dirk-cfx-react 1.0.57 → 1.0.58
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/hooks/index.cjs +15 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +11 -1
- package/dist/hooks/index.d.ts +11 -1
- package/dist/hooks/index.js +13 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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
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
|
-
export { FormProvider, FormState, NuiHandlerSignature, NuiMessageData, TornEdgeSVGFilter, ValidationRules, createFormStore, useForm, useNuiEvent, useTornEdges } from './hooks/index.cjs';
|
|
3
|
+
export { FormProvider, FormState, NuiHandlerSignature, NuiMessageData, TornEdgeSVGFilter, ValidationRules, createFormStore, createScriptSettings, useForm, useNuiEvent, useScriptSettingHooks, useScriptSettings, useTornEdges } from './hooks/index.cjs';
|
|
4
4
|
export { DirkProvider, DirkProviderProps, useSettings } from './providers/index.cjs';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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
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
|
-
export { FormProvider, FormState, NuiHandlerSignature, NuiMessageData, TornEdgeSVGFilter, ValidationRules, createFormStore, useForm, useNuiEvent, useTornEdges } from './hooks/index.js';
|
|
3
|
+
export { FormProvider, FormState, NuiHandlerSignature, NuiMessageData, TornEdgeSVGFilter, ValidationRules, createFormStore, createScriptSettings, useForm, useNuiEvent, useScriptSettingHooks, useScriptSettings, useTornEdges } from './hooks/index.js';
|
|
4
4
|
export { DirkProvider, DirkProviderProps, useSettings } from './providers/index.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createContext,
|
|
1
|
+
import { createContext, useRef, useEffect, useState, useContext, useMemo } from 'react';
|
|
2
2
|
import { create, useStore, createStore } from 'zustand';
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
@@ -2403,7 +2403,19 @@ function TornEdgeSVGFilter() {
|
|
|
2403
2403
|
}
|
|
2404
2404
|
);
|
|
2405
2405
|
}
|
|
2406
|
+
function createScriptSettings(defaultValue) {
|
|
2407
|
+
const store = create(() => defaultValue);
|
|
2408
|
+
const useScriptSettingHooks2 = () => {
|
|
2409
|
+
useNuiEvent("UPDATE_SCRIPT_SETTINGS", (newSettings) => {
|
|
2410
|
+
store.setState((prev) => ({ ...prev, ...newSettings }));
|
|
2411
|
+
});
|
|
2412
|
+
};
|
|
2413
|
+
return { store, useScriptSettingHooks: useScriptSettingHooks2 };
|
|
2414
|
+
}
|
|
2415
|
+
var { store: useScriptSettings, useScriptSettingHooks } = createScriptSettings({
|
|
2416
|
+
game: "fivem"
|
|
2417
|
+
});
|
|
2406
2418
|
|
|
2407
|
-
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 };
|
|
2419
|
+
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, createScriptSettings, 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, useScriptSettingHooks, useScriptSettings, useSettings, useTornEdges };
|
|
2408
2420
|
//# sourceMappingURL=index.js.map
|
|
2409
2421
|
//# sourceMappingURL=index.js.map
|