@articles-media/articles-dev-box 1.0.25 → 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,7 +1,7 @@
1
- import { n as e, t } from "./classnames-CpG5mzJ5.js";
2
- import { t as n } from "./Button-CU11ETla.js";
1
+ import { n as e, t } from "./classnames-DCsil9eG.js";
2
+ import { t as n } from "./Button-C8R7Qxqb.js";
3
3
  import { t as r } from "./Link-8nSDV4sI.js";
4
- import { n as i, o as a, r as o, s, t as c } from "./numberWithCommas-rN3cZDJL.js";
4
+ import { n as i, o as a, r as o, s, t as c } from "./numberWithCommas-DXxghuXP.js";
5
5
  import * as l from "react";
6
6
  import { lazy as u, memo as d, useEffect as f, useState as p } from "react";
7
7
  import { jsx as m, jsxs as h } from "react/jsx-runtime";
@@ -112,7 +112,10 @@ var E = async (e) => {
112
112
  } catch {}
113
113
  let t = new URLSearchParams({ ad_id: e.ad_id }).toString();
114
114
  return fetch(`${e.url}?${t}`).then((e) => e.json()).then((e) => e.result);
115
- }, ee = { dedupingInterval: 1e3 * 60 * 60 }, te = (e, t) => {
115
+ }, ee = {
116
+ dedupingInterval: 1e3 * 60 * 60,
117
+ errorRetryInterval: 1e3 * 60 * 5
118
+ }, te = (e, t) => {
116
119
  let { data: n, error: r, isLoading: i, mutate: a } = g(e ? {
117
120
  url: `https://articles.media/api/ads/${e}`,
118
121
  ad_id: e,
@@ -153,7 +156,8 @@ var A = async (e) => {
153
156
  return fetch(e.url).then((e) => e.json());
154
157
  }, j = 60, M = {
155
158
  dedupingInterval: o(j),
156
- focusThrottleInterval: o(j)
159
+ focusThrottleInterval: o(j),
160
+ errorRetryInterval: 1e3 * 60 * 5
157
161
  }, N = (e) => {
158
162
  let { data: t, error: n, isLoading: r, mutate: i } = g(e?.loading || e?.disabled ? null : { url: "https://articles.media/api/ads" }, A, M);
159
163
  return {
@@ -162,7 +166,7 @@ var A = async (e) => {
162
166
  isLoading: r,
163
167
  mutate: i
164
168
  };
165
- }, P = /* @__PURE__ */ e(t(), 1), F = u(() => import("./AdDetailsModal-Cv1ll9G-.js")), I = u(() => import("./AdConfirmExitModal-BNFKKayL.js"));
169
+ }, P = /* @__PURE__ */ e(t(), 1), F = u(() => import("./AdDetailsModal-FPwnBWKy.js")), I = u(() => import("./AdConfirmExitModal-BiIXNJwG.js"));
166
170
  function L(e, t) {
167
171
  return Math.floor(Math.random() * (t - e + 1)) + e;
168
172
  }
package/dist/Ad.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as e } from "./Ad-BAvmOFcq.js";
1
+ import { t as e } from "./Ad-DW52TMZ4.js";
2
2
  export { e as default };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./Button-CU11ETla.js";
1
+ import { t as e } from "./Button-C8R7Qxqb.js";
2
2
  import { t } from "./Link-8nSDV4sI.js";
3
3
  import { useEffect as n } from "react";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { t as e } from "./Button-CU11ETla.js";
1
+ import { t as e } from "./Button-C8R7Qxqb.js";
2
2
  import { t } from "./Link-8nSDV4sI.js";
3
3
  import { useEffect as n } from "react";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { n as e, t } from "./classnames-CpG5mzJ5.js";
1
+ import { n as e, t } from "./classnames-DCsil9eG.js";
2
2
  import { forwardRef as n } from "react";
3
3
  import { jsx as r } from "react/jsx-runtime";
4
4
  //#region src/components/UI/Button.jsx
@@ -1,4 +1,4 @@
1
- import { t as e } from "./Button-CU11ETla.js";
1
+ import { t as e } from "./Button-C8R7Qxqb.js";
2
2
  import { useState as t } from "react";
3
3
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
4
  import { Modal as i } from "react-bootstrap";
@@ -1,4 +1,4 @@
1
- import { t as e } from "./Button-CU11ETla.js";
1
+ import { t as e } from "./Button-C8R7Qxqb.js";
2
2
  import t from "./useUserFriends.js";
3
3
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
4
  import { Modal as i } from "react-bootstrap";
@@ -1,5 +1,5 @@
1
- import { t as e } from "./Button-CU11ETla.js";
2
- import { t } from "./ViewUserModal-C_gWUvXi.js";
1
+ import { t as e } from "./Button-C8R7Qxqb.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";
@@ -38,6 +38,7 @@ var l = async (e) => {
38
38
  return fetch(`${e.url}?${t}`).then((e) => e.json());
39
39
  }, u = {
40
40
  dedupingInterval: 1e3 * 60 * 30,
41
+ errorRetryInterval: 1e3 * 60 * 5,
41
42
  refreshInterval: 0,
42
43
  revalidateOnFocus: !1,
43
44
  revalidateIfStale: !1,
@@ -57,32 +58,32 @@ var l = async (e) => {
57
58
  };
58
59
  //#endregion
59
60
  //#region src/components/Games/GameScoreboard.jsx
60
- function f({ game: o, reloadScoreboard: l, setReloadScoreboard: u, prepend: f, append: p }) {
61
- let [m, h] = r(!1), [g, _] = r(!1), { data: v, isLoading: y, mutate: b } = d({ game: o });
61
+ function f({ game: o, metric: l, reloadScoreboard: u, setReloadScoreboard: f, prepend: p, append: m }) {
62
+ let [h, g] = r(!1), [_, v] = r(!1), { data: y, isLoading: b, mutate: x } = d({ game: o });
62
63
  return n(() => {}, []), n(() => {
63
- l && (u(!1), b());
64
- }, [l]), /* @__PURE__ */ a("div", {
64
+ u && (f(!1), x());
65
+ }, [u]), /* @__PURE__ */ a("div", {
65
66
  className: "scoreboard",
66
67
  children: [
67
68
  /* @__PURE__ */ a(s, {
68
- show: m,
69
+ show: h,
69
70
  size: "md",
70
71
  className: "articles-modal",
71
72
  centered: !0,
72
- onHide: () => h(!1),
73
+ onHide: () => g(!1),
73
74
  children: [
74
75
  /* @__PURE__ */ i(s.Header, { children: /* @__PURE__ */ i(s.Title, { children: "Scoreboard Settings" }) }),
75
76
  /* @__PURE__ */ i(s.Body, { children: /* @__PURE__ */ a("div", {
76
77
  className: "d-flex justify-content-between align-items-center",
77
- onClick: () => _(!g),
78
- children: [/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("i", { className: "fas fa-trophy-alt" }), /* @__PURE__ */ i("span", { children: "Join Scoreboard?" })] }), /* @__PURE__ */ i(c, { checked: g })]
78
+ onClick: () => v(!_),
79
+ children: [/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("i", { className: "fas fa-trophy-alt" }), /* @__PURE__ */ i("span", { children: "Join Scoreboard?" })] }), /* @__PURE__ */ i(c, { checked: _ })]
79
80
  }) }),
80
81
  /* @__PURE__ */ i(s.Footer, {
81
82
  className: "justify-content-between",
82
83
  children: /* @__PURE__ */ i(e, {
83
84
  variant: "articles",
84
85
  onClick: () => {
85
- h(!1);
86
+ g(!1);
86
87
  },
87
88
  children: "Close"
88
89
  })
@@ -91,7 +92,7 @@ function f({ game: o, reloadScoreboard: l, setReloadScoreboard: u, prepend: f, a
91
92
  }),
92
93
  /* @__PURE__ */ i("div", {
93
94
  className: "prepend-container",
94
- children: f
95
+ children: p
95
96
  }),
96
97
  /* @__PURE__ */ a("div", {
97
98
  className: "card card-articles card-sm mb-3 mb-lg-0",
@@ -100,7 +101,7 @@ function f({ game: o, reloadScoreboard: l, setReloadScoreboard: u, prepend: f, a
100
101
  className: "card-header d-flex justify-content-between align-items-center",
101
102
  children: [/* @__PURE__ */ a("span", { children: [o, " Scoreboard"] }), /* @__PURE__ */ i(e, {
102
103
  onClick: () => {
103
- b();
104
+ x();
104
105
  },
105
106
  small: !0,
106
107
  children: /* @__PURE__ */ i("i", { className: "fad fa-redo me-0" })
@@ -108,10 +109,10 @@ function f({ game: o, reloadScoreboard: l, setReloadScoreboard: u, prepend: f, a
108
109
  }),
109
110
  /* @__PURE__ */ a("div", {
110
111
  className: "card-body p-0",
111
- children: [(v?.length || 0) == 0 && /* @__PURE__ */ i("div", {
112
+ children: [(y?.length || 0) == 0 && /* @__PURE__ */ i("div", {
112
113
  className: "small p-2",
113
114
  children: "No scores yet"
114
- }), v?.map((e, n) => /* @__PURE__ */ a("div", {
115
+ }), y?.length > 0 && y?.map((e, n) => /* @__PURE__ */ a("div", {
115
116
  className: "result d-flex flex-column justify-content-between border-bottom p-2",
116
117
  children: [/* @__PURE__ */ a("div", {
117
118
  className: "d-flex justify-content-between lh-sm",
@@ -146,7 +147,7 @@ function f({ game: o, reloadScoreboard: l, setReloadScoreboard: u, prepend: f, a
146
147
  }), /* @__PURE__ */ i(e, {
147
148
  small: !0,
148
149
  onClick: () => {
149
- h(!0);
150
+ g(!0);
150
151
  },
151
152
  children: /* @__PURE__ */ i("i", { className: "fad fa-cog me-0" })
152
153
  })]
@@ -155,7 +156,7 @@ function f({ game: o, reloadScoreboard: l, setReloadScoreboard: u, prepend: f, a
155
156
  }),
156
157
  /* @__PURE__ */ i("div", {
157
158
  className: "append-container",
158
- children: p
159
+ children: m
159
160
  })
160
161
  ]
161
162
  });
@@ -1,2 +1,2 @@
1
- import { t as e } from "./GameScoreboard-Dj5mTFTn.js";
1
+ import { t as e } from "./GameScoreboard-pTQKozrD.js";
2
2
  export { e as default };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { n as e, t } from "./classnames-CpG5mzJ5.js";
2
+ import { n as e, t } from "./classnames-DCsil9eG.js";
3
3
  import { n, t as r } from "./useAuthSiteStatus-Cj9IjMj7.js";
4
4
  import { Suspense as i, lazy as a, memo as o, useState as s } from "react";
5
5
  import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
6
6
  //#region src/components/Global/GlobalBody.jsx
7
- var d = /* @__PURE__ */ e(t(), 1), f = a(() => import("./StatusModal-CBzdZdAm.js"));
7
+ var d = /* @__PURE__ */ e(t(), 1), f = a(() => import("./StatusModal-BrBJnAXD.js"));
8
8
  function p(e) {
9
9
  let [t, a] = s(!1), { data: o, error: p, isLoading: m, mutate: h } = n({ disable: process.env.NODE_ENV !== "development" }), { data: g, error: _, isLoading: v, mutate: y } = r({ disable: process.env.NODE_ENV !== "development" });
10
10
  return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("link", {
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as e } from "./Button-CU11ETla.js";
2
+ import { t as e } from "./Button-C8R7Qxqb.js";
3
3
  import { useEffect as t, useState as n } from "react";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  //#region src/components/Games/ReturnToLauncherButton.jsx
@@ -1,4 +1,4 @@
1
- import { t as e } from "./Button-CU11ETla.js";
1
+ import { t as e } from "./Button-C8R7Qxqb.js";
2
2
  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";
@@ -129,43 +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", {
132
+ return /* @__PURE__ */ r("div", {
133
133
  className: "",
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 })]
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 }) {
153
- let a = t((e) => e?.debug), o = t((e) => e?.setDebug);
154
- return /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("div", { children: "Debug Mode" }), /* @__PURE__ */ r("div", {
155
- className: "mb-3",
156
- children: [!1, !0].map((t, n) => /* @__PURE__ */ r(e, {
157
- active: a === t,
158
- onClick: () => {
159
- o(t);
160
- },
161
- children: t ? "On" : "Off"
162
- }, n))
163
- })] });
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);
164
+ return /* @__PURE__ */ i(n, { children: [
165
+ /* @__PURE__ */ r("div", { children: "Debug Mode" }),
166
+ /* @__PURE__ */ r("div", {
167
+ className: "mb-3",
168
+ children: [!1, !0].map((t, n) => /* @__PURE__ */ r(e, {
169
+ active: s === t,
170
+ onClick: () => {
171
+ c(t);
172
+ },
173
+ children: t ? "On" : "Off"
174
+ }, n))
175
+ }),
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", {
194
+ className: "mb-3",
195
+ children: "Other Settings"
196
+ }), /* @__PURE__ */ r("div", {
197
+ className: "mb-3",
198
+ children: o
199
+ })] })
200
+ ] });
164
201
  }
165
202
  //#endregion
166
203
  //#region src/components/Games/Settings/SettingsModal.jsx
167
- function p({ show: n, setShow: a, store: d, useAudioStore: p, config: m }) {
168
- let [h, g] = t(!1), [_, v] = t("Graphics");
204
+ function p({ show: n, setShow: a, store: d, useAudioStore: p, useTouchControlsStore: m, config: h }) {
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
+ };
169
208
  return d((e) => e.darkMode), d((e) => e.setDarkMode), d((e) => e.arcadeMode), d((e) => e.setArcadeMode), /* @__PURE__ */ i(o, {
170
209
  className: "articles-modal",
171
210
  size: "md",
@@ -193,9 +232,9 @@ function p({ show: n, setShow: a, store: d, useAudioStore: p, config: m }) {
193
232
  "Multiplayer",
194
233
  "Other"
195
234
  ].map((t) => /* @__PURE__ */ r(e, {
196
- active: _ == t,
235
+ active: v == t,
197
236
  onClick: () => {
198
- v(t);
237
+ b(t);
199
238
  },
200
239
  children: t
201
240
  }, t))
@@ -204,23 +243,27 @@ function p({ show: n, setShow: a, store: d, useAudioStore: p, config: m }) {
204
243
  /* @__PURE__ */ i("div", {
205
244
  className: "p-2",
206
245
  children: [
207
- _ == "Controls" && /* @__PURE__ */ r(u, {
246
+ v == "Controls" && /* @__PURE__ */ r(u, {
208
247
  useStore: d,
209
- config: m
248
+ useTouchControlsStore: m,
249
+ config: h
210
250
  }),
211
- _ == "Graphics" && /* @__PURE__ */ r(s, {
251
+ v == "Graphics" && /* @__PURE__ */ r(s, {
212
252
  useStore: d,
213
- config: m
253
+ config: h
214
254
  }),
215
- _ == "Audio" && /* @__PURE__ */ r(c, {
255
+ v == "Audio" && /* @__PURE__ */ r(c, {
216
256
  useAudioStore: p,
217
- config: m
257
+ config: h
218
258
  }),
219
- _ == "Multiplayer" && /* @__PURE__ */ r(l, {
259
+ v == "Multiplayer" && /* @__PURE__ */ r(l, {
220
260
  useStore: d,
221
- config: m
261
+ config: h
222
262
  }),
223
- _ == "Other" && /* @__PURE__ */ r(f, { useStore: d })
263
+ v == "Other" && /* @__PURE__ */ r(f, {
264
+ useStore: d,
265
+ config: h
266
+ })
224
267
  ]
225
268
  })
226
269
  ]
@@ -1,2 +1,2 @@
1
- import { t as e } from "./SettingsModal-tXcbd23J.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 };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./Button-CU11ETla.js";
1
+ import { t as e } from "./Button-C8R7Qxqb.js";
2
2
  import { n as t, t as n } from "./useAuthSiteStatus-Cj9IjMj7.js";
3
3
  import { useState as r } from "react";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
- import { n as e, t } from "./classnames-CpG5mzJ5.js";
2
- import { t as n } from "./Button-CU11ETla.js";
1
+ import { n as e, t } from "./classnames-DCsil9eG.js";
2
+ import { t as n } from "./Button-C8R7Qxqb.js";
3
3
  import { t as r } from "./Link-8nSDV4sI.js";
4
- import { a as i, i as a, n as o, o as s, r as c, t as l } from "./numberWithCommas-rN3cZDJL.js";
4
+ import { a as i, i as a, n as o, o as s, r as c, t as l } from "./numberWithCommas-DXxghuXP.js";
5
5
  import { useEffect as u, useMemo as ee, useState as d } from "react";
6
6
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
7
7
  import h from "swr";
@@ -829,13 +829,17 @@ function de({ activeLayoutProposalSentiments: e }) {
829
829
  }
830
830
  //#endregion
831
831
  //#region src/hooks/Politics/usePoliticalParties.js
832
- var L = (e) => fetch(e).then((e) => e.json());
833
- c(60), c(60);
834
- var fe = (e) => {
832
+ var L = (e) => fetch(e).then((e) => e.json()), fe = (e) => {
835
833
  let { data: t, error: n, isLoading: r, mutate: i } = h(process.env.NODE_ENV === "development" ? "http://localhost:3001/api/news/resources/political-parties" : "https://articles.media/api/news/resources/political-parties", L, e?.preload ? {
836
834
  dedupingInterval: 1e3 * 60 * 10,
835
+ focusThrottleInterval: c(60),
836
+ errorRetryInterval: 1e3 * 60 * 5,
837
837
  fallbackData: e?.preload
838
- } : { dedupingInterval: 1e3 * 60 * 10 });
838
+ } : {
839
+ dedupingInterval: 1e3 * 60 * 10,
840
+ focusThrottleInterval: c(60),
841
+ errorRetryInterval: 1e3 * 60 * 5
842
+ });
839
843
  return {
840
844
  data: t,
841
845
  error: n,
@@ -980,10 +984,11 @@ function R(e) {
980
984
  ]
981
985
  });
982
986
  };
983
- function Oe(e) {
984
- switch (e) {
987
+ function Oe(t) {
988
+ switch (t) {
985
989
  case "Link": return /* @__PURE__ */ p("span", {
986
990
  type: "button",
991
+ className: e.className,
987
992
  onClick: () => {
988
993
  T(!0);
989
994
  },
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { t as e } from "./ViewUserModal-C_gWUvXi.js";
2
+ import { t as e } from "./ViewUserModal-CrGeXxWG.js";
3
3
  export { e as default };
@@ -1,5 +1,5 @@
1
1
  //#region \0rolldown/runtime.js
2
- var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), s = (e, i, o, s) => {
2
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
3
3
  if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
4
4
  get: ((e) => i[e]).bind(null, d),
5
5
  enumerable: !(s = n(i, d)) || s.enumerable
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-BAvmOFcq.js";
4
- import { t as r } from "./ViewUserModal-C_gWUvXi.js";
5
- import { t as i } from "./GameScoreboard-Dj5mTFTn.js";
6
- import a from "./GlobalHead.js";
7
- import o from "./GlobalBody.js";
8
- import { t as s } from "./SettingsModal-tXcbd23J.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 };
@@ -677,7 +677,7 @@ var R = {
677
677
  night: "night"
678
678
  }, B = {
679
679
  G: function(e, t, n) {
680
- let r = e.getFullYear() > 0 ? 1 : 0;
680
+ let r = +(e.getFullYear() > 0);
681
681
  switch (t) {
682
682
  case "G":
683
683
  case "GG":
@@ -10,7 +10,8 @@ var t = (e) => {
10
10
  } : null, t, {
11
11
  revalidateOnFocus: !1,
12
12
  revalidateOnReconnect: !1,
13
- shouldRetryOnError: !1
13
+ shouldRetryOnError: !1,
14
+ errorRetryInterval: 1e3 * 60 * 1
14
15
  });
15
16
  return {
16
17
  data: r,
@@ -12,7 +12,8 @@ var t = async (e) => {
12
12
  refreshInterval: 0,
13
13
  revalidateOnFocus: !1,
14
14
  revalidateIfStale: !1,
15
- shouldRetryOnError: !1
15
+ shouldRetryOnError: !1,
16
+ errorRetryInterval: 1e3 * 60 * 1
16
17
  }, r = (r) => {
17
18
  let { data: i, error: a, isLoading: o, isValidating: s, mutate: c } = e(r?.user_id && r?.user_token ? {
18
19
  url: "https://articles.media/api/user/friends",
@@ -4,7 +4,8 @@ var t = (e) => fetch(e).then((e) => e.json()), n = (n) => {
4
4
  let { data: r, error: i, isLoading: a, mutate: o } = e(process.env.NODE_ENV === "development" ? `http://localhost:${n}/api/token` : "/api/token", t, {
5
5
  revalidateOnFocus: !1,
6
6
  revalidateOnReconnect: !1,
7
- shouldRetryOnError: !1
7
+ shouldRetryOnError: !1,
8
+ errorRetryInterval: 1e3 * 60 * 1
8
9
  });
9
10
  return {
10
11
  data: r,
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.25",
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",
@@ -48,7 +49,7 @@
48
49
  "peerDependencies": {
49
50
  "react": ">=19.2.3",
50
51
  "react-dom": ">=19.2.3",
51
- "swr": "^2.0.0",
52
+ "swr": "^2.4.1",
52
53
  "date-fns": "^4.0.0",
53
54
  "react-intersection-observer": "^10.0.0",
54
55
  "react-bootstrap": "^2.0.0"