dirk-cfx-react 1.1.47 → 1.1.49
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 +7 -8
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +1 -2
- package/dist/hooks/index.d.ts +1 -2
- package/dist/hooks/index.js +8 -8
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +7 -9
- 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 +8 -9
- package/dist/index.js.map +1 -1
- package/dist/providers/index.cjs +0 -25
- package/dist/providers/index.cjs.map +1 -1
- package/dist/providers/index.js +1 -26
- package/dist/providers/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, SettingsState, SkillSettings, UploadImageProps, colorWithAlpha, copyToClipboard, createSkill, fetchLuaTable, fetchNui, gameToMap, getImageShape, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, registerInitialLuaTableFetch, runFetches, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useProfanityStore, useSettings } from './utils/index.cjs';
|
|
3
|
-
export { FormProvider, FormState, NuiHandlerSignature, NuiMessageData, TornEdgeSVGFilter, ValidationRules, ValidatorFn,
|
|
3
|
+
export { FormProvider, FormState, NuiHandlerSignature, NuiMessageData, TornEdgeSVGFilter, ValidationRules, ValidatorFn, createFormStore, createScriptSettings, useForm, useFormActions, useFormError, useFormErrors, useFormField, useFormFields, useNuiEvent, useTornEdges } from './hooks/index.cjs';
|
|
4
4
|
export { DirkProvider, DirkProviderProps } 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, SettingsState, SkillSettings, UploadImageProps, colorWithAlpha, copyToClipboard, createSkill, fetchLuaTable, fetchNui, gameToMap, getImageShape, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, registerInitialLuaTableFetch, runFetches, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useProfanityStore, useSettings } from './utils/index.js';
|
|
3
|
-
export { FormProvider, FormState, NuiHandlerSignature, NuiMessageData, TornEdgeSVGFilter, ValidationRules, ValidatorFn,
|
|
3
|
+
export { FormProvider, FormState, NuiHandlerSignature, NuiMessageData, TornEdgeSVGFilter, ValidationRules, ValidatorFn, createFormStore, createScriptSettings, useForm, useFormActions, useFormError, useFormErrors, useFormField, useFormFields, useNuiEvent, useTornEdges } from './hooks/index.js';
|
|
4
4
|
export { DirkProvider, DirkProviderProps } from './providers/index.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -2307,15 +2307,15 @@ function TornEdgeSVGFilter() {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
);
|
|
2309
2309
|
}
|
|
2310
|
-
var _scriptSettingsUpdaters = [];
|
|
2311
|
-
function _dispatchScriptSettingsUpdate(data) {
|
|
2312
|
-
_scriptSettingsUpdaters.forEach((fn) => fn(data));
|
|
2313
|
-
}
|
|
2314
2310
|
function createScriptSettings(defaultValue) {
|
|
2315
2311
|
const store = create(() => defaultValue);
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2312
|
+
if (typeof window !== "undefined") {
|
|
2313
|
+
window.addEventListener("message", (event) => {
|
|
2314
|
+
if (event.data?.action === "UPDATE_SCRIPT_SETTINGS" && event.data?.data) {
|
|
2315
|
+
store.setState((prev) => ({ ...prev, ...event.data.data }));
|
|
2316
|
+
}
|
|
2317
|
+
});
|
|
2318
|
+
}
|
|
2319
2319
|
const useScriptSettingHooks = () => {
|
|
2320
2320
|
};
|
|
2321
2321
|
const updateScriptSettings = async (newSettings) => {
|
|
@@ -2540,7 +2540,6 @@ function DirkProvider({ children, overideResourceName, themeOverride }) {
|
|
|
2540
2540
|
console.error("Failed to fetch initial settings within dirk-cfx-react:", err);
|
|
2541
2541
|
});
|
|
2542
2542
|
}, []);
|
|
2543
|
-
useNuiEvent("UPDATE_SCRIPT_SETTINGS", _dispatchScriptSettingsUpdate);
|
|
2544
2543
|
const mergedTheme = useMemo(
|
|
2545
2544
|
() => mergeMantineThemeSafe(
|
|
2546
2545
|
{ ...theme_default, primaryColor, primaryShade },
|
|
@@ -2564,6 +2563,6 @@ function DirkProvider({ children, overideResourceName, themeOverride }) {
|
|
|
2564
2563
|
return /* @__PURE__ */ jsx(MantineProvider, { theme: mergedTheme, defaultColorScheme: "dark", children: /* @__PURE__ */ jsx(DirkErrorBoundary, { children: content }) });
|
|
2565
2564
|
}
|
|
2566
2565
|
|
|
2567
|
-
export { BorderedIcon, Counter, DirkProvider, FloatingParticles, FormProvider, InfoBox, InputContainer, LevelBanner, LevelPanel, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PromptModal, SegmentedControl, SegmentedProgress, Title, TornEdgeSVGFilter,
|
|
2566
|
+
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, fetchLuaTable, fetchNui, gameToMap, getImageShape, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, registerInitialLuaTableFetch, runFetches, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useForm, useFormActions, useFormError, useFormErrors, useFormField, useFormFields, useModal, useModalActions, useNavigation, useNavigationStore, useNuiEvent, useProfanityStore, useSettings, useTornEdges };
|
|
2568
2567
|
//# sourceMappingURL=index.js.map
|
|
2569
2568
|
//# sourceMappingURL=index.js.map
|