@react-native-vector-icons/common 11.0.0 → 12.0.0-alpha.10
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/README.md +48 -12
- package/lib/commonjs/NativeVectorIcons.js +8 -1
- package/lib/commonjs/NativeVectorIcons.js.map +1 -1
- package/lib/commonjs/scripts/updatePlist.js +1 -1
- package/lib/commonjs/scripts/updatePlist.js.map +1 -1
- package/lib/module/NativeVectorIcons.js +8 -1
- package/lib/module/NativeVectorIcons.js.map +1 -1
- package/lib/module/scripts/updatePlist.js +1 -1
- package/lib/module/scripts/updatePlist.js.map +1 -1
- package/lib/typescript/commonjs/src/NativeVectorIcons.d.ts.map +1 -1
- package/lib/typescript/module/src/NativeVectorIcons.d.ts.map +1 -1
- package/package.json +5 -6
- package/src/NativeVectorIcons.ts +7 -1
- package/src/scripts/updatePlist.ts +1 -1
- package/LICENSE +0 -20
- package/scripts/copy-fonts.sh +0 -56
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ extension and styling effortless.
|
|
|
12
12
|
For the integration of `.svg` files natively, you can explore [`react-native-vector-image`](https://github.com/oblador/react-native-vector-image).
|
|
13
13
|
|
|
14
14
|
> [!TIP]
|
|
15
|
-
> If you are still using the old single package `react-native-vector-icons` please visit https://github.com/oblador/react-native-vector-icons/tree/10.x
|
|
15
|
+
> If you are still using the old single package `react-native-vector-icons` please visit <https://github.com/oblador/react-native-vector-icons/tree/10.x>
|
|
16
16
|
|
|
17
17
|
## Table of Contents
|
|
18
18
|
|
|
@@ -37,20 +37,23 @@ Should you find this library beneficial, kindly contemplate the option of
|
|
|
37
37
|
|
|
38
38
|
## Available Icon Sets
|
|
39
39
|
|
|
40
|
-
[Explore all icons](https://
|
|
40
|
+
[Explore all icons](https://oblador.github.io/react-native-vector-icons/).
|
|
41
41
|
|
|
42
42
|
RNVI comes with the following supported icons. You can [search NPM](https://www.npmjs.com/search?q=keywords%3Areact-native-vector-icons-icon) for third party icons.
|
|
43
43
|
|
|
44
44
|
### Actively maintained
|
|
45
|
+
|
|
45
46
|
- [`AntDesign`](https://ant.design/components/icon) from Ant Group (v4.4.2 with _449_ icons)
|
|
46
47
|
- [`Feather`](http://feathericons.com) created by Cole Bemis & Contributors (v4.29.2 featuring _287_ icons)
|
|
47
|
-
- [`FontAwesome 6`](https://fontawesome.com/search) designed by Fonticons, Inc. (v6.7.
|
|
48
|
+
- [`FontAwesome 6`](https://fontawesome.com/search) designed by Fonticons, Inc. (v6.7.2 featuring _2060_ free and _52663_ pro icons)
|
|
48
49
|
- [`Foundation`](http://zurb.com/playground/foundation-icon-fonts-3) by ZURB, Inc. (v3.0 with _283_ icons)
|
|
49
50
|
- [`Ionicons`](https://ionic.io/ionicons) crafted by Ionic (v7.4.0 containing _1356_ icons)
|
|
50
51
|
- [`MaterialDesignIcons`](https://pictogrammers.com/library/mdi/) from MaterialDesignIcons.com (v7.4.47 including _7448_ icons)
|
|
51
|
-
- [`Octicons`](https://primer.style/foundations/icons) designed by GitHub, Inc. (v19.
|
|
52
|
+
- [`Octicons`](https://primer.style/foundations/icons) designed by GitHub, Inc. (v19.14.0 with _332_ icons)
|
|
53
|
+
- [`Lucide`](https://lucide.dev/) designed by Lucide, (v0.473.0 with _1548_ icons)
|
|
52
54
|
|
|
53
55
|
### No longer maintained upstream
|
|
56
|
+
|
|
54
57
|
- [`Entypo`](http://entypo.com) by Daniel Bruce (v1.0.1 with _411_ icons)
|
|
55
58
|
- [`EvilIcons`](http://evil-icons.io) designed by Alexander Madyankin & Roman Shamin (v1.10.1 with _70_ icons)
|
|
56
59
|
- [`FontAwesome`](https://fontawesome.com/v4/icons) by Fonticons, Inc. (v4.7.0 containing _785_ icons)
|
|
@@ -67,21 +70,26 @@ See [MIGRATION.md](MIGRATION.md) if you are migrating from `react-native-vector-
|
|
|
67
70
|
## Installation
|
|
68
71
|
|
|
69
72
|
1. Install the common package
|
|
73
|
+
|
|
70
74
|
```sh
|
|
71
75
|
npm install --save @react-native-vector-icons/common
|
|
72
76
|
```
|
|
77
|
+
|
|
73
78
|
2. Install the packages for the icons you want use
|
|
79
|
+
|
|
74
80
|
```sh
|
|
75
81
|
npm install --save @react-native-vector-icons/fontawesome6 @react-native-vector-icons/evil-icons
|
|
76
82
|
```
|
|
83
|
+
|
|
77
84
|
3. Depending on the platform you're targeting (iOS/Android/Windows), follow the appropriate setup instructions below.
|
|
78
85
|
4. If you are using one of the following fonts refer to their guides for further instructions
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
|
|
87
|
+
- [FontAwesome 6](packages/fontawesome6/README.md)
|
|
88
|
+
- [FontAwesome 6 Pro](packages/fontawesome6-pro/README.md)
|
|
89
|
+
- [FontAwesome 5](packages/fontawesome5/README.md)
|
|
90
|
+
- [FontAwesome 5 Pro](packages/fontawesome5-pro/README.md)
|
|
91
|
+
- [Fontello](packages/fontello/README.md)
|
|
92
|
+
- [Icomoon](packages/icomoon/README.md)
|
|
85
93
|
|
|
86
94
|
## Setup
|
|
87
95
|
|
|
@@ -175,7 +183,7 @@ See [CREATE_FONT_PACKAGE.md](./docs/CREATE_FONT_PACKAGE.md) to learn how to crea
|
|
|
175
183
|
You can also use `createIconSet()` directly in your project. This
|
|
176
184
|
returns your own custom font based on the `glyphMap` where the key is the icon
|
|
177
185
|
name and the value is either a UTF-8 character or it's character code.
|
|
178
|
-
`postScriptName` is the name of the postscript font. Open the font in https://fontdrop.info
|
|
186
|
+
`postScriptName` is the name of the postscript font. Open the font in <https://fontdrop.info/>,
|
|
179
187
|
Font Book.app or similar to learn the name. Also pass the `fontFileName` argument for Android support.
|
|
180
188
|
|
|
181
189
|
```js
|
|
@@ -192,6 +200,7 @@ const Icon = createIconSet(glyphMap, {
|
|
|
192
200
|
```
|
|
193
201
|
|
|
194
202
|
You should place the font ttf file into `rnvi-fonts`. You can customise this location by adding the following snippet to your package.json
|
|
203
|
+
|
|
195
204
|
```json
|
|
196
205
|
{
|
|
197
206
|
"reactNativeVectorIcons": {
|
|
@@ -219,7 +228,7 @@ Dynamic loading in react-native-vector-icons is currently limited to those fonts
|
|
|
219
228
|
|
|
220
229
|
By default, dynamic loading is enabled if supported by the version of Expo that you're using. It doesn't change the way you work with the package: If rendering an icon requires a font that is not known to the app, it will be loaded automatically and icon will render as expected.
|
|
221
230
|
|
|
222
|
-
`@react-native-vector-icons/common` exports several functions which you can use to control dynamic loading:
|
|
231
|
+
`@react-native-vector-icons/common` exports several functions which you can use to control dynamic loading:
|
|
223
232
|
|
|
224
233
|
- `isDynamicLoadingEnabled`: Returns whether dynamic loading is enabled.
|
|
225
234
|
- `isDynamicLoadingSupported`: Returns whether dynamic loading is supported by your runtime (checks that necessary Expo features are present).
|
|
@@ -259,6 +268,33 @@ function ExampleView(props) {
|
|
|
259
268
|
}
|
|
260
269
|
```
|
|
261
270
|
|
|
271
|
+
## Testing
|
|
272
|
+
|
|
273
|
+
When running tests with `jest` you will need to mock out the native code loading to prevent errors.
|
|
274
|
+
|
|
275
|
+
In `jest.config.js` add
|
|
276
|
+
|
|
277
|
+
```js
|
|
278
|
+
// Mock out font loading
|
|
279
|
+
moduleNameMapper: {
|
|
280
|
+
'\\.(ttf)$': '<rootDir>/__mocks__/file-mock.js',
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Create `__mocks__/file-mock.js`:
|
|
285
|
+
|
|
286
|
+
```js
|
|
287
|
+
module.exports = {};
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Create `__mocks__/@react-native-vector-icons/common.js`:
|
|
291
|
+
|
|
292
|
+
```js
|
|
293
|
+
// Mock the entire common library so there are no native module loading errors
|
|
294
|
+
module.exports = {
|
|
295
|
+
createIconSet: () => "icon"
|
|
296
|
+
}
|
|
297
|
+
|
|
262
298
|
## [Changelog](https://github.com/react-native-vector-icons/react-native-vector-icons/releases)
|
|
263
299
|
|
|
264
300
|
## License
|
|
@@ -5,5 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
|
-
|
|
8
|
+
// TODO: We should return some defaults if this doesn't exist because we aren't linked now that we are optional
|
|
9
|
+
var _default = exports.default = _reactNative.TurboModuleRegistry.get('VectorIcons') || {
|
|
10
|
+
// @ts-expect-error: don't care about unused name
|
|
11
|
+
getImageForFont: async (fontFamilyName, glyph, fontSize, color) => '',
|
|
12
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
13
|
+
// @ts-expect-error: don't care about unused name
|
|
14
|
+
getImageForFontSync: (fontFamilyName, glyph, fontSize, color) => '' // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
15
|
+
};
|
|
9
16
|
//# sourceMappingURL=NativeVectorIcons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","get","getImageForFont","fontFamilyName","glyph","fontSize","color","getImageForFontSync"],"sourceRoot":"../../src","sources":["NativeVectorIcons.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAQA;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GACeC,gCAAmB,CAACC,GAAG,CAAO,aAAa,CAAC,IAAI;EAC7D;EACAC,eAAe,EAAE,MAAAA,CAAOC,cAAsB,EAAEC,KAAa,EAAEC,QAAgB,EAAEC,KAAa,KAAK,EAAE;EAAE;EACvG;EACAC,mBAAmB,EAAEA,CAACJ,cAAsB,EAAEC,KAAa,EAAEC,QAAgB,EAAEC,KAAa,KAAK,EAAE,CAAE;AACvG,CAAC","ignoreList":[]}
|
|
@@ -41,7 +41,7 @@ providedFonts.forEach(font => {
|
|
|
41
41
|
// Check for extra fonts in Info.plist
|
|
42
42
|
plistFonts.forEach(font => {
|
|
43
43
|
if (!providedFonts.has(font)) {
|
|
44
|
-
console.log(_picocolors.default.
|
|
44
|
+
console.log(_picocolors.default.yellow(`Extra ${font} (Please remove manually if not needed)`));
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_nodeFs","_interopRequireDefault","require","path","_interopRequireWildcard","_picocolors","plist","_common","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getFontName","fontPath","basename","packageJsonFilename","process","argv","Error","infoPlistFilename","fonts","getFontPaths","console","log","length","infoPlistContent","fs","readFileSync","infoPlist","parse","plistFonts","Set","UIAppFonts","providedFonts","map","hasChanges","forEach","font","add","pc","green","
|
|
1
|
+
{"version":3,"names":["_nodeFs","_interopRequireDefault","require","path","_interopRequireWildcard","_picocolors","plist","_common","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getFontName","fontPath","basename","packageJsonFilename","process","argv","Error","infoPlistFilename","fonts","getFontPaths","console","log","length","infoPlistContent","fs","readFileSync","infoPlist","parse","plistFonts","Set","UIAppFonts","providedFonts","map","hasChanges","forEach","font","add","pc","green","yellow","Array","from","updatedInfoPlistContent","build","replace","writeFileSync"],"sourceRoot":"../../../src","sources":["scripts/updatePlist.ts"],"mappings":"AAAA;AACA;AAAA;;AAEA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,KAAA,GAAAF,uBAAA,CAAAF,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AAAwC,SAAAM,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAA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C5Bf,OAAO,CAACC,GAAG,CAACgB,mBAAE,CAACE,MAAM,CAAC,SAASJ,IAAI,yCAAyC,CAAC,CAAC;EAChF;AACF,CAAC,CAAC;;AAEF;AACA,IAAIF,UAAU,EAAE;EACdP,SAAS,CAACI,UAAU,GAAGU,KAAK,CAACC,IAAI,CAACb,UAAU,CAAC;EAC7C,MAAMc,uBAAuB,GAAGtD,KAAK,CAACuD,KAAK,CAACjB,SAAS,CAAC,CAACkB,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC;EAErGpB,eAAE,CAACqB,aAAa,CAAC5B,iBAAiB,EAAEyB,uBAAuB,EAAE,MAAM,CAAC;AACtE","ignoreList":[]}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { TurboModuleRegistry } from 'react-native';
|
|
4
|
-
|
|
4
|
+
// TODO: We should return some defaults if this doesn't exist because we aren't linked now that we are optional
|
|
5
|
+
export default TurboModuleRegistry.get('VectorIcons') || {
|
|
6
|
+
// @ts-expect-error: don't care about unused name
|
|
7
|
+
getImageForFont: async (fontFamilyName, glyph, fontSize, color) => '',
|
|
8
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
9
|
+
// @ts-expect-error: don't care about unused name
|
|
10
|
+
getImageForFontSync: (fontFamilyName, glyph, fontSize, color) => '' // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
11
|
+
};
|
|
5
12
|
//# sourceMappingURL=NativeVectorIcons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","get","getImageForFont","fontFamilyName","glyph","fontSize","color","getImageForFontSync"],"sourceRoot":"../../src","sources":["NativeVectorIcons.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAQlD;AACA,eAAeA,mBAAmB,CAACC,GAAG,CAAO,aAAa,CAAC,IAAI;EAC7D;EACAC,eAAe,EAAE,MAAAA,CAAOC,cAAsB,EAAEC,KAAa,EAAEC,QAAgB,EAAEC,KAAa,KAAK,EAAE;EAAE;EACvG;EACAC,mBAAmB,EAAEA,CAACJ,cAAsB,EAAEC,KAAa,EAAEC,QAAgB,EAAEC,KAAa,KAAK,EAAE,CAAE;AACvG,CAAC","ignoreList":[]}
|
|
@@ -38,7 +38,7 @@ providedFonts.forEach(font => {
|
|
|
38
38
|
// Check for extra fonts in Info.plist
|
|
39
39
|
plistFonts.forEach(font => {
|
|
40
40
|
if (!providedFonts.has(font)) {
|
|
41
|
-
console.log(pc.
|
|
41
|
+
console.log(pc.yellow(`Extra ${font} (Please remove manually if not needed)`));
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fs","path","pc","plist","getFontPaths","getFontName","fontPath","basename","packageJsonFilename","process","argv","Error","infoPlistFilename","fonts","console","log","length","infoPlistContent","readFileSync","infoPlist","parse","plistFonts","Set","UIAppFonts","providedFonts","map","hasChanges","forEach","font","has","add","green","
|
|
1
|
+
{"version":3,"names":["fs","path","pc","plist","getFontPaths","getFontName","fontPath","basename","packageJsonFilename","process","argv","Error","infoPlistFilename","fonts","console","log","length","infoPlistContent","readFileSync","infoPlist","parse","plistFonts","Set","UIAppFonts","providedFonts","map","hasChanges","forEach","font","has","add","green","yellow","Array","from","updatedInfoPlistContent","build","replace","writeFileSync"],"sourceRoot":"../../../src","sources":["scripts/updatePlist.ts"],"mappings":"AAAA;AACA;AAAA;;AAEA,OAAOA,EAAE,MAAM,SAAS;AACxB,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAOC,EAAE,MAAM,YAAY;AAC3B,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,SAASC,YAAY,QAAQ,aAAU;AAEvC,MAAMC,WAAW,GAAIC,QAAgB,IAAKL,IAAI,CAACM,QAAQ,C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aAAa,CAACK,GAAG,CAACD,IAAI,CAAC,EAAE;IAC5Bd,OAAO,CAACC,GAAG,CAACb,EAAE,CAAC8B,MAAM,CAAC,SAASJ,IAAI,yCAAyC,CAAC,CAAC;EAChF;AACF,CAAC,CAAC;;AAEF;AACA,IAAIF,UAAU,EAAE;EACdP,SAAS,CAACI,UAAU,GAAGU,KAAK,CAACC,IAAI,CAACb,UAAU,CAAC;EAC7C,MAAMc,uBAAuB,GAAGhC,KAAK,CAACiC,KAAK,CAACjB,SAAS,CAAC,CAACkB,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC;EAErGrC,EAAE,CAACsC,aAAa,CAAC1B,iBAAiB,EAAEuB,uBAAuB,EAAE,MAAM,CAAC;AACtE","ignoreList":[]}
|
|
@@ -1 +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;;
|
|
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;;AAGD,wBAKE"}
|
|
@@ -1 +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;;
|
|
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;;AAGD,wBAKE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-vector-icons/common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0-alpha.10",
|
|
4
4
|
"description": "Customizable Icons for React Native with support for image source and full styling.",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@types/plist": "^3.0.5",
|
|
95
|
-
"@types/react": "~18.3.
|
|
95
|
+
"@types/react": "~18.3.18",
|
|
96
96
|
"del-cli": "^6.0.0",
|
|
97
97
|
"onchange": "^7.1.0",
|
|
98
98
|
"react": "18.3.1",
|
|
99
|
-
"react-native": "0.76.
|
|
100
|
-
"react-native-builder-bob": "^0.
|
|
99
|
+
"react-native": "0.76.5",
|
|
100
|
+
"react-native-builder-bob": "^0.35.2",
|
|
101
101
|
"turbo": "^1.13.4",
|
|
102
102
|
"typescript": "^5.7.2"
|
|
103
103
|
},
|
|
@@ -161,6 +161,5 @@
|
|
|
161
161
|
"type": "module-mixed",
|
|
162
162
|
"languages": "kotlin-objc",
|
|
163
163
|
"version": "0.41.2"
|
|
164
|
-
}
|
|
165
|
-
"gitHead": "1651392734fd93ad09e833ab0c3c93f44b918439"
|
|
164
|
+
}
|
|
166
165
|
}
|
package/src/NativeVectorIcons.ts
CHANGED
|
@@ -7,4 +7,10 @@ export interface Spec extends TurboModule {
|
|
|
7
7
|
getImageForFontSync(fontFamilyName: string, glyph: string, fontSize: number, color: number): string;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// TODO: We should return some defaults if this doesn't exist because we aren't linked now that we are optional
|
|
11
|
+
export default TurboModuleRegistry.get<Spec>('VectorIcons') || {
|
|
12
|
+
// @ts-expect-error: don't care about unused name
|
|
13
|
+
getImageForFont: async (fontFamilyName: string, glyph: string, fontSize: number, color: number) => '', // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
14
|
+
// @ts-expect-error: don't care about unused name
|
|
15
|
+
getImageForFontSync: (fontFamilyName: string, glyph: string, fontSize: number, color: number) => '', // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
16
|
+
};
|
|
@@ -45,7 +45,7 @@ providedFonts.forEach((font) => {
|
|
|
45
45
|
// Check for extra fonts in Info.plist
|
|
46
46
|
plistFonts.forEach((font) => {
|
|
47
47
|
if (!providedFonts.has(font)) {
|
|
48
|
-
console.log(pc.
|
|
48
|
+
console.log(pc.yellow(`Extra ${font} (Please remove manually if not needed)`));
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
|
package/LICENSE
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2015 Joel Arvidsson
|
|
4
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
in the Software without restriction, including without limitation the rights
|
|
7
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
furnished to do so, subject to the following conditions:
|
|
10
|
-
|
|
11
|
-
The above copyright notice and this permission notice shall be included in all
|
|
12
|
-
copies or substantial portions of the Software.
|
|
13
|
-
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
-
SOFTWARE.
|
package/scripts/copy-fonts.sh
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
set -e
|
|
4
|
-
|
|
5
|
-
# This script borrows from the standard resource copy script https://gist.github.com/vonovak/d8f1a37804438f05bae22be1e8cd53c1
|
|
6
|
-
# We need two key bits of information
|
|
7
|
-
# Project Root - Where the package.json for the RN app lives
|
|
8
|
-
# Xcode Build Dir to copy the fonts into - We look for the directory that ends in .app
|
|
9
|
-
|
|
10
|
-
echo "(RNVI) START_COPY_FONTS"
|
|
11
|
-
|
|
12
|
-
echo "(RNVI) PWD: $(pwd)"
|
|
13
|
-
|
|
14
|
-
#############
|
|
15
|
-
# Find the fonts we need to copy
|
|
16
|
-
#############
|
|
17
|
-
|
|
18
|
-
# Assume the project root is always two directories above the POD_ROOT
|
|
19
|
-
echo "(RNVI) PODS_ROOT: $PODS_ROOT"
|
|
20
|
-
PROJECT_ROOT="${PODS_ROOT}/../.."
|
|
21
|
-
echo "(RNVI) PROJECT_ROOT: $PROJECT_ROOT"
|
|
22
|
-
|
|
23
|
-
# Items we need to copy for rsync
|
|
24
|
-
RESOURCES_TO_COPY="${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt"
|
|
25
|
-
|
|
26
|
-
"$NODE_BINARY" "${PODS_TARGET_SRCROOT}/lib/commonjs/scripts/getFonts.js" "$PROJECT_ROOT"/package.json >"$RESOURCES_TO_COPY"
|
|
27
|
-
|
|
28
|
-
#############
|
|
29
|
-
# Find the destination we copy to
|
|
30
|
-
#############
|
|
31
|
-
|
|
32
|
-
echo "(RNVI) PODS_CONFIGURATION_BUILD_DIR: $PODS_CONFIGURATION_BUILD_DIR"
|
|
33
|
-
XCODE_DIR=$(ls -d "$PODS_CONFIGURATION_BUILD_DIR"/*.app)
|
|
34
|
-
echo "(RNVI) XCODE_DIR: $XCODE_DIR"
|
|
35
|
-
DEST_DIR="${XCODE_DIR}"
|
|
36
|
-
echo "(RNVI) DEST_DIR: $DEST_DIR"
|
|
37
|
-
echo "(RNVI) INSTALL_DIR: $INSTALL_DIR"
|
|
38
|
-
mkdir -p "$DEST_DIR"
|
|
39
|
-
|
|
40
|
-
#############
|
|
41
|
-
# Copy the fonts
|
|
42
|
-
#############
|
|
43
|
-
echo "(RNVI) Copying the following files to $DEST_DIR"
|
|
44
|
-
sed 's/^/(RNVI) /' "$RESOURCES_TO_COPY"
|
|
45
|
-
|
|
46
|
-
# NOTE: Should we add --delete and remove old fonts automagically? NOt doing it yet as it feels risky
|
|
47
|
-
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "$DEST_DIR"
|
|
48
|
-
# TODO: How do we test this is right?
|
|
49
|
-
if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
|
|
50
|
-
mkdir -p "${INSTALL_DIR}/react-native-vector-icons"
|
|
51
|
-
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/react-native-vector-icons"
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
rm -f "$RESOURCES_TO_COPY"
|
|
55
|
-
|
|
56
|
-
echo "(RNVI) END:RNVI_COPY_FONTS"
|