@react-native-vector-icons/common 12.0.1 → 12.1.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/README.md +47 -35
- package/lib/commonjs/create-icon-set.js +11 -52
- package/lib/commonjs/create-icon-set.js.map +1 -1
- package/lib/commonjs/create-icon-source-cache.js +0 -2
- package/lib/commonjs/create-icon-source-cache.js.map +1 -1
- package/lib/commonjs/defaults.js +9 -0
- package/lib/commonjs/defaults.js.map +1 -0
- package/lib/commonjs/dynamicLoading/dynamic-font-loading.js +1 -1
- package/lib/commonjs/dynamicLoading/dynamic-font-loading.js.map +1 -1
- package/lib/commonjs/dynamicLoading/dynamic-loading-setting.js +8 -1
- package/lib/commonjs/dynamicLoading/dynamic-loading-setting.js.map +1 -1
- package/lib/commonjs/get-image-library.js +25 -5
- package/lib/commonjs/get-image-library.js.map +1 -1
- package/lib/commonjs/get-image-source.js +58 -0
- package/lib/commonjs/get-image-source.js.map +1 -0
- package/lib/commonjs/index.js +3 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/scripts/common.js.map +1 -1
- package/lib/commonjs/scripts/updatePlist.js.map +1 -1
- package/lib/module/create-icon-set.js +10 -51
- package/lib/module/create-icon-set.js.map +1 -1
- package/lib/module/create-icon-source-cache.js +0 -2
- package/lib/module/create-icon-source-cache.js.map +1 -1
- package/lib/module/defaults.js +5 -0
- package/lib/module/defaults.js.map +1 -0
- package/lib/module/dynamicLoading/dynamic-font-loading.js +2 -1
- package/lib/module/dynamicLoading/dynamic-font-loading.js.map +1 -1
- package/lib/module/dynamicLoading/dynamic-loading-setting.js +5 -0
- package/lib/module/dynamicLoading/dynamic-loading-setting.js.map +1 -1
- package/lib/module/get-image-library.js +26 -5
- package/lib/module/get-image-library.js.map +1 -1
- package/lib/module/get-image-source.js +52 -0
- package/lib/module/get-image-source.js.map +1 -0
- package/lib/module/index.js +3 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/scripts/common.js.map +1 -1
- package/lib/module/scripts/updatePlist.js.map +1 -1
- package/lib/typescript/commonjs/src/create-icon-set.d.ts +0 -2
- package/lib/typescript/commonjs/src/create-icon-set.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/create-icon-source-cache.d.ts +0 -1
- package/lib/typescript/commonjs/src/create-icon-source-cache.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/defaults.d.ts +3 -0
- package/lib/typescript/commonjs/src/defaults.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/dynamicLoading/dynamic-font-loading.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/dynamicLoading/dynamic-loading-setting.d.ts +15 -0
- package/lib/typescript/commonjs/src/dynamicLoading/dynamic-loading-setting.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/get-image-library.d.ts +4 -1
- package/lib/typescript/commonjs/src/get-image-library.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/get-image-source.d.ts +11 -0
- package/lib/typescript/commonjs/src/get-image-source.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +4 -3
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/scripts/common.d.ts.map +1 -1
- package/lib/typescript/module/src/create-icon-set.d.ts +0 -2
- package/lib/typescript/module/src/create-icon-set.d.ts.map +1 -1
- package/lib/typescript/module/src/create-icon-source-cache.d.ts +0 -1
- package/lib/typescript/module/src/create-icon-source-cache.d.ts.map +1 -1
- package/lib/typescript/module/src/defaults.d.ts +3 -0
- package/lib/typescript/module/src/defaults.d.ts.map +1 -0
- package/lib/typescript/module/src/dynamicLoading/dynamic-font-loading.d.ts.map +1 -1
- package/lib/typescript/module/src/dynamicLoading/dynamic-loading-setting.d.ts +15 -0
- package/lib/typescript/module/src/dynamicLoading/dynamic-loading-setting.d.ts.map +1 -1
- package/lib/typescript/module/src/get-image-library.d.ts +4 -1
- package/lib/typescript/module/src/get-image-library.d.ts.map +1 -1
- package/lib/typescript/module/src/get-image-source.d.ts +11 -0
- package/lib/typescript/module/src/get-image-source.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +4 -3
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/scripts/common.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/create-icon-set.tsx +16 -69
- package/src/create-icon-source-cache.ts +1 -3
- package/src/defaults.ts +2 -0
- package/src/dynamicLoading/dynamic-font-loading.ts +3 -1
- package/src/dynamicLoading/dynamic-loading-setting.ts +24 -5
- package/src/get-image-library.ts +30 -9
- package/src/get-image-source.ts +74 -0
- package/src/index.ts +4 -3
- package/src/scripts/common.ts +1 -0
- package/src/scripts/updatePlist.ts +1 -0
- package/android/generated/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeVectorIconsSpec.java +0 -42
- package/android/generated/android/app/build/generated/source/codegen/jni/CMakeLists.txt +0 -36
- package/android/generated/android/app/build/generated/source/codegen/jni/RNVectorIconsSpec-generated.cpp +0 -38
- package/android/generated/android/app/build/generated/source/codegen/jni/RNVectorIconsSpec.h +0 -31
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNVectorIconsSpec/ComponentDescriptors.cpp +0 -22
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNVectorIconsSpec/ComponentDescriptors.h +0 -24
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNVectorIconsSpec/EventEmitters.cpp +0 -16
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNVectorIconsSpec/EventEmitters.h +0 -17
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNVectorIconsSpec/Props.cpp +0 -19
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNVectorIconsSpec/Props.h +0 -18
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNVectorIconsSpec/RNVectorIconsSpecJSI-generated.cpp +0 -40
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNVectorIconsSpec/RNVectorIconsSpecJSI.h +0 -76
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNVectorIconsSpec/ShadowNodes.cpp +0 -17
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNVectorIconsSpec/ShadowNodes.h +0 -23
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNVectorIconsSpec/States.cpp +0 -16
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNVectorIconsSpec/States.h +0 -19
- package/ios/generated/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm +0 -2321
- package/ios/generated/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h +0 -2761
- package/ios/generated/build/generated/ios/FBReactNativeSpecJSI-generated.cpp +0 -2929
- package/ios/generated/build/generated/ios/FBReactNativeSpecJSI.h +0 -7727
- package/ios/generated/build/generated/ios/RCTModulesConformingToProtocolsProvider.h +0 -18
- package/ios/generated/build/generated/ios/RCTModulesConformingToProtocolsProvider.mm +0 -33
- package/ios/generated/build/generated/ios/RNVectorIconsSpec/RNVectorIconsSpec-generated.mm +0 -46
- package/ios/generated/build/generated/ios/RNVectorIconsSpec/RNVectorIconsSpec.h +0 -68
- package/ios/generated/build/generated/ios/RNVectorIconsSpecJSI-generated.cpp +0 -40
- package/ios/generated/build/generated/ios/RNVectorIconsSpecJSI.h +0 -76
- package/ios/generated/build/generated/ios/react/renderer/components/RNVectorIconsSpec/ComponentDescriptors.cpp +0 -22
- package/ios/generated/build/generated/ios/react/renderer/components/RNVectorIconsSpec/ComponentDescriptors.h +0 -24
- package/ios/generated/build/generated/ios/react/renderer/components/RNVectorIconsSpec/EventEmitters.cpp +0 -16
- package/ios/generated/build/generated/ios/react/renderer/components/RNVectorIconsSpec/EventEmitters.h +0 -17
- package/ios/generated/build/generated/ios/react/renderer/components/RNVectorIconsSpec/Props.cpp +0 -19
- package/ios/generated/build/generated/ios/react/renderer/components/RNVectorIconsSpec/Props.h +0 -18
- package/ios/generated/build/generated/ios/react/renderer/components/RNVectorIconsSpec/RCTComponentViewHelpers.h +0 -18
- package/ios/generated/build/generated/ios/react/renderer/components/RNVectorIconsSpec/ShadowNodes.cpp +0 -17
- package/ios/generated/build/generated/ios/react/renderer/components/RNVectorIconsSpec/ShadowNodes.h +0 -23
- package/ios/generated/build/generated/ios/react/renderer/components/RNVectorIconsSpec/States.cpp +0 -16
- package/ios/generated/build/generated/ios/react/renderer/components/RNVectorIconsSpec/States.h +0 -19
package/README.md
CHANGED
|
@@ -47,9 +47,9 @@ RNVI comes with the following supported icons. You can [search NPM](https://www.
|
|
|
47
47
|
- [`Feather`](http://feathericons.com) created by Cole Bemis & Contributors (v4.29.2 featuring _287_ icons)
|
|
48
48
|
- [`FontAwesome 6`](https://fontawesome.com/search) designed by Fonticons, Inc. (v6.7.2 featuring _2060_ free and _52663_ pro icons)
|
|
49
49
|
- [`Foundation`](http://zurb.com/playground/foundation-icon-fonts-3) by ZURB, Inc. (v3.0 with _283_ icons)
|
|
50
|
-
- [`Ionicons`](https://ionic.io/ionicons) crafted by Ionic (v8.0.
|
|
50
|
+
- [`Ionicons`](https://ionic.io/ionicons) crafted by Ionic (v8.0.9 containing _1357_ icons)
|
|
51
51
|
- [`MaterialDesignIcons`](https://pictogrammers.com/library/mdi/) from MaterialDesignIcons.com (v7.4.47 including _7448_ icons)
|
|
52
|
-
- [`Octicons`](https://primer.style/foundations/icons) designed by GitHub, Inc. (v19.15.
|
|
52
|
+
- [`Octicons`](https://primer.style/foundations/icons) designed by GitHub, Inc. (v19.15.2 with _333_ icons)
|
|
53
53
|
- [`Lucide`](https://lucide.dev/) designed by Lucide, (v0.473.0 with _1548_ icons)
|
|
54
54
|
|
|
55
55
|
### No longer maintained upstream
|
|
@@ -69,14 +69,14 @@ See [MIGRATION.md](MIGRATION.md) if you are migrating from `react-native-vector-
|
|
|
69
69
|
|
|
70
70
|
## Installation
|
|
71
71
|
|
|
72
|
-
1. Install the packages for the icons you want use
|
|
72
|
+
1. Install the packages for the icons you want to use
|
|
73
73
|
|
|
74
74
|
```sh
|
|
75
|
-
npm install
|
|
75
|
+
npm install @react-native-vector-icons/fontawesome6 @react-native-vector-icons/evil-icons
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
1. Depending on the platform you're targeting (iOS/Android/Windows), follow the appropriate setup instructions below.
|
|
79
|
+
1. If you are using one of the following fonts, refer to their guides for further instructions
|
|
80
80
|
|
|
81
81
|
- [FontAwesome 6](packages/fontawesome6/README.md)
|
|
82
82
|
- [FontAwesome 6 Pro](packages/fontawesome6-pro/README.md)
|
|
@@ -89,13 +89,26 @@ See [MIGRATION.md](MIGRATION.md) if you are migrating from `react-native-vector-
|
|
|
89
89
|
|
|
90
90
|
Please refer to the guide for [Expo](./docs/SETUP-EXPO.md), [React Native](./docs/SETUP-REACT-NATIVE.md) or [Web](./docs/SETUP-WEB.md) for further instructions.
|
|
91
91
|
|
|
92
|
+
### Font location customisation
|
|
93
|
+
|
|
94
|
+
For fonts like fontawesome6-pro, fontello and icomoon where you provide the fonts the default location for the font files is `rnvi-fonts` in the same directory as your package.json. This can be customized by setting the `fontDir` property in your `package.json` file.
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"reactNativeVectorIcons": {
|
|
99
|
+
"fontDir": "src/rnvi-fonts"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
92
104
|
## `Icon` Component
|
|
93
105
|
|
|
94
106
|
You can either use one of the bundled icons above or roll your own custom font.
|
|
95
107
|
|
|
96
108
|
```js
|
|
97
|
-
import Icon from
|
|
98
|
-
|
|
109
|
+
import Icon from "@react-native-vector-icons/fontawesome";
|
|
110
|
+
|
|
111
|
+
<Icon name="rocket" size={30} color="#900" />;
|
|
99
112
|
```
|
|
100
113
|
|
|
101
114
|
### Props
|
|
@@ -128,14 +141,16 @@ By combining some of these you can create for example :
|
|
|
128
141
|
|
|
129
142
|
## Multi-Style Fonts
|
|
130
143
|
|
|
131
|
-
Some fonts today use multiple styles, FontAwesome
|
|
144
|
+
Some fonts today use multiple styles, FontAwesome 6 for example, which is supported by this library. The usage is pretty much the same as the standard `Icon` component:
|
|
132
145
|
|
|
133
146
|
```jsx
|
|
134
|
-
import Icon from
|
|
147
|
+
import Icon from "@react-native-vector-icons/fontawesome5";
|
|
148
|
+
|
|
149
|
+
<Icon name="comments" size={30} color="#900" />; // Defaults to regular
|
|
135
150
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
151
|
+
<Icon name="comments" size={30} color="#900" iconType="solid" />
|
|
152
|
+
|
|
153
|
+
<Icon name="comments" size={30} color="#900" iconType="light" />
|
|
139
154
|
```
|
|
140
155
|
|
|
141
156
|
## Usage as PNG Image/Source Object
|
|
@@ -146,6 +161,7 @@ You need to install `@react-native-vector-icons/get-image` to use this feature.
|
|
|
146
161
|
|
|
147
162
|
```jsx
|
|
148
163
|
const source = Icon.getImageSourceSync('user', 20, 'red');
|
|
164
|
+
|
|
149
165
|
return <Image source={source} />;
|
|
150
166
|
);
|
|
151
167
|
```
|
|
@@ -176,16 +192,16 @@ name and the value is either a UTF-8 character or it's character code.
|
|
|
176
192
|
Font Book.app or similar to learn the name. Also pass the `fontFileName` argument for Android support.
|
|
177
193
|
|
|
178
194
|
```js
|
|
179
|
-
import { createIconSet } from
|
|
180
|
-
const glyphMap = {
|
|
195
|
+
import { createIconSet } from "@react-native-vector-icons/common";
|
|
196
|
+
const glyphMap = { "icon-name": 1234, test: "∆" };
|
|
181
197
|
|
|
182
198
|
// use createIconSet() with object parameter
|
|
183
199
|
// or use positional parameters for compatibility with version <= 10: `createIconSet(glyphMap, fontFamily[, fontFile])`
|
|
184
200
|
const Icon = createIconSet(glyphMap, {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
})
|
|
201
|
+
postScriptName: "FontName",
|
|
202
|
+
fontFileName: "font-name.ttf",
|
|
203
|
+
fontSource: require("../fonts/font-name.ttf"), // optional, for dynamic loading. Can also be a local file uri.
|
|
204
|
+
});
|
|
189
205
|
```
|
|
190
206
|
|
|
191
207
|
If you aren't using dynamic font loading you need to make sure your font is copied into your bundle.
|
|
@@ -227,26 +243,22 @@ Try the `IconExplorer` project in `Examples/IconExplorer` folder, there you can
|
|
|
227
243
|
### Basic Example
|
|
228
244
|
|
|
229
245
|
```js
|
|
230
|
-
import Icon from
|
|
246
|
+
import Icon from "@react-native-vector-icons/ionicons";
|
|
231
247
|
|
|
232
|
-
|
|
233
|
-
return <Icon name="ios-person" size={30} color="#4F8EF7" />;
|
|
234
|
-
}
|
|
248
|
+
const ExampleView = () => <Icon name="ios-person" size={30} color="#4F8EF7" />;
|
|
235
249
|
```
|
|
236
250
|
|
|
237
251
|
### Inline Icons
|
|
238
252
|
|
|
239
253
|
```js
|
|
240
|
-
import { Text } from
|
|
241
|
-
import Icon from
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
<
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
);
|
|
249
|
-
}
|
|
254
|
+
import { Text } from "react-native";
|
|
255
|
+
import Icon from "@react-native-vector-icons/ionicons";
|
|
256
|
+
|
|
257
|
+
const ExampleView = (props) => (
|
|
258
|
+
<Text>
|
|
259
|
+
Lorem <Icon name="ios-book" color="#4F8EF7" /> Ipsum
|
|
260
|
+
</Text>
|
|
261
|
+
);
|
|
250
262
|
```
|
|
251
263
|
|
|
252
264
|
## Testing
|
|
@@ -273,8 +285,8 @@ Create `__mocks__/@react-native-vector-icons/common.js`:
|
|
|
273
285
|
```js
|
|
274
286
|
// Mock the entire common library so there are no native module loading errors
|
|
275
287
|
module.exports = {
|
|
276
|
-
createIconSet: () => "icon"
|
|
277
|
-
}
|
|
288
|
+
createIconSet: () => "icon",
|
|
289
|
+
};
|
|
278
290
|
```
|
|
279
291
|
|
|
280
292
|
## [Changelog](https://github.com/oblador/react-native-vector-icons/releases)
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.DEFAULT_ICON_SIZE = exports.DEFAULT_ICON_COLOR = void 0;
|
|
7
6
|
exports.createIconSet = createIconSet;
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
8
|
var _reactNative = require("react-native");
|
|
10
9
|
var _createIconSourceCache = _interopRequireDefault(require("./create-icon-source-cache.js"));
|
|
10
|
+
var _defaults = require("./defaults.js");
|
|
11
11
|
var _dynamicFontLoading = require("./dynamicLoading/dynamic-font-loading");
|
|
12
12
|
var _dynamicLoadingSetting = require("./dynamicLoading/dynamic-loading-setting.js");
|
|
13
|
-
var
|
|
13
|
+
var _getImageSource = require("./get-image-source.js");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
@@ -19,8 +19,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
19
19
|
|
|
20
20
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
21
21
|
|
|
22
|
-
const DEFAULT_ICON_SIZE = exports.DEFAULT_ICON_SIZE = 12;
|
|
23
|
-
const DEFAULT_ICON_COLOR = exports.DEFAULT_ICON_COLOR = 'black';
|
|
24
22
|
function createIconSet(glyphMap, postScriptNameOrOptions, fontFileNameParam, fontStyleParam) {
|
|
25
23
|
const {
|
|
26
24
|
postScriptName,
|
|
@@ -43,16 +41,16 @@ function createIconSet(glyphMap, postScriptNameOrOptions, fontFileNameParam, fon
|
|
|
43
41
|
fontStyle: 'normal'
|
|
44
42
|
};
|
|
45
43
|
const resolveGlyph = name => {
|
|
46
|
-
const glyph = glyphMap[name]
|
|
44
|
+
const glyph = glyphMap[name];
|
|
47
45
|
if (typeof glyph === 'number') {
|
|
48
46
|
return String.fromCodePoint(glyph);
|
|
49
47
|
}
|
|
50
|
-
return
|
|
48
|
+
return '?';
|
|
51
49
|
};
|
|
52
50
|
const Icon = ({
|
|
53
51
|
name,
|
|
54
|
-
size = DEFAULT_ICON_SIZE,
|
|
55
|
-
color = DEFAULT_ICON_COLOR,
|
|
52
|
+
size = _defaults.DEFAULT_ICON_SIZE,
|
|
53
|
+
color = _defaults.DEFAULT_ICON_COLOR,
|
|
56
54
|
style,
|
|
57
55
|
children,
|
|
58
56
|
allowFontScaling = false,
|
|
@@ -98,52 +96,13 @@ function createIconSet(glyphMap, postScriptNameOrOptions, fontFileNameParam, fon
|
|
|
98
96
|
}));
|
|
99
97
|
WrappedIcon.displayName = 'Icon';
|
|
100
98
|
const imageSourceCache = (0, _createIconSourceCache.default)();
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const processedColor = (0, _reactNative.processColor)(color);
|
|
105
|
-
const cacheKey = `${glyph}:${size}:${String(processedColor)}`;
|
|
106
|
-
if (imageSourceCache.has(cacheKey)) {
|
|
107
|
-
// FIXME: Should this check if it's an error and throw it again?
|
|
108
|
-
return imageSourceCache.get(cacheKey);
|
|
109
|
-
}
|
|
110
|
-
try {
|
|
111
|
-
const imagePath = NativeIconAPI.getImageForFontSync(fontReference, glyph, size, processedColor // FIXME what if a non existant colour was passed in?
|
|
112
|
-
);
|
|
113
|
-
const value = {
|
|
114
|
-
uri: imagePath,
|
|
115
|
-
scale: _reactNative.PixelRatio.get()
|
|
116
|
-
};
|
|
117
|
-
imageSourceCache.setValue(cacheKey, value);
|
|
118
|
-
return value;
|
|
119
|
-
} catch (error) {
|
|
120
|
-
imageSourceCache.setError(cacheKey, error);
|
|
121
|
-
throw error;
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
const getImageSource = async (name, size = DEFAULT_ICON_SIZE, color = DEFAULT_ICON_COLOR) => {
|
|
125
|
-
const NativeIconAPI = (0, _getImageLibrary.ensureGetImageAvailable)();
|
|
126
|
-
const glyph = resolveGlyph(name);
|
|
127
|
-
const processedColor = (0, _reactNative.processColor)(color);
|
|
128
|
-
const cacheKey = `${glyph}:${size}:${String(processedColor)}`;
|
|
129
|
-
if (imageSourceCache.has(cacheKey)) {
|
|
130
|
-
// FIXME: Should this check if it's an error and throw it again?
|
|
131
|
-
return imageSourceCache.get(cacheKey);
|
|
132
|
-
}
|
|
133
|
-
try {
|
|
134
|
-
const imagePath = await NativeIconAPI.getImageForFont(fontReference, glyph, size, processedColor // FIXME what if a non existant colour was passed in?
|
|
135
|
-
);
|
|
136
|
-
const value = {
|
|
137
|
-
uri: imagePath,
|
|
138
|
-
scale: _reactNative.PixelRatio.get()
|
|
139
|
-
};
|
|
140
|
-
imageSourceCache.setValue(cacheKey, value);
|
|
141
|
-
return value;
|
|
142
|
-
} catch (error) {
|
|
143
|
-
imageSourceCache.setError(cacheKey, error);
|
|
144
|
-
throw error;
|
|
99
|
+
const getImageSource = async (name, size, color) => {
|
|
100
|
+
if (typeof postScriptNameOrOptions === 'object' && typeof postScriptNameOrOptions.fontSource !== 'undefined') {
|
|
101
|
+
await _dynamicFontLoading.dynamicLoader.loadFontAsync(fontReference, postScriptNameOrOptions.fontSource);
|
|
145
102
|
}
|
|
103
|
+
return (0, _getImageSource.getImageSource)(imageSourceCache, fontReference, resolveGlyph(name), size, color);
|
|
146
104
|
};
|
|
105
|
+
const getImageSourceSync = (name, size, color) => (0, _getImageSource.getImageSourceSync)(imageSourceCache, fontReference, resolveGlyph(name), size, color);
|
|
147
106
|
const IconNamespace = Object.assign(WrappedIcon, {
|
|
148
107
|
getImageSource,
|
|
149
108
|
getImageSourceSync
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_createIconSourceCache","_interopRequireDefault","_dynamicFontLoading","_dynamicLoadingSetting","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_createIconSourceCache","_interopRequireDefault","_defaults","_dynamicFontLoading","_dynamicLoadingSetting","_getImageSource","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","createIconSet","glyphMap","postScriptNameOrOptions","fontFileNameParam","fontStyleParam","postScriptName","fontFileName","fontStyle","fontBasename","replace","fontReference","Platform","select","windows","android","styleOverrides","fontFamily","fontWeight","resolveGlyph","name","glyph","String","fromCodePoint","Icon","size","DEFAULT_ICON_SIZE","color","DEFAULT_ICON_COLOR","style","children","allowFontScaling","innerRef","props","isFontLoaded","setIsFontLoaded","React","useState","isDynamicLoadingEnabled","dynamicLoader","isLoaded","useEffect","isMounted","fontSource","loadFontAsync","finally","styleDefaults","fontSize","newProps","jsxs","Text","ref","selectable","WrappedIcon","forwardRef","jsx","displayName","imageSourceCache","createIconSourceCache","getImageSource","getImageSourceImpl","getImageSourceSync","getImageSourceSyncImpl","IconNamespace","assign"],"sourceRoot":"../../src","sources":["create-icon-set.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,sBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAN,OAAA;AAEA,IAAAO,eAAA,GAAAP,OAAA;AAAwH,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAG,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,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WAAW,EAAE;MAC5G,MAAMJ,iCAAa,CAACK,aAAa,CAACjC,aAAa,EAAER,uBAAuB,CAACwC,UAAU,CAAC;IACtF;IACA,OAAO,IAAAiB,8BAAkB,EAACH,gBAAgB,EAAE9C,aAAa,EAAEQ,YAAY,CAACC,IAAI,CAAC,EAAEK,IAAI,EAAEE,KAAK,CAAC;EAC7F,CAAC;EAED,MAAMkC,kBAAwD,GAAGA,CAACzC,IAAI,EAAEK,IAAI,EAAEE,KAAK,KACjF,IAAAmC,kCAAsB,EAACL,gBAAgB,EAAE9C,aAAa,EAAEQ,YAAY,CAACC,IAAI,CAAC,EAAEK,IAAI,EAAEE,KAAK,CAAC;EAE1F,MAAMoC,aAAa,GAAGtE,MAAM,CAACuE,MAAM,CAACX,WAAW,EAAE;IAC/CM,cAAc;IACdE;EACF,CAAC,CAAC;EAEF,OAAOE,aAAa;AACtB","ignoreList":[]}
|
|
@@ -16,7 +16,6 @@ function createIconSourceCache() {
|
|
|
16
16
|
type: TYPE_ERROR,
|
|
17
17
|
data: error
|
|
18
18
|
});
|
|
19
|
-
const has = key => cache.has(key);
|
|
20
19
|
const get = key => {
|
|
21
20
|
const value = cache.get(key);
|
|
22
21
|
if (!value) {
|
|
@@ -34,7 +33,6 @@ function createIconSourceCache() {
|
|
|
34
33
|
return {
|
|
35
34
|
setValue,
|
|
36
35
|
setError,
|
|
37
|
-
has,
|
|
38
36
|
get
|
|
39
37
|
};
|
|
40
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TYPE_VALUE","TYPE_ERROR","createIconSourceCache","cache","Map","setValue","key","value","set","type","data","setError","error","
|
|
1
|
+
{"version":3,"names":["TYPE_VALUE","TYPE_ERROR","createIconSourceCache","cache","Map","setValue","key","value","set","type","data","setError","error","get","undefined"],"sourceRoot":"../../src","sources":["create-icon-source-cache.ts"],"mappings":";;;;;;AAAA,MAAMA,UAAU,GAAG,OAAO;AAC1B,MAAMC,UAAU,GAAG,OAAO;AAMX,SAASC,qBAAqBA,CAAA,EAAG;EAC9C,MAAMC,KAAK,GAAG,IAAIC,GAAG,CAAgB,CAAC;EAEtC,MAAMC,QAAQ,GAAGA,CAACC,GAAW,EAAEC,KAAgB,KAAKJ,KAAK,CAACK,GAAG,CAACF,GAAG,EAAE;IAAEG,IAAI,EAAET,UAAU;IAAEU,IAAI,EAAEH;EAAM,CAAC,CAAC;EAErG,MAAMI,QAAQ,GAAGA,CAACL,GAAW,EAAEM,KAAY,KAAKT,KAAK,CAACK,GAAG,CAACF,GAAG,EAAE;IAAEG,IAAI,EAAER,UAAU;IAAES,IAAI,EAAEE;EAAM,CAAC,CAAC;EAEjG,MAAMC,GAAG,GAAIP,GAAW,IAAK;IAC3B,MAAMC,KAAK,GAAGJ,KAAK,CAACU,GAAG,CAACP,GAAG,CAAC;IAC5B,IAAI,CAACC,KAAK,EAAE;MACV,OAAOO,SAAS;IAClB;IAEA,MAAM;MAAEL,IAAI;MAAEC;IAAK,CAAC,GAAGH,KAAK;IAC5B,IAAIE,IAAI,KAAKR,UAAU,EAAE;MACvB,MAAMS,IAAI;IACZ;IACA,OAAOA,IAAI;EACb,CAAC;EAED,OAAO;IAAEL,QAAQ;IAAEM,QAAQ;IAAEE;EAAI,CAAC;AACpC","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DEFAULT_ICON_SIZE = exports.DEFAULT_ICON_COLOR = void 0;
|
|
7
|
+
const DEFAULT_ICON_SIZE = exports.DEFAULT_ICON_SIZE = 12;
|
|
8
|
+
const DEFAULT_ICON_COLOR = exports.DEFAULT_ICON_COLOR = 'black';
|
|
9
|
+
//# sourceMappingURL=defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_ICON_SIZE","exports","DEFAULT_ICON_COLOR"],"sourceRoot":"../../src","sources":["defaults.ts"],"mappings":";;;;;;AAAO,MAAMA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,EAAE;AAC5B,MAAME,kBAAkB,GAAAD,OAAA,CAAAC,kBAAA,GAAG,OAAO","ignoreList":[]}
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.dynamicLoader = void 0;
|
|
7
|
-
var _registry = require("@react-native/assets-registry/registry");
|
|
8
7
|
var _reactNative = require("react-native");
|
|
8
|
+
var _registry = require("@react-native/assets-registry/registry");
|
|
9
9
|
var _dynamicLoadingSetting = require("./dynamic-loading-setting.js");
|
|
10
10
|
/*
|
|
11
11
|
* The following imports are always present when react native is installed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_registry","_dynamicLoadingSetting","loadPromises","loadFontAsync","fontFamily","fontSource","globalRef","globalThis","assertExpoModulesPresent","expoModules","expo","modules","LoadFont","localUri","uri","type","hash","getLocalFontUrl","ExpoAsset","downloadAsync","ExpoFontLoader","loadAsync","error","console","getErrorCallback","fontModuleId","assetMeta","getAssetByID","Error","String","assetSource","Image","resolveAssetSource","loadedFontsCache","isLoadedNative","loadedNativeFonts","getLoadedFonts","forEach","font","dynamicLoader","exports","isLoaded"],"sourceRoot":"../../../src","sources":["dynamicLoading/dynamic-font-loading.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAQA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,sBAAA,GAAAF,OAAA;AARA;AACA;AACA;AACA;AACA;AACA;;AAMA,MAAMG,YAAqD,GAAG,CAAC,CAAC;AAEhE,MAAMC,aAAa,GAAG,MAAAA,CAAOC,UAAkB,EAAEC,UAAsB,KAAoB;EACzF,MAAMC,SAAS,GAAGC,UAAU;EAC5B,IAAAC,+CAAwB,EAACF,S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AY,CAAC,EAAE,CAAC;EACtG;EAEA,MAAMK,WAAW,GAAGC,kBAAK,CAACC,kBAAkB,CAACP,YAAY,CAAC;EAE1D,OAAO;IAAE,GAAGC,SAAS;IAAE,GAAGI;EAAY,CAAC;AACzC,CAAC;AAED,MAAMG,gBAA6C,GAAG,CAAC,CAAC;AAExD,MAAMC,cAAc,GAAI9B,UAAkB,IAAK;EAC7C,IAAIA,UAAU,IAAI6B,gBAAgB,EAAE;IAClC,OAAO,IAAI;EACb;EACA,MAAM3B,SAAS,GAAGC,UAAU;EAC5B,IAAAC,+CAAwB,EAACF,SAAS,CAAC;EAEnC,MAAM6B,iBAAiB,GAAG7B,SAAS,CAACI,IAAI,CAACC,OAAO,CAACS,cAAc,CAACgB,cAAc,CAAC,CAAC;EAChFD,iBAAiB,CAACE,OAAO,CAAEC,IAAI,IAAK;IAClCL,gBAAgB,CAACK,IAAI,CAAC,GAAG,IAAI;EAC/B,CAAC,CAAC;EAEF,OAAOlC,UAAU,IAAI6B,gBAAgB;AACvC,CAAC;AAEM,MAAMM,aAA4B,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC1CE,QAAQ,EAAEP,cAAc;EACxB/B;AACF,CAAC","ignoreList":[]}
|
|
@@ -4,11 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.assertExpoModulesPresent = assertExpoModulesPresent;
|
|
7
|
-
exports.
|
|
7
|
+
exports.getErrorCallback = void 0;
|
|
8
|
+
exports.getIsRenderToImageSupported = getIsRenderToImageSupported;
|
|
9
|
+
exports.setDynamicLoadingErrorCallback = exports.setDynamicLoadingEnabled = exports.isDynamicLoadingSupported = exports.isDynamicLoadingEnabled = void 0;
|
|
8
10
|
// biome-ignore lint/suspicious/noExplicitAny: this is used internally with globalThis
|
|
9
11
|
function getIsDynamicLoadingSupported(globalObj) {
|
|
10
12
|
return globalObj?.expo && typeof globalObj.expo.modules?.ExpoAsset?.downloadAsync === 'function' && typeof globalObj.expo.modules?.ExpoFontLoader?.getLoadedFonts === 'function' && typeof globalObj.expo.modules?.ExpoFontLoader?.loadAsync === 'function';
|
|
11
13
|
}
|
|
14
|
+
|
|
15
|
+
// biome-ignore lint/suspicious/noExplicitAny: this is used internally with globalThis
|
|
16
|
+
function getIsRenderToImageSupported(globalObj) {
|
|
17
|
+
return globalObj?.expo && typeof globalObj.expo.modules?.ExpoFontUtils?.renderToImageAsync === 'function';
|
|
18
|
+
}
|
|
12
19
|
function assertExpoModulesPresent(globalObj) {
|
|
13
20
|
if (!getIsDynamicLoadingSupported(globalObj)) {
|
|
14
21
|
throw new Error('Dynamic font loading for Expo is not available.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getIsDynamicLoadingSupported","globalObj","expo","modules","ExpoAsset","downloadAsync","ExpoFontLoader","getLoadedFonts","loadAsync","assertExpoModulesPresent","Error","hasNecessaryExpoModules","globalThis","hasNecessaryExpoFeatures","dynamicFontLoadingEnabled","isDynamicLoadingSupported","exports","setDynamicLoadingEnabled","value","process","env","NODE_ENV","message","console","error","isDynamicLoadingEnabled","dynamicLoadingErrorCallback","setDynamicLoadingErrorCallback","callback","getErrorCallback"],"sourceRoot":"../../../src","sources":["dynamicLoading/dynamic-loading-setting.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["getIsDynamicLoadingSupported","globalObj","expo","modules","ExpoAsset","downloadAsync","ExpoFontLoader","getLoadedFonts","loadAsync","getIsRenderToImageSupported","ExpoFontUtils","renderToImageAsync","assertExpoModulesPresent","Error","hasNecessaryExpoModules","globalThis","hasNecessaryExpoFeatures","dynamicFontLoadingEnabled","isDynamicLoadingSupported","exports","setDynamicLoadingEnabled","value","process","env","NODE_ENV","message","console","error","isDynamicLoadingEnabled","dynamicLoadingErrorCallback","setDynamicLoadingErrorCallback","callback","getErrorCallback"],"sourceRoot":"../../../src","sources":["dynamicLoading/dynamic-loading-setting.ts"],"mappings":";;;;;;;;;AA8CA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ACtG,gIAAgI;MACpIY,OAAO,CAACC,KAAK,CAACF,OAAO,CAAC,CAAC,CAAC;IAC1B;IACA,OAAO,KAAK;EACd;EAEAR,yBAAyB,GAAG,CAAC,CAACI,KAAK;EAEnC,OAAO,IAAI;AACb,CAAC;;AAED;AACA;AACA;AAFAF,OAAA,CAAAC,wBAAA,GAAAA,wBAAA;AAGO,MAAMQ,uBAAuB,GAAGA,CAAA,KAAMX,yBAAyB;AAACE,OAAA,CAAAS,uBAAA,GAAAA,uBAAA;AAIvE,IAAIC,2BAAsD;;AAE1D;AACA;AACA;AACO,MAAMC,8BAA8B,GAAIC,QAAuB,IAAK;EACzEF,2BAA2B,GAAGE,QAAQ;AACxC,CAAC;AAACZ,OAAA,CAAAW,8BAAA,GAAAA,8BAAA;AAEK,MAAME,gBAAgB,GAAGA,CAAA,KAAMH,2BAA2B;AAACV,OAAA,CAAAa,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -4,20 +4,40 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ensureGetImageAvailable = void 0;
|
|
7
|
+
var _dynamicLoadingSetting = require("./dynamicLoading/dynamic-loading-setting.js");
|
|
7
8
|
// eslint-disable-next-line import/no-mutable-exports
|
|
8
9
|
let NativeIconAPI = null;
|
|
9
10
|
try {
|
|
10
11
|
// eslint-disable-next-line global-require,import/no-extraneous-dependencies,@typescript-eslint/no-require-imports
|
|
11
12
|
NativeIconAPI = require('@react-native-vector-icons/get-image');
|
|
12
13
|
} catch {
|
|
13
|
-
//
|
|
14
|
+
// if this fails, it's likely due to:
|
|
15
|
+
// "Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'VectorIcons' could not be found. ..."
|
|
16
|
+
// No warning at this stage.
|
|
14
17
|
}
|
|
18
|
+
const globalRef = globalThis;
|
|
19
|
+
const hasExpoRenderToImage = (0, _dynamicLoadingSetting.getIsRenderToImageSupported)(globalRef);
|
|
15
20
|
const ensureGetImageAvailable = () => {
|
|
16
|
-
if (
|
|
17
|
-
|
|
21
|
+
if (NativeIconAPI) {
|
|
22
|
+
NativeIconAPI.ensureNativeModuleAvailable();
|
|
23
|
+
return NativeIconAPI;
|
|
18
24
|
}
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
if (hasExpoRenderToImage) {
|
|
26
|
+
const {
|
|
27
|
+
ExpoFontUtils
|
|
28
|
+
} = globalRef.expo.modules;
|
|
29
|
+
return {
|
|
30
|
+
getImageForFont: async (fontReference, glyph, size, color) => ExpoFontUtils.renderToImageAsync(glyph, {
|
|
31
|
+
fontFamily: fontReference,
|
|
32
|
+
size,
|
|
33
|
+
color
|
|
34
|
+
}),
|
|
35
|
+
getImageForFontSync: () => {
|
|
36
|
+
throw new Error('You attempted to call `getImageForFontSync`. Expo dev client with `@react-native-vector-icons/get-image` installed is required for this. Alternatively, call `getImageForFont` or generate the image yourself and bundle it with the app.');
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
throw new Error('Error in getImageSource / getImageSourceSync: You need to either (1) install `@react-native-vector-icons/get-image` or (2) use Expo SDK 53+ (Expo dev client or Expo Go). Check your setup and rebuild the app.');
|
|
21
41
|
};
|
|
22
42
|
exports.ensureGetImageAvailable = ensureGetImageAvailable;
|
|
23
43
|
//# sourceMappingURL=get-image-library.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_dynamicLoadingSetting","require","NativeIconAPI","globalRef","globalThis","hasExpoRenderToImage","getIsRenderToImageSupported","ensureGetImageAvailable","ensureNativeModuleAvailable","ExpoFontUtils","expo","modules","getImageForFont","fontReference","glyph","size","color","renderToImageAsync","fontFamily","getImageForFontSync","Error","exports"],"sourceRoot":"../../src","sources":["get-image-library.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAEA;AACA,IAAIC,aAA2E,GAAG,IAAI;AAEtF,IAAI;EACF;EACAA,aAAa,GAAGD,OAAO,CAAC,sCAAsC,CAAC;AACjE,CAAC,CAAC,MAAM;EACN;EACA;EACA;AAAA;AAGF,MAAME,SAAS,GAAGC,UAAU;AAC5B,MAAMC,oBAAoB,GAAG,IAAAC,kDAA2B,EAACH,SAAS,CAAC;AAE5D,MAAMI,uBAAuB,GAAGA,CAAA,KAAM;EAC3C,IAAIL,aAAa,EAAE;IACjBA,aAAa,CAACM,2BAA2B,CAAC,CAAC;IAC3C,OAAON,aAAa;EACtB;EACA,IAAIG,oBAAoB,EAAE;IACxB,MAAM;MAAEI;IAAc,CAAC,GAAGN,SAAS,CAACO,IAAI,CAACC,OAAO;IAChD,OAAO;MACLC,eAAe,EAAE,MAAAA,CAAOC,aAAqB,EAAEC,KAAa,EAAEC,IAAY,EAAEC,KAAa,KACvFP,aAAa,CAACQ,kBAAkB,CAACH,KAAK,EAAE;QACtCI,UAAU,EAAEL,aAAa;QACzBE,IAAI;QACJC;MACF,CAAC,CAAC;MACJG,mBAAmB,EAAEA,CAAA,KAAM;QACzB,MAAM,IAAIC,KAAK,CACb,2OACF,CAAC;MACH;IACF,CAAC;EACH;EACA,MAAM,IAAIA,KAAK,CACb,iNACF,CAAC;AACH,CAAC;AAACC,OAAA,CAAAd,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getImageSourceSync = exports.getImageSource = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _defaults = require("./defaults.js");
|
|
9
|
+
var _getImageLibrary = require("./get-image-library.js");
|
|
10
|
+
const getImageSourceSync = (imageSourceCache, fontReference, glyph, size = _defaults.DEFAULT_ICON_SIZE, color = _defaults.DEFAULT_ICON_COLOR) => {
|
|
11
|
+
const NativeIconAPI = (0, _getImageLibrary.ensureGetImageAvailable)();
|
|
12
|
+
const processedColor = (0, _reactNative.processColor)(color);
|
|
13
|
+
const cacheKey = `${glyph}:${size}:${String(processedColor)}`;
|
|
14
|
+
const maybeCachedValue = imageSourceCache.get(cacheKey);
|
|
15
|
+
if (maybeCachedValue !== undefined) {
|
|
16
|
+
// FIXME: Should this check if it's an error and throw it again?
|
|
17
|
+
return maybeCachedValue;
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
const imagePath = NativeIconAPI.getImageForFontSync(fontReference, glyph, size, processedColor // FIXME what if a non existent colour was passed in?
|
|
21
|
+
);
|
|
22
|
+
const value = {
|
|
23
|
+
uri: imagePath,
|
|
24
|
+
scale: _reactNative.PixelRatio.get()
|
|
25
|
+
};
|
|
26
|
+
imageSourceCache.setValue(cacheKey, value);
|
|
27
|
+
return value;
|
|
28
|
+
} catch (error) {
|
|
29
|
+
imageSourceCache.setError(cacheKey, error);
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.getImageSourceSync = getImageSourceSync;
|
|
34
|
+
const getImageSource = async (imageSourceCache, fontReference, glyph, size = _defaults.DEFAULT_ICON_SIZE, color = _defaults.DEFAULT_ICON_COLOR) => {
|
|
35
|
+
const NativeIconAPI = (0, _getImageLibrary.ensureGetImageAvailable)();
|
|
36
|
+
const processedColor = (0, _reactNative.processColor)(color);
|
|
37
|
+
const cacheKey = `${glyph}:${size}:${String(processedColor)}`;
|
|
38
|
+
const maybeCachedValue = imageSourceCache.get(cacheKey);
|
|
39
|
+
if (maybeCachedValue !== undefined) {
|
|
40
|
+
// FIXME: Should this check if it's an error and throw it again?
|
|
41
|
+
return maybeCachedValue;
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
const imagePath = await NativeIconAPI.getImageForFont(fontReference, glyph, size, processedColor // FIXME what if a non existent colour was passed in?
|
|
45
|
+
);
|
|
46
|
+
const value = {
|
|
47
|
+
uri: imagePath,
|
|
48
|
+
scale: _reactNative.PixelRatio.get()
|
|
49
|
+
};
|
|
50
|
+
imageSourceCache.setValue(cacheKey, value);
|
|
51
|
+
return value;
|
|
52
|
+
} catch (error) {
|
|
53
|
+
imageSourceCache.setError(cacheKey, error);
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.getImageSource = getImageSource;
|
|
58
|
+
//# sourceMappingURL=get-image-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_defaults","_getImageLibrary","getImageSourceSync","imageSourceCache","fontReference","glyph","size","DEFAULT_ICON_SIZE","color","DEFAULT_ICON_COLOR","NativeIconAPI","ensureGetImageAvailable","processedColor","processColor","cacheKey","String","maybeCachedValue","get","undefined","imagePath","getImageForFontSync","value","uri","scale","PixelRatio","setValue","error","setError","exports","getImageSource","getImageForFont"],"sourceRoot":"../../src","sources":["get-image-source.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AAEO,MAAMG,kBAAkB,GAAGA,CAChCC,gBAA0D,EAC1DC,aAAqB,EACrBC,KAAa,EACbC,IAAI,GAAGC,2BAAiB,EACxBC,KAAyB,GAAGC,4BAAkB,KAC3C;EACH,MAAMC,aAAa,GAAG,IAAAC,wCAAuB,EAAC,CAAC;EAE/C,MAAMC,cAAc,GAAG,IAAAC,yBAAY,EAACL,KAAK,CAAC;EAC1C,MAAMM,QAAQ,GAAG,GAAGT,KAAK,IAAIC,IAAI,IAAIS,MAAM,CAACH,cAAc,CAAC,EAAE;EAE7D,MAAMI,gBAAgB,GAAGb,gBAAgB,CAACc,GAAG,CAACH,QAAQ,CAAC;EACvD,IAAIE,gBAAgB,KAAKE,SAAS,EAAE;IAClC;IACA,OAAOF,gBAAgB;EACzB;EAEA,IAAI;IACF,MAAMG,SAAS,GAAGT,aAAa,CAACU,mBAAmB,CACjDhB,aAAa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KAAK;EACd,CAAC,CAAC,OAAOK,KAAK,EAAE;IACdvB,gBAAgB,CAACwB,QAAQ,CAACb,QAAQ,EAAEY,KAAc,CAAC;IACnD,MAAMA,KAAK;EACb;AACF,CAAC;AAACE,OAAA,CAAAC,cAAA,GAAAA,cAAA","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "DEFAULT_ICON_COLOR", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _defaults.DEFAULT_ICON_COLOR;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "DEFAULT_ICON_SIZE", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
15
|
+
return _defaults.DEFAULT_ICON_SIZE;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "createIconSet", {
|
|
@@ -46,5 +46,6 @@ Object.defineProperty(exports, "setDynamicLoadingErrorCallback", {
|
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
var _createIconSet = require("./create-icon-set.js");
|
|
49
|
+
var _defaults = require("./defaults.js");
|
|
49
50
|
var _dynamicLoadingSetting = require("./dynamicLoading/dynamic-loading-setting.js");
|
|
50
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_createIconSet","require","_dynamicLoadingSetting"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"names":["_createIconSet","require","_defaults","_dynamicLoadingSetting"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_nodeFs","_interopRequireDefault","require","_nodePath","_cliTools","e","__esModule","default","getPackageJson","filename","packageData","fs","readFileSync","packageJson","JSON","parse","getPackageFontDirectories","packageJsonFilename","rootPackageJson","dependencies","Object","keys","packageDirs","forEach","dependency","dir","resolveNodeModuleDir","keywords","includes","push","getLocalFontsDir","config","reactNativeVectorIcons","path","dirname","fontDir","getFonts","existsSync","fonts","readdirSync","fontPaths","map","font","getFontPaths","flat","exports"],"sourceRoot":"../../../src","sources":["scripts/common.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAF,sBAAA,CAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_nodeFs","_interopRequireDefault","require","_nodePath","_cliTools","e","__esModule","default","getPackageJson","filename","packageData","fs","readFileSync","packageJson","JSON","parse","getPackageFontDirectories","packageJsonFilename","rootPackageJson","dependencies","Object","keys","packageDirs","forEach","dependency","dir","resolveNodeModuleDir","keywords","includes","push","getLocalFontsDir","config","reactNativeVectorIcons","path","dirname","fontDir","getFonts","existsSync","fonts","readdirSync","fontPaths","map","font","getFontPaths","flat","exports"],"sourceRoot":"../../../src","sources":["scripts/common.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAAyE,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEzE,MAAMG,cAAc,GAAIC,QAAgB,IAAK;EAC3C,MAAMC,WAAW,GAAGC,eAAE,CAACC,YAAY,CAACH,QAA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,IAAI,IAAK,GAAGP,OAAO,IAAIO,IAAI,EAAE,CAAC;EAE3D,OAAOF,SAAS;AAClB,CAAC;AAEM,MAAMG,YAAY,GAAI1B,mBAA2B,IAAK;EAC3D,MAAMK,WAAW,GAAGN,yBAAyB,CAACC,mBAAmB,CAAC;EAClEK,WAAW,CAACO,IAAI,CAACC,gBAAgB,CAACb,mBAAmB,CAAC,CAAC;EACvD,MAAMqB,KAAK,GAAGhB,WAAW,CAACmB,GAAG,CAACL,QAAQ,CAAC;EAEvC,OAAOE,KAAK,CAACM,IAAI,CAAC,CAAC;AACrB,CAAC;AAACC,OAAA,CAAAF,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -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","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;
|
|
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;AAEA,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,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAA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