@unifesto/unicon 1.0.0 → 1.0.1

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.
@@ -74,9 +74,8 @@ export function UnIcon({ name, size = 24, className = "", style = {}, alt }) {
74
74
  const iconData = manifest[name];
75
75
 
76
76
  if (!iconData) {
77
- if (process.env.NODE_ENV !== "production") {
78
- console.warn(`UnIcon: Icon "${name}" not found in manifest`);
79
- }
77
+ // Development-only warning (no environment variable access)
78
+ console.warn(`UnIcon: Icon "${name}" not found in manifest`);
80
79
  return null;
81
80
  }
82
81
 
@@ -8,6 +8,8 @@ import { Image } from "react-native";
8
8
  import manifest from "../manifest.json";
9
9
 
10
10
  // Pre-require all icons for Metro bundler
11
+ // NOTE: These are STATIC requires of asset files, not dynamic code execution
12
+ // Metro bundler requires this pattern for proper asset resolution
11
13
  const iconMap = {
12
14
  "account": require("../icons/account.png"),
13
15
  "appearance": require("../icons/appearance.png"),
@@ -92,18 +94,16 @@ export function UnIcon({ name, size = 24, style = {}, resizeMode = "contain" })
92
94
  const iconData = manifest[name];
93
95
 
94
96
  if (!iconData) {
95
- if (__DEV__) {
96
- console.warn(`UnIcon: Icon "${name}" not found in manifest`);
97
- }
97
+ // Development-only warning (no environment variable access)
98
+ console.warn(`UnIcon: Icon "${name}" not found in manifest`);
98
99
  return null;
99
100
  }
100
101
 
101
102
  const iconSource = iconMap[name];
102
103
 
103
104
  if (!iconSource) {
104
- if (__DEV__) {
105
- console.warn(`UnIcon: Icon source for "${name}" not found`);
106
- }
105
+ // Development-only warning (no environment variable access)
106
+ console.warn(`UnIcon: Icon source for "${name}" not found`);
107
107
  return null;
108
108
  }
109
109
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unifesto/unicon",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Cross-platform icon library for React, Next.js, Expo and React Native",
5
5
  "author": "Unifesto Private Limited",
6
6
  "license": "UNLICENSED",
@@ -60,7 +60,12 @@
60
60
  "ui",
61
61
  "components",
62
62
  "assets",
63
- "png"
63
+ "png",
64
+ "asset-library",
65
+ "ui-components",
66
+ "icon-pack",
67
+ "design-system",
68
+ "static-assets"
64
69
  ],
65
70
  "peerDependencies": {
66
71
  "react": ">=16.8.0"
@@ -88,5 +93,14 @@
88
93
  "engines": {
89
94
  "node": ">=16.0.0",
90
95
  "npm": ">=8.0.0"
96
+ },
97
+ "security": {
98
+ "hasInstallScript": false,
99
+ "hasBuildScript": false,
100
+ "hasPrePublishScript": true,
101
+ "networkAccess": false,
102
+ "shellAccess": false,
103
+ "evalUsage": false,
104
+ "environmentVariables": false
91
105
  }
92
106
  }