next-auth-mfelfelani72 0.0.19 → 0.0.21

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.
@@ -12,9 +12,9 @@ import { useState, useRef, useEffect } from "react";
12
12
  // Components
13
13
  import { LanguageIcon } from "forma-ui";
14
14
  // Zustand
15
- import { useLangStore } from "@/stores/LangStore";
15
+ import { useLangStore } from "../../stores/LangStore";
16
16
  // Interfaces
17
- import { languages, getNativeName, getFlag, } from "@/configs/language";
17
+ import { languages, getNativeName, getFlag, } from "../../configs/language";
18
18
  export default function LanguageSwitcher() {
19
19
  // Hooks
20
20
  const router = useRouter();
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState, useEffect } from "react";
4
4
  import Image from "next/image";
5
5
  import Link from "next/link";
6
- import { useTranslation } from "@/hooks/useTranslation";
6
+ import { useTranslation } from "../../hooks/useTranslation";
7
7
  export default function UiLogin({ onSubmit, errors, message, }) {
8
8
  const { t } = useTranslation();
9
9
  const [visible, setVisible] = useState(false);
@@ -7,9 +7,9 @@
7
7
  */
8
8
  "use client";
9
9
  // Functions
10
- import { getDictionary } from "@/locale";
10
+ import { getDictionary } from "../locale";
11
11
  // Zustand
12
- import { useLangStore } from "@/stores/LangStore";
12
+ import { useLangStore } from "../stores/LangStore";
13
13
  export function useTranslation() {
14
14
  const { lang } = useLangStore();
15
15
  const translations = getDictionary(lang);
@@ -5,7 +5,7 @@
5
5
  * @Date: 2025-10-12 09:03:23
6
6
  * @Description:
7
7
  */
8
- import { Lang } from "@/configs/language";
8
+ import { Lang } from "../configs/language";
9
9
  export type Dictionary = Record<string, string>;
10
10
  export interface LangState {
11
11
  lang: Lang;
@@ -6,8 +6,8 @@
6
6
  * @Description:
7
7
  */
8
8
  import type { ReactNode } from "react";
9
- import { type Lang } from "@/configs/language";
10
- import { Dictionary } from "@/interfaces/dictionary";
9
+ import { type Lang } from "../configs/language";
10
+ import { Dictionary } from "../interfaces/dictionary";
11
11
  export interface LangLayoutProps {
12
12
  children: ReactNode;
13
13
  params: Promise<{
@@ -6,7 +6,7 @@
6
6
  * @Description: Translation utilities
7
7
  */
8
8
  import React from "react";
9
- import { type Lang } from "@/configs/language";
9
+ import { type Lang } from "../configs/language";
10
10
  export declare function createTranslator(lang: Lang): {
11
11
  t: (key: string, fallback?: string) => string;
12
12
  lang: "en" | "fa";
@@ -6,7 +6,7 @@
6
6
  * @Description: Translation utilities
7
7
  */
8
8
  import React from "react";
9
- import { getDictionary } from "@/locale";
9
+ import { getDictionary } from "../locale";
10
10
  // Core translation function
11
11
  export function createTranslator(lang) {
12
12
  const translations = getDictionary(lang);
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { create } from "zustand";
9
9
  import { persist, createJSONStorage } from "zustand/middleware";
10
- import { isBrowser, setCookie, getCookie } from "@/utilities/app/cookieUtils";
10
+ import { isBrowser, setCookie, getCookie } from "../utilities/app/cookieUtils";
11
11
  // Storage helper
12
12
  const themeStorage = {
13
13
  getItem: (name) => {
@@ -5,6 +5,6 @@
5
5
  * @Date: 2025-10-05 12:41:14
6
6
  * @Description: Lang store with API routes
7
7
  */
8
- import { LangState } from "@/interfaces/dictionary";
8
+ import { LangState } from "../interfaces/dictionary";
9
9
  export declare const useLangStore: import("zustand").UseBoundStore<import("zustand").StoreApi<LangState>>;
10
10
  export declare const initializeLang: (langFromUrl?: string) => Promise<void>;
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { create } from "zustand";
9
9
  // Configurations
10
- import { languages } from "@/configs/language";
10
+ import { languages } from "../configs/language";
11
11
  export const useLangStore = create()((set, get) => ({
12
12
  lang: "en",
13
13
  dir: "ltr",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-auth-mfelfelani72",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [