@articles-media/articles-dev-box 1.0.29 → 1.0.30
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/README.md
CHANGED
|
@@ -67,6 +67,10 @@ npm run dev
|
|
|
67
67
|
- Hook for getting the details of the current user if a valid user token is found.
|
|
68
68
|
- useFullscreen
|
|
69
69
|
- Hook for going fullscreen on the body or provided element
|
|
70
|
+
- typicalZustandStoreExcludes
|
|
71
|
+
- Array of strings that every game published by Articles Media would want to normally exclude from persisting in base game store.
|
|
72
|
+
- typicalZustandStoreStateSlice
|
|
73
|
+
- Slice of zustand states that every game normally uses
|
|
70
74
|
|
|
71
75
|
# Roadmap
|
|
72
76
|
⏹️ Remove Bootstrap reliance
|
|
@@ -3,16 +3,16 @@ import { useState as t } from "react";
|
|
|
3
3
|
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
import { Form as a, Modal as o } from "react-bootstrap";
|
|
5
5
|
//#region src/components/Games/Settings/GraphicsTab.jsx
|
|
6
|
-
function s({ useStore: t }) {
|
|
7
|
-
let
|
|
6
|
+
function s({ useStore: t, config: a }) {
|
|
7
|
+
let o = t((e) => e?.darkMode), s = t((e) => e?.setDarkMode), c = t((e) => e?.graphicsQuality), l = t((e) => e?.setGraphicsQuality), u = t((e) => e?.landingAnimation), d = t((e) => e?.setLandingAnimation);
|
|
8
8
|
return /* @__PURE__ */ i(n, { children: [
|
|
9
9
|
/* @__PURE__ */ r("div", { children: "Dark Mode" }),
|
|
10
10
|
/* @__PURE__ */ r("div", {
|
|
11
11
|
className: "mb-3",
|
|
12
12
|
children: [!1, !0].map((t, n) => /* @__PURE__ */ r(e, {
|
|
13
|
-
active:
|
|
13
|
+
active: o === t,
|
|
14
14
|
onClick: () => {
|
|
15
|
-
|
|
15
|
+
s(t);
|
|
16
16
|
},
|
|
17
17
|
children: t ? "On" : "Off"
|
|
18
18
|
}, n))
|
|
@@ -25,9 +25,9 @@ function s({ useStore: t }) {
|
|
|
25
25
|
"Medium",
|
|
26
26
|
"High"
|
|
27
27
|
].map((t) => /* @__PURE__ */ r(e, {
|
|
28
|
-
active:
|
|
28
|
+
active: c === t,
|
|
29
29
|
onClick: () => {
|
|
30
|
-
|
|
30
|
+
l(t);
|
|
31
31
|
},
|
|
32
32
|
children: t
|
|
33
33
|
}, t))
|
|
@@ -36,19 +36,20 @@ function s({ useStore: t }) {
|
|
|
36
36
|
/* @__PURE__ */ i("div", {
|
|
37
37
|
className: "mb-3",
|
|
38
38
|
children: [/* @__PURE__ */ r(e, {
|
|
39
|
-
active:
|
|
39
|
+
active: u === !1,
|
|
40
40
|
onClick: () => {
|
|
41
|
-
|
|
41
|
+
d(!1);
|
|
42
42
|
},
|
|
43
43
|
children: "Disabled"
|
|
44
44
|
}), /* @__PURE__ */ r(e, {
|
|
45
|
-
active:
|
|
45
|
+
active: u === !0,
|
|
46
46
|
onClick: () => {
|
|
47
|
-
|
|
47
|
+
d(!0);
|
|
48
48
|
},
|
|
49
49
|
children: "Enabled"
|
|
50
50
|
})]
|
|
51
|
-
})
|
|
51
|
+
}),
|
|
52
|
+
a?.tabs?.Graphics?.children
|
|
52
53
|
] });
|
|
53
54
|
}
|
|
54
55
|
//#endregion
|
package/dist/SettingsModal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./SettingsModal-
|
|
1
|
+
import { t as e } from "./SettingsModal-gPPyBi4S.js";
|
|
2
2
|
export { e as default };
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import s from "./ArticlesAd.js";
|
|
|
9
9
|
import { t as c } from "./GameScoreboard-9GYlLx72.js";
|
|
10
10
|
import l from "./GlobalHead.js";
|
|
11
11
|
import u from "./GlobalBody.js";
|
|
12
|
-
import { t as d } from "./SettingsModal-
|
|
12
|
+
import { t as d } from "./SettingsModal-gPPyBi4S.js";
|
|
13
13
|
import f from "./CreditsModal.js";
|
|
14
14
|
import p from "./DarkModeHandler.js";
|
|
15
15
|
import m from "./ToontownModeHandler.js";
|
|
@@ -17,4 +17,6 @@ import h from "./SocketServerUrlHandler.js";
|
|
|
17
17
|
import g from "./useUserFriends.js";
|
|
18
18
|
import _ from "./FriendsList.js";
|
|
19
19
|
import v from "./useFullscreen.js";
|
|
20
|
-
|
|
20
|
+
import y from "./typicalZustandStoreExcludes.js";
|
|
21
|
+
import b from "./typicalZustandStoreStateSlice.js";
|
|
22
|
+
export { a as Ad, s as ArticlesAd, f as CreditsModal, p as DarkModeHandler, _ as FriendsList, c as GameScoreboard, u as GlobalBody, l as GlobalHead, e as ReturnToLauncherButton, o as SessionButton, d as SettingsModal, t as SignInButton, h as SocketServerUrlHandler, m as ToontownModeHandler, i as ViewUserModal, y as typicalZustandStoreExcludes, b as typicalZustandStoreStateSlice, v as useFullscreen, n as useUserDetails, g as useUserFriends, r as useUserToken };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/constants/typicalZustandStoreExcludes.js
|
|
2
|
+
var e = [
|
|
3
|
+
"_hasHydrated",
|
|
4
|
+
"showSettingsModal",
|
|
5
|
+
"showInfoModal",
|
|
6
|
+
"showCreditsModal",
|
|
7
|
+
"showGameOverModal",
|
|
8
|
+
"showMenu",
|
|
9
|
+
"lobbyDetails",
|
|
10
|
+
"sceneKey"
|
|
11
|
+
];
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as default };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
//#region src/constants/typicalZustandStoreStateSlice.js
|
|
2
|
+
var e = (e, t, n) => ({
|
|
3
|
+
_hasHydrated: !1,
|
|
4
|
+
setHasHydrated: (t) => {
|
|
5
|
+
e({ _hasHydrated: t });
|
|
6
|
+
},
|
|
7
|
+
darkMode: null,
|
|
8
|
+
toggleDarkMode: () => e({ darkMode: !t().darkMode }),
|
|
9
|
+
setDarkMode: (t) => {
|
|
10
|
+
e((e) => ({ darkMode: t }));
|
|
11
|
+
},
|
|
12
|
+
nickname: n(),
|
|
13
|
+
setNickname: (t) => {
|
|
14
|
+
e((e) => ({ nickname: t }));
|
|
15
|
+
},
|
|
16
|
+
randomNickname: () => {
|
|
17
|
+
let t = n();
|
|
18
|
+
e((e) => ({ nickname: t }));
|
|
19
|
+
},
|
|
20
|
+
nicknameKeyboard: !1,
|
|
21
|
+
setNicknameKeyboard: (t) => {
|
|
22
|
+
e((e) => ({ nicknameKeyboard: t }));
|
|
23
|
+
},
|
|
24
|
+
debug: !1,
|
|
25
|
+
setDebug: (t) => {
|
|
26
|
+
e((e) => ({ debug: t }));
|
|
27
|
+
},
|
|
28
|
+
sidebar: !0,
|
|
29
|
+
toggleSidebar: () => {
|
|
30
|
+
e((e) => ({ sidebar: !e.sidebar }));
|
|
31
|
+
},
|
|
32
|
+
setSidebar: (t) => {
|
|
33
|
+
e((e) => ({ sidebar: t }));
|
|
34
|
+
},
|
|
35
|
+
showMenu: !1,
|
|
36
|
+
setShowMenu: (t) => e({ showMenu: t }),
|
|
37
|
+
showSettingsModal: !1,
|
|
38
|
+
setShowSettingsModal: (t) => {
|
|
39
|
+
e((e) => ({ showSettingsModal: t }));
|
|
40
|
+
},
|
|
41
|
+
showInfoModal: !1,
|
|
42
|
+
setShowInfoModal: (t) => {
|
|
43
|
+
e((e) => ({ showInfoModal: t }));
|
|
44
|
+
},
|
|
45
|
+
showCreditsModal: !1,
|
|
46
|
+
setShowCreditsModal: (t) => {
|
|
47
|
+
e((e) => ({ showCreditsModal: t }));
|
|
48
|
+
},
|
|
49
|
+
graphicsQuality: "High",
|
|
50
|
+
setGraphicsQuality: (t) => e({ graphicsQuality: t }),
|
|
51
|
+
lobbyDetails: {
|
|
52
|
+
players: [],
|
|
53
|
+
games: []
|
|
54
|
+
},
|
|
55
|
+
setLobbyDetails: (t) => e({ lobbyDetails: t }),
|
|
56
|
+
landingAnimation: !0,
|
|
57
|
+
setLandingAnimation: (t) => e({ landingAnimation: t }),
|
|
58
|
+
toggleLandingAnimation: () => e({ landingAnimation: !t().landingAnimation }),
|
|
59
|
+
toontownMode: !1,
|
|
60
|
+
toggleToontownMode: () => {
|
|
61
|
+
e((e) => ({ toontownMode: !e.toontownMode }));
|
|
62
|
+
},
|
|
63
|
+
setToontownMode: (t) => {
|
|
64
|
+
e((e) => ({ toontownMode: t }));
|
|
65
|
+
},
|
|
66
|
+
showGameOverModal: !1,
|
|
67
|
+
setShowGameOverModal: (t) => {
|
|
68
|
+
e((e) => ({ showGameOverModal: t }));
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
//#endregion
|
|
72
|
+
export { e as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@articles-media/articles-dev-box",
|
|
3
3
|
"description": "Shared code, functions, and components for different Articles Media projects.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.30",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"imports": {
|
|
7
7
|
"#root/src/*": "./src/*"
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
"./useUserToken": "./dist/useUserToken.js",
|
|
37
37
|
"./useUserFriends": "./dist/useUserFriends.js",
|
|
38
38
|
"./useFullscreen": "./dist/useFullscreen.js",
|
|
39
|
+
"./typicalZustandStoreExcludes": "./dist/typicalZustandStoreExcludes.js",
|
|
40
|
+
"./typicalZustandStoreStateSlice": "./dist/typicalZustandStoreStateSlice.js",
|
|
39
41
|
"./dist/style.css": "./dist/articles-dev-box.css",
|
|
40
42
|
"./dist/articles-dev-box.css": "./dist/articles-dev-box.css"
|
|
41
43
|
},
|