@react-native-vector-icons/common 0.0.1-alpha.8 → 11.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/LICENSE +1 -2
  2. package/README.md +49 -91
  3. package/android/build.gradle +37 -3
  4. package/android/generated/java/com/reactnativevectoricons/common/NativeVectorIconsSpec.java +42 -0
  5. package/android/generated/jni/CMakeLists.txt +49 -0
  6. package/android/generated/jni/RNVectorIconsSpec-generated.cpp +38 -0
  7. package/android/generated/jni/RNVectorIconsSpec.h +31 -0
  8. package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/ComponentDescriptors.cpp +22 -0
  9. package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/ComponentDescriptors.h +24 -0
  10. package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/EventEmitters.cpp +16 -0
  11. package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/EventEmitters.h +17 -0
  12. package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/Props.cpp +19 -0
  13. package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/Props.h +18 -0
  14. package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/RNVectorIconsSpecJSI-generated.cpp +40 -0
  15. package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/RNVectorIconsSpecJSI.h +76 -0
  16. package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/ShadowNodes.cpp +17 -0
  17. package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/ShadowNodes.h +23 -0
  18. package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/States.cpp +16 -0
  19. package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/States.h +19 -0
  20. package/android/src/main/AndroidManifestNew.xml +1 -1
  21. package/android/src/main/java/com/reactnativevectoricons/common/VectorIconsModule.kt +90 -0
  22. package/android/src/main/java/com/reactnativevectoricons/common/VectorIconsPackage.kt +35 -0
  23. package/android/src/newarch/VectorIconsSpec.kt +7 -0
  24. package/android/src/oldarch/VectorIconsSpec.kt +38 -0
  25. package/ios/VectorIcons.h +13 -17
  26. package/ios/VectorIcons.mm +76 -92
  27. package/ios/generated/RNVectorIconsSpec/ComponentDescriptors.cpp +22 -0
  28. package/ios/generated/RNVectorIconsSpec/ComponentDescriptors.h +24 -0
  29. package/ios/generated/RNVectorIconsSpec/EventEmitters.cpp +16 -0
  30. package/ios/generated/RNVectorIconsSpec/EventEmitters.h +17 -0
  31. package/ios/generated/RNVectorIconsSpec/Props.cpp +19 -0
  32. package/ios/generated/RNVectorIconsSpec/Props.h +18 -0
  33. package/ios/generated/RNVectorIconsSpec/RCTComponentViewHelpers.h +18 -0
  34. package/ios/generated/RNVectorIconsSpec/RNVectorIconsSpec-generated.mm +36 -0
  35. package/ios/generated/RNVectorIconsSpec/RNVectorIconsSpec.h +58 -0
  36. package/ios/generated/RNVectorIconsSpec/ShadowNodes.cpp +17 -0
  37. package/ios/generated/RNVectorIconsSpec/ShadowNodes.h +23 -0
  38. package/ios/generated/RNVectorIconsSpec/States.cpp +16 -0
  39. package/ios/generated/RNVectorIconsSpec/States.h +19 -0
  40. package/ios/generated/RNVectorIconsSpecJSI-generated.cpp +40 -0
  41. package/ios/generated/RNVectorIconsSpecJSI.h +76 -0
  42. package/lib/commonjs/NativeVectorIcons.js.map +1 -1
  43. package/lib/commonjs/create-icon-set.js +49 -36
  44. package/lib/commonjs/create-icon-set.js.map +1 -1
  45. package/lib/commonjs/dynamicLoading/dynamic-font-loading.js +92 -0
  46. package/lib/commonjs/dynamicLoading/dynamic-font-loading.js.map +1 -0
  47. package/lib/commonjs/dynamicLoading/dynamic-font-loading.web.js +20 -0
  48. package/lib/commonjs/dynamicLoading/dynamic-font-loading.web.js.map +1 -0
  49. package/lib/commonjs/dynamicLoading/dynamic-loading-setting.js +50 -0
  50. package/lib/commonjs/dynamicLoading/dynamic-loading-setting.js.map +1 -0
  51. package/lib/commonjs/dynamicLoading/types.js +2 -0
  52. package/lib/commonjs/dynamicLoading/types.js.map +1 -0
  53. package/lib/commonjs/ensure-native-module-available.js +1 -1
  54. package/lib/commonjs/ensure-native-module-available.js.map +1 -1
  55. package/lib/commonjs/index.js +57 -1
  56. package/lib/commonjs/index.js.map +1 -1
  57. package/lib/commonjs/scripts/common.js +49 -0
  58. package/lib/commonjs/scripts/common.js.map +1 -0
  59. package/lib/commonjs/scripts/getFonts.js +6 -40
  60. package/lib/commonjs/scripts/getFonts.js.map +1 -1
  61. package/lib/commonjs/scripts/updatePlist.js +54 -0
  62. package/lib/commonjs/scripts/updatePlist.js.map +1 -0
  63. package/lib/module/NativeVectorIcons.js +2 -0
  64. package/lib/module/NativeVectorIcons.js.map +1 -1
  65. package/lib/module/NativeVectorIcons.web.js +2 -0
  66. package/lib/module/NativeVectorIcons.web.js.map +1 -1
  67. package/lib/module/create-icon-set.js +49 -34
  68. package/lib/module/create-icon-set.js.map +1 -1
  69. package/lib/module/create-icon-source-cache.js +2 -0
  70. package/lib/module/create-icon-source-cache.js.map +1 -1
  71. package/lib/module/dynamicLoading/dynamic-font-loading.js +85 -0
  72. package/lib/module/dynamicLoading/dynamic-font-loading.js.map +1 -0
  73. package/lib/module/dynamicLoading/dynamic-font-loading.web.js +16 -0
  74. package/lib/module/dynamicLoading/dynamic-font-loading.web.js.map +1 -0
  75. package/lib/module/dynamicLoading/dynamic-loading-setting.js +41 -0
  76. package/lib/module/dynamicLoading/dynamic-loading-setting.js.map +1 -0
  77. package/lib/module/dynamicLoading/types.js +2 -0
  78. package/lib/module/dynamicLoading/types.js.map +1 -0
  79. package/lib/module/ensure-native-module-available.js +2 -0
  80. package/lib/module/ensure-native-module-available.js.map +1 -1
  81. package/lib/module/index.js +33 -1
  82. package/lib/module/index.js.map +1 -1
  83. package/lib/module/scripts/common.js +43 -0
  84. package/lib/module/scripts/common.js.map +1 -0
  85. package/lib/module/scripts/getFonts.js +8 -39
  86. package/lib/module/scripts/getFonts.js.map +1 -1
  87. package/lib/module/scripts/updatePlist.js +51 -0
  88. package/lib/module/scripts/updatePlist.js.map +1 -0
  89. package/lib/typescript/commonjs/package.json +1 -0
  90. package/lib/typescript/commonjs/src/NativeVectorIcons.d.ts +8 -0
  91. package/lib/typescript/commonjs/src/NativeVectorIcons.d.ts.map +1 -0
  92. package/lib/typescript/commonjs/src/NativeVectorIcons.web.d.ts.map +1 -0
  93. package/lib/typescript/commonjs/src/create-icon-set.d.ts +36 -0
  94. package/lib/typescript/commonjs/src/create-icon-set.d.ts.map +1 -0
  95. package/lib/typescript/commonjs/src/create-icon-source-cache.d.ts.map +1 -0
  96. package/lib/typescript/commonjs/src/dynamicLoading/dynamic-font-loading.d.ts +3 -0
  97. package/lib/typescript/commonjs/src/dynamicLoading/dynamic-font-loading.d.ts.map +1 -0
  98. package/lib/typescript/commonjs/src/dynamicLoading/dynamic-font-loading.web.d.ts +6 -0
  99. package/lib/typescript/commonjs/src/dynamicLoading/dynamic-font-loading.web.d.ts.map +1 -0
  100. package/lib/typescript/commonjs/src/dynamicLoading/dynamic-loading-setting.d.ts +41 -0
  101. package/lib/typescript/commonjs/src/dynamicLoading/dynamic-loading-setting.d.ts.map +1 -0
  102. package/lib/typescript/commonjs/src/dynamicLoading/types.d.ts +9 -0
  103. package/lib/typescript/commonjs/src/dynamicLoading/types.d.ts.map +1 -0
  104. package/lib/typescript/commonjs/src/ensure-native-module-available.d.ts.map +1 -0
  105. package/lib/typescript/commonjs/src/index.d.ts +6 -0
  106. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/src/scripts/common.d.ts +2 -0
  108. package/lib/typescript/commonjs/src/scripts/common.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/src/scripts/getFonts.d.ts.map +1 -0
  110. package/lib/typescript/commonjs/src/scripts/updatePlist.d.ts +3 -0
  111. package/lib/typescript/commonjs/src/scripts/updatePlist.d.ts.map +1 -0
  112. package/lib/typescript/module/package.json +1 -0
  113. package/lib/typescript/module/src/NativeVectorIcons.d.ts +8 -0
  114. package/lib/typescript/module/src/NativeVectorIcons.d.ts.map +1 -0
  115. package/lib/typescript/module/src/NativeVectorIcons.web.d.ts +3 -0
  116. package/lib/typescript/module/src/NativeVectorIcons.web.d.ts.map +1 -0
  117. package/lib/typescript/module/src/create-icon-set.d.ts +36 -0
  118. package/lib/typescript/module/src/create-icon-set.d.ts.map +1 -0
  119. package/lib/typescript/module/src/create-icon-source-cache.d.ts +21 -0
  120. package/lib/typescript/module/src/create-icon-source-cache.d.ts.map +1 -0
  121. package/lib/typescript/module/src/dynamicLoading/dynamic-font-loading.d.ts +3 -0
  122. package/lib/typescript/module/src/dynamicLoading/dynamic-font-loading.d.ts.map +1 -0
  123. package/lib/typescript/module/src/dynamicLoading/dynamic-font-loading.web.d.ts +6 -0
  124. package/lib/typescript/module/src/dynamicLoading/dynamic-font-loading.web.d.ts.map +1 -0
  125. package/lib/typescript/module/src/dynamicLoading/dynamic-loading-setting.d.ts +41 -0
  126. package/lib/typescript/module/src/dynamicLoading/dynamic-loading-setting.d.ts.map +1 -0
  127. package/lib/typescript/module/src/dynamicLoading/types.d.ts +9 -0
  128. package/lib/typescript/module/src/dynamicLoading/types.d.ts.map +1 -0
  129. package/lib/typescript/module/src/ensure-native-module-available.d.ts +2 -0
  130. package/lib/typescript/module/src/ensure-native-module-available.d.ts.map +1 -0
  131. package/lib/typescript/module/src/index.d.ts +6 -0
  132. package/lib/typescript/module/src/index.d.ts.map +1 -0
  133. package/lib/typescript/module/src/scripts/common.d.ts +2 -0
  134. package/lib/typescript/module/src/scripts/common.d.ts.map +1 -0
  135. package/lib/typescript/module/src/scripts/getFonts.d.ts +3 -0
  136. package/lib/typescript/module/src/scripts/getFonts.d.ts.map +1 -0
  137. package/lib/typescript/module/src/scripts/updatePlist.d.ts +3 -0
  138. package/lib/typescript/module/src/scripts/updatePlist.d.ts.map +1 -0
  139. package/package.json +72 -44
  140. package/react-native-vector-icons.podspec +67 -42
  141. package/react-native.config.js +12 -0
  142. package/src/NativeVectorIcons.ts +2 -4
  143. package/src/create-icon-set.tsx +79 -32
  144. package/src/dynamicLoading/dynamic-font-loading.ts +97 -0
  145. package/src/dynamicLoading/dynamic-font-loading.web.ts +15 -0
  146. package/src/dynamicLoading/dynamic-loading-setting.ts +77 -0
  147. package/src/dynamicLoading/types.ts +10 -0
  148. package/src/index.ts +48 -1
  149. package/src/scripts/common.ts +52 -0
  150. package/src/scripts/getFonts.ts +6 -47
  151. package/src/scripts/updatePlist.ts +58 -0
  152. package/android/src/main/java/com/reactnativevectoricons/common/VectorIconsModule.java +0 -121
  153. package/android/src/main/java/com/reactnativevectoricons/common/VectorIconsPackage.java +0 -45
  154. package/android/src/newarch/VectorIconsSpec.java +0 -9
  155. package/android/src/oldarch/VectorIconsSpec.java +0 -18
  156. package/lib/typescript/src/NativeVectorIcons.d.ts +0 -9
  157. package/lib/typescript/src/NativeVectorIcons.d.ts.map +0 -1
  158. package/lib/typescript/src/NativeVectorIcons.web.d.ts.map +0 -1
  159. package/lib/typescript/src/create-icon-set.d.ts +0 -26
  160. package/lib/typescript/src/create-icon-set.d.ts.map +0 -1
  161. package/lib/typescript/src/create-icon-source-cache.d.ts.map +0 -1
  162. package/lib/typescript/src/ensure-native-module-available.d.ts.map +0 -1
  163. package/lib/typescript/src/index.d.ts +0 -3
  164. package/lib/typescript/src/index.d.ts.map +0 -1
  165. package/lib/typescript/src/scripts/getFonts.d.ts.map +0 -1
  166. /package/lib/typescript/{src → commonjs/src}/NativeVectorIcons.web.d.ts +0 -0
  167. /package/lib/typescript/{src → commonjs/src}/create-icon-source-cache.d.ts +0 -0
  168. /package/lib/typescript/{src → commonjs/src}/ensure-native-module-available.d.ts +0 -0
  169. /package/lib/typescript/{src → commonjs/src}/scripts/getFonts.d.ts +0 -0
@@ -0,0 +1,16 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateEventEmitterCpp.js
9
+ */
10
+
11
+ #include "EventEmitters.h"
12
+
13
+
14
+ namespace facebook::react {
15
+
16
+ } // namespace facebook::react
@@ -0,0 +1,17 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateEventEmitterH.js
9
+ */
10
+ #pragma once
11
+
12
+ #include <react/renderer/components/view/ViewEventEmitter.h>
13
+
14
+
15
+ namespace facebook::react {
16
+
17
+ } // namespace facebook::react
@@ -0,0 +1,19 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GeneratePropsCpp.js
9
+ */
10
+
11
+ #include "Props.h"
12
+ #include <react/renderer/core/PropsParserContext.h>
13
+ #include <react/renderer/core/propsConversions.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+
19
+ } // namespace facebook::react
@@ -0,0 +1,18 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GeneratePropsH.js
9
+ */
10
+ #pragma once
11
+
12
+
13
+
14
+ namespace facebook::react {
15
+
16
+
17
+
18
+ } // namespace facebook::react
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateComponentHObjCpp.js
8
+ */
9
+
10
+ #import <Foundation/Foundation.h>
11
+ #import <React/RCTDefines.h>
12
+ #import <React/RCTLog.h>
13
+
14
+ NS_ASSUME_NONNULL_BEGIN
15
+
16
+
17
+
18
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,36 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #import "RNVectorIconsSpec.h"
15
+
16
+
17
+ namespace facebook::react {
18
+
19
+ static facebook::jsi::Value __hostFunction_NativeVectorIconsSpecJSI_getImageForFont(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
20
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getImageForFont", @selector(getImageForFont:glyph:fontSize:color:resolve:reject:), args, count);
21
+ }
22
+
23
+ static facebook::jsi::Value __hostFunction_NativeVectorIconsSpecJSI_getImageForFontSync(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
24
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "getImageForFontSync", @selector(getImageForFontSync:glyph:fontSize:color:), args, count);
25
+ }
26
+
27
+ NativeVectorIconsSpecJSI::NativeVectorIconsSpecJSI(const ObjCTurboModule::InitParams &params)
28
+ : ObjCTurboModule(params) {
29
+
30
+ methodMap_["getImageForFont"] = MethodMetadata {4, __hostFunction_NativeVectorIconsSpecJSI_getImageForFont};
31
+
32
+
33
+ methodMap_["getImageForFontSync"] = MethodMetadata {4, __hostFunction_NativeVectorIconsSpecJSI_getImageForFontSync};
34
+
35
+ }
36
+ } // namespace facebook::react
@@ -0,0 +1,58 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #ifndef __cplusplus
15
+ #error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
16
+ #endif
17
+
18
+ // Avoid multiple includes of RNVectorIconsSpec symbols
19
+ #ifndef RNVectorIconsSpec_H
20
+ #define RNVectorIconsSpec_H
21
+
22
+ #import <Foundation/Foundation.h>
23
+ #import <RCTRequired/RCTRequired.h>
24
+ #import <RCTTypeSafety/RCTConvertHelpers.h>
25
+ #import <RCTTypeSafety/RCTTypedModuleConstants.h>
26
+ #import <React/RCTBridgeModule.h>
27
+ #import <React/RCTCxxConvert.h>
28
+ #import <React/RCTManagedPointer.h>
29
+ #import <ReactCommon/RCTTurboModule.h>
30
+ #import <optional>
31
+ #import <vector>
32
+
33
+
34
+ @protocol NativeVectorIconsSpec <RCTBridgeModule, RCTTurboModule>
35
+
36
+ - (void)getImageForFont:(NSString *)fontFamilyName
37
+ glyph:(NSString *)glyph
38
+ fontSize:(double)fontSize
39
+ color:(double)color
40
+ resolve:(RCTPromiseResolveBlock)resolve
41
+ reject:(RCTPromiseRejectBlock)reject;
42
+ - (NSString *)getImageForFontSync:(NSString *)fontFamilyName
43
+ glyph:(NSString *)glyph
44
+ fontSize:(double)fontSize
45
+ color:(double)color;
46
+
47
+ @end
48
+ namespace facebook::react {
49
+ /**
50
+ * ObjC++ class for module 'NativeVectorIcons'
51
+ */
52
+ class JSI_EXPORT NativeVectorIconsSpecJSI : public ObjCTurboModule {
53
+ public:
54
+ NativeVectorIconsSpecJSI(const ObjCTurboModule::InitParams &params);
55
+ };
56
+ } // namespace facebook::react
57
+
58
+ #endif // RNVectorIconsSpec_H
@@ -0,0 +1,17 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateShadowNodeCpp.js
9
+ */
10
+
11
+ #include "ShadowNodes.h"
12
+
13
+ namespace facebook::react {
14
+
15
+
16
+
17
+ } // namespace facebook::react
@@ -0,0 +1,23 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateShadowNodeH.js
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include "EventEmitters.h"
14
+ #include "Props.h"
15
+ #include "States.h"
16
+ #include <react/renderer/components/view/ConcreteViewShadowNode.h>
17
+ #include <jsi/jsi.h>
18
+
19
+ namespace facebook::react {
20
+
21
+
22
+
23
+ } // namespace facebook::react
@@ -0,0 +1,16 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateStateCpp.js
9
+ */
10
+ #include "States.h"
11
+
12
+ namespace facebook::react {
13
+
14
+
15
+
16
+ } // namespace facebook::react
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateStateH.js
8
+ */
9
+ #pragma once
10
+
11
+ #ifdef ANDROID
12
+ #include <folly/dynamic.h>
13
+ #endif
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+
19
+ } // namespace facebook::react
@@ -0,0 +1,40 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleCpp.js
8
+ */
9
+
10
+ #include "RNVectorIconsSpecJSI.h"
11
+
12
+ namespace facebook::react {
13
+
14
+ static jsi::Value __hostFunction_NativeVectorIconsCxxSpecJSI_getImageForFont(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
+ return static_cast<NativeVectorIconsCxxSpecJSI *>(&turboModule)->getImageForFont(
16
+ rt,
17
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
18
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
19
+ count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber(),
20
+ count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asNumber()
21
+ );
22
+ }
23
+ static jsi::Value __hostFunction_NativeVectorIconsCxxSpecJSI_getImageForFontSync(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
24
+ return static_cast<NativeVectorIconsCxxSpecJSI *>(&turboModule)->getImageForFontSync(
25
+ rt,
26
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
27
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
28
+ count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber(),
29
+ count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asNumber()
30
+ );
31
+ }
32
+
33
+ NativeVectorIconsCxxSpecJSI::NativeVectorIconsCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
34
+ : TurboModule("VectorIcons", jsInvoker) {
35
+ methodMap_["getImageForFont"] = MethodMetadata {4, __hostFunction_NativeVectorIconsCxxSpecJSI_getImageForFont};
36
+ methodMap_["getImageForFontSync"] = MethodMetadata {4, __hostFunction_NativeVectorIconsCxxSpecJSI_getImageForFontSync};
37
+ }
38
+
39
+
40
+ } // namespace facebook::react
@@ -0,0 +1,76 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleH.js
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include <ReactCommon/TurboModule.h>
13
+ #include <react/bridging/Bridging.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+ class JSI_EXPORT NativeVectorIconsCxxSpecJSI : public TurboModule {
19
+ protected:
20
+ NativeVectorIconsCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
21
+
22
+ public:
23
+ virtual jsi::Value getImageForFont(jsi::Runtime &rt, jsi::String fontFamilyName, jsi::String glyph, double fontSize, double color) = 0;
24
+ virtual jsi::String getImageForFontSync(jsi::Runtime &rt, jsi::String fontFamilyName, jsi::String glyph, double fontSize, double color) = 0;
25
+
26
+ };
27
+
28
+ template <typename T>
29
+ class JSI_EXPORT NativeVectorIconsCxxSpec : public TurboModule {
30
+ public:
31
+ jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
32
+ return delegate_.get(rt, propName);
33
+ }
34
+
35
+ static constexpr std::string_view kModuleName = "VectorIcons";
36
+
37
+ protected:
38
+ NativeVectorIconsCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
39
+ : TurboModule(std::string{NativeVectorIconsCxxSpec::kModuleName}, jsInvoker),
40
+ delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
41
+
42
+
43
+ private:
44
+ class Delegate : public NativeVectorIconsCxxSpecJSI {
45
+ public:
46
+ Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
47
+ NativeVectorIconsCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
48
+
49
+ }
50
+
51
+ jsi::Value getImageForFont(jsi::Runtime &rt, jsi::String fontFamilyName, jsi::String glyph, double fontSize, double color) override {
52
+ static_assert(
53
+ bridging::getParameterCount(&T::getImageForFont) == 5,
54
+ "Expected getImageForFont(...) to have 5 parameters");
55
+
56
+ return bridging::callFromJs<jsi::Value>(
57
+ rt, &T::getImageForFont, jsInvoker_, instance_, std::move(fontFamilyName), std::move(glyph), std::move(fontSize), std::move(color));
58
+ }
59
+ jsi::String getImageForFontSync(jsi::Runtime &rt, jsi::String fontFamilyName, jsi::String glyph, double fontSize, double color) override {
60
+ static_assert(
61
+ bridging::getParameterCount(&T::getImageForFontSync) == 5,
62
+ "Expected getImageForFontSync(...) to have 5 parameters");
63
+
64
+ return bridging::callFromJs<jsi::String>(
65
+ rt, &T::getImageForFontSync, jsInvoker_, instance_, std::move(fontFamilyName), std::move(glyph), std::move(fontSize), std::move(color));
66
+ }
67
+
68
+ private:
69
+ friend class NativeVectorIconsCxxSpec;
70
+ T *instance_;
71
+ };
72
+
73
+ Delegate delegate_;
74
+ };
75
+
76
+ } // namespace facebook::react
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeVectorIcons.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAUpCC,gCAAmB,CAACC,YAAY,CAAO,aAAa,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeVectorIcons.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAQpCC,gCAAmB,CAACC,YAAY,CAAO,aAAa,CAAC","ignoreList":[]}
@@ -3,26 +3,37 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createIconSet = exports.DEFAULT_ICON_SIZE = exports.DEFAULT_ICON_COLOR = void 0;
6
+ exports.DEFAULT_ICON_SIZE = exports.DEFAULT_ICON_COLOR = void 0;
7
+ exports.createIconSet = createIconSet;
7
8
  var _react = _interopRequireWildcard(require("react"));
8
9
  var _reactNative = require("react-native");
9
10
  var _NativeVectorIcons = _interopRequireDefault(require("./NativeVectorIcons"));
10
- var _createIconSourceCache = _interopRequireDefault(require("./create-icon-source-cache"));
11
- var _ensureNativeModuleAvailable = _interopRequireDefault(require("./ensure-native-module-available"));
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ var _createIconSourceCache = _interopRequireDefault(require("./create-icon-source-cache.js"));
12
+ var _dynamicFontLoading = require("./dynamicLoading/dynamic-font-loading");
13
+ var _dynamicLoadingSetting = require("./dynamicLoading/dynamic-loading-setting.js");
14
+ var _ensureNativeModuleAvailable = _interopRequireDefault(require("./ensure-native-module-available.js"));
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
19
  const DEFAULT_ICON_SIZE = exports.DEFAULT_ICON_SIZE = 12;
17
20
  const DEFAULT_ICON_COLOR = exports.DEFAULT_ICON_COLOR = 'black';
18
- const createIconSet = (glyphMap, fontFamily, fontFile, fontStyle) => {
19
- // Android doesn't care about actual fontFamily name, it will only look in fonts folder.
20
- const fontBasename = fontFile ? fontFile.replace(/\.(otf|ttf)$/, '') : fontFamily;
21
+ function createIconSet(glyphMap, postScriptNameOrOptions, fontFileNameParam, fontStyleParam) {
22
+ const {
23
+ postScriptName,
24
+ fontFileName,
25
+ fontStyle
26
+ } = typeof postScriptNameOrOptions === 'string' ? {
27
+ postScriptName: postScriptNameOrOptions,
28
+ fontFileName: fontFileNameParam,
29
+ fontStyle: fontStyleParam
30
+ } : postScriptNameOrOptions;
31
+ const fontBasename = fontFileName ? fontFileName.replace(/\.(otf|ttf)$/, '') : postScriptName;
21
32
  const fontReference = _reactNative.Platform.select({
22
- windows: `/Assets/${fontFile}#${fontFamily}`,
33
+ windows: `/Assets/${fontFileName}#${postScriptName}`,
23
34
  android: fontBasename,
24
35
  web: fontBasename,
25
- default: fontFamily
36
+ default: postScriptName
26
37
  });
27
38
  const resolveGlyph = name => {
28
39
  const glyph = glyphMap[name] || '?';
@@ -34,14 +45,30 @@ const createIconSet = (glyphMap, fontFamily, fontFile, fontStyle) => {
34
45
  const Icon = ({
35
46
  name,
36
47
  size = DEFAULT_ICON_SIZE,
37
- color,
48
+ color = DEFAULT_ICON_COLOR,
38
49
  style,
39
50
  children,
40
51
  allowFontScaling = false,
41
52
  innerRef,
42
53
  ...props
43
54
  }) => {
44
- const glyph = name ? resolveGlyph(name) : '';
55
+ const [isFontLoaded, setIsFontLoaded] = _react.default.useState((0, _dynamicLoadingSetting.isDynamicLoadingEnabled)() ? _dynamicFontLoading.dynamicLoader.isLoaded(fontReference) : true);
56
+ const glyph = isFontLoaded && name ? resolveGlyph(name) : '';
57
+
58
+ // biome-ignore lint/correctness/useExhaustiveDependencies: the dependencies never change
59
+ (0, _react.useEffect)(() => {
60
+ let isMounted = true;
61
+ if (!isFontLoaded && typeof postScriptNameOrOptions === 'object' && typeof postScriptNameOrOptions.fontSource !== 'undefined') {
62
+ _dynamicFontLoading.dynamicLoader.loadFontAsync(fontReference, postScriptNameOrOptions.fontSource).finally(() => {
63
+ if (isMounted) {
64
+ setIsFontLoaded(true);
65
+ }
66
+ });
67
+ }
68
+ return () => {
69
+ isMounted = false;
70
+ };
71
+ }, []);
45
72
  const styleDefaults = {
46
73
  fontSize: size,
47
74
  color
@@ -56,14 +83,17 @@ const createIconSet = (glyphMap, fontFamily, fontFile, fontStyle) => {
56
83
  style: [styleDefaults, style, styleOverrides, fontStyle || {}],
57
84
  allowFontScaling
58
85
  };
59
- return /*#__PURE__*/_react.default.createElement(_reactNative.Text, _extends({
86
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
60
87
  ref: innerRef,
61
- selectable: false
62
- }, newProps), glyph, children);
88
+ selectable: false,
89
+ ...newProps,
90
+ children: [glyph, children]
91
+ });
63
92
  };
64
- const WrappedIcon = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => /*#__PURE__*/_react.default.createElement(Icon, _extends({
65
- innerRef: ref
66
- }, props)));
93
+ const WrappedIcon = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
94
+ innerRef: ref,
95
+ ...props
96
+ }));
67
97
  WrappedIcon.displayName = 'Icon';
68
98
  const imageSourceCache = (0, _createIconSourceCache.default)();
69
99
  const getImageSourceSync = (name, size = DEFAULT_ICON_SIZE, color = DEFAULT_ICON_COLOR) => {
@@ -112,27 +142,10 @@ const createIconSet = (glyphMap, fontFamily, fontFile, fontStyle) => {
112
142
  throw error;
113
143
  }
114
144
  };
115
- const loadFont = async () => {
116
- if (_reactNative.Platform.OS !== 'ios') {
117
- return;
118
- }
119
- (0, _ensureNativeModuleAvailable.default)();
120
- const [filename, extension] = fontFile.split('.'); // FIXME: what if filename has two dots?
121
- if (!filename) {
122
- // NOTE: Thie is impossible but TypeScript doesn't know that
123
- throw new Error('Font needs a filename.');
124
- }
125
- if (!extension) {
126
- throw new Error('Font needs a filename extensison.');
127
- }
128
- await _NativeVectorIcons.default.loadFontWithFileName(filename, extension, 'react-native-vector-icons');
129
- };
130
- loadFont();
131
145
  const IconNamespace = Object.assign(WrappedIcon, {
132
146
  getImageSource,
133
147
  getImageSourceSync
134
148
  });
135
149
  return IconNamespace;
136
- };
137
- exports.createIconSet = createIconSet;
150
+ }
138
151
  //# sourceMappingURL=create-icon-set.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_NativeVectorIcons","_interopRequireDefault","_createIconSourceCache","_ensureNativeModuleAvailable","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","prototype","apply","DEFAULT_ICON_SIZE","exports","DEFAULT_ICON_COLOR","createIconSet","glyphMap","fontFamily","fontFile","fontStyle","fontBasename","replace","fontReference","Platform","select","windows","android","web","resolveGlyph","name","glyph","String","fromCodePoint","Icon","size","color","style","children","allowFontScaling","innerRef","props","styleDefaults","fontSize","styleOverrides","fontWeight","newProps","createElement","Text","ref","selectable","WrappedIcon","forwardRef","displayName","imageSourceCache","createIconSourceCache","getImageSourceSync","ensureNativeModuleAvailable","processedColor","processColor","cacheKey","imagePath","NativeIconAPI","getImageForFontSync","value","uri","scale","PixelRatio","setValue","error","setError","getImageSource","getImageForFont","loadFont","OS","filename","extension","split","Error","loadFontWithFileName","IconNamespace"],"sourceRoot":"../../src","sources":["create-icon-set.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,4BAAA,GAAAF,sBAAA,CAAAH,OAAA;AAA2E,SAAAG,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAX,wBAAAW,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAH,UAAA,SAAAG,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAF,OAAA,EAAAE,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAJ,CAAA,UAAAG,CAAA,CAAAE,GAAA,CAAAL,CAAA,OAAAM,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAZ,CAAA,oBAAAY,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAd,CAAA,EAAAY,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAX,CAAA,EAAAY,CAAA,UAAAG,CAAA,KAA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AACJ,QAAQ,EAAEC,SAAS,EAAE,2BAA2B,CAAC;EAC5F,CAAC;EAEDH,QAAQ,CAAC,CAAC;EAEV,MAAMO,aAAa,GAAGrF,MAAM,CAACS,MAAM,CAAC+C,WAAW,EAAE;IAC/CoB,cAAc;IACdf;EACF,CAAC,CAAC;EAEF,OAAOwB,aAAa;AACtB,CAAC;AAAClE,OAAA,CAAAE,aAAA,GAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_NativeVectorIcons","_interopRequireDefault","_createIconSourceCache","_dynamicFontLoading","_dynamicLoadingSetting","_ensureNativeModuleAvailable","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DEFAULT_ICON_SIZE","exports","DEFAULT_ICON_COLOR","createIconSet","glyphMap","postScriptNameOrOptions","fontFileNameParam","fontStyleParam","postScriptName","fontFileName","fontStyle","fontBasename","replace","fontReference","Platform","select","windows","android","web","resolveGlyph","name","glyph","String","fromCodePoint","Icon","size","color","style","children","allowFontScaling","innerRef","props","isFontLoaded","setIsFontLoaded","React","useState","isDynamicLoadingEnabled","dynamicLoader","isLoaded","useEffect","isMounted","fontSource","loadFontAsync","finally","styleDefaults","fontSize","styleOverrides","fontFamily","fontWeight","newProps","jsxs","Text","ref","selectable","WrappedIcon","forwardRef","jsx","displayName","imageSourceCache","createIconSourceCache","getImageSourceSync","ensureNativeModuleAvailable","processedColor","processColor","cacheKey","imagePath","NativeIconAPI","getImageForFontSync","value","uri","scale","PixelRatio","setValue","error","setError","getImageSource","getImageForFont","IconNamespace","assign"],"sourceRoot":"../../src","sources":["create-icon-set.tsx"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAC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