dirk-cfx-react 1.0.52 → 1.0.54

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.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { BorderedIcon, BorderedIconProps, ButtonProps, Counter, FloatingParticles, FloatingParticlesProps, InfoBox, InfoBoxProps, InputContainer, InputContainerProps, LevelBanner, LevelPanel, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, NavigationStore, ParticleState, ProgressProps, Prompt, PromptButton, PromptModal, SegmentProps, SegmentedControl, SegmentedControlProps, SegmentedProgress, Title, TitleProps, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.cjs';
2
- export { InitialFetch, InternalEvent, SkillSettings, UploadImageProps, colorWithAlpha, copyToClipboard, createSkill, fetchNui, getImageShape, initialFetches, internalEvent, isEnvBrowser, isProfanity, locale, localeStore, noop, numberToRoman, openLink, registerInitialFetch, runFetches, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useProfanityStore } from './utils/index.cjs';
2
+ export { InitialFetch, InternalEvent, SkillSettings, UploadImageProps, colorWithAlpha, copyToClipboard, createSkill, fetchNui, gameToMap, getImageShape, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, runFetches, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useProfanityStore } from './utils/index.cjs';
3
3
  export { FormProvider, FormState, TornEdgeSVGFilter, ValidationRules, createFormStore, useForm, useNuiEvent, useTornEdges } from './hooks/index.cjs';
4
4
  export { DirkProvider, DirkProviderProps, useSettings } from './providers/index.cjs';
5
5
  import 'react/jsx-runtime';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { BorderedIcon, BorderedIconProps, ButtonProps, Counter, FloatingParticles, FloatingParticlesProps, InfoBox, InfoBoxProps, InputContainer, InputContainerProps, LevelBanner, LevelPanel, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, NavigationStore, ParticleState, ProgressProps, Prompt, PromptButton, PromptModal, SegmentProps, SegmentedControl, SegmentedControlProps, SegmentedProgress, Title, TitleProps, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.js';
2
- export { InitialFetch, InternalEvent, SkillSettings, UploadImageProps, colorWithAlpha, copyToClipboard, createSkill, fetchNui, getImageShape, initialFetches, internalEvent, isEnvBrowser, isProfanity, locale, localeStore, noop, numberToRoman, openLink, registerInitialFetch, runFetches, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useProfanityStore } from './utils/index.js';
2
+ export { InitialFetch, InternalEvent, SkillSettings, UploadImageProps, colorWithAlpha, copyToClipboard, createSkill, fetchNui, gameToMap, getImageShape, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, runFetches, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useProfanityStore } from './utils/index.js';
3
3
  export { FormProvider, FormState, TornEdgeSVGFilter, ValidationRules, createFormStore, useForm, useNuiEvent, useTornEdges } from './hooks/index.js';
4
4
  export { DirkProvider, DirkProviderProps, useSettings } from './providers/index.js';
5
5
  import 'react/jsx-runtime';
package/dist/index.js CHANGED
@@ -225,7 +225,6 @@ async function fetchNui(eventName, data, mockData) {
225
225
  },
226
226
  body: JSON.stringify(data)
227
227
  };
228
- console.log(mockData);
229
228
  if (isEnvBrowser() && mockData) return mockData;
230
229
  if (isEnvBrowser() && mockData === void 0) {
231
230
  console.warn(
@@ -298,6 +297,24 @@ var locale = localeStore.getState().locale;
298
297
  registerInitialFetch("GET_LOCALES", void 0).then((data) => {
299
298
  localeStore.setState({ locales: data });
300
299
  });
300
+
301
+ // src/utils/map.ts
302
+ var mapCenter = [-119.43, 58.84];
303
+ var latPr100 = 1.421;
304
+ function gameToMap(x, y) {
305
+ return [
306
+ mapCenter[0] + latPr100 / 100 * y,
307
+ // lng
308
+ mapCenter[1] + latPr100 / 100 * x
309
+ // lat
310
+ ];
311
+ }
312
+ function mapToGame(lat, lng) {
313
+ return [
314
+ (lng - mapCenter[1]) * 100 / latPr100,
315
+ (lat - mapCenter[0]) * 100 / latPr100
316
+ ];
317
+ }
301
318
  var useProfanityStore = create(() => [
302
319
  "ars3",
303
320
  "a55",
@@ -2376,6 +2393,6 @@ function TornEdgeSVGFilter() {
2376
2393
  );
2377
2394
  }
2378
2395
 
2379
- export { BorderedIcon, Counter, DirkProvider, FloatingParticles, FormProvider, InfoBox, InputContainer, LevelBanner, LevelPanel, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PromptModal, SegmentedControl, SegmentedProgress, Title, TornEdgeSVGFilter, colorWithAlpha, copyToClipboard, createFormStore, createSkill, fetchNui, getImageShape, initialFetches, internalEvent, isEnvBrowser, isProfanity, locale, localeStore, noop, numberToRoman, openLink, registerInitialFetch, runFetches, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useForm, useModal, useModalActions, useNavigation, useNavigationStore, useNuiEvent, useProfanityStore, useSettings, useTornEdges };
2396
+ export { BorderedIcon, Counter, DirkProvider, FloatingParticles, FormProvider, InfoBox, InputContainer, LevelBanner, LevelPanel, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PromptModal, SegmentedControl, SegmentedProgress, Title, TornEdgeSVGFilter, colorWithAlpha, copyToClipboard, createFormStore, createSkill, fetchNui, gameToMap, getImageShape, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, runFetches, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useForm, useModal, useModalActions, useNavigation, useNavigationStore, useNuiEvent, useProfanityStore, useSettings, useTornEdges };
2380
2397
  //# sourceMappingURL=index.js.map
2381
2398
  //# sourceMappingURL=index.js.map