@react-native-vector-icons/common 0.0.1-alpha.7 → 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.
- package/LICENSE +1 -2
- package/README.md +49 -91
- package/android/build.gradle +37 -3
- package/android/generated/java/com/reactnativevectoricons/common/NativeVectorIconsSpec.java +42 -0
- package/android/generated/jni/CMakeLists.txt +49 -0
- package/android/generated/jni/RNVectorIconsSpec-generated.cpp +38 -0
- package/android/generated/jni/RNVectorIconsSpec.h +31 -0
- package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/ComponentDescriptors.cpp +22 -0
- package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/ComponentDescriptors.h +24 -0
- package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/EventEmitters.cpp +16 -0
- package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/EventEmitters.h +17 -0
- package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/Props.cpp +19 -0
- package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/Props.h +18 -0
- package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/RNVectorIconsSpecJSI-generated.cpp +40 -0
- package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/RNVectorIconsSpecJSI.h +76 -0
- package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/ShadowNodes.cpp +17 -0
- package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/ShadowNodes.h +23 -0
- package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/States.cpp +16 -0
- package/android/generated/jni/react/renderer/components/RNVectorIconsSpec/States.h +19 -0
- package/android/src/main/AndroidManifestNew.xml +1 -1
- package/android/src/main/java/com/reactnativevectoricons/common/VectorIconsModule.kt +90 -0
- package/android/src/main/java/com/reactnativevectoricons/common/VectorIconsPackage.kt +35 -0
- package/android/src/newarch/VectorIconsSpec.kt +7 -0
- package/android/src/oldarch/VectorIconsSpec.kt +38 -0
- package/ios/VectorIcons.h +13 -17
- package/ios/VectorIcons.mm +76 -92
- package/ios/generated/RNVectorIconsSpec/ComponentDescriptors.cpp +22 -0
- package/ios/generated/RNVectorIconsSpec/ComponentDescriptors.h +24 -0
- package/ios/generated/RNVectorIconsSpec/EventEmitters.cpp +16 -0
- package/ios/generated/RNVectorIconsSpec/EventEmitters.h +17 -0
- package/ios/generated/RNVectorIconsSpec/Props.cpp +19 -0
- package/ios/generated/RNVectorIconsSpec/Props.h +18 -0
- package/ios/generated/RNVectorIconsSpec/RCTComponentViewHelpers.h +18 -0
- package/ios/generated/RNVectorIconsSpec/RNVectorIconsSpec-generated.mm +36 -0
- package/ios/generated/RNVectorIconsSpec/RNVectorIconsSpec.h +58 -0
- package/ios/generated/RNVectorIconsSpec/ShadowNodes.cpp +17 -0
- package/ios/generated/RNVectorIconsSpec/ShadowNodes.h +23 -0
- package/ios/generated/RNVectorIconsSpec/States.cpp +16 -0
- package/ios/generated/RNVectorIconsSpec/States.h +19 -0
- package/ios/generated/RNVectorIconsSpecJSI-generated.cpp +40 -0
- package/ios/generated/RNVectorIconsSpecJSI.h +76 -0
- package/lib/commonjs/NativeVectorIcons.js.map +1 -1
- package/lib/commonjs/create-icon-set.js +49 -36
- package/lib/commonjs/create-icon-set.js.map +1 -1
- package/lib/commonjs/dynamicLoading/dynamic-font-loading.js +92 -0
- package/lib/commonjs/dynamicLoading/dynamic-font-loading.js.map +1 -0
- package/lib/commonjs/dynamicLoading/dynamic-font-loading.web.js +20 -0
- package/lib/commonjs/dynamicLoading/dynamic-font-loading.web.js.map +1 -0
- package/lib/commonjs/dynamicLoading/dynamic-loading-setting.js +50 -0
- package/lib/commonjs/dynamicLoading/dynamic-loading-setting.js.map +1 -0
- package/lib/commonjs/dynamicLoading/types.js +2 -0
- package/lib/commonjs/dynamicLoading/types.js.map +1 -0
- package/lib/commonjs/ensure-native-module-available.js +1 -1
- package/lib/commonjs/ensure-native-module-available.js.map +1 -1
- package/lib/commonjs/index.js +57 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/scripts/common.js +49 -0
- package/lib/commonjs/scripts/common.js.map +1 -0
- package/lib/commonjs/scripts/getFonts.js +6 -40
- package/lib/commonjs/scripts/getFonts.js.map +1 -1
- package/lib/commonjs/scripts/updatePlist.js +54 -0
- package/lib/commonjs/scripts/updatePlist.js.map +1 -0
- package/lib/module/NativeVectorIcons.js +2 -0
- package/lib/module/NativeVectorIcons.js.map +1 -1
- package/lib/module/NativeVectorIcons.web.js +2 -0
- package/lib/module/NativeVectorIcons.web.js.map +1 -1
- package/lib/module/create-icon-set.js +49 -34
- package/lib/module/create-icon-set.js.map +1 -1
- package/lib/module/create-icon-source-cache.js +2 -0
- package/lib/module/create-icon-source-cache.js.map +1 -1
- package/lib/module/dynamicLoading/dynamic-font-loading.js +85 -0
- package/lib/module/dynamicLoading/dynamic-font-loading.js.map +1 -0
- package/lib/module/dynamicLoading/dynamic-font-loading.web.js +16 -0
- package/lib/module/dynamicLoading/dynamic-font-loading.web.js.map +1 -0
- package/lib/module/dynamicLoading/dynamic-loading-setting.js +41 -0
- package/lib/module/dynamicLoading/dynamic-loading-setting.js.map +1 -0
- package/lib/module/dynamicLoading/types.js +2 -0
- package/lib/module/dynamicLoading/types.js.map +1 -0
- package/lib/module/ensure-native-module-available.js +2 -0
- package/lib/module/ensure-native-module-available.js.map +1 -1
- package/lib/module/index.js +33 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/scripts/common.js +43 -0
- package/lib/module/scripts/common.js.map +1 -0
- package/lib/module/scripts/getFonts.js +8 -39
- package/lib/module/scripts/getFonts.js.map +1 -1
- package/lib/module/scripts/updatePlist.js +51 -0
- package/lib/module/scripts/updatePlist.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/NativeVectorIcons.d.ts +8 -0
- package/lib/typescript/commonjs/src/NativeVectorIcons.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NativeVectorIcons.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/create-icon-set.d.ts +36 -0
- package/lib/typescript/commonjs/src/create-icon-set.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/create-icon-source-cache.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/dynamicLoading/dynamic-font-loading.d.ts +3 -0
- package/lib/typescript/commonjs/src/dynamicLoading/dynamic-font-loading.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/dynamicLoading/dynamic-font-loading.web.d.ts +6 -0
- package/lib/typescript/commonjs/src/dynamicLoading/dynamic-font-loading.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/dynamicLoading/dynamic-loading-setting.d.ts +41 -0
- package/lib/typescript/commonjs/src/dynamicLoading/dynamic-loading-setting.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/dynamicLoading/types.d.ts +9 -0
- package/lib/typescript/commonjs/src/dynamicLoading/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ensure-native-module-available.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/scripts/common.d.ts +2 -0
- package/lib/typescript/commonjs/src/scripts/common.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/scripts/getFonts.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/scripts/updatePlist.d.ts +3 -0
- package/lib/typescript/commonjs/src/scripts/updatePlist.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/NativeVectorIcons.d.ts +8 -0
- package/lib/typescript/module/src/NativeVectorIcons.d.ts.map +1 -0
- package/lib/typescript/module/src/NativeVectorIcons.web.d.ts +3 -0
- package/lib/typescript/module/src/NativeVectorIcons.web.d.ts.map +1 -0
- package/lib/typescript/module/src/create-icon-set.d.ts +36 -0
- package/lib/typescript/module/src/create-icon-set.d.ts.map +1 -0
- package/lib/typescript/module/src/create-icon-source-cache.d.ts +21 -0
- package/lib/typescript/module/src/create-icon-source-cache.d.ts.map +1 -0
- package/lib/typescript/module/src/dynamicLoading/dynamic-font-loading.d.ts +3 -0
- package/lib/typescript/module/src/dynamicLoading/dynamic-font-loading.d.ts.map +1 -0
- package/lib/typescript/module/src/dynamicLoading/dynamic-font-loading.web.d.ts +6 -0
- package/lib/typescript/module/src/dynamicLoading/dynamic-font-loading.web.d.ts.map +1 -0
- package/lib/typescript/module/src/dynamicLoading/dynamic-loading-setting.d.ts +41 -0
- package/lib/typescript/module/src/dynamicLoading/dynamic-loading-setting.d.ts.map +1 -0
- package/lib/typescript/module/src/dynamicLoading/types.d.ts +9 -0
- package/lib/typescript/module/src/dynamicLoading/types.d.ts.map +1 -0
- package/lib/typescript/module/src/ensure-native-module-available.d.ts +2 -0
- package/lib/typescript/module/src/ensure-native-module-available.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +6 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/scripts/common.d.ts +2 -0
- package/lib/typescript/module/src/scripts/common.d.ts.map +1 -0
- package/lib/typescript/module/src/scripts/getFonts.d.ts +3 -0
- package/lib/typescript/module/src/scripts/getFonts.d.ts.map +1 -0
- package/lib/typescript/module/src/scripts/updatePlist.d.ts +3 -0
- package/lib/typescript/module/src/scripts/updatePlist.d.ts.map +1 -0
- package/package.json +72 -44
- package/react-native-vector-icons.podspec +67 -42
- package/react-native.config.js +12 -0
- package/src/NativeVectorIcons.ts +2 -4
- package/src/create-icon-set.tsx +79 -32
- package/src/dynamicLoading/dynamic-font-loading.ts +97 -0
- package/src/dynamicLoading/dynamic-font-loading.web.ts +15 -0
- package/src/dynamicLoading/dynamic-loading-setting.ts +77 -0
- package/src/dynamicLoading/types.ts +10 -0
- package/src/index.ts +48 -1
- package/src/scripts/common.ts +52 -0
- package/src/scripts/getFonts.ts +6 -47
- package/src/scripts/updatePlist.ts +58 -0
- package/android/src/main/java/com/reactnativevectoricons/common/VectorIconsModule.java +0 -121
- package/android/src/main/java/com/reactnativevectoricons/common/VectorIconsPackage.java +0 -45
- package/android/src/newarch/VectorIconsSpec.java +0 -9
- package/android/src/oldarch/VectorIconsSpec.java +0 -18
- package/lib/typescript/src/NativeVectorIcons.d.ts +0 -9
- package/lib/typescript/src/NativeVectorIcons.d.ts.map +0 -1
- package/lib/typescript/src/NativeVectorIcons.web.d.ts.map +0 -1
- package/lib/typescript/src/create-icon-set.d.ts +0 -26
- package/lib/typescript/src/create-icon-set.d.ts.map +0 -1
- package/lib/typescript/src/create-icon-source-cache.d.ts.map +0 -1
- package/lib/typescript/src/ensure-native-module-available.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts +0 -3
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/scripts/getFonts.d.ts.map +0 -1
- /package/lib/typescript/{src → commonjs/src}/NativeVectorIcons.web.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/create-icon-source-cache.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/ensure-native-module-available.d.ts +0 -0
- /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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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
|
|
3
|
+
"version": "11.0.0-alpha.0",
|
|
4
4
|
"description": "Customizable Icons for React Native with support for image source and full styling.",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
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",
|
|
@@ -14,6 +25,7 @@
|
|
|
14
25
|
"ios",
|
|
15
26
|
"cpp",
|
|
16
27
|
"*.podspec",
|
|
28
|
+
"react-native.config.js",
|
|
17
29
|
"!ios/build",
|
|
18
30
|
"!android/build",
|
|
19
31
|
"!android/gradle",
|
|
@@ -27,11 +39,14 @@
|
|
|
27
39
|
],
|
|
28
40
|
"scripts": {
|
|
29
41
|
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
30
|
-
"prepare": "bob build",
|
|
42
|
+
"prepare": "bob build && chmod +x lib/commonjs/scripts/updatePlist.js",
|
|
31
43
|
"prepack": "cp ../../README.md .",
|
|
32
44
|
"postpack": "rm README.md",
|
|
33
45
|
"watch": "onchange 'src/**' --initial -- yarn run prepare"
|
|
34
46
|
},
|
|
47
|
+
"bin": {
|
|
48
|
+
"rnvi-update-plist": "lib/commonjs/scripts/updatePlist.js"
|
|
49
|
+
},
|
|
35
50
|
"keywords": [
|
|
36
51
|
"react-native",
|
|
37
52
|
"ios",
|
|
@@ -50,54 +65,45 @@
|
|
|
50
65
|
"retina",
|
|
51
66
|
"font"
|
|
52
67
|
],
|
|
68
|
+
"repository": {
|
|
69
|
+
"type": "git",
|
|
70
|
+
"url": "git://github.com/oblador/react-native-vector-icons.git"
|
|
71
|
+
},
|
|
53
72
|
"author": {
|
|
54
73
|
"name": "Joel Arvidsson",
|
|
55
74
|
"email": "joel@oblador.se"
|
|
56
75
|
},
|
|
57
|
-
"
|
|
76
|
+
"license": "MIT",
|
|
58
77
|
"bugs": {
|
|
59
|
-
"url": "https://github.com/
|
|
78
|
+
"url": "https://github.com/oblador/react-native-vector-icons/issues"
|
|
60
79
|
},
|
|
61
|
-
"
|
|
62
|
-
"type": "git",
|
|
63
|
-
"url": "git://github.com/react-native-vector-icons/react-native-vector-icons.git"
|
|
64
|
-
},
|
|
65
|
-
"license": "MIT",
|
|
80
|
+
"homepage": "https://github.com/oblador/react-native-vector-icons",
|
|
66
81
|
"publishConfig": {
|
|
67
|
-
"access": "public",
|
|
68
82
|
"registry": "https://registry.npmjs.org/"
|
|
69
83
|
},
|
|
70
84
|
"dependencies": {
|
|
71
|
-
"@react-native-community/cli-tools": "^
|
|
72
|
-
"
|
|
73
|
-
"
|
|
85
|
+
"@react-native-community/cli-tools": "^14.1.1",
|
|
86
|
+
"picocolors": "^1.1.0",
|
|
87
|
+
"plist": "^3.1.0"
|
|
74
88
|
},
|
|
75
89
|
"devDependencies": {
|
|
76
|
-
"@types/
|
|
77
|
-
"@types/react": "~18.3.
|
|
78
|
-
"
|
|
79
|
-
"css-social-buttons": "^1.1.1",
|
|
80
|
-
"del-cli": "^5.1.0",
|
|
81
|
-
"jest": "^29.7.0",
|
|
90
|
+
"@types/plist": "^3.0.5",
|
|
91
|
+
"@types/react": "~18.3.11",
|
|
92
|
+
"del-cli": "^6.0.0",
|
|
82
93
|
"onchange": "^7.1.0",
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
"svgicons2svgfont": "^12.0.0",
|
|
92
|
-
"typescript": "^5.4.5"
|
|
94
|
+
"react": "18.3.1",
|
|
95
|
+
"react-native": "0.75.4",
|
|
96
|
+
"react-native-builder-bob": "^0.30.2",
|
|
97
|
+
"turbo": "^1.13.4",
|
|
98
|
+
"typescript": "^5.6.3"
|
|
99
|
+
},
|
|
100
|
+
"resolutions": {
|
|
101
|
+
"@types/react": "^18.2.44"
|
|
93
102
|
},
|
|
94
103
|
"peerDependencies": {
|
|
95
104
|
"react": "*",
|
|
96
105
|
"react-native": "*"
|
|
97
106
|
},
|
|
98
|
-
"engines": {
|
|
99
|
-
"node": ">= 18.0.0"
|
|
100
|
-
},
|
|
101
107
|
"workspaces": [
|
|
102
108
|
"packages/*"
|
|
103
109
|
],
|
|
@@ -112,23 +118,45 @@
|
|
|
112
118
|
"source": "src",
|
|
113
119
|
"output": "lib",
|
|
114
120
|
"targets": [
|
|
115
|
-
"
|
|
116
|
-
|
|
121
|
+
"codegen",
|
|
122
|
+
[
|
|
123
|
+
"commonjs",
|
|
124
|
+
{
|
|
125
|
+
"esm": true
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
[
|
|
129
|
+
"module",
|
|
130
|
+
{
|
|
131
|
+
"esm": true
|
|
132
|
+
}
|
|
133
|
+
],
|
|
117
134
|
[
|
|
118
135
|
"typescript",
|
|
119
136
|
{
|
|
120
|
-
"project": "tsconfig.json"
|
|
137
|
+
"project": "tsconfig.build.json",
|
|
138
|
+
"esm": true
|
|
121
139
|
}
|
|
122
140
|
]
|
|
123
141
|
]
|
|
124
142
|
},
|
|
125
143
|
"codegenConfig": {
|
|
126
|
-
"name": "
|
|
127
|
-
"type": "
|
|
144
|
+
"name": "RNVectorIconsSpec",
|
|
145
|
+
"type": "all",
|
|
128
146
|
"jsSrcsDir": "src",
|
|
147
|
+
"outputDir": {
|
|
148
|
+
"ios": "ios/generated",
|
|
149
|
+
"android": "android/generated"
|
|
150
|
+
},
|
|
129
151
|
"android": {
|
|
130
152
|
"javaPackageName": "com.reactnativevectoricons.common"
|
|
131
|
-
}
|
|
153
|
+
},
|
|
154
|
+
"includesGeneratedCode": true
|
|
155
|
+
},
|
|
156
|
+
"create-react-native-library": {
|
|
157
|
+
"type": "module-mixed",
|
|
158
|
+
"languages": "kotlin-objc",
|
|
159
|
+
"version": "0.41.2"
|
|
132
160
|
},
|
|
133
|
-
"gitHead": "
|
|
161
|
+
"gitHead": "d48f0a5a5f05bcbe55acdd81c69f45879af19398"
|
|
134
162
|
}
|
|
@@ -11,66 +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 =>
|
|
15
|
-
s.source = { :git => "
|
|
14
|
+
s.platforms = { :ios => min_ios_version_supported, :tvos => "9.0", :visionos => "1.0" }
|
|
15
|
+
s.source = { :git => package["repository"]["url"], :tag => "v#{s.version}" }
|
|
16
16
|
|
|
17
|
-
s.source_files = "ios/**/*.{h,m,mm}"
|
|
17
|
+
s.source_files = "ios/**/*.{h,m,mm,cpp}"
|
|
18
|
+
|
|
19
|
+
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
20
|
+
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
21
|
+
if respond_to?(:install_modules_dependencies, true)
|
|
22
|
+
install_modules_dependencies(s)
|
|
23
|
+
else
|
|
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
|
|
40
|
+
end
|
|
18
41
|
|
|
19
42
|
s.script_phase = {
|
|
20
43
|
:name => 'Copy Fonts',
|
|
21
44
|
:script => "
|
|
22
45
|
set -e
|
|
23
46
|
|
|
24
|
-
#
|
|
47
|
+
# This script borrows from the standard resource copy script https://gist.github.com/vonovak/d8f1a37804438f05bae22be1e8cd53c1
|
|
25
48
|
# We need two key bits of information
|
|
26
|
-
# Project Root -
|
|
49
|
+
# Project Root - Where the package.json for the RN app lives
|
|
27
50
|
# Xcode Build Dir to copy the fonts into - We look for the directory that ends in .app
|
|
28
51
|
|
|
29
|
-
echo
|
|
52
|
+
echo \"(RNVI) START_COPY_FONTS\"
|
|
53
|
+
|
|
54
|
+
echo \"(RNVI) PWD: $(pwd)\"
|
|
30
55
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
56
|
+
#############
|
|
57
|
+
# Find the fonts we need to copy
|
|
58
|
+
#############
|
|
34
59
|
|
|
60
|
+
# Assume the project root is always two directories above the POD_ROOT
|
|
61
|
+
echo \"(RNVI) PODS_ROOT: $PODS_ROOT\"
|
|
35
62
|
PROJECT_ROOT=\"${PODS_ROOT}/../..\"
|
|
36
|
-
echo \"PROJECT_ROOT: $PROJECT_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\"
|
|
37
69
|
|
|
70
|
+
#############
|
|
71
|
+
# Find the destination we copy to
|
|
72
|
+
#############
|
|
73
|
+
|
|
74
|
+
echo \"(RNVI) PODS_CONFIGURATION_BUILD_DIR: $PODS_CONFIGURATION_BUILD_DIR\"
|
|
38
75
|
XCODE_DIR=$(ls -d \"$PODS_CONFIGURATION_BUILD_DIR\"/*.app)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
echo DEST_DIR:
|
|
76
|
+
echo \"(RNVI) XCODE_DIR: $XCODE_DIR\"
|
|
77
|
+
DEST_DIR=\"${XCODE_DIR}\"
|
|
78
|
+
echo \"(RNVI) DEST_DIR: $DEST_DIR\"
|
|
79
|
+
echo I $INSTALL_DIR
|
|
42
80
|
mkdir -p \"$DEST_DIR\"
|
|
43
81
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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\"
|
|
49
97
|
|
|
50
|
-
echo END:RNVI_COPY_FONTS
|
|
98
|
+
echo \"(RNVI) END:RNVI_COPY_FONTS\"
|
|
51
99
|
",
|
|
52
100
|
}
|
|
53
|
-
|
|
54
|
-
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
55
|
-
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
56
|
-
if respond_to?(:install_modules_dependencies, true)
|
|
57
|
-
install_modules_dependencies(s)
|
|
58
|
-
else
|
|
59
|
-
s.dependency "React-Core"
|
|
60
|
-
|
|
61
|
-
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
62
|
-
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
63
|
-
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
64
|
-
s.pod_target_xcconfig = {
|
|
65
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
66
|
-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
67
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
68
|
-
}
|
|
69
|
-
s.dependency "React-Codegen"
|
|
70
|
-
s.dependency "RCT-Folly"
|
|
71
|
-
s.dependency "RCTRequired"
|
|
72
|
-
s.dependency "RCTTypeSafety"
|
|
73
|
-
s.dependency "ReactCommon/turbomodule/core"
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
101
|
end
|
package/src/NativeVectorIcons.ts
CHANGED
|
@@ -2,11 +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(
|
|
5
|
+
getImageForFont(fontFamilyName: string, glyph: string, fontSize: number, color: number): Promise<string>;
|
|
6
6
|
|
|
7
|
-
getImageForFontSync(
|
|
8
|
-
|
|
9
|
-
loadFontWithFileName(fontFileName: string, extension: string, subdirectory?: string): Promise<void>;
|
|
7
|
+
getImageForFontSync(fontFamilyName: string, glyph: string, fontSize: number, color: number): string;
|
|
10
8
|
}
|
|
11
9
|
|
|
12
10
|
export default TurboModuleRegistry.getEnforcing<Spec>('VectorIcons');
|