@hoddy-ui/next 2.0.21 → 2.0.23

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/dist/index.mjs CHANGED
@@ -141,24 +141,25 @@ function colors(theme) {
141
141
  }
142
142
 
143
143
  // ../src/config/KeyManager.ts
144
- var apiKey = {
144
+ var config = {
145
145
  GOOGLE_MAP_API_KEY: ""
146
146
  };
147
- function setApiKey(key) {
148
- apiKey = key;
147
+ function setConfig(key) {
148
+ config = key;
149
149
  }
150
- function getApiKey() {
151
- return apiKey;
150
+ function getConfig() {
151
+ return config;
152
152
  }
153
153
 
154
154
  // ../src/config/index.ts
155
- function initialize(config) {
155
+ function initialize(config2) {
156
156
  try {
157
- setApiKey({
158
- GOOGLE_MAP_API_KEY: config.googleMapApiKey
157
+ setConfig({
158
+ GOOGLE_MAP_API_KEY: config2.googleMapApiKey,
159
+ DEFAULT_FONT_FAMILY: config2.fontFamily
159
160
  });
160
- if (config.colors)
161
- setExtraColors(config.colors);
161
+ if (config2.colors)
162
+ setExtraColors(config2.colors);
162
163
  } catch (error) {
163
164
  console.error("Error reading the config file:", error);
164
165
  }
@@ -232,7 +233,7 @@ var Typography = forwardRef(
232
233
  alignItems: "center",
233
234
  textAlign: align,
234
235
  fontWeight: fontWeight.toString(),
235
- fontFamily: fontFamily || "System"
236
+ fontFamily: fontFamily || getConfig().DEFAULT_FONT_FAMILY || "System"
236
237
  // Use custom font if provided, else default
237
238
  }
238
239
  });
@@ -1690,12 +1691,12 @@ var TextField_default = TextField;
1690
1691
  import * as Location from "expo-location";
1691
1692
  import { ScaledSheet as ScaledSheet13 } from "react-native-size-matters";
1692
1693
  setTimeout(() => {
1693
- const { GOOGLE_MAP_API_KEY } = getApiKey();
1694
+ const { GOOGLE_MAP_API_KEY } = getConfig();
1694
1695
  if (GOOGLE_MAP_API_KEY)
1695
1696
  Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
1696
1697
  }, 500);
1697
1698
  var getPredictionsFromCoords = async (coords) => {
1698
- const { GOOGLE_MAP_API_KEY } = getApiKey();
1699
+ const { GOOGLE_MAP_API_KEY } = getConfig();
1699
1700
  if (!GOOGLE_MAP_API_KEY)
1700
1701
  console.error(
1701
1702
  "Google map api key needs to be set to use this component \nMake sure to run initialize() with a valid google map api key"
@@ -1730,7 +1731,7 @@ var Locator = ({
1730
1731
  float = true,
1731
1732
  country = "ng"
1732
1733
  }) => {
1733
- const { GOOGLE_MAP_API_KEY } = getApiKey();
1734
+ const { GOOGLE_MAP_API_KEY } = getConfig();
1734
1735
  const [changed, setChanged] = useState8(false);
1735
1736
  const [value, setValue] = useState8("");
1736
1737
  const [prediction, setPrediction] = useState8([]);