@articles-media/articles-dev-box 1.0.26 → 1.0.27

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
@@ -37,6 +37,8 @@ npm run dev
37
37
 
38
38
  - ReturnToLauncherButton
39
39
  - For bringing users back to their state in the games showcase/launcher
40
+ - SignInButton
41
+ - For bringing users to the accounts service to login at and redirecting back
40
42
  - GameScoreboard
41
43
  - Scoreboard for registered games that links with a user's Articles Media account.
42
44
  - Ad
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./Button-C8R7Qxqb.js";
2
- import { t } from "./ViewUserModal-BbphE2vW.js";
2
+ import { t } from "./ViewUserModal-CrGeXxWG.js";
3
3
  import { useEffect as n, useState as r } from "react";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  import o from "swr";
@@ -1,2 +1,2 @@
1
- import { t as e } from "./GameScoreboard-DID7b4kw.js";
1
+ import { t as e } from "./GameScoreboard-pTQKozrD.js";
2
2
  export { e as default };
@@ -129,53 +129,82 @@ function l({ useStore: t }) {
129
129
  //#endregion
130
130
  //#region src/components/Games/Settings/ControlsTab.jsx
131
131
  function u({ useTouchControlsStore: e }) {
132
- return /* @__PURE__ */ i("div", {
133
- className: "p-3",
134
- children: [/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("h5", { children: "Control Settings" }), /* @__PURE__ */ r("p", { children: "Configure your key bindings and control preferences here." })] }), e && /* @__PURE__ */ r(d, { useTouchControlsStore: e })]
132
+ return /* @__PURE__ */ r("div", {
133
+ className: "",
134
+ children: e && /* @__PURE__ */ r(d, { useTouchControlsStore: e })
135
135
  });
136
136
  }
137
- function d({ useTouchControlsStore: e }) {
138
- let t = e((e) => e.touchControls), n = e((e) => e.setTouchControls);
139
- return /* @__PURE__ */ r("div", {
137
+ function d({ useTouchControlsStore: t }) {
138
+ let n = t((e) => e?.enabled), a = t((e) => e?.setEnabled);
139
+ return /* @__PURE__ */ i("div", {
140
140
  className: "mb-3",
141
- children: [!1, !0].map((e, i) => /* @__PURE__ */ r(ArticlesButton, {
142
- active: t === e,
143
- onClick: () => {
144
- n(e);
145
- },
146
- children: e ? "On" : "Off"
147
- }, i))
141
+ children: [
142
+ /* @__PURE__ */ r("div", { children: "Touch Controls" }),
143
+ /* @__PURE__ */ r("div", {
144
+ className: "small mb-1",
145
+ children: "Adds on screen controls for touch devices."
146
+ }),
147
+ /* @__PURE__ */ r("div", {
148
+ className: "mb-3",
149
+ children: [!1, !0].map((t, i) => /* @__PURE__ */ r(e, {
150
+ active: n === t,
151
+ onClick: () => {
152
+ a(t);
153
+ },
154
+ children: t ? "On" : "Off"
155
+ }, i))
156
+ })
157
+ ]
148
158
  });
149
159
  }
150
160
  //#endregion
151
161
  //#region src/components/Games/Settings/OtherTab.jsx
152
- function f({ useStore: t, children: a }) {
153
- let o = t((e) => e?.debug), s = t((e) => e?.setDebug);
162
+ function f({ useStore: t, config: a, children: o }) {
163
+ let s = t((e) => e?.debug), c = t((e) => e?.setDebug), l = t((e) => e?.toontownMode), u = t((e) => e?.setToontownMode);
154
164
  return /* @__PURE__ */ i(n, { children: [
155
165
  /* @__PURE__ */ r("div", { children: "Debug Mode" }),
156
166
  /* @__PURE__ */ r("div", {
157
167
  className: "mb-3",
158
168
  children: [!1, !0].map((t, n) => /* @__PURE__ */ r(e, {
159
- active: o === t,
169
+ active: s === t,
160
170
  onClick: () => {
161
- s(t);
171
+ c(t);
162
172
  },
163
173
  children: t ? "On" : "Off"
164
174
  }, n))
165
175
  }),
166
- a && /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("div", {
176
+ a?.tabs?.Other?.toontownMode && /* @__PURE__ */ i(n, { children: [
177
+ /* @__PURE__ */ r("div", { children: "Toontown Mode" }),
178
+ /* @__PURE__ */ r("div", {
179
+ className: "small mb-1",
180
+ children: "Mimics Toontown Online graphics."
181
+ }),
182
+ /* @__PURE__ */ r("div", {
183
+ className: "mb-3",
184
+ children: [!1, !0].map((t, n) => /* @__PURE__ */ r(e, {
185
+ active: l === t,
186
+ onClick: () => {
187
+ u(t);
188
+ },
189
+ children: t ? "On" : "Off"
190
+ }, n))
191
+ })
192
+ ] }),
193
+ o && /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("div", {
167
194
  className: "mb-3",
168
195
  children: "Other Settings"
169
196
  }), /* @__PURE__ */ r("div", {
170
197
  className: "mb-3",
171
- children: a
198
+ children: o
172
199
  })] })
173
200
  ] });
174
201
  }
175
202
  //#endregion
176
203
  //#region src/components/Games/Settings/SettingsModal.jsx
177
204
  function p({ show: n, setShow: a, store: d, useAudioStore: p, useTouchControlsStore: m, config: h }) {
178
- let [g, _] = t(!1), [v, y] = t("Graphics");
205
+ let [g, _] = t(!1), [v, y] = t(localStorage.getItem("articles_settings_tab") || "Graphics"), b = (e) => {
206
+ y(e), localStorage.setItem("articles_settings_tab", e);
207
+ };
179
208
  return d((e) => e.darkMode), d((e) => e.setDarkMode), d((e) => e.arcadeMode), d((e) => e.setArcadeMode), /* @__PURE__ */ i(o, {
180
209
  className: "articles-modal",
181
210
  size: "md",
@@ -205,7 +234,7 @@ function p({ show: n, setShow: a, store: d, useAudioStore: p, useTouchControlsSt
205
234
  ].map((t) => /* @__PURE__ */ r(e, {
206
235
  active: v == t,
207
236
  onClick: () => {
208
- y(t);
237
+ b(t);
209
238
  },
210
239
  children: t
211
240
  }, t))
@@ -231,7 +260,10 @@ function p({ show: n, setShow: a, store: d, useAudioStore: p, useTouchControlsSt
231
260
  useStore: d,
232
261
  config: h
233
262
  }),
234
- v == "Other" && /* @__PURE__ */ r(f, { useStore: d })
263
+ v == "Other" && /* @__PURE__ */ r(f, {
264
+ useStore: d,
265
+ config: h
266
+ })
235
267
  ]
236
268
  })
237
269
  ]
@@ -1,2 +1,2 @@
1
- import { t as e } from "./SettingsModal-DYcHm28E.js";
1
+ import { t as e } from "./SettingsModal-DQSSeIBg.js";
2
2
  export { e as default };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { t as e } from "./Button-C8R7Qxqb.js";
3
+ import { useEffect as t, useState as n } from "react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ //#region src/components/User/SignInButton.jsx
6
+ function a({ className: a, id: o, text: s }) {
7
+ let [c, l] = n(!1), u = process.env.NODE_ENV === "development" ? "http://localhost:3012" : "https://accounts.articles.media", [d, f] = n(`${u}/login`);
8
+ return t(() => {
9
+ l(!0);
10
+ let e = window.location.pathname, t = window.location.search;
11
+ f(`${u}/login?redirect=${encodeURIComponent(window.location.origin + e + t)}&type=subdomain`);
12
+ }, [u]), /* @__PURE__ */ r("a", {
13
+ href: d,
14
+ rel: "noopener noreferrer",
15
+ children: /* @__PURE__ */ i(e, {
16
+ className: `${a} w-100`,
17
+ id: o,
18
+ small: !0,
19
+ style: {
20
+ zIndex: 10,
21
+ position: "relative"
22
+ },
23
+ onClick: () => {},
24
+ children: [/* @__PURE__ */ r("i", { className: "fad fa-user" }), s || "Sign In"]
25
+ })
26
+ });
27
+ }
28
+ //#endregion
29
+ export { a as default };
@@ -984,10 +984,11 @@ function R(e) {
984
984
  ]
985
985
  });
986
986
  };
987
- function Oe(e) {
988
- switch (e) {
987
+ function Oe(t) {
988
+ switch (t) {
989
989
  case "Link": return /* @__PURE__ */ p("span", {
990
990
  type: "button",
991
+ className: e.className,
991
992
  onClick: () => {
992
993
  T(!0);
993
994
  },
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { t as e } from "./ViewUserModal-BbphE2vW.js";
2
+ import { t as e } from "./ViewUserModal-CrGeXxWG.js";
3
3
  export { e as default };
package/dist/index.js CHANGED
@@ -1,16 +1,17 @@
1
1
  import e from "./ReturnToLauncherButton.js";
2
- import t from "./ArticlesAd.js";
3
- import { t as n } from "./Ad-DW52TMZ4.js";
4
- import { t as r } from "./ViewUserModal-BbphE2vW.js";
5
- import { t as i } from "./GameScoreboard-DID7b4kw.js";
6
- import a from "./GlobalHead.js";
7
- import o from "./GlobalBody.js";
8
- import { t as s } from "./SettingsModal-DYcHm28E.js";
9
- import c from "./CreditsModal.js";
10
- import l from "./DarkModeHandler.js";
11
- import u from "./useUserFriends.js";
12
- import d from "./FriendsList.js";
13
- import f from "./useUserDetails.js";
14
- import p from "./useUserToken.js";
15
- import m from "./useFullscreen.js";
16
- export { n as Ad, t as ArticlesAd, c as CreditsModal, l as DarkModeHandler, d as FriendsList, i as GameScoreboard, o as GlobalBody, a as GlobalHead, e as ReturnToLauncherButton, s as SettingsModal, r as ViewUserModal, m as useFullscreen, f as useUserDetails, u as useUserFriends, p as useUserToken };
2
+ import t from "./SignInButton.js";
3
+ import n from "./ArticlesAd.js";
4
+ import { t as r } from "./Ad-DW52TMZ4.js";
5
+ import { t as i } from "./ViewUserModal-CrGeXxWG.js";
6
+ import { t as a } from "./GameScoreboard-pTQKozrD.js";
7
+ import o from "./GlobalHead.js";
8
+ import s from "./GlobalBody.js";
9
+ import { t as c } from "./SettingsModal-DQSSeIBg.js";
10
+ import l from "./CreditsModal.js";
11
+ import u from "./DarkModeHandler.js";
12
+ import d from "./useUserFriends.js";
13
+ import f from "./FriendsList.js";
14
+ import p from "./useUserDetails.js";
15
+ import m from "./useUserToken.js";
16
+ import h from "./useFullscreen.js";
17
+ export { r as Ad, n as ArticlesAd, l as CreditsModal, u as DarkModeHandler, f as FriendsList, a as GameScoreboard, s as GlobalBody, o as GlobalHead, e as ReturnToLauncherButton, c as SettingsModal, t as SignInButton, i as ViewUserModal, h as useFullscreen, p as useUserDetails, d as useUserFriends, m as useUserToken };
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.26",
4
+ "version": "1.0.27",
5
5
  "type": "module",
6
6
  "imports": {
7
7
  "#root/src/*": "./src/*"
@@ -21,6 +21,7 @@
21
21
  "./ArticlesAd": "./dist/ArticlesAd.js",
22
22
  "./GameScoreboard": "./dist/GameScoreboard.js",
23
23
  "./ReturnToLauncherButton": "./dist/ReturnToLauncherButton.js",
24
+ "./SignInButton": "./dist/SignInButton.js",
24
25
  "./GlobalHead": "./dist/GlobalHead.js",
25
26
  "./GlobalBody": "./dist/GlobalBody.js",
26
27
  "./ViewUserModal": "./dist/ViewUserModal.js",