dirk-cfx-react 1.0.51 → 1.0.53
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 +48 -0
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +14 -1
- package/dist/components/index.d.ts +14 -1
- package/dist/components/index.js +49 -2
- package/dist/components/index.js.map +1 -1
- package/dist/index.cjs +70 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +67 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/index.cjs +22 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +8 -1
- package/dist/utils/index.d.ts +8 -1
- package/dist/utils/index.js +19 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -306,6 +306,24 @@ var locale = localeStore.getState().locale;
|
|
|
306
306
|
registerInitialFetch("GET_LOCALES", void 0).then((data) => {
|
|
307
307
|
localeStore.setState({ locales: data });
|
|
308
308
|
});
|
|
309
|
+
|
|
310
|
+
// src/utils/map.ts
|
|
311
|
+
var mapCenter = [-119.43, 58.84];
|
|
312
|
+
var latPr100 = 1.421;
|
|
313
|
+
function gameToMap(x, y) {
|
|
314
|
+
return [
|
|
315
|
+
mapCenter[0] + latPr100 / 100 * y,
|
|
316
|
+
// lng
|
|
317
|
+
mapCenter[1] + latPr100 / 100 * x
|
|
318
|
+
// lat
|
|
319
|
+
];
|
|
320
|
+
}
|
|
321
|
+
function mapToGame(lat, lng) {
|
|
322
|
+
return [
|
|
323
|
+
(lng - mapCenter[1]) * 100 / latPr100,
|
|
324
|
+
(lat - mapCenter[0]) * 100 / latPr100
|
|
325
|
+
];
|
|
326
|
+
}
|
|
309
327
|
var useProfanityStore = zustand.create(() => [
|
|
310
328
|
"ars3",
|
|
311
329
|
"a55",
|
|
@@ -1870,6 +1888,53 @@ function Modal() {
|
|
|
1870
1888
|
}
|
|
1871
1889
|
) });
|
|
1872
1890
|
}
|
|
1891
|
+
function PromptModal(props) {
|
|
1892
|
+
const theme2 = core.useMantineTheme();
|
|
1893
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1894
|
+
MotionFlex,
|
|
1895
|
+
{
|
|
1896
|
+
gap: "sm",
|
|
1897
|
+
direction: "column",
|
|
1898
|
+
flex: 1,
|
|
1899
|
+
children: [
|
|
1900
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1901
|
+
core.Text,
|
|
1902
|
+
{
|
|
1903
|
+
size: "xs",
|
|
1904
|
+
c: "rgba(255, 255, 255, 0.8)",
|
|
1905
|
+
children: props.message
|
|
1906
|
+
}
|
|
1907
|
+
),
|
|
1908
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1909
|
+
core.Flex,
|
|
1910
|
+
{
|
|
1911
|
+
gap: "sm",
|
|
1912
|
+
children: props.buttons.map((button, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1913
|
+
core.Button,
|
|
1914
|
+
{
|
|
1915
|
+
variant: button.variant,
|
|
1916
|
+
color: button.color,
|
|
1917
|
+
flex: 0.5,
|
|
1918
|
+
onClick: button.onClick,
|
|
1919
|
+
leftSection: button.icon ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1920
|
+
reactFontawesome.FontAwesomeIcon,
|
|
1921
|
+
{
|
|
1922
|
+
icon: button.icon,
|
|
1923
|
+
style: {
|
|
1924
|
+
fontSize: theme2.fontSizes.xs
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
) : void 0,
|
|
1928
|
+
children: button.text
|
|
1929
|
+
},
|
|
1930
|
+
index
|
|
1931
|
+
))
|
|
1932
|
+
}
|
|
1933
|
+
)
|
|
1934
|
+
]
|
|
1935
|
+
}
|
|
1936
|
+
);
|
|
1937
|
+
}
|
|
1873
1938
|
var useNuiEvent = (action, handler) => {
|
|
1874
1939
|
const savedHandler = react.useRef(noop);
|
|
1875
1940
|
react.useEffect(() => {
|
|
@@ -2355,6 +2420,7 @@ exports.MotionText = MotionText;
|
|
|
2355
2420
|
exports.NavBar = NavBar;
|
|
2356
2421
|
exports.NavigationContext = NavigationContext;
|
|
2357
2422
|
exports.NavigationProvider = NavigationProvider;
|
|
2423
|
+
exports.PromptModal = PromptModal;
|
|
2358
2424
|
exports.SegmentedControl = SegmentedControl;
|
|
2359
2425
|
exports.SegmentedProgress = SegmentedProgress;
|
|
2360
2426
|
exports.Title = Title;
|
|
@@ -2364,13 +2430,17 @@ exports.copyToClipboard = copyToClipboard;
|
|
|
2364
2430
|
exports.createFormStore = createFormStore;
|
|
2365
2431
|
exports.createSkill = createSkill;
|
|
2366
2432
|
exports.fetchNui = fetchNui;
|
|
2433
|
+
exports.gameToMap = gameToMap;
|
|
2367
2434
|
exports.getImageShape = getImageShape;
|
|
2368
2435
|
exports.initialFetches = initialFetches;
|
|
2369
2436
|
exports.internalEvent = internalEvent;
|
|
2370
2437
|
exports.isEnvBrowser = isEnvBrowser;
|
|
2371
2438
|
exports.isProfanity = isProfanity;
|
|
2439
|
+
exports.latPr100 = latPr100;
|
|
2372
2440
|
exports.locale = locale;
|
|
2373
2441
|
exports.localeStore = localeStore;
|
|
2442
|
+
exports.mapCenter = mapCenter;
|
|
2443
|
+
exports.mapToGame = mapToGame;
|
|
2374
2444
|
exports.noop = noop;
|
|
2375
2445
|
exports.numberToRoman = numberToRoman;
|
|
2376
2446
|
exports.openLink = openLink;
|