@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.d.mts CHANGED
@@ -256,6 +256,7 @@ interface DividerProps {
256
256
  type configProps = {
257
257
  googleMapApiKey?: string;
258
258
  colors?: extraColorTypes;
259
+ fontFamily?: string;
259
260
  };
260
261
  declare function initialize(config: configProps): void;
261
262
 
package/dist/index.d.ts CHANGED
@@ -256,6 +256,7 @@ interface DividerProps {
256
256
  type configProps = {
257
257
  googleMapApiKey?: string;
258
258
  colors?: extraColorTypes;
259
+ fontFamily?: string;
259
260
  };
260
261
  declare function initialize(config: configProps): void;
261
262
 
package/dist/index.js CHANGED
@@ -206,24 +206,25 @@ function colors(theme) {
206
206
  }
207
207
 
208
208
  // ../src/config/KeyManager.ts
209
- var apiKey = {
209
+ var config = {
210
210
  GOOGLE_MAP_API_KEY: ""
211
211
  };
212
- function setApiKey(key) {
213
- apiKey = key;
212
+ function setConfig(key) {
213
+ config = key;
214
214
  }
215
- function getApiKey() {
216
- return apiKey;
215
+ function getConfig() {
216
+ return config;
217
217
  }
218
218
 
219
219
  // ../src/config/index.ts
220
- function initialize(config) {
220
+ function initialize(config2) {
221
221
  try {
222
- setApiKey({
223
- GOOGLE_MAP_API_KEY: config.googleMapApiKey
222
+ setConfig({
223
+ GOOGLE_MAP_API_KEY: config2.googleMapApiKey,
224
+ DEFAULT_FONT_FAMILY: config2.fontFamily
224
225
  });
225
- if (config.colors)
226
- setExtraColors(config.colors);
226
+ if (config2.colors)
227
+ setExtraColors(config2.colors);
227
228
  } catch (error) {
228
229
  console.error("Error reading the config file:", error);
229
230
  }
@@ -293,7 +294,7 @@ var Typography = (0, import_react.forwardRef)(
293
294
  alignItems: "center",
294
295
  textAlign: align,
295
296
  fontWeight: fontWeight.toString(),
296
- fontFamily: fontFamily || "System"
297
+ fontFamily: fontFamily || getConfig().DEFAULT_FONT_FAMILY || "System"
297
298
  // Use custom font if provided, else default
298
299
  }
299
300
  });
@@ -1726,12 +1727,12 @@ var TextField_default = TextField;
1726
1727
  var Location = __toESM(require("expo-location"));
1727
1728
  var import_react_native_size_matters15 = require("react-native-size-matters");
1728
1729
  setTimeout(() => {
1729
- const { GOOGLE_MAP_API_KEY } = getApiKey();
1730
+ const { GOOGLE_MAP_API_KEY } = getConfig();
1730
1731
  if (GOOGLE_MAP_API_KEY)
1731
1732
  Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
1732
1733
  }, 500);
1733
1734
  var getPredictionsFromCoords = async (coords) => {
1734
- const { GOOGLE_MAP_API_KEY } = getApiKey();
1735
+ const { GOOGLE_MAP_API_KEY } = getConfig();
1735
1736
  if (!GOOGLE_MAP_API_KEY)
1736
1737
  console.error(
1737
1738
  "Google map api key needs to be set to use this component \nMake sure to run initialize() with a valid google map api key"
@@ -1766,7 +1767,7 @@ var Locator = ({
1766
1767
  float = true,
1767
1768
  country = "ng"
1768
1769
  }) => {
1769
- const { GOOGLE_MAP_API_KEY } = getApiKey();
1770
+ const { GOOGLE_MAP_API_KEY } = getConfig();
1770
1771
  const [changed, setChanged] = (0, import_react17.useState)(false);
1771
1772
  const [value, setValue] = (0, import_react17.useState)("");
1772
1773
  const [prediction, setPrediction] = (0, import_react17.useState)([]);