@react-native-vector-icons/common 0.0.1-alpha.2 → 0.0.1-alpha.22

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 (172) hide show
  1. package/LICENSE +1 -2
  2. package/README.md +268 -0
  3. package/android/build.gradle +40 -6
  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/NativeVectorIcons.web.js.map +1 -1
  44. package/lib/commonjs/create-icon-set.js +52 -35
  45. package/lib/commonjs/create-icon-set.js.map +1 -1
  46. package/lib/commonjs/create-icon-source-cache.js.map +1 -1
  47. package/lib/commonjs/dynamicLoading/dynamic-font-loading.js +92 -0
  48. package/lib/commonjs/dynamicLoading/dynamic-font-loading.js.map +1 -0
  49. package/lib/commonjs/dynamicLoading/dynamic-font-loading.web.js +20 -0
  50. package/lib/commonjs/dynamicLoading/dynamic-font-loading.web.js.map +1 -0
  51. package/lib/commonjs/dynamicLoading/dynamic-loading-setting.js +50 -0
  52. package/lib/commonjs/dynamicLoading/dynamic-loading-setting.js.map +1 -0
  53. package/lib/commonjs/dynamicLoading/types.js +2 -0
  54. package/lib/commonjs/dynamicLoading/types.js.map +1 -0
  55. package/lib/commonjs/ensure-native-module-available.js +1 -1
  56. package/lib/commonjs/ensure-native-module-available.js.map +1 -1
  57. package/lib/commonjs/index.js +57 -1
  58. package/lib/commonjs/index.js.map +1 -1
  59. package/lib/commonjs/scripts/common.js +49 -0
  60. package/lib/commonjs/scripts/common.js.map +1 -0
  61. package/lib/commonjs/scripts/getFonts.js +6 -40
  62. package/lib/commonjs/scripts/getFonts.js.map +1 -1
  63. package/lib/commonjs/scripts/updatePlist.js +54 -0
  64. package/lib/commonjs/scripts/updatePlist.js.map +1 -0
  65. package/lib/module/NativeVectorIcons.js +2 -0
  66. package/lib/module/NativeVectorIcons.js.map +1 -1
  67. package/lib/module/NativeVectorIcons.web.js +2 -0
  68. package/lib/module/NativeVectorIcons.web.js.map +1 -1
  69. package/lib/module/create-icon-set.js +52 -33
  70. package/lib/module/create-icon-set.js.map +1 -1
  71. package/lib/module/create-icon-source-cache.js +2 -0
  72. package/lib/module/create-icon-source-cache.js.map +1 -1
  73. package/lib/module/dynamicLoading/dynamic-font-loading.js +85 -0
  74. package/lib/module/dynamicLoading/dynamic-font-loading.js.map +1 -0
  75. package/lib/module/dynamicLoading/dynamic-font-loading.web.js +16 -0
  76. package/lib/module/dynamicLoading/dynamic-font-loading.web.js.map +1 -0
  77. package/lib/module/dynamicLoading/dynamic-loading-setting.js +41 -0
  78. package/lib/module/dynamicLoading/dynamic-loading-setting.js.map +1 -0
  79. package/lib/module/dynamicLoading/types.js +2 -0
  80. package/lib/module/dynamicLoading/types.js.map +1 -0
  81. package/lib/module/ensure-native-module-available.js +2 -0
  82. package/lib/module/ensure-native-module-available.js.map +1 -1
  83. package/lib/module/index.js +33 -1
  84. package/lib/module/index.js.map +1 -1
  85. package/lib/module/scripts/common.js +43 -0
  86. package/lib/module/scripts/common.js.map +1 -0
  87. package/lib/module/scripts/getFonts.js +8 -39
  88. package/lib/module/scripts/getFonts.js.map +1 -1
  89. package/lib/module/scripts/updatePlist.js +51 -0
  90. package/lib/module/scripts/updatePlist.js.map +1 -0
  91. package/lib/typescript/commonjs/package.json +1 -0
  92. package/lib/typescript/commonjs/src/NativeVectorIcons.d.ts +8 -0
  93. package/lib/typescript/commonjs/src/NativeVectorIcons.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/src/NativeVectorIcons.web.d.ts.map +1 -0
  95. package/lib/typescript/commonjs/src/create-icon-set.d.ts +36 -0
  96. package/lib/typescript/commonjs/src/create-icon-set.d.ts.map +1 -0
  97. package/lib/typescript/commonjs/src/create-icon-source-cache.d.ts.map +1 -0
  98. package/lib/typescript/commonjs/src/dynamicLoading/dynamic-font-loading.d.ts +3 -0
  99. package/lib/typescript/commonjs/src/dynamicLoading/dynamic-font-loading.d.ts.map +1 -0
  100. package/lib/typescript/commonjs/src/dynamicLoading/dynamic-font-loading.web.d.ts +6 -0
  101. package/lib/typescript/commonjs/src/dynamicLoading/dynamic-font-loading.web.d.ts.map +1 -0
  102. package/lib/typescript/commonjs/src/dynamicLoading/dynamic-loading-setting.d.ts +41 -0
  103. package/lib/typescript/commonjs/src/dynamicLoading/dynamic-loading-setting.d.ts.map +1 -0
  104. package/lib/typescript/commonjs/src/dynamicLoading/types.d.ts +9 -0
  105. package/lib/typescript/commonjs/src/dynamicLoading/types.d.ts.map +1 -0
  106. package/lib/typescript/commonjs/src/ensure-native-module-available.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/src/index.d.ts +6 -0
  108. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/src/scripts/common.d.ts +2 -0
  110. package/lib/typescript/commonjs/src/scripts/common.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/src/scripts/getFonts.d.ts.map +1 -0
  112. package/lib/typescript/commonjs/src/scripts/updatePlist.d.ts +3 -0
  113. package/lib/typescript/commonjs/src/scripts/updatePlist.d.ts.map +1 -0
  114. package/lib/typescript/module/package.json +1 -0
  115. package/lib/typescript/module/src/NativeVectorIcons.d.ts +8 -0
  116. package/lib/typescript/module/src/NativeVectorIcons.d.ts.map +1 -0
  117. package/lib/typescript/module/src/NativeVectorIcons.web.d.ts +3 -0
  118. package/lib/typescript/module/src/NativeVectorIcons.web.d.ts.map +1 -0
  119. package/lib/typescript/module/src/create-icon-set.d.ts +36 -0
  120. package/lib/typescript/module/src/create-icon-set.d.ts.map +1 -0
  121. package/lib/typescript/module/src/create-icon-source-cache.d.ts +21 -0
  122. package/lib/typescript/module/src/create-icon-source-cache.d.ts.map +1 -0
  123. package/lib/typescript/module/src/dynamicLoading/dynamic-font-loading.d.ts +3 -0
  124. package/lib/typescript/module/src/dynamicLoading/dynamic-font-loading.d.ts.map +1 -0
  125. package/lib/typescript/module/src/dynamicLoading/dynamic-font-loading.web.d.ts +6 -0
  126. package/lib/typescript/module/src/dynamicLoading/dynamic-font-loading.web.d.ts.map +1 -0
  127. package/lib/typescript/module/src/dynamicLoading/dynamic-loading-setting.d.ts +41 -0
  128. package/lib/typescript/module/src/dynamicLoading/dynamic-loading-setting.d.ts.map +1 -0
  129. package/lib/typescript/module/src/dynamicLoading/types.d.ts +9 -0
  130. package/lib/typescript/module/src/dynamicLoading/types.d.ts.map +1 -0
  131. package/lib/typescript/module/src/ensure-native-module-available.d.ts +2 -0
  132. package/lib/typescript/module/src/ensure-native-module-available.d.ts.map +1 -0
  133. package/lib/typescript/module/src/index.d.ts +6 -0
  134. package/lib/typescript/module/src/index.d.ts.map +1 -0
  135. package/lib/typescript/module/src/scripts/common.d.ts +2 -0
  136. package/lib/typescript/module/src/scripts/common.d.ts.map +1 -0
  137. package/lib/typescript/module/src/scripts/getFonts.d.ts +3 -0
  138. package/lib/typescript/module/src/scripts/getFonts.d.ts.map +1 -0
  139. package/lib/typescript/module/src/scripts/updatePlist.d.ts +3 -0
  140. package/lib/typescript/module/src/scripts/updatePlist.d.ts.map +1 -0
  141. package/package.json +72 -81
  142. package/react-native-vector-icons.podspec +79 -35
  143. package/src/NativeVectorIcons.ts +2 -14
  144. package/src/create-icon-set.tsx +97 -54
  145. package/src/create-icon-source-cache.ts +3 -7
  146. package/src/dynamicLoading/dynamic-font-loading.ts +97 -0
  147. package/src/dynamicLoading/dynamic-font-loading.web.ts +15 -0
  148. package/src/dynamicLoading/dynamic-loading-setting.ts +77 -0
  149. package/src/dynamicLoading/types.ts +10 -0
  150. package/src/ensure-native-module-available.ts +1 -1
  151. package/src/index.ts +48 -1
  152. package/src/scripts/common.ts +52 -0
  153. package/src/scripts/getFonts.ts +6 -47
  154. package/src/scripts/updatePlist.ts +58 -0
  155. package/android/src/main/java/com/reactnativevectoricons/common/VectorIconsModule.java +0 -121
  156. package/android/src/main/java/com/reactnativevectoricons/common/VectorIconsPackage.java +0 -45
  157. package/android/src/newarch/VectorIconsSpec.java +0 -9
  158. package/android/src/oldarch/VectorIconsSpec.java +0 -18
  159. package/lib/typescript/src/NativeVectorIcons.d.ts +0 -9
  160. package/lib/typescript/src/NativeVectorIcons.d.ts.map +0 -1
  161. package/lib/typescript/src/NativeVectorIcons.web.d.ts.map +0 -1
  162. package/lib/typescript/src/create-icon-set.d.ts +0 -26
  163. package/lib/typescript/src/create-icon-set.d.ts.map +0 -1
  164. package/lib/typescript/src/create-icon-source-cache.d.ts.map +0 -1
  165. package/lib/typescript/src/ensure-native-module-available.d.ts.map +0 -1
  166. package/lib/typescript/src/index.d.ts +0 -3
  167. package/lib/typescript/src/index.d.ts.map +0 -1
  168. package/lib/typescript/src/scripts/getFonts.d.ts.map +0 -1
  169. /package/lib/typescript/{src → commonjs/src}/NativeVectorIcons.web.d.ts +0 -0
  170. /package/lib/typescript/{src → commonjs/src}/create-icon-source-cache.d.ts +0 -0
  171. /package/lib/typescript/{src → commonjs/src}/ensure-native-module-available.d.ts +0 -0
  172. /package/lib/typescript/{src → commonjs/src}/scripts/getFonts.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACzF,YAAY,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,0CAA0C,CAAC;AA4BlD,wBAAgB,eAAe,CAC7B,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAElH"}
@@ -0,0 +1,2 @@
1
+ export declare const getFontPaths: (packageJsonFilename: string) => string[];
2
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/common.ts"],"names":[],"mappings":"AA6CA,eAAO,MAAM,YAAY,wBAAyB,MAAM,aAMvD,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFonts.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/getFonts.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=updatePlist.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updatePlist.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/updatePlist.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,8 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export interface Spec extends TurboModule {
3
+ getImageForFont(fontFamilyName: string, glyph: string, fontSize: number, color: number): Promise<string>;
4
+ getImageForFontSync(fontFamilyName: string, glyph: string, fontSize: number, color: number): string;
5
+ }
6
+ declare const _default: Spec;
7
+ export default _default;
8
+ //# sourceMappingURL=NativeVectorIcons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeVectorIcons.d.ts","sourceRoot":"","sources":["../../../../src/NativeVectorIcons.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,eAAe,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEzG,mBAAmB,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CACrG;;AAED,wBAAqE"}
@@ -0,0 +1,3 @@
1
+ declare const _default: {};
2
+ export default _default;
3
+ //# sourceMappingURL=NativeVectorIcons.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeVectorIcons.web.d.ts","sourceRoot":"","sources":["../../../../src/NativeVectorIcons.web.ts"],"names":[],"mappings":";AAAA,wBAAkB"}
@@ -0,0 +1,36 @@
1
+ import React, { type Ref } from 'react';
2
+ import { Text, type TextProps, type TextStyle } from 'react-native';
3
+ import type { FontSource } from './dynamicLoading/types';
4
+ export declare const DEFAULT_ICON_SIZE = 12;
5
+ export declare const DEFAULT_ICON_COLOR = "black";
6
+ type ValueData = {
7
+ uri: string;
8
+ scale: number;
9
+ };
10
+ type GetImageSourceSyncIconFunc<GM> = (name: GM, size?: number, color?: TextStyle['color']) => ValueData | undefined;
11
+ type GetImageSourceIconFunc<GM> = (name: GM, size?: number, color?: TextStyle['color']) => Promise<ValueData | undefined>;
12
+ export type IconProps<T> = TextProps & {
13
+ name: T;
14
+ size?: number;
15
+ color?: TextStyle['color'];
16
+ innerRef?: Ref<Text>;
17
+ };
18
+ type IconComponent<GM extends Record<string, number>> = React.FC<TextProps & {
19
+ name: keyof GM;
20
+ size?: number;
21
+ color?: TextStyle['color'];
22
+ innerRef?: Ref<Text>;
23
+ } & React.RefAttributes<Text>> & {
24
+ getImageSource: GetImageSourceIconFunc<keyof GM>;
25
+ getImageSourceSync: GetImageSourceSyncIconFunc<keyof GM>;
26
+ };
27
+ export type CreateIconSetOptions = {
28
+ postScriptName: string;
29
+ fontFileName: string;
30
+ fontSource?: FontSource;
31
+ fontStyle?: TextProps['style'];
32
+ };
33
+ export declare function createIconSet<GM extends Record<string, number>>(glyphMap: GM, postScriptName: string, fontFileName: string, fontStyle?: TextProps['style']): IconComponent<GM>;
34
+ export declare function createIconSet<GM extends Record<string, number>>(glyphMap: GM, options: CreateIconSetOptions): IconComponent<GM>;
35
+ export {};
36
+ //# sourceMappingURL=create-icon-set.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-icon-set.d.ts","sourceRoot":"","sources":["../../../../src/create-icon-set.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,KAAK,GAAG,EAAa,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAwB,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAgB,MAAM,cAAc,CAAC;AAMxG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C,KAAK,SAAS,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAChD,KAAK,0BAA0B,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,KAAK,SAAS,GAAG,SAAS,CAAC;AACrH,KAAK,sBAAsB,CAAC,EAAE,IAAI,CAChC,IAAI,EAAE,EAAE,EACR,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,KACvB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;AAEpC,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,SAAS,GAAG;IACrC,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;CACtB,CAAC;AAEF,KAAK,aAAa,CAAC,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,CAC9D,SAAS,GAAG;IACV,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;CACtB,GAAG,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAC9B,GAAG;IACF,cAAc,EAAE,sBAAsB,CAAC,MAAM,EAAE,CAAC,CAAC;IACjD,kBAAkB,EAAE,0BAA0B,CAAC,MAAM,EAAE,CAAC,CAAC;CAC1D,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAChC,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7D,QAAQ,EAAE,EAAE,EACZ,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,GAC7B,aAAa,CAAC,EAAE,CAAC,CAAC;AACrB,wBAAgB,aAAa,CAAC,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7D,QAAQ,EAAE,EAAE,EACZ,OAAO,EAAE,oBAAoB,GAC5B,aAAa,CAAC,EAAE,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ declare const TYPE_VALUE = "value";
2
+ declare const TYPE_ERROR = "error";
3
+ type ValueData = {
4
+ uri: string;
5
+ scale: number;
6
+ };
7
+ type Value = {
8
+ type: typeof TYPE_VALUE;
9
+ data: ValueData;
10
+ } | {
11
+ type: typeof TYPE_ERROR;
12
+ data: Error;
13
+ };
14
+ export default function createIconSourceCache(): {
15
+ setValue: (key: string, value: ValueData) => Map<string, Value>;
16
+ setError: (key: string, error: Error) => Map<string, Value>;
17
+ has: (key: string) => boolean;
18
+ get: (key: string) => ValueData | undefined;
19
+ };
20
+ export {};
21
+ //# sourceMappingURL=create-icon-source-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-icon-source-cache.d.ts","sourceRoot":"","sources":["../../../../src/create-icon-source-cache.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,UAAU,UAAU,CAAC;AAC3B,QAAA,MAAM,UAAU,UAAU,CAAC;AAE3B,KAAK,SAAS,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhD,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,OAAO,UAAU,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,OAAO,UAAU,CAAC;IAAC,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC;AAErG,MAAM,CAAC,OAAO,UAAU,qBAAqB;oBAGpB,MAAM,SAAS,SAAS;oBAExB,MAAM,SAAS,KAAK;eAEzB,MAAM;eAEN,MAAM;EAczB"}
@@ -0,0 +1,3 @@
1
+ import type { DynamicLoader } from './types';
2
+ export declare const dynamicLoader: DynamicLoader;
3
+ //# sourceMappingURL=dynamic-font-loading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-font-loading.d.ts","sourceRoot":"","sources":["../../../../../src/dynamicLoading/dynamic-font-loading.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,SAAS,CAAC;AAkFzD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * dynamic font loading isn't supported on web
3
+ * */
4
+ import type { DynamicLoader } from './types';
5
+ export declare const dynamicLoader: DynamicLoader;
6
+ //# sourceMappingURL=dynamic-font-loading.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-font-loading.web.d.ts","sourceRoot":"","sources":["../../../../../src/dynamicLoading/dynamic-font-loading.web.ts"],"names":[],"mappings":"AAAA;;KAEK;AACL,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,SAAS,CAAC;AAQzD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"}
@@ -0,0 +1,41 @@
1
+ import type { FontSource } from './types';
2
+ declare global {
3
+ interface ExpoGlobal {
4
+ modules: {
5
+ ExpoAsset: {
6
+ downloadAsync: (uri: string, hash: string | undefined, type: string) => Promise<string>;
7
+ };
8
+ ExpoFontLoader: {
9
+ getLoadedFonts: () => string[];
10
+ loadAsync: (fontFamilyAlias: string, fileUri: string) => Promise<void>;
11
+ };
12
+ };
13
+ }
14
+ var expo: ExpoGlobal | undefined;
15
+ }
16
+ export declare const isDynamicLoadingSupported: () => boolean;
17
+ /**
18
+ * Set whether dynamic loading of fonts is enabled.
19
+ * Currently, the presence of Expo Asset and Font Loader modules is a prerequisite for enabling.
20
+ * In the future, React Native core apis will be used for dynamic font loading.
21
+ *
22
+ * @param value - whether dynamic loading of fonts is enabled
23
+ * @returns `true` if dynamic loading of fonts was successfully set. `false` otherwise.
24
+ * */
25
+ export declare const setDynamicLoadingEnabled: (value: boolean) => boolean;
26
+ /**
27
+ * Whether dynamic loading of fonts is enabled.
28
+ * */
29
+ export declare const isDynamicLoadingEnabled: () => boolean;
30
+ type ErrorCallback = (args: {
31
+ error: Error;
32
+ fontFamily: string;
33
+ fontSource: FontSource;
34
+ }) => void;
35
+ /**
36
+ * Set a callback to be called when an error occurs during dynamic font loading.
37
+ * */
38
+ export declare const setDynamicLoadingErrorCallback: (callback: ErrorCallback) => void;
39
+ export declare const getErrorCallback: () => ErrorCallback | undefined;
40
+ export {};
41
+ //# sourceMappingURL=dynamic-loading-setting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-loading-setting.d.ts","sourceRoot":"","sources":["../../../../../src/dynamicLoading/dynamic-loading-setting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,UAAU;QAClB,OAAO,EAAE;YACP,SAAS,EAAE;gBAGT,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;aACzF,CAAC;YACF,cAAc,EAAE;gBAGd,cAAc,EAAE,MAAM,MAAM,EAAE,CAAC;gBAC/B,SAAS,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;aACxE,CAAC;SACH,CAAC;KACH;IAGD,IAAI,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;CAClC;AASD,eAAO,MAAM,yBAAyB,eAAiC,CAAC;AAExE;;;;;;;KAOK;AACL,eAAO,MAAM,wBAAwB,UAAW,OAAO,KAAG,OAczD,CAAC;AAEF;;KAEK;AACL,eAAO,MAAM,uBAAuB,eAAkC,CAAC;AAEvE,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;CACxB,KAAK,IAAI,CAAC;AAIX;;KAEK;AACL,eAAO,MAAM,8BAA8B,aAAc,aAAa,SAErE,CAAC;AAEF,eAAO,MAAM,gBAAgB,iCAAoC,CAAC"}
@@ -0,0 +1,9 @@
1
+ type ModuleId = number;
2
+ type LocalFileSystemUri = string;
3
+ export type FontSource = ModuleId | LocalFileSystemUri;
4
+ export type DynamicLoader = {
5
+ loadFontAsync: (fontFamily: string, fontSource: FontSource) => Promise<void>;
6
+ isLoaded: (fontFamily: string) => boolean;
7
+ };
8
+ export {};
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/dynamicLoading/types.ts"],"names":[],"mappings":"AACA,KAAK,QAAQ,GAAG,MAAM,CAAC;AACvB,KAAK,kBAAkB,GAAG,MAAM,CAAC;AAEjC,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,kBAAkB,CAAC;AAEvD,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7E,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default function ensureNativeModuleAvailable(): void;
2
+ //# sourceMappingURL=ensure-native-module-available.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure-native-module-available.d.ts","sourceRoot":"","sources":["../../../../src/ensure-native-module-available.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,2BAA2B,SAMlD"}
@@ -0,0 +1,6 @@
1
+ export { createIconSet, DEFAULT_ICON_SIZE, DEFAULT_ICON_COLOR } from './create-icon-set';
2
+ export type { IconProps, CreateIconSetOptions } from './create-icon-set';
3
+ export { setDynamicLoadingEnabled, isDynamicLoadingEnabled, isDynamicLoadingSupported, setDynamicLoadingErrorCallback, } from './dynamicLoading/dynamic-loading-setting';
4
+ export declare function getImageForFont(fontFamilyName: string, glyph: string, fontSize: number, color: number): Promise<string>;
5
+ export declare function getImageForFontSync(fontFamilyName: string, glyph: string, fontSize: number, color: number): string;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACzF,YAAY,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,0CAA0C,CAAC;AA4BlD,wBAAgB,eAAe,CAC7B,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAElH"}
@@ -0,0 +1,2 @@
1
+ export declare const getFontPaths: (packageJsonFilename: string) => string[];
2
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/common.ts"],"names":[],"mappings":"AA6CA,eAAO,MAAM,YAAY,wBAAyB,MAAM,aAMvD,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=getFonts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFonts.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/getFonts.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=updatePlist.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updatePlist.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/updatePlist.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,12 +1,23 @@
1
1
  {
2
2
  "name": "@react-native-vector-icons/common",
3
- "version": "0.0.1-alpha.2",
3
+ "version": "0.0.1-alpha.22",
4
4
  "description": "Customizable Icons for React Native with support for image source and full styling.",
5
- "main": "lib/commonjs/index",
6
- "module": "lib/module/index",
7
- "types": "lib/typescript/src/index.d.ts",
8
- "react-native": "src/index",
9
- "source": "src/index",
5
+ "source": "./src/index.tsx",
6
+ "main": "./lib/commonjs/index.js",
7
+ "module": "./lib/module/index.js",
8
+ "exports": {
9
+ "./package.json": "./package.json",
10
+ ".": {
11
+ "import": {
12
+ "types": "./lib/typescript/module/src/index.d.ts",
13
+ "default": "./lib/module/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./lib/typescript/commonjs/src/index.d.ts",
17
+ "default": "./lib/commonjs/index.js"
18
+ }
19
+ }
20
+ },
10
21
  "files": [
11
22
  "src",
12
23
  "lib",
@@ -27,11 +38,14 @@
27
38
  ],
28
39
  "scripts": {
29
40
  "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
30
- "prepare": "bob build",
31
- "preinstall": "cp ../../README.md .",
32
- "postinstall": "rm README.md",
41
+ "prepare": "bob build && chmod +x lib/commonjs/scripts/updatePlist.js",
42
+ "prepack": "cp ../../README.md .",
43
+ "postpack": "rm README.md",
33
44
  "watch": "onchange 'src/**' --initial -- yarn run prepare"
34
45
  },
46
+ "bin": {
47
+ "rnvi-update-plist": "lib/commonjs/scripts/updatePlist.js"
48
+ },
35
49
  "keywords": [
36
50
  "react-native",
37
51
  "ios",
@@ -50,67 +64,45 @@
50
64
  "retina",
51
65
  "font"
52
66
  ],
67
+ "repository": {
68
+ "type": "git",
69
+ "url": "git://github.com/oblador/react-native-vector-icons.git"
70
+ },
53
71
  "author": {
54
72
  "name": "Joel Arvidsson",
55
73
  "email": "joel@oblador.se"
56
74
  },
57
- "homepage": "https://github.com/react-native-vector-icons/react-native-vector-icons",
75
+ "license": "MIT",
58
76
  "bugs": {
59
- "url": "https://github.com/react-native-vector-icons/react-native-vector-icons/issues"
77
+ "url": "https://github.com/oblador/react-native-vector-icons/issues"
60
78
  },
61
- "repository": {
62
- "type": "git",
63
- "url": "git://github.com/react-native-vector-icons/react-native-vector-icons.git"
64
- },
65
- "license": "MIT",
79
+ "homepage": "https://github.com/oblador/react-native-vector-icons",
66
80
  "publishConfig": {
67
- "access": "public",
68
81
  "registry": "https://registry.npmjs.org/"
69
82
  },
70
83
  "dependencies": {
71
- "prop-types": "^15.8.1",
72
- "yargs": "^17.7.2"
84
+ "@react-native-community/cli-tools": "^14.1.1",
85
+ "picocolors": "^1.1.0",
86
+ "plist": "^3.1.0"
73
87
  },
74
88
  "devDependencies": {
75
- "@commitlint/config-conventional": "^18.4.3",
76
- "@evilmartians/lefthook": "^1.5.5",
77
- "@react-native/eslint-config": "^0.74.0",
78
- "@release-it/conventional-changelog": "^8.0.1",
79
- "@types/jest": "^29.5.11",
80
- "@types/react": "~18.2.46",
81
- "@types/react-native": "0.73.0",
82
- "commitlint": "^18.4.3",
83
- "css-social-buttons": "^1.1.1",
89
+ "@types/plist": "^3.0.5",
90
+ "@types/react": "~18.3.11",
84
91
  "del-cli": "^5.1.0",
85
- "eslint": "^8.56.0",
86
- "eslint-config-airbnb": "^19.0.4",
87
- "eslint-config-prettier": "^9.1.0",
88
- "eslint-plugin-import": "^2.29.1",
89
- "eslint-plugin-jsx-a11y": "^6.8.0",
90
- "eslint-plugin-prettier": "^5.1.2",
91
- "eslint-plugin-react": "^7.33.2",
92
- "eslint-plugin-react-hooks": "^4.6.0",
93
- "jest": "^29.7.0",
94
92
  "onchange": "^7.1.0",
95
- "oslllo-svg-fixer": "^3.0.0",
96
- "pod-install": "^0.1.39",
97
- "prettier": "^3.1.1",
98
- "react": "18.2.0",
99
- "react-native": "0.73.1",
100
- "react-native-builder-bob": "^0.23.2",
101
- "release-it": "^17.0.1",
102
- "svg2ttf": "^6.0.3",
103
- "svgicons2svgfont": "^12.0.0",
104
- "turbo": "^1.11.2",
105
- "typescript": "^5.3.3"
93
+ "react": "18.3.1",
94
+ "react-native": "0.75.4",
95
+ "react-native-builder-bob": "^0.30.2",
96
+ "turbo": "^1.13.4",
97
+ "typescript": "^5.6.2"
98
+ },
99
+ "resolutions": {
100
+ "@types/react": "^18.2.44"
106
101
  },
107
102
  "peerDependencies": {
108
103
  "react": "*",
109
104
  "react-native": "*"
110
105
  },
111
- "engines": {
112
- "node": ">= 18.0.0"
113
- },
114
106
  "workspaces": [
115
107
  "packages/*"
116
108
  ],
@@ -121,50 +113,49 @@
121
113
  "<rootDir>/lib/"
122
114
  ]
123
115
  },
124
- "commitlint": {
125
- "extends": [
126
- "@commitlint/config-conventional"
127
- ]
128
- },
129
- "release-it": {
130
- "git": {
131
- "commitMessage": "chore: release ${version}",
132
- "tagName": "v${version}"
133
- },
134
- "npm": {
135
- "publish": true
136
- },
137
- "github": {
138
- "release": true
139
- },
140
- "plugins": {
141
- "@release-it/conventional-changelog": {
142
- "preset": "angular"
143
- }
144
- }
145
- },
146
116
  "react-native-builder-bob": {
147
117
  "source": "src",
148
118
  "output": "lib",
149
119
  "targets": [
150
- "commonjs",
151
- "module",
120
+ "codegen",
121
+ [
122
+ "commonjs",
123
+ {
124
+ "esm": true
125
+ }
126
+ ],
127
+ [
128
+ "module",
129
+ {
130
+ "esm": true
131
+ }
132
+ ],
152
133
  [
153
134
  "typescript",
154
135
  {
155
- "project": "tsconfig.json"
136
+ "project": "tsconfig.build.json",
137
+ "esm": true
156
138
  }
157
139
  ]
158
140
  ]
159
141
  },
160
142
  "codegenConfig": {
161
- "name": "VectorIconsSpec",
162
- "type": "modules",
143
+ "name": "RNVectorIconsSpec",
144
+ "type": "all",
163
145
  "jsSrcsDir": "src",
146
+ "outputDir": {
147
+ "ios": "ios/generated",
148
+ "android": "android/generated"
149
+ },
164
150
  "android": {
165
151
  "javaPackageName": "com.reactnativevectoricons.common"
166
- }
152
+ },
153
+ "includesGeneratedCode": true
154
+ },
155
+ "create-react-native-library": {
156
+ "type": "module-mixed",
157
+ "languages": "kotlin-objc",
158
+ "version": "0.41.2"
167
159
  },
168
- "packageManager": "yarn@4.0.1",
169
- "gitHead": "d3df16c8ea56afc562da15ee8c78d7ec7749385a"
160
+ "gitHead": "29128b5055742f7e3f3a006473caf4eb9860cefc"
170
161
  }
@@ -11,47 +11,91 @@ Pod::Spec.new do |s|
11
11
  s.license = package["license"]
12
12
  s.authors = package["author"]
13
13
 
14
- s.platforms = { :ios => "12.0", :tvos => "9.0" }
15
- s.source = { :git => "https://github.com/react-native-vector-icons/react-native-vector-icons.git", :tag => "#{s.version}" }
14
+ s.platforms = { :ios => min_ios_version_supported, :tvos => "9.0" }
15
+ s.source = { :git => "https://github.com/oblador/react-native-vector-icons.git", :tag => "#{s.version}" }
16
16
 
17
- s.source_files = "ios/**/*.{h,m,mm}"
18
-
19
- s.script_phase = {
20
- :name => 'Copy Fonts',
21
- :script => "
22
- echo $PODS_ROOT
23
- APP_NAME=\"$(echo $PODS_ROOT | sed 's#/ios/Pods##;s#.*/##').app\"
24
- echo $APP_NAME
25
-
26
- mkdir ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/../${APP_NAME}/react-native-vector-icons
27
- FONTS=$(node #{__dir__}/lib/commonjs/scripts/getFonts.js ${SRCROOT}/../..)
28
- for font in $FONTS; do
29
- echo Copying font $font
30
- cp $font ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/../${APP_NAME}/react-native-vector-icons
31
- done
32
- ",
33
- }
17
+ s.source_files = "ios/**/*.{h,m,mm,cpp}"
34
18
 
35
19
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
36
20
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
37
21
  if respond_to?(:install_modules_dependencies, true)
38
22
  install_modules_dependencies(s)
39
23
  else
40
- s.dependency "React-Core"
41
-
42
- # Don't install the dependencies when we run `pod install` in the old architecture.
43
- if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
44
- s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
45
- s.pod_target_xcconfig = {
46
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
47
- "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
48
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
49
- }
50
- s.dependency "React-Codegen"
51
- s.dependency "RCT-Folly"
52
- s.dependency "RCTRequired"
53
- s.dependency "RCTTypeSafety"
54
- s.dependency "ReactCommon/turbomodule/core"
55
- end
24
+ s.dependency "React-Core"
25
+
26
+ # Don't install the dependencies when we run `pod install` in the old architecture.
27
+ if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
28
+ s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
29
+ s.pod_target_xcconfig = {
30
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
31
+ "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
32
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
33
+ }
34
+ s.dependency "React-Codegen"
35
+ s.dependency "RCT-Folly"
36
+ s.dependency "RCTRequired"
37
+ s.dependency "RCTTypeSafety"
38
+ s.dependency "ReactCommon/turbomodule/core"
39
+ end
56
40
  end
41
+
42
+ s.script_phase = {
43
+ :name => 'Copy Fonts',
44
+ :script => "
45
+ set -e
46
+
47
+ # This script borrows from the standard resource copy script https://gist.github.com/vonovak/d8f1a37804438f05bae22be1e8cd53c1
48
+ # We need two key bits of information
49
+ # Project Root - Where the package.json for the RN app lives
50
+ # Xcode Build Dir to copy the fonts into - We look for the directory that ends in .app
51
+
52
+ echo \"(RNVI) START_COPY_FONTS\"
53
+
54
+ echo \"(RNVI) PWD: $(pwd)\"
55
+
56
+ #############
57
+ # Find the fonts we need to copy
58
+ #############
59
+
60
+ # Assume the project root is always two directories above the POD_ROOT
61
+ echo \"(RNVI) PODS_ROOT: $PODS_ROOT\"
62
+ PROJECT_ROOT=\"${PODS_ROOT}/../..\"
63
+ echo \"(RNVI) PROJECT_ROOT: $PROJECT_ROOT\"
64
+
65
+ # Items we need to copy for rsync
66
+ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
67
+
68
+ node \"${PODS_TARGET_SRCROOT}/lib/commonjs/scripts/getFonts.js\" \"$PROJECT_ROOT\"/package.json > \"$RESOURCES_TO_COPY\"
69
+
70
+ #############
71
+ # Find the destination we copy to
72
+ #############
73
+
74
+ echo \"(RNVI) PODS_CONFIGURATION_BUILD_DIR: $PODS_CONFIGURATION_BUILD_DIR\"
75
+ XCODE_DIR=$(ls -d \"$PODS_CONFIGURATION_BUILD_DIR\"/*.app)
76
+ echo \"(RNVI) XCODE_DIR: $XCODE_DIR\"
77
+ DEST_DIR=\"${XCODE_DIR}\"
78
+ echo \"(RNVI) DEST_DIR: $DEST_DIR\"
79
+ echo I $INSTALL_DIR
80
+ mkdir -p \"$DEST_DIR\"
81
+
82
+ #############
83
+ # Copy the fonts
84
+ #############
85
+ echo \"(RNVI) Copying the following files to $DEST_DIR\"
86
+ cat \"$RESOURCES_TO_COPY\" | sed 's/^/(RNVI) /'
87
+
88
+ # NOTE: Should we add --delete and remove old fonts automagically? NOt doing it yet as it feels risky
89
+ rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from=\"$RESOURCES_TO_COPY\" / \"$DEST_DIR\"
90
+ # TODO: How do we test this is right?
91
+ if [[ \"${ACTION}\" == \"install\" ]] && [[ \"${SKIP_INSTALL}\" == \"NO\" ]]; then
92
+ mkdir -p \"${INSTALL_DIR}/react-native-vector-icons\"
93
+ rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from=\"$RESOURCES_TO_COPY\" / \"${INSTALL_DIR}/react-native-vector-icons\"
94
+ fi
95
+
96
+ rm -f \"$RESOURCES_TO_COPY\"
97
+
98
+ echo \"(RNVI) END:RNVI_COPY_FONTS\"
99
+ ",
100
+ }
57
101
  end
@@ -2,21 +2,9 @@ import type { TurboModule } from 'react-native';
2
2
  import { TurboModuleRegistry } from 'react-native';
3
3
 
4
4
  export interface Spec extends TurboModule {
5
- getImageForFont(
6
- fontName: string,
7
- glyph: string,
8
- fontSize: number,
9
- color: number
10
- ): Promise<string>;
5
+ getImageForFont(fontFamilyName: string, glyph: string, fontSize: number, color: number): Promise<string>;
11
6
 
12
- getImageForFontSync(
13
- fontName: string,
14
- glyph: string,
15
- fontSize: number,
16
- color: number
17
- ): string;
18
-
19
- loadFontWithFileName(fontFileName: string, extension: string, subdirectory?: string): Promise<void>;
7
+ getImageForFontSync(fontFamilyName: string, glyph: string, fontSize: number, color: number): string;
20
8
  }
21
9
 
22
10
  export default TurboModuleRegistry.getEnforcing<Spec>('VectorIcons');