@articles-media/articles-dev-box 1.0.34 → 1.0.35
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 +1 -1
- package/dist/{GameMenu-BD1HSDJ-.js → GameMenu-lHVT8MdJ.js} +45 -21
- package/dist/GameMenu.js +1 -1
- package/dist/{SettingsModal-D6AkYDbw.js → SettingsModal-yJTqjsyc.js} +1 -1
- package/dist/SettingsModal.js +1 -1
- package/dist/articles-dev-box.css +3 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ For newly developed components I sometimes find myself trying to remember what r
|
|
|
79
79
|
|
|
80
80
|
- typicalZustandStoreExcludes - Catching Game and School Run
|
|
81
81
|
- SessionButton - Catching Game and School Run
|
|
82
|
-
- GameMenu - School Run
|
|
82
|
+
- GameMenu - Catching Game and School Run use Static Panel for sidebarStyle and Corner Button for menuBarStyle. Ice Slide uses Floating Panel for sidebarStyle and Bar for menuBarStyle.
|
|
83
83
|
|
|
84
84
|
# Roadmap
|
|
85
85
|
⏹️ Remove Bootstrap reliance?
|
|
@@ -4,38 +4,58 @@ import { useEffect } from "react";
|
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/Games/GameMenu/MobileMenu.jsx
|
|
6
6
|
var import_classnames = /* @__PURE__ */ __toESM(require_classnames(), 1);
|
|
7
|
-
function MobileMenu({ useStore, LeftPanelContent,
|
|
7
|
+
function MobileMenu({ useStore, LeftPanelContent, menuBarConfig }) {
|
|
8
8
|
const showMenu = useStore((state) => state.showMenu);
|
|
9
9
|
const setShowMenu = useStore((state) => state.setShowMenu);
|
|
10
|
+
const MenuButton = () => /* @__PURE__ */ jsxs(ArticlesButton, {
|
|
11
|
+
small: true,
|
|
12
|
+
active: showMenu,
|
|
13
|
+
onClick: () => {
|
|
14
|
+
setShowMenu(!showMenu);
|
|
15
|
+
},
|
|
16
|
+
className: "d-flex",
|
|
17
|
+
children: [/* @__PURE__ */ jsx("i", { className: "fad fa-bars" }), /* @__PURE__ */ jsx("span", {
|
|
18
|
+
className: "text",
|
|
19
|
+
children: "Menu"
|
|
20
|
+
})]
|
|
21
|
+
});
|
|
10
22
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
11
23
|
className: (0, import_classnames.default)("menu-bar", {
|
|
12
|
-
"card card-articles p-1 justify-content-center":
|
|
13
|
-
[
|
|
24
|
+
"card card-articles p-1 justify-content-center": menuBarConfig.style == "Bar",
|
|
25
|
+
[menuBarConfig.style.replaceAll(" ", "_")]: menuBarConfig.style,
|
|
26
|
+
[menuBarConfig.menuBarButtonPosition]: menuBarConfig.menuBarButtonPosition
|
|
14
27
|
}),
|
|
15
|
-
|
|
28
|
+
style: { ...menuBarConfig.style == "Bar" && { borderRadius: "0px" } },
|
|
29
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
16
30
|
className: "flex-header align-items-center",
|
|
17
|
-
children:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsxs("div", {
|
|
33
|
+
className: "Left d-flex align-items-center",
|
|
34
|
+
children: [(menuBarConfig.menuBarButtonPosition == "Left" || !menuBarConfig.menuBarButtonPosition) && /* @__PURE__ */ jsx(MenuButton, {}), menuBarConfig.leftSlotChildren && menuBarConfig.leftSlotChildren]
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ jsxs("div", {
|
|
37
|
+
className: "Center d-flex align-items-center",
|
|
38
|
+
children: [menuBarConfig.menuBarButtonPosition == "Center" && /* @__PURE__ */ jsx(MenuButton, {}), menuBarConfig.centerSlotChildren && menuBarConfig.centerSlotChildren]
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ jsxs("div", {
|
|
41
|
+
className: "Right d-flex align-items-center",
|
|
42
|
+
children: [menuBarConfig.menuBarButtonPosition == "Right" && /* @__PURE__ */ jsx(MenuButton, {}), menuBarConfig.rightSlotChildren && menuBarConfig.rightSlotChildren]
|
|
43
|
+
})
|
|
44
|
+
]
|
|
29
45
|
})
|
|
30
46
|
}), /* @__PURE__ */ jsx("div", {
|
|
31
47
|
className: `mobile-menu ${showMenu && "show"}`,
|
|
32
48
|
onClick: () => setShowMenu(false),
|
|
33
49
|
style: {
|
|
34
|
-
...
|
|
35
|
-
...
|
|
50
|
+
...menuBarConfig.style == "Bar" && { bottom: "50px" },
|
|
51
|
+
...menuBarConfig.style == "Corner Button" && { bottom: "0px" }
|
|
36
52
|
},
|
|
37
53
|
children: /* @__PURE__ */ jsx("div", {
|
|
38
|
-
style: {
|
|
54
|
+
style: {
|
|
55
|
+
maxWidth: "300px",
|
|
56
|
+
maxHeight: "calc(100vh - 100px)",
|
|
57
|
+
overflowY: "auto"
|
|
58
|
+
},
|
|
39
59
|
className: "mobile-menu-container",
|
|
40
60
|
onClick: (e) => e.stopPropagation(),
|
|
41
61
|
children: LeftPanelContent && /* @__PURE__ */ jsx(LeftPanelContent, {})
|
|
@@ -52,7 +72,7 @@ function MobileMenu({ useStore, LeftPanelContent, menuBarStyle }) {
|
|
|
52
72
|
* @param {"Static Panel" | "Floating Panel"} [props.sidebarStyle]
|
|
53
73
|
*/
|
|
54
74
|
function GameMenu(props) {
|
|
55
|
-
const { useStore, LeftPanelContent,
|
|
75
|
+
const { useStore, LeftPanelContent, sidebarStyleConfig, sidebarStyle, menuBarConfig, menuBarStyle, menuBarButtonPosition } = props;
|
|
56
76
|
const sidebar = useStore((state) => state.sidebar);
|
|
57
77
|
const setShowMenu = useStore((state) => state.setShowMenu);
|
|
58
78
|
useEffect(() => {
|
|
@@ -66,7 +86,11 @@ function GameMenu(props) {
|
|
|
66
86
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MobileMenu, {
|
|
67
87
|
useStore,
|
|
68
88
|
LeftPanelContent,
|
|
69
|
-
|
|
89
|
+
menuBarConfig: {
|
|
90
|
+
...menuBarConfig,
|
|
91
|
+
style: menuBarConfig.style || menuBarStyle,
|
|
92
|
+
menuBarButtonPosition: menuBarConfig.menuBarButtonPosition || menuBarButtonPosition
|
|
93
|
+
}
|
|
70
94
|
}), /* @__PURE__ */ jsx("div", {
|
|
71
95
|
className: `panel-left card rounded-0 ${convertedSidebarStyle}`,
|
|
72
96
|
style: { ...convertedSidebarStyle == "Floating_Panel" && {
|
package/dist/GameMenu.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as GameMenu } from "./GameMenu-
|
|
1
|
+
import { t as GameMenu } from "./GameMenu-lHVT8MdJ.js";
|
|
2
2
|
export { GameMenu as default };
|
|
@@ -232,7 +232,7 @@ function OtherTab({ useStore, config }) {
|
|
|
232
232
|
var package_default = {
|
|
233
233
|
name: "@articles-media/articles-dev-box",
|
|
234
234
|
description: "Shared code, functions, and components for different Articles Media projects.",
|
|
235
|
-
version: "1.0.
|
|
235
|
+
version: "1.0.35",
|
|
236
236
|
type: "module",
|
|
237
237
|
imports: { "#root/src/*": "./src/*" },
|
|
238
238
|
main: "./dist/index.js",
|
package/dist/SettingsModal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SettingsModal } from "./SettingsModal-
|
|
1
|
+
import { t as SettingsModal } from "./SettingsModal-yJTqjsyc.js";
|
|
2
2
|
export { SettingsModal as default };
|
|
@@ -283,13 +283,13 @@
|
|
|
283
283
|
.menu-bar.Corner_Button {
|
|
284
284
|
position: fixed;
|
|
285
285
|
bottom: 0;
|
|
286
|
+
width: 100%;
|
|
286
287
|
left: 0;
|
|
287
|
-
|
|
288
|
+
right: 0;
|
|
288
289
|
height: 50px;
|
|
289
290
|
z-index: 3;
|
|
290
291
|
}
|
|
291
292
|
.menu-bar.Corner_Button .btn {
|
|
292
|
-
position: absolute;
|
|
293
293
|
width: 100%;
|
|
294
294
|
height: 100%;
|
|
295
295
|
border-radius: 0;
|
|
@@ -334,6 +334,7 @@
|
|
|
334
334
|
.panel-right {
|
|
335
335
|
width: 300px;
|
|
336
336
|
height: calc(100vh - 0px);
|
|
337
|
+
overflow-y: auto;
|
|
337
338
|
flex-shrink: 0;
|
|
338
339
|
}
|
|
339
340
|
|
package/dist/index.js
CHANGED
|
@@ -8,11 +8,11 @@ import useUserFriends from "./useUserFriends.js";
|
|
|
8
8
|
import FriendsList from "./FriendsList.js";
|
|
9
9
|
import SessionButton from "./SessionButton.js";
|
|
10
10
|
import ArticlesAd from "./ArticlesAd.js";
|
|
11
|
-
import { t as GameMenu } from "./GameMenu-
|
|
11
|
+
import { t as GameMenu } from "./GameMenu-lHVT8MdJ.js";
|
|
12
12
|
import { t as GameScoreboard } from "./GameScoreboard-DVoXXDnM.js";
|
|
13
13
|
import GlobalHead from "./GlobalHead.js";
|
|
14
14
|
import GlobalBody_default from "./GlobalBody.js";
|
|
15
|
-
import { t as SettingsModal } from "./SettingsModal-
|
|
15
|
+
import { t as SettingsModal } from "./SettingsModal-yJTqjsyc.js";
|
|
16
16
|
import CreditsModal from "./CreditsModal.js";
|
|
17
17
|
import DarkModeHandler from "./DarkModeHandler.js";
|
|
18
18
|
import ToontownModeHandler from "./ToontownModeHandler.js";
|
package/package.json
CHANGED