@evlop/commons 1.0.204 → 1.0.205

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.
@@ -1,6 +1,21 @@
1
- import { IconIdentifier, ReactNativeVectorIcons } from './types';
2
- declare const icons: ReactNativeVectorIcons;
3
- export declare function getIconInfo(iconIdentifier: IconIdentifier): Object;
4
- export { IconIdentifier, ReactNativeVectorIcons };
5
- export default icons;
1
+ import IconIdentifier from "./types";
2
+ declare function _getIconInfo(iconIdentifier: IconIdentifier | any): {
3
+ id: any;
4
+ type: any;
5
+ name: any;
6
+ character: any;
7
+ isDirected: any;
8
+ variant?: undefined;
9
+ } | {
10
+ id: any;
11
+ type: any;
12
+ variant: any;
13
+ name: any;
14
+ character: any;
15
+ isDirected: any;
16
+ };
17
+ export declare const getIconInfo: typeof _getIconInfo & import("lodash").MemoizedFunction;
18
+ declare const reactNativeVectorIcons: {};
19
+ export { IconIdentifier };
20
+ export default reactNativeVectorIcons;
6
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/constants/iconInfo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjE,QAAA,MAAM,KAAK,wBAA+B,CAAE;AAE5C,wBAAgB,WAAW,CAAC,cAAc,EAAE,cAAc,UAEzD;AAED,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,CAAA;AACjD,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/constants/iconInfo/index.ts"],"names":[],"mappings":"AAGA,OAAO,cAAc,MAAM,SAAS,CAAC;AAErC,iBAAS,YAAY,CAAC,cAAc,EAAE,cAAc,GAAG,GAAG;;;;;;;;;;;;;;EAwBzD;AAED,eAAO,MAAM,WAAW,yDAAwB,CAAC;AAEjD,QAAA,MAAM,sBAAsB,IAAK,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,eAAe,sBAAsB,CAAC"}
@@ -1,10 +1,40 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.getIconInfo = void 0;
4
- const icons = {};
5
- function getIconInfo(iconIdentifier) {
6
- return icons[iconIdentifier];
7
+ const lodash_1 = require("lodash");
8
+ const directed_icons_1 = __importDefault(require("./directed-icons"));
9
+ const reactNativeVectorIcons_lookup_min_json_1 = __importDefault(require("./reactNativeVectorIcons.lookup.min.json"));
10
+ function _getIconInfo(iconIdentifier) {
11
+ var _a, _b;
12
+ const parts = iconIdentifier.split(':');
13
+ if (parts.length === 2) {
14
+ const [library, iconName] = parts;
15
+ const character = reactNativeVectorIcons_lookup_min_json_1.default[library][iconName];
16
+ return {
17
+ id: iconIdentifier,
18
+ type: library,
19
+ name: iconName,
20
+ character,
21
+ isDirected: (_a = directed_icons_1.default[library]) === null || _a === void 0 ? void 0 : _a[iconName],
22
+ };
23
+ }
24
+ else if (parts.length === 3) {
25
+ const [library, variant, iconName] = parts;
26
+ const character = reactNativeVectorIcons_lookup_min_json_1.default[library][variant][iconName];
27
+ return {
28
+ id: iconIdentifier,
29
+ type: library,
30
+ variant,
31
+ name: iconName,
32
+ character,
33
+ isDirected: (_b = directed_icons_1.default[library]) === null || _b === void 0 ? void 0 : _b[iconName],
34
+ };
35
+ }
7
36
  }
8
- exports.getIconInfo = getIconInfo;
9
- exports.default = icons;
37
+ exports.getIconInfo = lodash_1.memoize(_getIconInfo);
38
+ const reactNativeVectorIcons = {};
39
+ exports.default = reactNativeVectorIcons;
10
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/constants/iconInfo/index.ts"],"names":[],"mappings":";;;AAEA,MAAM,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AG,EAAE,CAAC;AAIlC,kBAAe,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evlop/commons",
3
- "version": "1.0.204",
3
+ "version": "1.0.205",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "peerDependencies": {
@@ -1,25 +0,0 @@
1
- import reactNativeVectorIcons from "./reactNativeVectorIcons.lookup.min.json";
2
- export declare function getIconInfo(iconIdentifier: string): {
3
- id: string;
4
- type: string;
5
- name: string;
6
- character: any;
7
- isDirected: any;
8
- variant?: undefined;
9
- } | {
10
- id: string;
11
- type: string;
12
- variant: string;
13
- name: string;
14
- character: any;
15
- isDirected: any;
16
- } | {
17
- name: string;
18
- id?: undefined;
19
- type?: undefined;
20
- character?: undefined;
21
- isDirected?: undefined;
22
- variant?: undefined;
23
- };
24
- export default reactNativeVectorIcons;
25
- //# sourceMappingURL=index.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/constants/iconInfo/index.native.ts"],"names":[],"mappings":"AACA,OAAO,sBAAsB,MAAM,0CAA0C,CAAC;AAE9E,wBAAgB,WAAW,CAAC,cAAc,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;EA0BjD;AAED,eAAe,sBAAsB,CAAC"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getIconInfo = void 0;
7
- const directed_icons_1 = __importDefault(require("./directed-icons"));
8
- const reactNativeVectorIcons_lookup_min_json_1 = __importDefault(require("./reactNativeVectorIcons.lookup.min.json"));
9
- function getIconInfo(iconIdentifier) {
10
- var _a, _b;
11
- const parts = iconIdentifier.split(':');
12
- if (parts.length === 2) {
13
- const [library, iconName] = parts;
14
- const character = reactNativeVectorIcons_lookup_min_json_1.default[library][iconName];
15
- return {
16
- id: iconIdentifier,
17
- type: library,
18
- name: iconName,
19
- character,
20
- isDirected: (_a = directed_icons_1.default[library]) === null || _a === void 0 ? void 0 : _a[iconName],
21
- };
22
- }
23
- else if (parts.length === 3) {
24
- const [library, variant, iconName] = parts;
25
- const character = reactNativeVectorIcons_lookup_min_json_1.default[library][variant][iconName];
26
- return {
27
- id: iconIdentifier,
28
- type: library,
29
- variant,
30
- name: iconName,
31
- character,
32
- isDirected: (_b = directed_icons_1.default[library]) === null || _b === void 0 ? void 0 : _b[iconName],
33
- };
34
- }
35
- else {
36
- return { name: iconIdentifier };
37
- }
38
- }
39
- exports.getIconInfo = getIconInfo;
40
- exports.default = reactNativeVectorIcons_lookup_min_json_1.default;
41
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/constants/iconInfo/index.native.ts"],"names":[],"mappings":";;;;;;AAAA,sEAA6C;AAC7C,sHAA8E;AAE9E,SAAgB,WAAW,CAAC,cAAsB;;IAChD,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,IAAG,KAAK,CAAC,MAAM,KAAK,CAAC,EAAC;QACpB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC;QAClC,MAAM,SAAS,GAAG,gDAAsB,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC5D,OAAO;YACH,EAAE,EAAE,cAAc;YAClB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,SAAS;YACT,UAAU,QAAE,wBAAa,CAAC,OAAO,CAAC,0CAAG,QAAQ,CAAC;SACjD,CAAA;KACF;SAAM,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAC;QAC5B,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC;QAC3C,MAAM,SAAS,GAAG,gDAAsB,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;QACrE,OAAO;YACH,EAAE,EAAE,cAAc;YAClB,IAAI,EAAE,OAAO;YACb,OAAO;YACP,IAAI,EAAE,QAAQ;YACd,SAAS;YACT,UAAU,QAAE,wBAAa,CAAC,OAAO,CAAC,0CAAG,QAAQ,CAAC;SACjD,CAAA;KACF;SAAM;QACL,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,CAAA;KAChC;AACH,CAAC;AA1BD,kCA0BC;AAED,kBAAe,gDAAsB,CAAC"}
@@ -1,4 +0,0 @@
1
- import reactNativeVectorIcons from "./reactNativeVectorIcons.lookup.json";
2
- export declare function getIconInfo(iconIdentifier: string): any;
3
- export default reactNativeVectorIcons;
4
- //# sourceMappingURL=index.web.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/constants/iconInfo/index.web.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,sCAAsC,CAAC;AAE1E,wBAAgB,WAAW,CAAC,cAAc,EAAE,MAAM,OAEjD;AAED,eAAe,sBAAsB,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getIconInfo = void 0;
7
- const reactNativeVectorIcons_lookup_json_1 = __importDefault(require("./reactNativeVectorIcons.lookup.json"));
8
- function getIconInfo(iconIdentifier) {
9
- return reactNativeVectorIcons_lookup_json_1.default[iconIdentifier];
10
- }
11
- exports.getIconInfo = getIconInfo;
12
- exports.default = reactNativeVectorIcons_lookup_json_1.default;
13
- //# sourceMappingURL=index.web.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../../../src/constants/iconInfo/index.web.ts"],"names":[],"mappings":";;;;;;AAAA,8GAA0E;AAE1E,SAAgB,WAAW,CAAC,cAAsB;IAC9C,OAAO,4CAAsB,CAAC,cAAc,CAAC,CAAC;AAClD,CAAC;AAFD,kCAEC;AAED,kBAAe,4CAAsB,CAAC"}