dirk-cfx-react 1.1.39 → 1.1.41
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/components/index.cjs +1 -6
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +1 -6
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/index.cjs +0 -4
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +0 -4
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +2 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -17
- package/dist/index.js.map +1 -1
- package/dist/providers/index.cjs +1 -13
- package/dist/providers/index.cjs.map +1 -1
- package/dist/providers/index.js +2 -14
- package/dist/providers/index.js.map +1 -1
- package/dist/utils/index.cjs +0 -4
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +0 -4
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -239,7 +239,6 @@ var useSettings = create(() => ({
|
|
|
239
239
|
]
|
|
240
240
|
}));
|
|
241
241
|
registerInitialFetch("GET_SETTINGS", void 0).then((data) => {
|
|
242
|
-
console.log("Fetched settings:", data);
|
|
243
242
|
if (!data) {
|
|
244
243
|
console.warn("No settings data received from GET_SETTINGS fetch.");
|
|
245
244
|
return;
|
|
@@ -267,9 +266,7 @@ async function fetchNui(eventName, data, mockData) {
|
|
|
267
266
|
}
|
|
268
267
|
const overrideResourceName = useSettings.getState().overideResourceName;
|
|
269
268
|
const resourceName = window.GetParentResourceName ? window.GetParentResourceName() : overrideResourceName ? overrideResourceName : "dirk-cfx-react";
|
|
270
|
-
console.log(`[fetchNui] Sending event "${eventName}" to resource "${resourceName}" with data:`, data);
|
|
271
269
|
const resp = await fetch(`https://${resourceName}/${eventName}`, options);
|
|
272
|
-
console.log(`[fetchNui] Received response for event "${eventName}":`, resp);
|
|
273
270
|
return await resp.json();
|
|
274
271
|
}
|
|
275
272
|
var initialFetches = {};
|
|
@@ -336,7 +333,6 @@ var localeStore = create((set, get) => {
|
|
|
336
333
|
});
|
|
337
334
|
var locale = localeStore.getState().locale;
|
|
338
335
|
registerInitialFetch("GET_LOCALES", void 0).then((data) => {
|
|
339
|
-
console.log("Fetched locales:", data);
|
|
340
336
|
localeStore.setState({ locales: data });
|
|
341
337
|
});
|
|
342
338
|
|
|
@@ -1524,8 +1520,7 @@ function SegmentedProgress(props) {
|
|
|
1524
1520
|
{
|
|
1525
1521
|
variants: itemVariants,
|
|
1526
1522
|
style: {
|
|
1527
|
-
|
|
1528
|
-
// Ensures equal width distribution
|
|
1523
|
+
flex: 1,
|
|
1529
1524
|
height: "100%",
|
|
1530
1525
|
background: isFilled ? "rgba(255, 255, 255, 0.8)" : isPartial ? `linear-gradient(to right, rgba(255, 255, 255, 0.8) ${partialFill * 100}%, rgba(255, 255, 255, 0.2) ${partialFill * 100}%)` : "rgba(255, 255, 255, 0.2)",
|
|
1531
1526
|
transition: "background 0.3s ease"
|
|
@@ -2329,7 +2324,6 @@ function createScriptSettings(defaultValue) {
|
|
|
2329
2324
|
});
|
|
2330
2325
|
};
|
|
2331
2326
|
const updateScriptSettings = async (newSettings) => {
|
|
2332
|
-
console.log("Updating script settings:", JSON.stringify(newSettings, null, 2));
|
|
2333
2327
|
store.setState((prev) => ({ ...prev, ...newSettings }));
|
|
2334
2328
|
return await fetchNui("UPDATE_SCRIPT_SETTINGS", newSettings);
|
|
2335
2329
|
};
|
|
@@ -2507,15 +2501,6 @@ function DirkProvider({ children, overideResourceName, themeOverride }) {
|
|
|
2507
2501
|
overideResourceName
|
|
2508
2502
|
});
|
|
2509
2503
|
}, [overideResourceName]);
|
|
2510
|
-
useEffect(() => {
|
|
2511
|
-
fetchNui("GET_SETTINGS").then((data) => {
|
|
2512
|
-
useSettings.setState({
|
|
2513
|
-
...data
|
|
2514
|
-
});
|
|
2515
|
-
}).catch((err) => {
|
|
2516
|
-
console.error("Failed to fetch initial settings within dirk-cfx-react:", err);
|
|
2517
|
-
});
|
|
2518
|
-
}, []);
|
|
2519
2504
|
const mergedTheme = useMemo(
|
|
2520
2505
|
() => mergeMantineThemeSafe(
|
|
2521
2506
|
{ ...theme_default, primaryColor, primaryShade },
|
|
@@ -2536,7 +2521,7 @@ function DirkProvider({ children, overideResourceName, themeOverride }) {
|
|
|
2536
2521
|
children
|
|
2537
2522
|
}
|
|
2538
2523
|
) : children;
|
|
2539
|
-
return /* @__PURE__ */ jsx(
|
|
2524
|
+
return /* @__PURE__ */ jsx(MantineProvider, { theme: mergedTheme, defaultColorScheme: "dark", children: /* @__PURE__ */ jsx(DirkErrorBoundary, { children: content }) });
|
|
2540
2525
|
}
|
|
2541
2526
|
|
|
2542
2527
|
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 };
|