@absolutejs/absolute 0.6.1 → 0.6.2

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.
@@ -15662,7 +15662,7 @@ var require_client = __commonJS((exports, module) => {
15662
15662
 
15663
15663
  // node_modules/react/cjs/react-jsx-dev-runtime.development.js
15664
15664
  var require_react_jsx_dev_runtime_development = __commonJS((exports) => {
15665
- var React5 = __toESM(require_react(), 1);
15665
+ var React3 = __toESM(require_react(), 1);
15666
15666
  (function() {
15667
15667
  function getComponentNameFromType(type) {
15668
15668
  if (type == null)
@@ -15853,17 +15853,17 @@ React keys must be passed directly to JSX without using spread:
15853
15853
  }
15854
15854
  var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
15855
15855
  Symbol.for("react.provider");
15856
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React5.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
15856
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
15857
15857
  return null;
15858
15858
  };
15859
- React5 = {
15859
+ React3 = {
15860
15860
  "react-stack-bottom-frame": function(callStackForError) {
15861
15861
  return callStackForError();
15862
15862
  }
15863
15863
  };
15864
15864
  var specialPropKeyWarningShown;
15865
15865
  var didWarnAboutElementRef = {};
15866
- var unknownOwnerDebugStack = React5["react-stack-bottom-frame"].bind(React5, UnknownOwner)();
15866
+ var unknownOwnerDebugStack = React3["react-stack-bottom-frame"].bind(React3, UnknownOwner)();
15867
15867
  var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
15868
15868
  var didWarnAboutKeySpread = {};
15869
15869
  exports.Fragment = REACT_FRAGMENT_TYPE;
@@ -18656,6 +18656,7 @@ function becomeIdle(self) {
18656
18656
  });
18657
18657
  }
18658
18658
  }
18659
+ var to2 = (source, ...args) => new Interpolation(source, args);
18659
18660
  globals_exports.assign({
18660
18661
  createStringInterpolator: createStringInterpolator2,
18661
18662
  to: (source, args) => new Interpolation(source, args)
@@ -18991,8 +18992,27 @@ var host = createHost(primitives, {
18991
18992
  });
18992
18993
  var animated = host.animated;
18993
18994
 
18995
+ // src/frontend/components/documentation/Overview.tsx
18996
+ var jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
18997
+ var Overview = () => /* @__PURE__ */ jsx_dev_runtime.jsxDEV("div", {
18998
+ style: {
18999
+ display: "flex",
19000
+ flex: 1,
19001
+ flexDirection: "column",
19002
+ padding: "1rem 2rem"
19003
+ },
19004
+ children: [
19005
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV("h1", {
19006
+ children: "Overview"
19007
+ }, undefined, false, undefined, this),
19008
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV("p", {
19009
+ children: "The documentation provides a comprehensive guide to the features and functionality of the platform. It covers various aspects including installation, configuration, and usage of different packages. The documentation is designed to help users quickly get started and effectively utilize the platform's capabilities."
19010
+ }, undefined, false, undefined, this)
19011
+ ]
19012
+ }, undefined, true, undefined, this);
19013
+
18994
19014
  // src/frontend/components/navbar/Navbar.tsx
18995
- var import_react28 = __toESM(require_react(), 1);
19015
+ var import_react26 = __toESM(require_react(), 1);
18996
19016
 
18997
19017
  // node_modules/react-icons/lib/iconBase.mjs
18998
19018
  var import_react16 = __toESM(require_react(), 1);
@@ -19314,7 +19334,7 @@ var profileButtonStyle = {
19314
19334
  };
19315
19335
 
19316
19336
  // src/frontend/components/hamburger/HamburgerMenu.tsx
19317
- var import_react22 = __toESM(require_react(), 1);
19337
+ var import_react21 = __toESM(require_react(), 1);
19318
19338
 
19319
19339
  // src/types/types.ts
19320
19340
  var isNavbarDropdown = (element) => ("links" in element);
@@ -19474,21 +19494,21 @@ var opButtonStyle = (disabled, providerPrimaryColor = "#747775") => ({
19474
19494
  var isNonEmptyString = (str) => str !== null && str !== undefined && str.trim() !== "";
19475
19495
 
19476
19496
  // src/frontend/components/utils/Divider.tsx
19477
- var jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
19478
- var Divider = ({ color, text, height }) => /* @__PURE__ */ jsx_dev_runtime.jsxDEV("div", {
19497
+ var jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
19498
+ var Divider = ({ color, text, height }) => /* @__PURE__ */ jsx_dev_runtime2.jsxDEV("div", {
19479
19499
  style: separatorStyle,
19480
19500
  children: [
19481
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV("div", {
19501
+ /* @__PURE__ */ jsx_dev_runtime2.jsxDEV("div", {
19482
19502
  style: separatorLineStyle({
19483
19503
  color,
19484
19504
  height
19485
19505
  })
19486
19506
  }, undefined, false, undefined, this),
19487
- isNonEmptyString(text) && /* @__PURE__ */ jsx_dev_runtime.jsxDEV("span", {
19507
+ isNonEmptyString(text) && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV("span", {
19488
19508
  style: separatorTextStyle,
19489
19509
  children: text
19490
19510
  }, undefined, false, undefined, this),
19491
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV("div", {
19511
+ /* @__PURE__ */ jsx_dev_runtime2.jsxDEV("div", {
19492
19512
  style: separatorLineStyle({
19493
19513
  color,
19494
19514
  height
@@ -21912,11 +21932,11 @@ var providerData = {
21912
21932
  };
21913
21933
 
21914
21934
  // src/frontend/components/utils/ProviderDropdown.tsx
21915
- var jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
21935
+ var jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
21916
21936
  var ProviderDropdown = ({
21917
21937
  setCurrentProvider,
21918
21938
  themeSprings
21919
- }) => /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(animated.select, {
21939
+ }) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(animated.select, {
21920
21940
  defaultValue: -1,
21921
21941
  onChange: (event) => {
21922
21942
  const index = parseInt(event.target.value);
@@ -21938,14 +21958,14 @@ var ProviderDropdown = ({
21938
21958
  width: "100%"
21939
21959
  },
21940
21960
  children: [
21941
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV("option", {
21961
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV("option", {
21942
21962
  value: -1,
21943
21963
  style: {
21944
21964
  fontWeight: "bold"
21945
21965
  },
21946
21966
  children: "Select provider"
21947
21967
  }, undefined, false, undefined, this),
21948
- providerOptions.map((provider, index) => /* @__PURE__ */ jsx_dev_runtime2.jsxDEV("option", {
21968
+ providerOptions.map((provider, index) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV("option", {
21949
21969
  value: index,
21950
21970
  style: {
21951
21971
  textAlign: "left"
@@ -21967,7 +21987,7 @@ function FiUser(props) {
21967
21987
  }
21968
21988
 
21969
21989
  // src/frontend/components/auth/OAuthLink.tsx
21970
- var jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
21990
+ var jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
21971
21991
  var OAuthLink = ({ mode, provider, themeSprings }) => {
21972
21992
  const defaultData = {
21973
21993
  createNewCredentialsUrl: "/oauth2/credentials/create",
@@ -21979,24 +21999,24 @@ var OAuthLink = ({ mode, provider, themeSprings }) => {
21979
21999
  const { logoUrl, name, primaryColor } = provider && providerData[provider] ? providerData[provider] : defaultData;
21980
22000
  const isProviderSelected = provider !== undefined;
21981
22001
  const buttonText = mode === "login" ? `Sign in with ${name}` : `Sign up with ${name}`;
21982
- return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(animated.a, {
22002
+ return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(animated.a, {
21983
22003
  href: provider ? `/oauth2/${provider}/authorization` : undefined,
21984
22004
  style: oauthButtonStyle({
21985
22005
  isProviderSelected,
21986
22006
  providerPrimaryColor: isProviderSelected ? primaryColor : "#999999",
21987
22007
  themeSprings
21988
22008
  }),
21989
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV("div", {
22009
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV("div", {
21990
22010
  style: oauthButtonContentStyle,
21991
22011
  children: [
21992
- provider ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV("img", {
22012
+ provider ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV("img", {
21993
22013
  src: logoUrl,
21994
22014
  alt: `${name} logo`,
21995
22015
  style: oauthIconStyle
21996
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(FiUser, {
22016
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(FiUser, {
21997
22017
  style: oauthIconStyle
21998
22018
  }, undefined, false, undefined, this),
21999
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV("span", {
22019
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV("span", {
22000
22020
  style: oauthButtonTextStyle,
22001
22021
  children: buttonText
22002
22022
  }, undefined, false, undefined, this)
@@ -22006,7 +22026,7 @@ var OAuthLink = ({ mode, provider, themeSprings }) => {
22006
22026
  };
22007
22027
 
22008
22028
  // src/frontend/components/auth/AuthContainer.tsx
22009
- var jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
22029
+ var jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
22010
22030
  var AuthContainer = ({ themeSprings }) => {
22011
22031
  const [currentProvider, setCurrentProvider] = import_react18.useState();
22012
22032
  const [mode, setMode] = import_react18.useState("login");
@@ -22015,10 +22035,10 @@ var AuthContainer = ({ themeSprings }) => {
22015
22035
  };
22016
22036
  const { isSizeOrLess } = useMediaQuery();
22017
22037
  const isMobile = isSizeOrLess("sm");
22018
- return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV("div", {
22038
+ return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV("div", {
22019
22039
  style: containerStyle(isMobile),
22020
22040
  children: [
22021
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(animated.a, {
22041
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(animated.a, {
22022
22042
  href: "/",
22023
22043
  style: {
22024
22044
  color: themeSprings.contrastPrimary,
@@ -22028,37 +22048,37 @@ var AuthContainer = ({ themeSprings }) => {
22028
22048
  },
22029
22049
  children: "AbsoluteJS"
22030
22050
  }, undefined, false, undefined, this),
22031
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV("h1", {
22051
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV("h1", {
22032
22052
  style: headingStyle,
22033
22053
  children: mode === "login" ? "Sign in to your Account" : "Create an account"
22034
22054
  }, undefined, false, undefined, this),
22035
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(OAuthLink, {
22055
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(OAuthLink, {
22036
22056
  mode,
22037
22057
  provider: "google",
22038
22058
  themeSprings
22039
22059
  }, undefined, false, undefined, this),
22040
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(OAuthLink, {
22060
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(OAuthLink, {
22041
22061
  mode,
22042
22062
  provider: "github",
22043
22063
  themeSprings
22044
22064
  }, undefined, false, undefined, this),
22045
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Divider, {
22065
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Divider, {
22046
22066
  text: "or"
22047
22067
  }, undefined, false, undefined, this),
22048
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ProviderDropdown, {
22068
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ProviderDropdown, {
22049
22069
  setCurrentProvider,
22050
22070
  themeSprings
22051
22071
  }, undefined, false, undefined, this),
22052
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(OAuthLink, {
22072
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(OAuthLink, {
22053
22073
  mode,
22054
22074
  provider: currentProvider,
22055
22075
  themeSprings
22056
22076
  }, undefined, false, undefined, this),
22057
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(animated.p, {
22077
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(animated.p, {
22058
22078
  style: loginTextStyle(themeSprings),
22059
22079
  children: [
22060
22080
  mode === "login" ? "Need an account? " : "Have an account? ",
22061
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(animated.button, {
22081
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(animated.button, {
22062
22082
  style: loginLinkTextStyle(themeSprings),
22063
22083
  onClick: switchMode,
22064
22084
  children: mode === "login" ? "Sign Up" : "Sign In"
@@ -22070,18 +22090,18 @@ var AuthContainer = ({ themeSprings }) => {
22070
22090
  };
22071
22091
 
22072
22092
  // src/frontend/components/navbar/NavbarLink.tsx
22073
- var jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
22093
+ var jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
22074
22094
  var NavbarLink = ({
22075
22095
  icon,
22076
22096
  href,
22077
22097
  label,
22078
22098
  themeSprings
22079
- }) => /* @__PURE__ */ jsx_dev_runtime5.jsxDEV("a", {
22099
+ }) => /* @__PURE__ */ jsx_dev_runtime6.jsxDEV("a", {
22080
22100
  href,
22081
22101
  style: optionStyle,
22082
22102
  children: [
22083
22103
  icon,
22084
- /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(animated.span, {
22104
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(animated.span, {
22085
22105
  style: navbarDrowdownLinkStyle(themeSprings),
22086
22106
  children: label
22087
22107
  }, undefined, false, undefined, this)
@@ -22090,7 +22110,7 @@ var NavbarLink = ({
22090
22110
 
22091
22111
  // src/frontend/components/utils/Modal.tsx
22092
22112
  var import_react19 = __toESM(require_react(), 1);
22093
- var jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
22113
+ var jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
22094
22114
  var Modal = ({
22095
22115
  style,
22096
22116
  isOpen,
@@ -22118,7 +22138,7 @@ var Modal = ({
22118
22138
  document.body.style.overflow = "";
22119
22139
  };
22120
22140
  }, [isOpen]);
22121
- return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(animated.dialog, {
22141
+ return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(animated.dialog, {
22122
22142
  ref: dialogRef,
22123
22143
  onCancel: (event) => {
22124
22144
  event.preventDefault();
@@ -22142,7 +22162,7 @@ var Modal = ({
22142
22162
  position: "fixed"
22143
22163
  },
22144
22164
  children: [
22145
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV("style", {
22165
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV("style", {
22146
22166
  children: `
22147
22167
  dialog::backdrop {
22148
22168
  background: rgba(0,0,0,0.5);
@@ -22150,7 +22170,7 @@ var Modal = ({
22150
22170
  }
22151
22171
  `
22152
22172
  }, undefined, false, undefined, this),
22153
- isOpen && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(animated.div, {
22173
+ isOpen && /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(animated.div, {
22154
22174
  onClick: (event) => event.stopPropagation(),
22155
22175
  style: {
22156
22176
  ...style,
@@ -22159,7 +22179,7 @@ var Modal = ({
22159
22179
  position: "relative"
22160
22180
  },
22161
22181
  children: [
22162
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV("button", {
22182
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV("button", {
22163
22183
  onClick: () => {
22164
22184
  dialogRef.current?.close();
22165
22185
  onClose?.();
@@ -22218,6 +22238,17 @@ var useContainerQuery = () => {
22218
22238
  return { dimensions, ref };
22219
22239
  };
22220
22240
 
22241
+ // node_modules/react-icons/ai/index.mjs
22242
+ function AiOutlineExperiment(props) {
22243
+ return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M512 472a40 40 0 1 0 80 0 40 40 0 1 0-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 0 1-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z" }, child: [] }] })(props);
22244
+ }
22245
+ function AiOutlineMinusCircle(props) {
22246
+ return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" }, child: [] }, { tag: "path", attr: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" }, child: [] }] })(props);
22247
+ }
22248
+ function AiOutlineMoon(props) {
22249
+ return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024", fill: "currentColor", fillRule: "evenodd" }, child: [{ tag: "path", attr: { d: "M489.493 111.658c30.658-1.792 45.991 36.44 22.59 56.329C457.831 214.095 426 281.423 426 354c0 134.757 109.243 244 244 244 72.577 0 139.905-31.832 186.014-86.084 19.868-23.377 58.064-8.102 56.332 22.53C900.4 745.823 725.141 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.287-386.024 374.198-399.649l.206-.013zm-81.143 79.75-4.112 1.362C271.1 237.943 176 364.092 176 511.5 176 697.344 326.656 848 512.5 848c148.28 0 274.938-96.192 319.453-230.41l.625-1.934-.11.071c-47.18 29.331-102.126 45.755-159.723 46.26L670 662c-170.104 0-308-137.896-308-308 0-58.595 16.476-114.54 46.273-162.467z" }, child: [] }] })(props);
22250
+ }
22251
+
22221
22252
  // node_modules/react-icons/fa/index.mjs
22222
22253
  function FaCheckCircle(props) {
22223
22254
  return GenIcon({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z" }, child: [] }] })(props);
@@ -22232,11 +22263,39 @@ function FaRegQuestionCircle(props) {
22232
22263
  return GenIcon({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm107.244-255.2c0 67.052-72.421 68.084-72.421 92.863V300c0 6.627-5.373 12-12 12h-45.647c-6.627 0-12-5.373-12-12v-8.659c0-35.745 27.1-50.034 47.579-61.516 17.561-9.845 28.324-16.541 28.324-29.579 0-17.246-21.999-28.693-39.784-28.693-23.189 0-33.894 10.977-48.942 29.969-4.057 5.12-11.46 6.071-16.666 2.124l-27.824-21.098c-5.107-3.872-6.251-11.066-2.644-16.363C184.846 131.491 214.94 112 261.794 112c49.071 0 101.45 38.304 101.45 88.8zM298 368c0 23.159-18.841 42-42 42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42z" }, child: [] }] })(props);
22233
22264
  }
22234
22265
 
22266
+ // node_modules/react-icons/io5/index.mjs
22267
+ function IoSunny(props) {
22268
+ return GenIcon({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 118a22 22 0 0 1-22-22V48a22 22 0 0 1 44 0v48a22 22 0 0 1-22 22zm0 368a22 22 0 0 1-22-22v-48a22 22 0 0 1 44 0v48a22 22 0 0 1-22 22zm113.14-321.14a22 22 0 0 1-15.56-37.55l33.94-33.94a22 22 0 0 1 31.11 31.11l-33.94 33.94a21.93 21.93 0 0 1-15.55 6.44zM108.92 425.08a22 22 0 0 1-15.55-37.56l33.94-33.94a22 22 0 1 1 31.11 31.11l-33.94 33.94a21.94 21.94 0 0 1-15.56 6.45zM464 278h-48a22 22 0 0 1 0-44h48a22 22 0 0 1 0 44zm-368 0H48a22 22 0 0 1 0-44h48a22 22 0 0 1 0 44zm307.08 147.08a21.94 21.94 0 0 1-15.56-6.45l-33.94-33.94a22 22 0 0 1 31.11-31.11l33.94 33.94a22 22 0 0 1-15.55 37.56zM142.86 164.86a21.89 21.89 0 0 1-15.55-6.44l-33.94-33.94a22 22 0 0 1 31.11-31.11l33.94 33.94a22 22 0 0 1-15.56 37.55zM256 358a102 102 0 1 1 102-102 102.12 102.12 0 0 1-102 102z" }, child: [] }] })(props);
22269
+ }
22270
+
22271
+ // src/frontend/components/utils/ProfilePicture.tsx
22272
+ var jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
22273
+ var ProfilePicture = ({
22274
+ userImage,
22275
+ backupImage,
22276
+ width = "2rem",
22277
+ height = "2rem",
22278
+ themeSprings
22279
+ }) => /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(animated.img, {
22280
+ src: userImage ?? backupImage,
22281
+ alt: "Profile",
22282
+ style: {
22283
+ backgroundColor: themeSprings.themeTertiary,
22284
+ borderRadius: "50%",
22285
+ height,
22286
+ objectFit: "cover",
22287
+ width
22288
+ }
22289
+ }, undefined, false, undefined, this);
22290
+
22235
22291
  // src/frontend/components/utils/AnimatedComponents.tsx
22236
22292
  var AnimatedFaChevronDown = animated(FaChevronDown);
22293
+ var AnimatedProfilePicture = animated(ProfilePicture);
22294
+ var AnimatedMoon = animated(AiOutlineMoon);
22295
+ var AnimatedSun = animated(IoSunny);
22237
22296
 
22238
22297
  // src/frontend/components/hamburger/HamburgerDropdown.tsx
22239
- var jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
22298
+ var jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
22240
22299
  var HamburgerDropdown = ({
22241
22300
  label,
22242
22301
  icon,
@@ -22264,27 +22323,27 @@ var HamburgerDropdown = ({
22264
22323
  transform: isOpen ? "rotate(180deg)" : "rotate(0deg)"
22265
22324
  });
22266
22325
  };
22267
- return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV("div", {
22326
+ return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV("div", {
22268
22327
  style: { width: "100%" },
22269
22328
  children: [
22270
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV("div", {
22329
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV("div", {
22271
22330
  style: {
22272
22331
  alignItems: "center",
22273
22332
  display: "flex",
22274
22333
  justifyContent: "space-between"
22275
22334
  },
22276
22335
  children: [
22277
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(animated.a, {
22336
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(animated.a, {
22278
22337
  href,
22279
22338
  style: labelStyle(themeSprings),
22280
22339
  children: [
22281
22340
  icon,
22282
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV("span", {
22341
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV("span", {
22283
22342
  children: label
22284
22343
  }, undefined, false, undefined, this)
22285
22344
  ]
22286
22345
  }, undefined, true, undefined, this),
22287
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(AnimatedFaChevronDown, {
22346
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(AnimatedFaChevronDown, {
22288
22347
  onClick: toggleDropdown,
22289
22348
  style: {
22290
22349
  cursor: "pointer",
@@ -22296,14 +22355,14 @@ var HamburgerDropdown = ({
22296
22355
  }, undefined, false, undefined, this)
22297
22356
  ]
22298
22357
  }, undefined, true, undefined, this),
22299
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(animated.nav, {
22358
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(animated.nav, {
22300
22359
  ref,
22301
22360
  style: {
22302
22361
  height: dropdownSprings.height,
22303
22362
  opacity: dropdownSprings.opacity,
22304
22363
  overflow: "hidden"
22305
22364
  },
22306
- children: links.map((link, index) => /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(NavbarLink, {
22365
+ children: links.map((link, index) => /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(NavbarLink, {
22307
22366
  themeSprings,
22308
22367
  icon: link.icon,
22309
22368
  href: link.href,
@@ -22315,11 +22374,11 @@ var HamburgerDropdown = ({
22315
22374
  };
22316
22375
 
22317
22376
  // src/frontend/components/hamburger/HamburgerHeader.tsx
22318
- var jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
22377
+ var jsx_dev_runtime10 = __toESM(require_jsx_dev_runtime(), 1);
22319
22378
  var HamburgerHeader = ({
22320
22379
  onClose,
22321
22380
  themeSprings
22322
- }) => /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(animated.div, {
22381
+ }) => /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(animated.div, {
22323
22382
  style: {
22324
22383
  alignItems: "center",
22325
22384
  backgroundColor: themeSprings.themePrimary,
@@ -22334,7 +22393,7 @@ var HamburgerHeader = ({
22334
22393
  width: "100%"
22335
22394
  },
22336
22395
  children: [
22337
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV("a", {
22396
+ /* @__PURE__ */ jsx_dev_runtime10.jsxDEV("a", {
22338
22397
  href: "/",
22339
22398
  style: {
22340
22399
  color: "inherit",
@@ -22344,7 +22403,7 @@ var HamburgerHeader = ({
22344
22403
  },
22345
22404
  children: "AbsoluteJS"
22346
22405
  }, undefined, false, undefined, this),
22347
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(FaTimes, {
22406
+ /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(FaTimes, {
22348
22407
  style: {
22349
22408
  cursor: "pointer",
22350
22409
  fontSize: "34px"
@@ -22354,52 +22413,6 @@ var HamburgerHeader = ({
22354
22413
  ]
22355
22414
  }, undefined, true, undefined, this);
22356
22415
 
22357
- // node_modules/zustand/esm/vanilla.mjs
22358
- var createStoreImpl = (createState) => {
22359
- let state;
22360
- const listeners = /* @__PURE__ */ new Set;
22361
- const setState = (partial, replace) => {
22362
- const nextState = typeof partial === "function" ? partial(state) : partial;
22363
- if (!Object.is(nextState, state)) {
22364
- const previousState = state;
22365
- state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
22366
- listeners.forEach((listener) => listener(state, previousState));
22367
- }
22368
- };
22369
- const getState = () => state;
22370
- const getInitialState = () => initialState;
22371
- const subscribe = (listener) => {
22372
- listeners.add(listener);
22373
- return () => listeners.delete(listener);
22374
- };
22375
- const api = { setState, getState, getInitialState, subscribe };
22376
- const initialState = state = createState(setState, getState, api);
22377
- return api;
22378
- };
22379
- var createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
22380
-
22381
- // node_modules/zustand/esm/react.mjs
22382
- var import_react21 = __toESM(require_react(), 1);
22383
- var identity = (arg) => arg;
22384
- function useStore(api, selector = identity) {
22385
- const slice = import_react21.default.useSyncExternalStore(api.subscribe, () => selector(api.getState()), () => selector(api.getInitialState()));
22386
- import_react21.default.useDebugValue(slice);
22387
- return slice;
22388
- }
22389
- var createImpl = (createState) => {
22390
- const api = createStore(createState);
22391
- const useBoundStore = (selector) => useStore(api, selector);
22392
- Object.assign(useBoundStore, api);
22393
- return useBoundStore;
22394
- };
22395
- var create = (createState) => createState ? createImpl(createState) : createImpl;
22396
-
22397
- // src/frontend/hooks/useThemeStore.ts
22398
- var useThemeStore = create((set) => ({
22399
- theme: "dark",
22400
- setTheme: (newTheme) => set({ theme: newTheme })
22401
- }));
22402
-
22403
22416
  // src/frontend/styles/styles.ts
22404
22417
  var styleReset = `
22405
22418
  * {
@@ -22416,6 +22429,7 @@ var bodyDefault = (themeSprings) => ({
22416
22429
  flexDirection: "column",
22417
22430
  fontFamily: "Poppins, sans-serif",
22418
22431
  height: "100%",
22432
+ lineHeight: "1.4",
22419
22433
  margin: 0
22420
22434
  });
22421
22435
  var mainDefault = {
@@ -22428,8 +22442,8 @@ var htmlDefault = {
22428
22442
  height: "100%"
22429
22443
  };
22430
22444
  var buttonStyle = ({
22431
- backgroundColor = "none",
22432
- color = "white",
22445
+ backgroundColor,
22446
+ color,
22433
22447
  width
22434
22448
  }) => ({
22435
22449
  alignItems: "center",
@@ -22463,93 +22477,70 @@ var paragraphStyle = (themeSprings) => ({
22463
22477
  textAlign: "center"
22464
22478
  });
22465
22479
 
22466
- // src/frontend/components/utils/ProfilePicture.tsx
22467
- var jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
22468
- var ProfilePicture = ({
22469
- userImage,
22470
- backupImage,
22471
- width = "2rem",
22472
- height = "2rem",
22473
- themeSprings
22474
- }) => /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(animated.img, {
22475
- src: userImage ?? backupImage,
22476
- alt: "Profile",
22477
- style: {
22478
- backgroundColor: themeSprings.themeTertiary,
22479
- borderRadius: "50%",
22480
- height,
22481
- objectFit: "cover",
22482
- width
22483
- }
22484
- }, undefined, false, undefined, this);
22485
-
22486
22480
  // src/frontend/components/hamburger/HamburgerUserButtons.tsx
22487
- var jsx_dev_runtime10 = __toESM(require_jsx_dev_runtime(), 1);
22481
+ var jsx_dev_runtime11 = __toESM(require_jsx_dev_runtime(), 1);
22488
22482
  var HamburgerUserButtons = ({
22489
22483
  user,
22490
22484
  handleSignOut,
22491
22485
  openModal,
22492
22486
  themeSprings
22493
- }) => {
22494
- const theme = useThemeStore((state) => state.theme);
22495
- return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV("div", {
22496
- style: {
22497
- alignItems: "center",
22498
- display: "flex",
22499
- flexDirection: "column",
22500
- justifyContent: "space-between",
22501
- width: "100%"
22502
- },
22503
- children: [
22504
- /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(animated.button, {
22505
- onClick: user ? () => handleSignOut() : openModal,
22506
- style: buttonStyle({
22507
- backgroundColor: themeSprings.themeTertiary,
22508
- color: themeSprings.contrastPrimary,
22509
- width: "100%"
22510
- }),
22511
- children: user ? "Sign Out" : "Login"
22512
- }, undefined, false, undefined, this),
22513
- user !== undefined && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV("div", {
22514
- style: {
22515
- alignItems: "center",
22516
- display: "flex",
22517
- flexDirection: "row",
22518
- gap: "2rem",
22519
- marginTop: "1rem"
22520
- },
22521
- children: [
22522
- /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(animated.a, {
22523
- href: "/portal",
22524
- children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ProfilePicture, {
22525
- themeSprings,
22526
- userImage: typeof user.metadata?.profile_picture === "string" ? user.metadata.profile_picture : undefined,
22527
- backupImage: theme === "dark" ? "/assets/svg/default-profile-icon-light.svg" : "/assets/svg/default-profile-icon.svg",
22528
- width: "4rem",
22529
- height: "4rem"
22530
- }, undefined, false, undefined, this)
22531
- }, undefined, false, undefined, this),
22532
- /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(animated.span, {
22533
- style: {
22534
- color: themeSprings.contrastPrimary,
22535
- fontSize: "1.2rem",
22536
- fontWeight: "bold",
22537
- textAlign: "center"
22538
- },
22539
- children: [
22540
- typeof user.metadata?.given_name === "string" ? user.metadata.given_name : "",
22541
- " ",
22542
- typeof user.metadata?.family_name === "string" ? user.metadata.family_name : ""
22543
- ]
22544
- }, undefined, true, undefined, this)
22545
- ]
22546
- }, undefined, true, undefined, this)
22547
- ]
22548
- }, undefined, true, undefined, this);
22549
- };
22487
+ }) => /* @__PURE__ */ jsx_dev_runtime11.jsxDEV("div", {
22488
+ style: {
22489
+ alignItems: "center",
22490
+ display: "flex",
22491
+ flexDirection: "column",
22492
+ justifyContent: "space-between",
22493
+ width: "100%"
22494
+ },
22495
+ children: [
22496
+ /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(animated.button, {
22497
+ onClick: user ? () => handleSignOut() : openModal,
22498
+ style: buttonStyle({
22499
+ backgroundColor: themeSprings.themeTertiary,
22500
+ color: themeSprings.contrastPrimary,
22501
+ width: "100%"
22502
+ }),
22503
+ children: user ? "Sign Out" : "Login"
22504
+ }, undefined, false, undefined, this),
22505
+ user !== undefined && /* @__PURE__ */ jsx_dev_runtime11.jsxDEV("div", {
22506
+ style: {
22507
+ alignItems: "center",
22508
+ display: "flex",
22509
+ flexDirection: "row",
22510
+ gap: "2rem",
22511
+ marginTop: "1rem"
22512
+ },
22513
+ children: [
22514
+ /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(animated.a, {
22515
+ href: "/portal",
22516
+ children: /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(AnimatedProfilePicture, {
22517
+ themeSprings,
22518
+ userImage: typeof user.metadata?.profile_picture === "string" ? user.metadata.profile_picture : undefined,
22519
+ backupImage: themeSprings.theme.to((mode) => mode === "dark" ? "/assets/svg/default-profile-icon-light.svg" : "/assets/svg/default-profile-icon.svg"),
22520
+ width: "4rem",
22521
+ height: "4rem"
22522
+ }, undefined, false, undefined, this)
22523
+ }, undefined, false, undefined, this),
22524
+ /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(animated.span, {
22525
+ style: {
22526
+ color: themeSprings.contrastPrimary,
22527
+ fontSize: "1.2rem",
22528
+ fontWeight: "bold",
22529
+ textAlign: "center"
22530
+ },
22531
+ children: [
22532
+ typeof user.metadata?.given_name === "string" ? user.metadata.given_name : "",
22533
+ " ",
22534
+ typeof user.metadata?.family_name === "string" ? user.metadata.family_name : ""
22535
+ ]
22536
+ }, undefined, true, undefined, this)
22537
+ ]
22538
+ }, undefined, true, undefined, this)
22539
+ ]
22540
+ }, undefined, true, undefined, this);
22550
22541
 
22551
22542
  // src/frontend/components/hamburger/HamburgerMenu.tsx
22552
- var jsx_dev_runtime11 = __toESM(require_jsx_dev_runtime(), 1);
22543
+ var jsx_dev_runtime12 = __toESM(require_jsx_dev_runtime(), 1);
22553
22544
  var HamburgerMenu = ({
22554
22545
  spring,
22555
22546
  springApi,
@@ -22557,8 +22548,8 @@ var HamburgerMenu = ({
22557
22548
  themeSprings,
22558
22549
  handleSignOut
22559
22550
  }) => {
22560
- const [isModalOpen, setIsModalOpen] = import_react22.useState(false);
22561
- return /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(animated.div, {
22551
+ const [isModalOpen, setIsModalOpen] = import_react21.useState(false);
22552
+ return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(animated.div, {
22562
22553
  style: {
22563
22554
  background: themeSprings.themeSecondary,
22564
22555
  display: "flex",
@@ -22574,11 +22565,11 @@ var HamburgerMenu = ({
22574
22565
  zIndex: 1e4
22575
22566
  },
22576
22567
  children: [
22577
- /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(HamburgerHeader, {
22568
+ /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(HamburgerHeader, {
22578
22569
  themeSprings,
22579
22570
  onClose: () => void springApi.start({ transform: "translateX(100%)" })
22580
22571
  }, undefined, false, undefined, this),
22581
- /* @__PURE__ */ jsx_dev_runtime11.jsxDEV("nav", {
22572
+ /* @__PURE__ */ jsx_dev_runtime12.jsxDEV("nav", {
22582
22573
  style: {
22583
22574
  display: "flex",
22584
22575
  flexDirection: "column",
@@ -22588,28 +22579,28 @@ var HamburgerMenu = ({
22588
22579
  children: [
22589
22580
  navbarData.map((element) => {
22590
22581
  if (isNavbarDropdown(element)) {
22591
- return /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(HamburgerDropdown, {
22582
+ return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(HamburgerDropdown, {
22592
22583
  themeSprings,
22593
22584
  label: element.label,
22594
22585
  href: element.href,
22595
22586
  links: element.links
22596
22587
  }, element.label, false, undefined, this);
22597
22588
  }
22598
- return /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(NavbarLink, {
22589
+ return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(NavbarLink, {
22599
22590
  themeSprings,
22600
22591
  icon: element.icon,
22601
22592
  href: element.href,
22602
22593
  label: element.label
22603
22594
  }, element.label, false, undefined, this);
22604
22595
  }),
22605
- /* @__PURE__ */ jsx_dev_runtime11.jsxDEV("hr", {
22596
+ /* @__PURE__ */ jsx_dev_runtime12.jsxDEV("hr", {
22606
22597
  style: {
22607
22598
  border: "1px solid #ddd",
22608
22599
  margin: "20px 0",
22609
22600
  width: "100%"
22610
22601
  }
22611
22602
  }, undefined, false, undefined, this),
22612
- /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(HamburgerUserButtons, {
22603
+ /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(HamburgerUserButtons, {
22613
22604
  themeSprings,
22614
22605
  user,
22615
22606
  handleSignOut,
@@ -22619,7 +22610,7 @@ var HamburgerMenu = ({
22619
22610
  }, undefined, false, undefined, this)
22620
22611
  ]
22621
22612
  }, undefined, true, undefined, this),
22622
- /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Modal, {
22613
+ /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Modal, {
22623
22614
  style: {
22624
22615
  backgroundColor: themeSprings.themeSecondary,
22625
22616
  borderRadius: "0.5rem"
@@ -22628,7 +22619,7 @@ var HamburgerMenu = ({
22628
22619
  onClose: () => {
22629
22620
  setIsModalOpen(false);
22630
22621
  },
22631
- children: /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(AuthContainer, {
22622
+ children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(AuthContainer, {
22632
22623
  themeSprings
22633
22624
  }, undefined, false, undefined, this)
22634
22625
  }, undefined, false, undefined, this)
@@ -22637,8 +22628,8 @@ var HamburgerMenu = ({
22637
22628
  };
22638
22629
 
22639
22630
  // src/frontend/components/navbar/NavbarDropdown.tsx
22640
- var import_react23 = __toESM(require_react(), 1);
22641
- var jsx_dev_runtime12 = __toESM(require_jsx_dev_runtime(), 1);
22631
+ var import_react22 = __toESM(require_react(), 1);
22632
+ var jsx_dev_runtime13 = __toESM(require_jsx_dev_runtime(), 1);
22642
22633
  var AnimatedFaChevronDown2 = animated(FaChevronDown);
22643
22634
  var NavbarDropdown = ({
22644
22635
  label,
@@ -22646,7 +22637,7 @@ var NavbarDropdown = ({
22646
22637
  links,
22647
22638
  themeSprings
22648
22639
  }) => {
22649
- const dropdownRef = import_react23.useRef(null);
22640
+ const dropdownRef = import_react22.useRef(null);
22650
22641
  const [dropdownSpring, dropdownApi] = useSpring(() => ({
22651
22642
  config: { friction: 30, tension: 250 },
22652
22643
  height: 0,
@@ -22669,10 +22660,10 @@ var NavbarDropdown = ({
22669
22660
  transform: "rotate(-180deg)"
22670
22661
  });
22671
22662
  };
22672
- return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV("div", {
22663
+ return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV("div", {
22673
22664
  style: dropdownStyle,
22674
22665
  children: [
22675
- /* @__PURE__ */ jsx_dev_runtime12.jsxDEV("div", {
22666
+ /* @__PURE__ */ jsx_dev_runtime13.jsxDEV("div", {
22676
22667
  style: {
22677
22668
  alignItems: "center",
22678
22669
  display: "flex",
@@ -22689,12 +22680,12 @@ var NavbarDropdown = ({
22689
22680
  onMouseEnter: openDropdown,
22690
22681
  onMouseLeave: closeDropdown,
22691
22682
  children: [
22692
- /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(animated.a, {
22683
+ /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(animated.a, {
22693
22684
  href,
22694
22685
  style: labelStyle(themeSprings),
22695
22686
  children: label
22696
22687
  }, undefined, false, undefined, this),
22697
- /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(AnimatedFaChevronDown2, {
22688
+ /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(AnimatedFaChevronDown2, {
22698
22689
  style: {
22699
22690
  fontSize: "1.5rem",
22700
22691
  marginLeft: "10px",
@@ -22704,12 +22695,12 @@ var NavbarDropdown = ({
22704
22695
  }, undefined, false, undefined, this)
22705
22696
  ]
22706
22697
  }, undefined, true, undefined, this),
22707
- /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(animated.nav, {
22698
+ /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(animated.nav, {
22708
22699
  ref: dropdownRef,
22709
22700
  style: getNavbarDropdownListStyle(dropdownSpring, themeSprings),
22710
22701
  onMouseEnter: openDropdown,
22711
22702
  onMouseLeave: closeDropdown,
22712
- children: links.map((link, index) => /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(NavbarLink, {
22703
+ children: links.map((link, index) => /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(NavbarLink, {
22713
22704
  themeSprings,
22714
22705
  icon: link.icon,
22715
22706
  href: link.href,
@@ -22721,8 +22712,8 @@ var NavbarDropdown = ({
22721
22712
  };
22722
22713
 
22723
22714
  // src/frontend/components/navbar/NavbarLinks.tsx
22724
- var jsx_dev_runtime13 = __toESM(require_jsx_dev_runtime(), 1);
22725
- var NavbarLinks = ({ navbarData: navbarData2, themeSprings }) => /* @__PURE__ */ jsx_dev_runtime13.jsxDEV("nav", {
22715
+ var jsx_dev_runtime14 = __toESM(require_jsx_dev_runtime(), 1);
22716
+ var NavbarLinks = ({ navbarData: navbarData2, themeSprings }) => /* @__PURE__ */ jsx_dev_runtime14.jsxDEV("nav", {
22726
22717
  style: {
22727
22718
  alignItems: "center",
22728
22719
  display: "flex",
@@ -22731,14 +22722,14 @@ var NavbarLinks = ({ navbarData: navbarData2, themeSprings }) => /* @__PURE__ */
22731
22722
  },
22732
22723
  children: navbarData2.map((element) => {
22733
22724
  if (isNavbarDropdown(element)) {
22734
- return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(NavbarDropdown, {
22725
+ return /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(NavbarDropdown, {
22735
22726
  themeSprings,
22736
22727
  label: element.label,
22737
22728
  href: element.href,
22738
22729
  links: element.links
22739
22730
  }, element.label, false, undefined, this);
22740
22731
  }
22741
- return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(NavbarLink, {
22732
+ return /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(NavbarLink, {
22742
22733
  themeSprings,
22743
22734
  icon: element.icon,
22744
22735
  href: element.href,
@@ -22748,11 +22739,11 @@ var NavbarLinks = ({ navbarData: navbarData2, themeSprings }) => /* @__PURE__ */
22748
22739
  }, undefined, false, undefined, this);
22749
22740
 
22750
22741
  // src/frontend/components/navbar/NavbarUserButtons.tsx
22751
- var import_react27 = __toESM(require_react(), 1);
22742
+ var import_react25 = __toESM(require_react(), 1);
22752
22743
 
22753
22744
  // src/frontend/components/navbar/DropdownContainer.tsx
22754
- var import_react24 = __toESM(require_react(), 1);
22755
- var jsx_dev_runtime14 = __toESM(require_jsx_dev_runtime(), 1);
22745
+ var import_react23 = __toESM(require_react(), 1);
22746
+ var jsx_dev_runtime15 = __toESM(require_jsx_dev_runtime(), 1);
22756
22747
  var DropdownContainer = ({
22757
22748
  spring,
22758
22749
  springApi,
@@ -22761,8 +22752,8 @@ var DropdownContainer = ({
22761
22752
  themeSprings,
22762
22753
  ignoredElements = []
22763
22754
  }) => {
22764
- const dropdownRef = import_react24.useRef(null);
22765
- import_react24.useEffect(() => {
22755
+ const dropdownRef = import_react23.useRef(null);
22756
+ import_react23.useEffect(() => {
22766
22757
  const handleOutsideClick = (event) => {
22767
22758
  if (!(event.target instanceof Node))
22768
22759
  return;
@@ -22781,7 +22772,7 @@ var DropdownContainer = ({
22781
22772
  document.removeEventListener("mousedown", handleOutsideClick);
22782
22773
  };
22783
22774
  }, [ignoredElements, springApi, onClose]);
22784
- return /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(animated.div, {
22775
+ return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(animated.div, {
22785
22776
  ref: dropdownRef,
22786
22777
  style: {
22787
22778
  backgroundColor: themeSprings.themePrimary,
@@ -22800,63 +22791,11 @@ var DropdownContainer = ({
22800
22791
  };
22801
22792
 
22802
22793
  // src/frontend/components/navbar/ThemeButton.tsx
22803
- var import_react26 = __toESM(require_react(), 1);
22804
-
22805
- // node_modules/react-icons/ai/index.mjs
22806
- function AiOutlineExperiment(props) {
22807
- return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M512 472a40 40 0 1 0 80 0 40 40 0 1 0-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 0 1-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z" }, child: [] }] })(props);
22808
- }
22809
- function AiOutlineMinusCircle(props) {
22810
- return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" }, child: [] }, { tag: "path", attr: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" }, child: [] }] })(props);
22811
- }
22812
- function AiOutlineMoon(props) {
22813
- return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024", fill: "currentColor", fillRule: "evenodd" }, child: [{ tag: "path", attr: { d: "M489.493 111.658c30.658-1.792 45.991 36.44 22.59 56.329C457.831 214.095 426 281.423 426 354c0 134.757 109.243 244 244 244 72.577 0 139.905-31.832 186.014-86.084 19.868-23.377 58.064-8.102 56.332 22.53C900.4 745.823 725.141 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.287-386.024 374.198-399.649l.206-.013zm-81.143 79.75-4.112 1.362C271.1 237.943 176 364.092 176 511.5 176 697.344 326.656 848 512.5 848c148.28 0 274.938-96.192 319.453-230.41l.625-1.934-.11.071c-47.18 29.331-102.126 45.755-159.723 46.26L670 662c-170.104 0-308-137.896-308-308 0-58.595 16.476-114.54 46.273-162.467z" }, child: [] }] })(props);
22814
- }
22815
-
22816
- // node_modules/react-icons/io5/index.mjs
22817
- function IoSunny(props) {
22818
- return GenIcon({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 118a22 22 0 0 1-22-22V48a22 22 0 0 1 44 0v48a22 22 0 0 1-22 22zm0 368a22 22 0 0 1-22-22v-48a22 22 0 0 1 44 0v48a22 22 0 0 1-22 22zm113.14-321.14a22 22 0 0 1-15.56-37.55l33.94-33.94a22 22 0 0 1 31.11 31.11l-33.94 33.94a21.93 21.93 0 0 1-15.55 6.44zM108.92 425.08a22 22 0 0 1-15.55-37.56l33.94-33.94a22 22 0 1 1 31.11 31.11l-33.94 33.94a21.94 21.94 0 0 1-15.56 6.45zM464 278h-48a22 22 0 0 1 0-44h48a22 22 0 0 1 0 44zm-368 0H48a22 22 0 0 1 0-44h48a22 22 0 0 1 0 44zm307.08 147.08a21.94 21.94 0 0 1-15.56-6.45l-33.94-33.94a22 22 0 0 1 31.11-31.11l33.94 33.94a22 22 0 0 1-15.55 37.56zM142.86 164.86a21.89 21.89 0 0 1-15.55-6.44l-33.94-33.94a22 22 0 0 1 31.11-31.11l33.94 33.94a22 22 0 0 1-15.56 37.55zM256 358a102 102 0 1 1 102-102 102.12 102.12 0 0 1-102 102z" }, child: [] }] })(props);
22819
- }
22820
-
22821
- // src/frontend/hooks/useInitTheme.ts
22822
- var import_react25 = __toESM(require_react(), 1);
22823
- var useInitTheme = () => {
22824
- const setTheme = useThemeStore((state) => state.setTheme);
22825
- const [currentTheme, setCurrentTheme] = import_react25.useState("dark");
22826
- import_react25.useEffect(() => {
22827
- const storedTheme = window.localStorage.getItem("theme");
22828
- const mediaQuery = window.matchMedia("(prefers-color-scheme: light)");
22829
- const applySystemTheme = (event) => {
22830
- setTheme(event.matches ? "light" : "dark");
22831
- setCurrentTheme(event.matches ? "system:light" : "system:dark");
22832
- };
22833
- if (storedTheme === "light") {
22834
- setTheme("light");
22835
- setCurrentTheme("light");
22836
- return;
22837
- }
22838
- if (storedTheme === "dark") {
22839
- setTheme("dark");
22840
- setCurrentTheme("dark");
22841
- return;
22842
- }
22843
- const isLight = mediaQuery.matches;
22844
- setTheme(isLight ? "light" : "dark");
22845
- setCurrentTheme(isLight ? "system:light" : "system:dark");
22846
- mediaQuery.addEventListener("change", applySystemTheme);
22847
- return () => {
22848
- mediaQuery.removeEventListener("change", applySystemTheme);
22849
- };
22850
- }, [setTheme, setCurrentTheme]);
22851
- return { currentTheme, setCurrentTheme, setTheme };
22852
- };
22853
-
22854
- // src/frontend/components/navbar/ThemeButton.tsx
22855
- var jsx_dev_runtime15 = __toESM(require_jsx_dev_runtime(), 1);
22856
- var ThemeButton = ({ themeSprings }) => {
22857
- const { currentTheme, setCurrentTheme, setTheme } = useInitTheme();
22858
- const detailsRef = import_react26.useRef(null);
22859
- import_react26.useEffect(() => {
22794
+ var import_react24 = __toESM(require_react(), 1);
22795
+ var jsx_dev_runtime16 = __toESM(require_jsx_dev_runtime(), 1);
22796
+ var ThemeButton = ({ themeSprings, setTheme }) => {
22797
+ const detailsRef = import_react24.useRef(null);
22798
+ import_react24.useEffect(() => {
22860
22799
  const onClickOutside = (event) => {
22861
22800
  const det = detailsRef.current;
22862
22801
  if (!det?.open)
@@ -22871,26 +22810,15 @@ var ThemeButton = ({ themeSprings }) => {
22871
22810
  return () => document.removeEventListener("mousedown", onClickOutside);
22872
22811
  }, []);
22873
22812
  const selectTheme = (option) => {
22874
- if (option === "system") {
22875
- const prefersLight = window.matchMedia("(prefers-color-scheme: light)").matches;
22876
- setTheme(prefersLight ? "light" : "dark");
22877
- setCurrentTheme(prefersLight ? "system:light" : "system:dark");
22878
- window.localStorage.removeItem("theme");
22879
- } else {
22880
- setTheme(option);
22881
- setCurrentTheme(option);
22882
- window.localStorage.setItem("theme", option);
22883
- }
22813
+ setTheme(option);
22884
22814
  if (detailsRef.current)
22885
22815
  detailsRef.current.open = false;
22886
22816
  };
22887
- const icon = currentTheme.includes("dark") ? /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(AiOutlineMoon, {
22888
- style: { height: 24, width: 24 }
22889
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(IoSunny, {
22890
- style: { height: 24, width: 24 }
22891
- }, undefined, false, undefined, this);
22892
- const selected = currentTheme.startsWith("system") ? "system" : currentTheme;
22893
- return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(animated.details, {
22817
+ const selected = themeSprings.theme.to((t) => {
22818
+ const sel = t.startsWith("system") ? "system" : t;
22819
+ return sel;
22820
+ });
22821
+ return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(animated.details, {
22894
22822
  ref: detailsRef,
22895
22823
  style: {
22896
22824
  display: "inline-block",
@@ -22898,7 +22826,7 @@ var ThemeButton = ({ themeSprings }) => {
22898
22826
  position: "relative"
22899
22827
  },
22900
22828
  children: [
22901
- /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(animated.summary, {
22829
+ /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(animated.summary, {
22902
22830
  style: {
22903
22831
  alignItems: "center",
22904
22832
  backgroundColor: themeSprings.themeTertiary,
@@ -22912,11 +22840,29 @@ var ThemeButton = ({ themeSprings }) => {
22912
22840
  listStyle: "none",
22913
22841
  margin: 0,
22914
22842
  padding: 0,
22843
+ position: "relative",
22915
22844
  width: "2.5rem"
22916
22845
  },
22917
- children: icon
22918
- }, undefined, false, undefined, this),
22919
- /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(animated.ul, {
22846
+ children: [
22847
+ /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(AnimatedMoon, {
22848
+ style: {
22849
+ height: 24,
22850
+ opacity: themeSprings.theme.to((t) => t.endsWith("dark") ? 1 : 0),
22851
+ position: "absolute",
22852
+ width: 24
22853
+ }
22854
+ }, undefined, false, undefined, this),
22855
+ /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(AnimatedSun, {
22856
+ style: {
22857
+ height: 24,
22858
+ opacity: themeSprings.theme.to((t) => t.endsWith("dark") ? 0 : 1),
22859
+ position: "absolute",
22860
+ width: 24
22861
+ }
22862
+ }, undefined, false, undefined, this)
22863
+ ]
22864
+ }, undefined, true, undefined, this),
22865
+ /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(animated.ul, {
22920
22866
  style: {
22921
22867
  backgroundColor: themeSprings.themeTertiary,
22922
22868
  borderRadius: "0.25rem",
@@ -22929,33 +22875,41 @@ var ThemeButton = ({ themeSprings }) => {
22929
22875
  right: 0,
22930
22876
  top: "3.5rem"
22931
22877
  },
22932
- children: ["system", "light", "dark"].map((opt) => /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(animated.li, {
22933
- onClick: () => selectTheme(opt),
22934
- style: {
22935
- background: opt === selected ? themeSprings.contrastPrimary : "transparent",
22936
- borderRadius: "0.25rem",
22937
- color: opt === selected ? themeSprings.themeTertiary : themeSprings.contrastPrimary,
22938
- cursor: "pointer",
22939
- padding: "0.25rem 0.5rem"
22940
- },
22941
- children: opt.charAt(0).toUpperCase() + opt.slice(1)
22942
- }, opt, false, undefined, this))
22878
+ children: ["system", "light", "dark"].map((opt) => {
22879
+ const background = to2([selected, themeSprings.themePrimary], (sel, bkg) => sel === opt ? bkg : "transparent");
22880
+ const color = to2([
22881
+ selected,
22882
+ themeSprings.contrastPrimary,
22883
+ themeSprings.contrastSecondary
22884
+ ], (sel, tertiary, contrast) => sel === opt ? tertiary : contrast);
22885
+ return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(animated.li, {
22886
+ onClick: () => selectTheme(opt),
22887
+ style: {
22888
+ background,
22889
+ borderRadius: "0.25rem",
22890
+ color,
22891
+ cursor: "pointer",
22892
+ padding: "0.25rem 0.5rem"
22893
+ },
22894
+ children: opt.charAt(0).toUpperCase() + opt.slice(1)
22895
+ }, opt, false, undefined, this);
22896
+ })
22943
22897
  }, undefined, false, undefined, this)
22944
22898
  ]
22945
22899
  }, undefined, true, undefined, this);
22946
22900
  };
22947
22901
 
22948
22902
  // src/frontend/components/navbar/NavbarUserButtons.tsx
22949
- var jsx_dev_runtime16 = __toESM(require_jsx_dev_runtime(), 1);
22903
+ var jsx_dev_runtime17 = __toESM(require_jsx_dev_runtime(), 1);
22950
22904
  var NavbarUserButtons = ({
22951
22905
  user,
22952
22906
  handleSignOut,
22953
- themeSprings
22907
+ themeSprings,
22908
+ setTheme
22954
22909
  }) => {
22955
- const [isDropdownOpen, setIsDropdownOpen] = import_react27.useState(false);
22910
+ const [isDropdownOpen, setIsDropdownOpen] = import_react25.useState(false);
22956
22911
  const { isSizeOrLess } = useMediaQuery();
22957
22912
  const isMobile = isSizeOrLess("sm");
22958
- const theme = useThemeStore((state) => state.theme);
22959
22913
  const openDropdown = () => {
22960
22914
  setIsDropdownOpen(true);
22961
22915
  loginDropdownApi.start({ opacity: 1, scale: 1 });
@@ -22976,15 +22930,15 @@ var NavbarUserButtons = ({
22976
22930
  opacity: 0,
22977
22931
  scale: 0
22978
22932
  }));
22979
- const userButtonRef = import_react27.useRef(null);
22980
- return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV("div", {
22933
+ const userButtonRef = import_react25.useRef(null);
22934
+ return /* @__PURE__ */ jsx_dev_runtime17.jsxDEV("div", {
22981
22935
  style: {
22982
22936
  display: "flex",
22983
22937
  marginLeft: "1rem",
22984
22938
  position: "relative"
22985
22939
  },
22986
22940
  children: [
22987
- /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(animated.button, {
22941
+ /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(animated.button, {
22988
22942
  ref: userButtonRef,
22989
22943
  onClick: user ? () => handleSignOut() : handleLoginClick,
22990
22944
  style: buttonStyle({
@@ -22993,31 +22947,32 @@ var NavbarUserButtons = ({
22993
22947
  }),
22994
22948
  children: user ? "Sign Out" : "Login"
22995
22949
  }, undefined, false, undefined, this),
22996
- user !== undefined && !isMobile && /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(animated.a, {
22950
+ user !== undefined && !isMobile && /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(animated.a, {
22997
22951
  style: profileButtonStyle,
22998
22952
  href: "/protected",
22999
- children: /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(ProfilePicture, {
22953
+ children: /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(AnimatedProfilePicture, {
23000
22954
  themeSprings,
23001
22955
  userImage: typeof user.metadata?.profile_picture === "string" ? user.metadata.profile_picture : undefined,
23002
- backupImage: theme === "dark" ? "/assets/svg/default-profile-icon-light.svg" : "/assets/svg/default-profile-icon.svg",
22956
+ backupImage: themeSprings.theme.to((theme) => theme.endsWith("dark") ? "/assets/svg/default-profile-icon-light.svg" : "/assets/svg/default-profile-icon.svg"),
23003
22957
  width: "2.5rem",
23004
22958
  height: "2.5rem"
23005
22959
  }, undefined, false, undefined, this)
23006
22960
  }, undefined, false, undefined, this),
23007
- /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(ThemeButton, {
23008
- themeSprings
22961
+ /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(ThemeButton, {
22962
+ themeSprings,
22963
+ setTheme
23009
22964
  }, undefined, false, undefined, this),
23010
- isDropdownOpen === true && !isMobile && /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(DropdownContainer, {
22965
+ isDropdownOpen === true && !isMobile && /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(DropdownContainer, {
23011
22966
  themeSprings,
23012
22967
  spring: loginDropdownSpring,
23013
22968
  springApi: loginDropdownApi,
23014
22969
  onClose: closeDropdown,
23015
22970
  ignoredElements: [userButtonRef],
23016
- children: /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(AuthContainer, {
22971
+ children: /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(AuthContainer, {
23017
22972
  themeSprings
23018
22973
  }, undefined, false, undefined, this)
23019
22974
  }, undefined, false, undefined, this),
23020
- isDropdownOpen === true && isMobile && /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Modal, {
22975
+ isDropdownOpen === true && isMobile && /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Modal, {
23021
22976
  style: {
23022
22977
  backgroundColor: themeSprings.themeSecondary,
23023
22978
  borderRadius: "0.5rem"
@@ -23026,7 +22981,7 @@ var NavbarUserButtons = ({
23026
22981
  onClose: () => {
23027
22982
  setIsDropdownOpen(false);
23028
22983
  },
23029
- children: /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(AuthContainer, {
22984
+ children: /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(AuthContainer, {
23030
22985
  themeSprings
23031
22986
  }, undefined, false, undefined, this)
23032
22987
  }, undefined, false, undefined, this)
@@ -23035,11 +22990,16 @@ var NavbarUserButtons = ({
23035
22990
  };
23036
22991
 
23037
22992
  // src/frontend/components/navbar/Navbar.tsx
23038
- var jsx_dev_runtime17 = __toESM(require_jsx_dev_runtime(), 1);
23039
- var Navbar = ({ user, handleSignOut, themeSprings }) => {
22993
+ var jsx_dev_runtime18 = __toESM(require_jsx_dev_runtime(), 1);
22994
+ var Navbar = ({
22995
+ user,
22996
+ handleSignOut,
22997
+ themeSprings,
22998
+ setTheme
22999
+ }) => {
23040
23000
  const { isSizeOrLess } = useMediaQuery();
23041
23001
  const isMobile = isSizeOrLess("sm");
23042
- const navRef = import_react28.useRef(null);
23002
+ const navRef = import_react26.useRef(null);
23043
23003
  const [hamburgerMenuSpring, hamburgerMenuApi] = useSpring(() => ({
23044
23004
  config: { friction: 40, tension: 275 },
23045
23005
  transform: "translateX(100%)",
@@ -23058,11 +23018,11 @@ var Navbar = ({ user, handleSignOut, themeSprings }) => {
23058
23018
  transform: isOpen ? "translateX(0%)" : "translateX(100%)"
23059
23019
  });
23060
23020
  };
23061
- return /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(animated.header, {
23021
+ return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(animated.header, {
23062
23022
  ref: navRef,
23063
23023
  style: navbarContainerStyle(themeSprings),
23064
23024
  children: [
23065
- /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(animated.a, {
23025
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(animated.a, {
23066
23026
  href: "/",
23067
23027
  style: {
23068
23028
  color: themeSprings.contrastPrimary,
@@ -23072,31 +23032,32 @@ var Navbar = ({ user, handleSignOut, themeSprings }) => {
23072
23032
  },
23073
23033
  children: "AbsoluteJS"
23074
23034
  }, undefined, false, undefined, this),
23075
- /* @__PURE__ */ jsx_dev_runtime17.jsxDEV("div", {
23035
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV("div", {
23076
23036
  style: {
23077
23037
  alignItems: "center",
23078
23038
  display: "flex"
23079
23039
  },
23080
23040
  children: [
23081
- !isMobile && /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(NavbarLinks, {
23041
+ !isMobile && /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(NavbarLinks, {
23082
23042
  navbarData,
23083
23043
  themeSprings
23084
23044
  }, undefined, false, undefined, this),
23085
- /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(NavbarUserButtons, {
23045
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(NavbarUserButtons, {
23086
23046
  user,
23087
23047
  handleSignOut,
23088
- themeSprings
23048
+ themeSprings,
23049
+ setTheme
23089
23050
  }, undefined, false, undefined, this),
23090
- isMobile === true && /* @__PURE__ */ jsx_dev_runtime17.jsxDEV("button", {
23051
+ isMobile === true && /* @__PURE__ */ jsx_dev_runtime18.jsxDEV("button", {
23091
23052
  style: hamburgerButtonStyle,
23092
23053
  onClick: toggleHamburgerMenu,
23093
- children: /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(RxHamburgerMenu, {
23054
+ children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(RxHamburgerMenu, {
23094
23055
  size: 36
23095
23056
  }, undefined, false, undefined, this)
23096
23057
  }, undefined, false, undefined, this)
23097
23058
  ]
23098
23059
  }, undefined, true, undefined, this),
23099
- /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(HamburgerMenu, {
23060
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(HamburgerMenu, {
23100
23061
  themeSprings,
23101
23062
  spring: hamburgerMenuSpring,
23102
23063
  springApi: hamburgerMenuApi,
@@ -23108,35 +23069,35 @@ var Navbar = ({ user, handleSignOut, themeSprings }) => {
23108
23069
  };
23109
23070
 
23110
23071
  // src/frontend/components/page/Head.tsx
23111
- var jsx_dev_runtime18 = __toESM(require_jsx_dev_runtime(), 1);
23072
+ var jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
23112
23073
  var Head = ({
23113
23074
  title = "AbsoluteJS",
23114
23075
  icon = "/assets/favicon.ico"
23115
- }) => /* @__PURE__ */ jsx_dev_runtime18.jsxDEV("head", {
23076
+ }) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("head", {
23116
23077
  children: [
23117
- /* @__PURE__ */ jsx_dev_runtime18.jsxDEV("meta", {
23078
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("meta", {
23118
23079
  charSet: "utf-8"
23119
23080
  }, undefined, false, undefined, this),
23120
- /* @__PURE__ */ jsx_dev_runtime18.jsxDEV("title", {
23081
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("title", {
23121
23082
  children: title
23122
23083
  }, undefined, false, undefined, this),
23123
- /* @__PURE__ */ jsx_dev_runtime18.jsxDEV("meta", {
23084
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("meta", {
23124
23085
  name: "description",
23125
23086
  content: "AbsoluteJS Documentation"
23126
23087
  }, undefined, false, undefined, this),
23127
- /* @__PURE__ */ jsx_dev_runtime18.jsxDEV("meta", {
23088
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("meta", {
23128
23089
  name: "viewport",
23129
23090
  content: "width=device-width, initial-scale=1"
23130
23091
  }, undefined, false, undefined, this),
23131
- /* @__PURE__ */ jsx_dev_runtime18.jsxDEV("link", {
23092
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("link", {
23132
23093
  rel: "icon",
23133
23094
  href: icon
23134
23095
  }, undefined, false, undefined, this),
23135
- /* @__PURE__ */ jsx_dev_runtime18.jsxDEV("link", {
23096
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("link", {
23136
23097
  href: "https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap",
23137
23098
  rel: "stylesheet"
23138
23099
  }, undefined, false, undefined, this),
23139
- /* @__PURE__ */ jsx_dev_runtime18.jsxDEV("style", {
23100
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("style", {
23140
23101
  children: styleReset
23141
23102
  }, undefined, false, undefined, this)
23142
23103
  ]
@@ -23187,7 +23148,7 @@ var sidebarData = [
23187
23148
  ];
23188
23149
 
23189
23150
  // src/frontend/components/sidebar/SidebarDropdown.tsx
23190
- var jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
23151
+ var jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
23191
23152
  var SidebarDropdown = ({
23192
23153
  label,
23193
23154
  icon,
@@ -23215,27 +23176,27 @@ var SidebarDropdown = ({
23215
23176
  transform: isOpen ? "rotate(180deg)" : "rotate(0deg)"
23216
23177
  });
23217
23178
  };
23218
- return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("div", {
23179
+ return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV("div", {
23219
23180
  style: { width: "100%" },
23220
23181
  children: [
23221
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("div", {
23182
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV("div", {
23222
23183
  style: {
23223
23184
  alignItems: "center",
23224
23185
  display: "flex",
23225
23186
  justifyContent: "space-between"
23226
23187
  },
23227
23188
  children: [
23228
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(animated.a, {
23189
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(animated.a, {
23229
23190
  href,
23230
23191
  style: labelStyle(themeSprings),
23231
23192
  children: [
23232
23193
  icon,
23233
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("span", {
23194
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV("span", {
23234
23195
  children: label
23235
23196
  }, undefined, false, undefined, this)
23236
23197
  ]
23237
23198
  }, undefined, true, undefined, this),
23238
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(AnimatedFaChevronDown, {
23199
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(AnimatedFaChevronDown, {
23239
23200
  onClick: toggleDropdown,
23240
23201
  style: {
23241
23202
  cursor: "pointer",
@@ -23247,14 +23208,14 @@ var SidebarDropdown = ({
23247
23208
  }, undefined, false, undefined, this)
23248
23209
  ]
23249
23210
  }, undefined, true, undefined, this),
23250
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(animated.nav, {
23211
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(animated.nav, {
23251
23212
  ref,
23252
23213
  style: {
23253
23214
  height: dropdownSprings.height,
23254
23215
  opacity: dropdownSprings.opacity,
23255
23216
  overflow: "hidden"
23256
23217
  },
23257
- children: links.map((link, index) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(NavbarLink, {
23218
+ children: links.map((link, index) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(NavbarLink, {
23258
23219
  themeSprings,
23259
23220
  icon: link.icon,
23260
23221
  href: link.href,
@@ -23266,8 +23227,8 @@ var SidebarDropdown = ({
23266
23227
  };
23267
23228
 
23268
23229
  // src/frontend/components/sidebar/Sidebar.tsx
23269
- var jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
23270
- var Sidebar = ({ themeSprings }) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(animated.aside, {
23230
+ var jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
23231
+ var Sidebar = ({ themeSprings }) => /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(animated.aside, {
23271
23232
  style: {
23272
23233
  borderColor: themeSprings.themeTertiary,
23273
23234
  borderRight: "2px solid",
@@ -23275,7 +23236,7 @@ var Sidebar = ({ themeSprings }) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(ani
23275
23236
  },
23276
23237
  children: sidebarData.map((element) => {
23277
23238
  if (isNavbarDropdown(element)) {
23278
- return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(SidebarDropdown, {
23239
+ return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(SidebarDropdown, {
23279
23240
  label: element.label,
23280
23241
  href: element.href,
23281
23242
  links: element.links,
@@ -23283,7 +23244,7 @@ var Sidebar = ({ themeSprings }) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(ani
23283
23244
  themeSprings
23284
23245
  }, element.label, false, undefined, this);
23285
23246
  }
23286
- return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(animated.a, {
23247
+ return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(animated.a, {
23287
23248
  href: element.href,
23288
23249
  style: navbarDrowdownLinkStyle(themeSprings),
23289
23250
  children: element.label
@@ -23292,9 +23253,9 @@ var Sidebar = ({ themeSprings }) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(ani
23292
23253
  }, undefined, false, undefined, this);
23293
23254
 
23294
23255
  // src/frontend/hooks/useAuthStatus.ts
23295
- var import_react29 = __toESM(require_react(), 1);
23256
+ var import_react27 = __toESM(require_react(), 1);
23296
23257
  var useAuthStatus = () => {
23297
- const [user, setUser] = import_react29.useState();
23258
+ const [user, setUser] = import_react27.useState();
23298
23259
  const checkAuthStatus = async () => {
23299
23260
  const response = await fetch("/oauth2/status");
23300
23261
  if (!response.ok && response.statusText === "Unauthorized") {
@@ -23323,7 +23284,7 @@ var useAuthStatus = () => {
23323
23284
  console.error("SignOut failed");
23324
23285
  }
23325
23286
  };
23326
- import_react29.useEffect(() => {
23287
+ import_react27.useEffect(() => {
23327
23288
  checkAuthStatus();
23328
23289
  }, []);
23329
23290
  return {
@@ -23333,8 +23294,8 @@ var useAuthStatus = () => {
23333
23294
  };
23334
23295
  };
23335
23296
 
23336
- // src/frontend/hooks/useThemeColors.ts
23337
- var import_react30 = __toESM(require_react(), 1);
23297
+ // src/frontend/hooks/useTheme.ts
23298
+ var import_react28 = __toESM(require_react(), 1);
23338
23299
 
23339
23300
  // src/frontend/styles/colors.ts
23340
23301
  var primaryColor = "#A0E7E5";
@@ -23345,52 +23306,68 @@ var darkPrimaryColor = "#0B0B0B";
23345
23306
  var darkSecondaryColor = "#14141E";
23346
23307
  var darkTertiaryColor = "#1E1E2E";
23347
23308
 
23348
- // src/frontend/hooks/useThemeColors.ts
23349
- var useThemeColors = () => {
23350
- const theme = useThemeStore((state) => state.theme);
23351
- const [themeSprings, themeApi] = useSpring(() => ({
23352
- contrastPrimary: theme === "dark" ? lightPrimaryColor : darkPrimaryColor,
23353
- contrastSecondary: theme === "dark" ? lightSecondaryColor : darkSecondaryColor,
23354
- themePrimary: theme === "dark" ? darkPrimaryColor : lightPrimaryColor,
23355
- themeSecondary: theme === "dark" ? darkSecondaryColor : lightSecondaryColor,
23356
- themeTertiary: theme === "dark" ? darkTertiaryColor : lightTertiaryColor
23357
- }));
23358
- import_react30.useEffect(() => {
23359
- themeApi.start({
23360
- contrastPrimary: theme === "dark" ? lightPrimaryColor : darkPrimaryColor,
23361
- contrastSecondary: theme === "dark" ? lightSecondaryColor : darkSecondaryColor,
23362
- themePrimary: theme === "dark" ? darkPrimaryColor : lightPrimaryColor,
23363
- themeSecondary: theme === "dark" ? darkSecondaryColor : lightSecondaryColor,
23364
- themeTertiary: theme === "dark" ? darkTertiaryColor : lightTertiaryColor
23365
- });
23366
- }, [theme, themeApi]);
23367
- return themeSprings;
23309
+ // src/frontend/hooks/useTheme.ts
23310
+ var createPalette = (mode) => ({
23311
+ contrastPrimary: mode.endsWith("dark") ? lightPrimaryColor : darkPrimaryColor,
23312
+ contrastSecondary: mode.endsWith("dark") ? lightSecondaryColor : darkSecondaryColor,
23313
+ theme: mode,
23314
+ themePrimary: mode.endsWith("dark") ? darkPrimaryColor : lightPrimaryColor,
23315
+ themeSecondary: mode.endsWith("dark") ? darkSecondaryColor : lightSecondaryColor,
23316
+ themeTertiary: mode.endsWith("dark") ? darkTertiaryColor : lightTertiaryColor
23317
+ });
23318
+ var useTheme = (initialTheme) => {
23319
+ const browserEnvironmentAvailable = typeof window !== "undefined" && typeof window.matchMedia === "function";
23320
+ const [themeSprings, themeSpringController] = useSpring(() => createPalette(initialTheme ?? "system:dark"));
23321
+ const mediaQueryRef = import_react28.useRef(null);
23322
+ const applySystemChange = (event) => {
23323
+ const updatedThemeMode = event.matches ? "system:dark" : "system:light";
23324
+ themeSpringController.start(createPalette(updatedThemeMode));
23325
+ document.cookie = `theme=${updatedThemeMode}; Max-Age=31536000; Path=/`;
23326
+ };
23327
+ import_react28.useEffect(() => {
23328
+ if (!browserEnvironmentAvailable)
23329
+ return;
23330
+ const shouldFollowSystem = !initialTheme || initialTheme.startsWith("system");
23331
+ if (!shouldFollowSystem)
23332
+ return;
23333
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
23334
+ mediaQueryRef.current = mediaQuery;
23335
+ if (!mediaQuery.matches) {
23336
+ themeSpringController.start(createPalette("system:light"));
23337
+ }
23338
+ mediaQuery.addEventListener("change", applySystemChange);
23339
+ return () => {
23340
+ mediaQuery.removeEventListener("change", applySystemChange);
23341
+ mediaQueryRef.current = null;
23342
+ };
23343
+ }, []);
23344
+ const setTheme = (selectedTheme) => {
23345
+ if (!browserEnvironmentAvailable)
23346
+ return;
23347
+ if (mediaQueryRef.current) {
23348
+ mediaQueryRef.current.removeEventListener("change", applySystemChange);
23349
+ mediaQueryRef.current = null;
23350
+ }
23351
+ let nextThemeMode;
23352
+ if (selectedTheme === "system") {
23353
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
23354
+ nextThemeMode = mediaQuery.matches ? "system:dark" : "system:light";
23355
+ mediaQuery.addEventListener("change", applySystemChange);
23356
+ mediaQueryRef.current = mediaQuery;
23357
+ } else {
23358
+ nextThemeMode = selectedTheme;
23359
+ }
23360
+ themeSpringController.start(createPalette(nextThemeMode));
23361
+ document.cookie = `theme=${nextThemeMode}; Max-Age=31536000; Path=/`;
23362
+ };
23363
+ return [themeSprings, setTheme];
23368
23364
  };
23369
23365
 
23370
- // src/frontend/components/documentation/Overview.tsx
23371
- var jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
23372
- var Overview = () => /* @__PURE__ */ jsx_dev_runtime21.jsxDEV("div", {
23373
- style: {
23374
- display: "flex",
23375
- flex: 1,
23376
- flexDirection: "column",
23377
- padding: "1rem 2rem"
23378
- },
23379
- children: [
23380
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV("h1", {
23381
- children: "Overview"
23382
- }, undefined, false, undefined, this),
23383
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV("p", {
23384
- children: "The documentation provides a comprehensive guide to the features and functionality of the platform. It covers various aspects including installation, configuration, and usage of different packages. The documentation is designed to help users quickly get started and effectively utilize the platform's capabilities."
23385
- }, undefined, false, undefined, this)
23386
- ]
23387
- }, undefined, true, undefined, this);
23388
-
23389
23366
  // src/frontend/pages/Documentation.tsx
23390
23367
  var jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
23391
- var Documentation = () => {
23368
+ var Documentation = ({ section, theme }) => {
23392
23369
  const { user, handleSignOut } = useAuthStatus();
23393
- const themeSprings = useThemeColors();
23370
+ const [themeSprings, setTheme] = useTheme(theme);
23394
23371
  return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV("html", {
23395
23372
  lang: "en",
23396
23373
  style: htmlDefault,
@@ -23400,6 +23377,7 @@ var Documentation = () => {
23400
23377
  style: bodyDefault(themeSprings),
23401
23378
  children: [
23402
23379
  /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Navbar, {
23380
+ setTheme,
23403
23381
  themeSprings,
23404
23382
  user,
23405
23383
  handleSignOut
@@ -23427,4 +23405,6 @@ var Documentation = () => {
23427
23405
 
23428
23406
  // src/frontend/indexes/DocumentationIndex.tsx
23429
23407
  var jsx_dev_runtime23 = __toESM(require_jsx_dev_runtime(), 1);
23430
- import_client.hydrateRoot(document, /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Documentation, {}, undefined, false, undefined, this));
23408
+ import_client.hydrateRoot(document, /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Documentation, {
23409
+ ...window.__INITIAL_PROPS__
23410
+ }, undefined, false, undefined, this));