@oxyhq/services 0.0.71 → 0.0.73

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.
Files changed (40) hide show
  1. package/dist/components/auth/AccountSwitcherModal.js +1 -1
  2. package/dist/components/auth/SessionOwnerButton.d.ts.map +1 -1
  3. package/dist/components/elements/ellipsis-wrapper/components/{ellipsis-wrapper.d.ts → EllipsisWrapper.d.ts} +1 -1
  4. package/dist/components/elements/ellipsis-wrapper/components/EllipsisWrapper.d.ts.map +1 -0
  5. package/dist/hooks/useOxySession.d.ts +0 -2
  6. package/dist/hooks/useOxySession.d.ts.map +1 -1
  7. package/dist/hooks/useOxySession.js +55 -42
  8. package/package.json +3 -2
  9. package/dist/components/auth/styles/account-switcher-modal.module.css +0 -35
  10. package/dist/components/auth/styles/account-switcher-modal.module.css.map +0 -1
  11. package/dist/components/auth/styles/oavatar.module.css +0 -34
  12. package/dist/components/auth/styles/oavatar.module.css.map +0 -1
  13. package/dist/components/auth/styles/session-owner-modal.module.css +0 -35
  14. package/dist/components/auth/styles/session-owner-modal.module.css.map +0 -1
  15. package/dist/components/auth/styles/sign-in-button.module.css +0 -30
  16. package/dist/components/auth/styles/sign-in-button.module.css.map +0 -1
  17. package/dist/components/elements/button/components/styles/button.module.css +0 -25
  18. package/dist/components/elements/button/components/styles/button.module.css.map +0 -1
  19. package/dist/components/elements/ellipsis-wrapper/components/ellipsis-wrapper.d.ts.map +0 -1
  20. package/dist/components/elements/ellipsis-wrapper/components/styles/ellipses-wrapper.module.css +0 -11
  21. package/dist/components/elements/ellipsis-wrapper/components/styles/ellipses-wrapper.module.css.map +0 -1
  22. package/dist/components/elements/modal/components/styles/confirmation-modal.module.css +0 -105
  23. package/dist/components/elements/modal/components/styles/confirmation-modal.module.css.map +0 -1
  24. package/dist/components/elements/modal/components/styles/modal.module.css +0 -10
  25. package/dist/components/elements/modal/components/styles/modal.module.css.map +0 -1
  26. package/dist/features/profile/components/styles/avatar.module.css +0 -15
  27. package/dist/features/profile/components/styles/avatar.module.css.map +0 -1
  28. package/dist/features/profile/components/styles/user-name.module.css +0 -18
  29. package/dist/features/profile/components/styles/user-name.module.css.map +0 -1
  30. package/dist/features/profile/components/styles/user-username.module.css +0 -6
  31. package/dist/features/profile/components/styles/user-username.module.css.map +0 -1
  32. package/dist/hooks/get-user.d.ts +0 -2
  33. package/dist/hooks/get-user.d.ts.map +0 -1
  34. package/dist/hooks/get-user.js +0 -31
  35. package/dist/index.css +0 -5
  36. package/dist/index.css.map +0 -1
  37. package/dist/types.d.ts +0 -2
  38. package/dist/types.d.ts.map +0 -1
  39. package/dist/types.js +0 -1
  40. /package/dist/components/elements/ellipsis-wrapper/components/{ellipsis-wrapper.js → EllipsisWrapper.js} +0 -0
@@ -9,7 +9,7 @@ import { PiSignOutBold } from "react-icons/pi";
9
9
  import { AiOutlineClose } from "react-icons/ai";
10
10
  import { Avatar } from "../../features/profile";
11
11
  import getUserById from "../../hooks/getUserById";
12
- import styles from "./styles/account-switcher-modal.module.css";
12
+ import styles from "./styles/account-switcher-modal.module.scss";
13
13
  export const AccountSwitcherModal = forwardRef((props, ref) => {
14
14
  const { onClose } = props;
15
15
  const { session } = useOxySession();
@@ -1 +1 @@
1
- {"version":3,"file":"SessionOwnerButton.d.ts","sourceRoot":"","sources":["../../../src/components/auth/SessionOwnerButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,eAAO,MAAM,kBAAkB,yBAoD9B,CAAC"}
1
+ {"version":3,"file":"SessionOwnerButton.d.ts","sourceRoot":"","sources":["../../../src/components/auth/SessionOwnerButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,eAAO,MAAM,kBAAkB,yBAoD9B,CAAC"}
@@ -2,4 +2,4 @@ import React from "react";
2
2
  export declare const EllipsisWrapper: ({ children, }: {
3
3
  children: React.ReactNode;
4
4
  }) => React.JSX.Element;
5
- //# sourceMappingURL=ellipsis-wrapper.d.ts.map
5
+ //# sourceMappingURL=EllipsisWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EllipsisWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/components/elements/ellipsis-wrapper/components/EllipsisWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,eAAe,kBAEzB;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,sBAUA,CAAC"}
@@ -12,8 +12,6 @@ interface SessionModel {
12
12
  role: UserRole;
13
13
  isOAuth: boolean;
14
14
  isTwoFactorEnabled: boolean;
15
- lastLogin: string;
16
- permissions: string[];
17
15
  };
18
16
  }
19
17
  type SessionState = {
@@ -1 +1 @@
1
- {"version":3,"file":"useOxySession.d.ts","sourceRoot":"","sources":["../../src/hooks/useOxySession.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,UAAU,YAAY;IACpB,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,OAAO,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,QAAQ,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;QACjB,kBAAkB,EAAE,OAAO,CAAC;QAC5B,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,EAAE,CAAC;KACvB,CAAC;CACH;AAED,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;IACX,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,eAAe,2EAiDzB,CAAC;AAEJ,iBAAS,aAAa;;;;EAQrB;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"useOxySession.d.ts","sourceRoot":"","sources":["../../src/hooks/useOxySession.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,UAAU,YAAY;IACpB,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,OAAO,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,QAAQ,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;QACjB,kBAAkB,EAAE,OAAO,CAAC;KAC7B,CAAC;CACH;AAED,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;IACX,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,eAAe,2EA4D1B,CAAC;AAEH,iBAAS,aAAa;;;;EAQrB;AAED,eAAe,aAAa,CAAC"}
@@ -3,58 +3,71 @@ import axios from "axios";
3
3
  import { create } from "zustand";
4
4
  import localforage from "localforage";
5
5
  import { OXY_AUTH_URL } from "../config";
6
- export const useSessionStore = create((set) => ({
7
- session: null,
8
- status: "idle",
9
- error: null,
10
- fetchSessionData: async () => {
11
- set({ status: "loading" });
12
- try {
13
- let clientKey = null;
14
- if (typeof window !== "undefined") {
15
- const urlParams = new URLSearchParams(window.location.search);
16
- clientKey = urlParams.get("clientKey");
17
- }
18
- if (!clientKey) {
19
- clientKey = await localforage.getItem("clientKey");
20
- }
21
- else {
22
- await localforage.setItem("clientKey", clientKey);
23
- }
24
- if (!clientKey) {
25
- throw new Error("Client key not found.");
26
- }
27
- const response = await axios.get(`${OXY_AUTH_URL}/api/session/${clientKey}`);
28
- if (response.status !== 200) {
29
- throw new Error(`Unexpected response status: ${response.status}`);
30
- }
31
- set({ session: response.data, status: "success", error: null });
32
- }
33
- catch (error) {
34
- let errorMessage = "An error occurred while loading the session data.";
35
- if (axios.isAxiosError(error)) {
36
- if (error.response) {
37
- errorMessage = `API error: ${error.response.status} ${error.response.statusText}`;
6
+ export const useSessionStore = create((set) => {
7
+ let isFirstFetch = true;
8
+ return {
9
+ session: null,
10
+ status: "loading",
11
+ error: null,
12
+ fetchSessionData: async () => {
13
+ try {
14
+ if (isFirstFetch) {
15
+ set({ status: "loading" });
16
+ isFirstFetch = false;
38
17
  }
39
- else if (error.request) {
40
- errorMessage = "Network error: No response received from server.";
18
+ // Get the session ID from the URL parameters if it exists
19
+ const urlParams = new URLSearchParams(window.location.search);
20
+ let clientKey = urlParams.get("clientKey");
21
+ // If the session ID was not found in the URL parameters, get it from local storage
22
+ if (!clientKey) {
23
+ clientKey = await localforage.getItem("clientKey");
41
24
  }
42
25
  else {
43
- errorMessage = `Axios error: ${error.message}`;
26
+ // If the session ID was found in the URL parameters, set it in local storage
27
+ await localforage.setItem("clientKey", clientKey);
28
+ }
29
+ const response = await axios.get(OXY_AUTH_URL + "/api/session/" + clientKey);
30
+ if (response.status !== 200) {
31
+ throw new Error(`Unexpected response status: ${response.status}`);
44
32
  }
33
+ set({ session: response.data, status: "success" });
45
34
  }
46
- else if (error instanceof Error) {
47
- errorMessage = `Error: ${error.message}`;
35
+ catch (error) {
36
+ if (axios.isAxiosError(error)) {
37
+ if (error.response) {
38
+ set({
39
+ error: `Network error: ${error.message}, Status code: ${error.response.status}`,
40
+ status: "error",
41
+ });
42
+ }
43
+ else if (error.request) {
44
+ set({
45
+ error: "Network error: No response received from server.",
46
+ status: "error",
47
+ });
48
+ }
49
+ else {
50
+ set({
51
+ error: `Network error: ${error.message}`,
52
+ status: "error",
53
+ });
54
+ }
55
+ }
56
+ else {
57
+ set({
58
+ error: "An unknown error occurred while loading the session data.",
59
+ status: "error",
60
+ });
61
+ }
48
62
  }
49
- set({ error: errorMessage, status: "error", session: null });
50
- }
51
- },
52
- }));
63
+ },
64
+ };
65
+ });
53
66
  function useOxySession() {
54
67
  const { session, status, error, fetchSessionData } = useSessionStore();
55
68
  useEffect(() => {
56
69
  fetchSessionData();
57
- }, [fetchSessionData]);
70
+ }, []);
58
71
  return { session, status, error };
59
72
  }
60
73
  export default useOxySession;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/services",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "description": "",
5
5
  "homepage": "https://oxy.so/",
6
6
  "main": "./dist/index.js",
@@ -12,7 +12,8 @@
12
12
  "build:scss": "sass src:temp",
13
13
  "copy:css": "ncp temp dist",
14
14
  "build:ts": "tsc",
15
- "build": "npm run build:scss && npm run build:ts && npm run copy:css",
15
+ "clean": "rimraf dist",
16
+ "build": "npm run clean && npm run build:scss && npm run build:ts && npm run copy:css",
16
17
  "test": "jest",
17
18
  "lint": "eslint src/**/*.{ts,tsx}"
18
19
  },
@@ -1,35 +0,0 @@
1
- .container {
2
- width: 300px;
3
- background-color: var(--clr-background);
4
- box-shadow: 0 0rem 10px -2px var(--clr-tertiary);
5
- border-radius: 1rem;
6
- padding: 0.8em 0;
7
- overflow: hidden;
8
- position: fixed;
9
- top: 0;
10
- bottom: 0;
11
- left: 0;
12
- right: 0;
13
- margin: auto;
14
- a {
15
- font-size: var(--fs-milli);
16
- font-weight: var(--fw-700);
17
- display: block;
18
- padding: 0.8em 1em;
19
- cursor: pointer;
20
- transition: background-color 0.1s ease-in-out;
21
- &:hover {
22
- background-color: var(--clr-trends-hover);
23
- }
24
- &:active {
25
- background-color: var(--clr-trends-active);
26
- }
27
- &:focus-visible {
28
- background-color: var(--clr-trends-hover);
29
- outline: 2px solid var(--clr-primary-disabled);
30
- outline-offset: -2px;
31
- }
32
- }
33
- }
34
-
35
- /*# sourceMappingURL=account-switcher-modal.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/components/auth/styles/account-switcher-modal.module.css"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IAEA;MACE;;IAGF;MACE;;IAGF;MACE;MACA;MACA","file":"account-switcher-modal.module.css"}
@@ -1,34 +0,0 @@
1
- .oavatar {
2
- width: 2rem;
3
- height: 2rem;
4
- padding: 0.7em;
5
- border-radius: 100vmax;
6
- font-size: var(--fs-milli);
7
- font-weight: var(--fw-700);
8
- color: var(--clr-dark);
9
- background-color: var(--clr-light);
10
- border: 1px solid var(--clr-auth-border);
11
- display: flex;
12
- justify-content: center;
13
- align-items: center;
14
- cursor: pointer;
15
- transition: background 0.2s ease-in-out;
16
- }
17
- .oavatar:hover {
18
- background-color: var(--clr-auth-button-hover);
19
- }
20
- .oavatar:active {
21
- background-color: var(--clr-auth-button-active);
22
- }
23
- .oavatar:focus-visible {
24
- outline: 2px solid var(--clr-light);
25
- background-color: var(--clr-auth-button-hover);
26
- }
27
- .oavatar svg {
28
- width: var(--fs-h2);
29
- height: var(--fs-h2);
30
- fill: var(--clr-dark);
31
- margin-right: 0.5em;
32
- }
33
-
34
- /*# sourceMappingURL=oavatar.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/components/auth/styles/oavatar.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA","file":"oavatar.module.css"}
@@ -1,35 +0,0 @@
1
- .container {
2
- width: 300px;
3
- background-color: var(--clr-background);
4
- box-shadow: 0 0rem 10px -2px var(--clr-tertiary);
5
- border-radius: 1rem;
6
- padding: 0.8em 0;
7
- overflow: hidden;
8
- position: fixed;
9
- top: 0;
10
- bottom: 0;
11
- left: 0;
12
- right: 0;
13
- margin: auto;
14
- }
15
- .container a {
16
- font-size: var(--fs-milli);
17
- font-weight: var(--fw-700);
18
- display: block;
19
- padding: 0.8em 1em;
20
- cursor: pointer;
21
- transition: background-color 0.1s ease-in-out;
22
- }
23
- .container a:hover {
24
- background-color: var(--clr-trends-hover);
25
- }
26
- .container a:active {
27
- background-color: var(--clr-trends-active);
28
- }
29
- .container a:focus-visible {
30
- background-color: var(--clr-trends-hover);
31
- outline: 2px solid var(--clr-primary-disabled);
32
- outline-offset: -2px;
33
- }
34
-
35
- /*# sourceMappingURL=session-owner-modal.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/components/auth/styles/session-owner-modal.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA","file":"session-owner-modal.module.css"}
@@ -1,30 +0,0 @@
1
- .container {
2
- width: 100%;
3
- padding: 0.7em;
4
- border-radius: 100vmax;
5
- background-color: var(--clr-light);
6
- border: 1px solid var(--clr-auth-border);
7
- display: flex;
8
- justify-content: center;
9
- align-items: center;
10
- cursor: pointer;
11
- transition: background 0.2s ease-in-out;
12
- }
13
- .container:hover {
14
- background-color: var(--clr-auth-button-hover);
15
- }
16
- .container:active {
17
- background-color: var(--clr-auth-button-active);
18
- }
19
- .container:focus-visible {
20
- outline: 2px solid var(--clr-light);
21
- background-color: var(--clr-auth-button-hover);
22
- }
23
- .container svg {
24
- width: var(--fs-h2);
25
- height: var(--fs-h2);
26
- fill: var(--clr-dark);
27
- margin-right: 0.5em;
28
- }
29
-
30
- /*# sourceMappingURL=sign-in-button.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/components/auth/styles/sign-in-button.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA","file":"sign-in-button.module.css"}
@@ -1,25 +0,0 @@
1
- .container {
2
- cursor: pointer;
3
- display: grid;
4
- place-items: center;
5
- padding: 0.5em;
6
- border-radius: 100vmax;
7
- transition: background-color 0.15s ease-in-out;
8
- }
9
- .container svg {
10
- width: var(--fs-h2);
11
- height: var(--fs-h2);
12
- fill: var(--clr-secondary);
13
- }
14
- .container:hover {
15
- background-color: var(--clr-nav-hover);
16
- }
17
- .container:active {
18
- background-color: var(--clr-nav-active);
19
- }
20
- .container:focus-visible {
21
- outline: 2px solid var(--clr-secondary);
22
- background-color: var(--clr-nav-hover);
23
- }
24
-
25
- /*# sourceMappingURL=button.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../../../src/components/elements/button/components/styles/button.module.scss"],"names":[],"mappings":"AAAA;EACI;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;EACA","file":"button.module.css"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ellipsis-wrapper.d.ts","sourceRoot":"","sources":["../../../../../src/components/elements/ellipsis-wrapper/components/ellipsis-wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,eAAe,kBAEzB;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,sBAUA,CAAC"}
@@ -1,11 +0,0 @@
1
- .container {
2
- display: grid;
3
- grid-auto-flow: column;
4
- }
5
- .container * {
6
- white-space: nowrap;
7
- text-overflow: ellipsis;
8
- overflow: hidden;
9
- }
10
-
11
- /*# sourceMappingURL=ellipses-wrapper.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../../../src/components/elements/ellipsis-wrapper/components/styles/ellipses-wrapper.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;;AAEA;EACE;EACA;EACA","file":"ellipses-wrapper.module.css"}
@@ -1,105 +0,0 @@
1
- .container {
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- bottom: 0;
6
- right: 0;
7
- width: fit-content;
8
- max-width: 320px;
9
- height: fit-content;
10
- margin: auto;
11
- background-color: var(--clr-background);
12
- padding: 2em;
13
- border-radius: 1rem;
14
- }
15
- .container .logo {
16
- display: grid;
17
- place-items: center;
18
- margin-bottom: 1em;
19
- }
20
- .container .logo svg {
21
- width: var(--fs-kilo);
22
- height: var(--fs-kilo);
23
- fill: var(--clr-primary);
24
- }
25
- .container h1 {
26
- font-size: var(--fs-h2);
27
- font-weight: var(--fw-700);
28
- margin-bottom: 0.5em;
29
- }
30
- .container p {
31
- font-size: var(--fs-milli);
32
- color: var(--clr-tertiary);
33
- margin-bottom: 2rem;
34
- line-height: 1.4;
35
- }
36
- .container .buttons {
37
- display: grid;
38
- gap: 0.8rem;
39
- }
40
- .container .buttons button {
41
- display: grid;
42
- place-items: center;
43
- padding: 0.9em;
44
- border-radius: 100vmax;
45
- font-size: var(--fs-milli);
46
- font-weight: var(--fw-700);
47
- cursor: pointer;
48
- transition: background-color 0.2s ease;
49
- }
50
- .container .buttons .delete {
51
- background-color: var(--clr-red);
52
- }
53
- .container .buttons .delete:hover {
54
- background-color: var(--clr-red-hover);
55
- }
56
- .container .buttons .delete:active {
57
- background-color: var(--clr-red-active);
58
- }
59
- .container .buttons .delete:focus-visible {
60
- outline: 2px solid var(--clr-secondary);
61
- background-color: var(--clr-red-hover);
62
- }
63
- .container .buttons .unfollow {
64
- background-color: var(--clr-secondary);
65
- color: var(--clr-background);
66
- }
67
- .container .buttons .unfollow:hover {
68
- background-color: var(--clr-secondary-hover);
69
- }
70
- .container .buttons .unfollow:active {
71
- background-color: var(--clr-secondary-active);
72
- }
73
- .container .buttons .unfollow:focus-visible {
74
- outline: 2px solid var(--clr-secondary);
75
- }
76
- .container .buttons .signout {
77
- background-color: var(--clr-secondary);
78
- color: var(--clr-background);
79
- }
80
- .container .buttons .signout:hover {
81
- background-color: var(--clr-signout-logout-hover);
82
- }
83
- .container .buttons .signout:active {
84
- background-color: var(--clr-signout-logout-active);
85
- }
86
- .container .buttons .signout:focus-visible {
87
- outline: 2px solid var(--clr-secondary);
88
- background-color: var(--clr-signout-logout-hover);
89
- }
90
- .container .buttons .cancel {
91
- color: var(--clr-secondary);
92
- border: 1px solid var(--clr-tertiary);
93
- }
94
- .container .buttons .cancel:hover {
95
- background-color: var(--clr-trends-hover);
96
- }
97
- .container .buttons .cancel:active {
98
- background-color: var(--clr-trends-active);
99
- }
100
- .container .buttons .cancel:focus-visible {
101
- outline: 2px solid var(--clr-secondary);
102
- background-color: var(--clr-trends-hover);
103
- }
104
-
105
- /*# sourceMappingURL=confirmation-modal.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../../../src/components/elements/modal/components/styles/confirmation-modal.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAIJ;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAIJ;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAIJ;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA","file":"confirmation-modal.module.css"}
@@ -1,10 +0,0 @@
1
- .container {
2
- z-index: var(--z-index-modal-backdrop);
3
- position: fixed;
4
- top: 0;
5
- left: 0;
6
- width: 100%;
7
- height: 100%;
8
- }
9
-
10
- /*# sourceMappingURL=modal.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../../../src/components/elements/modal/components/styles/modal.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA","file":"modal.module.css"}
@@ -1,15 +0,0 @@
1
- .container {
2
- position: relative;
3
- width: var(--avatar-width);
4
- border-radius: 50%;
5
- overflow: hidden;
6
- aspect-ratio: 1/1;
7
- }
8
- .container img {
9
- display: block;
10
- width: 100%;
11
- height: 100%;
12
- object-fit: cover;
13
- }
14
-
15
- /*# sourceMappingURL=avatar.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../../src/features/profile/components/styles/avatar.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA","file":"avatar.module.css"}
@@ -1,18 +0,0 @@
1
- .container {
2
- font-size: var(--fs-milli);
3
- font-weight: var(--fw-500);
4
- color: var(--clr-secondary);
5
- display: grid;
6
- grid-auto-flow: column;
7
- }
8
- .container span {
9
- white-space: nowrap;
10
- overflow: hidden;
11
- text-overflow: ellipsis;
12
- }
13
-
14
- .hover:hover {
15
- text-decoration: underline;
16
- }
17
-
18
- /*# sourceMappingURL=user-name.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../../src/features/profile/components/styles/user-name.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAKF;EACE","file":"user-name.module.css"}
@@ -1,6 +0,0 @@
1
- .container {
2
- font-size: var(--fs-milli);
3
- color: var(--clr-tertiary);
4
- }
5
-
6
- /*# sourceMappingURL=user-username.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../../src/features/profile/components/styles/user-username.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA","file":"user-username.module.css"}
@@ -1,2 +0,0 @@
1
- export declare const getUser: (id: string | undefined) => Promise<any>;
2
- //# sourceMappingURL=get-user.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-user.d.ts","sourceRoot":"","sources":["../../src/hooks/get-user.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,OAAc,MAAM,GAAG,SAAS,iBA0BnD,CAAC"}
@@ -1,31 +0,0 @@
1
- import axios from "axios";
2
- import { OXY_AUTH_URL } from "../config";
3
- export const getUser = async (id) => {
4
- if (!id) {
5
- throw new Error("User ID is required");
6
- }
7
- try {
8
- const response = await axios.get(OXY_AUTH_URL + `/api/users/${id}`);
9
- return response.data;
10
- }
11
- catch (error) {
12
- if (axios.isAxiosError(error)) {
13
- if (error.response) {
14
- // Server responded with a status code outside of 2xx
15
- throw new Error(`Server responded with status ${error.response.status}: ${error.response.data}`);
16
- }
17
- else if (error.request) {
18
- // Request was made but no response received
19
- throw new Error("No response received from server");
20
- }
21
- else {
22
- // Error setting up the request
23
- throw new Error(`Axios error: ${error.message}`);
24
- }
25
- }
26
- else {
27
- // Non-Axios error
28
- throw error;
29
- }
30
- }
31
- };
package/dist/index.css DELETED
@@ -1,5 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
- /*# sourceMappingURL=index.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../src/index.css"],"names":[],"mappings":"AAAA;AACA;AACA","file":"index.css"}
package/dist/types.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export type UserRole = "ADMIN" | "USER" | "MODERATOR";
2
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,CAAC"}
package/dist/types.js DELETED
@@ -1 +0,0 @@
1
- export {};