forma-ui 0.0.6 → 0.0.7

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 (99) hide show
  1. package/dist/Interfaces/dictionary.d.ts +25 -0
  2. package/dist/Interfaces/dictionary.js +8 -0
  3. package/dist/Interfaces/global.d.ts +21 -0
  4. package/dist/Interfaces/global.js +1 -0
  5. package/dist/Interfaces/meta.d.ts +39 -0
  6. package/dist/Interfaces/meta.js +8 -0
  7. package/dist/app/[lang]/stores/LangStore.d.ts +22 -0
  8. package/dist/app/[lang]/stores/LangStore.js +125 -0
  9. package/dist/components/icon/icon.d.ts +3 -0
  10. package/dist/components/icon/icon.js +6 -2
  11. package/dist/components/ui/Accordion.d.ts +1 -0
  12. package/dist/components/ui/Accordion.js +15 -6
  13. package/dist/components/ui/Button.d.ts +0 -0
  14. package/dist/components/ui/Button.js +1 -1
  15. package/dist/components/ui/CheckBox.d.ts +0 -0
  16. package/dist/components/ui/CheckBox.js +0 -0
  17. package/dist/components/ui/Input.d.ts +0 -0
  18. package/dist/components/ui/Input.js +10 -7
  19. package/dist/components/ui/Modal.d.ts +9 -9
  20. package/dist/components/ui/Modal.js +51 -6
  21. package/dist/components/ui/RadioButton.d.ts +0 -0
  22. package/dist/components/ui/RadioButton.js +0 -0
  23. package/dist/components/ui/Table.d.ts +0 -0
  24. package/dist/components/ui/Table.js +0 -0
  25. package/dist/components/ui/Tabs.d.ts +0 -0
  26. package/dist/components/ui/Tabs.js +0 -0
  27. package/dist/configs/language.d.ts +39 -0
  28. package/dist/configs/language.js +50 -0
  29. package/dist/configs/metadata.d.ts +69 -0
  30. package/dist/configs/metadata.js +143 -0
  31. package/dist/dictionaries/en.json +0 -0
  32. package/dist/dictionaries/fa.json +0 -0
  33. package/dist/dictionaries/index.d.ts +0 -0
  34. package/dist/dictionaries/index.js +0 -0
  35. package/dist/hooks/useDevice.d.ts +21 -0
  36. package/dist/hooks/useDevice.js +49 -0
  37. package/dist/hooks/useTranslation.d.ts +4 -0
  38. package/dist/hooks/useTranslation.js +34 -0
  39. package/dist/index.d.ts +8 -0
  40. package/dist/index.js +10 -1
  41. package/dist/libs/api/axiosClient.d.ts +9 -0
  42. package/dist/libs/api/axiosClient.js +34 -0
  43. package/dist/libs/api/cns.d.ts +16 -0
  44. package/dist/libs/api/cns.js +29 -0
  45. package/dist/libs/api/usePostFetch.d.ts +23 -0
  46. package/dist/libs/api/usePostFetch.js +17 -0
  47. package/dist/libs/cn.d.ts +1 -0
  48. package/dist/libs/cn.js +12 -0
  49. package/dist/libs/cookieUtils.d.ts +10 -0
  50. package/dist/libs/cookieUtils.js +28 -0
  51. package/dist/libs/detectComponentResponsive.d.ts +10 -0
  52. package/dist/libs/detectComponentResponsive.js +24 -0
  53. package/dist/libs/detectDeviceFromUA.d.ts +8 -0
  54. package/dist/libs/detectDeviceFromUA.js +14 -0
  55. package/dist/libs/fonts.d.ts +10 -0
  56. package/dist/libs/fonts.js +94 -0
  57. package/dist/libs/metadataHelper.d.ts +17 -0
  58. package/dist/libs/metadataHelper.js +20 -0
  59. package/dist/libs/modal/Modal.d.ts +9 -0
  60. package/dist/libs/modal/Modal.js +41 -0
  61. package/dist/libs/translation.d.ts +5 -0
  62. package/dist/libs/translation.js +30 -0
  63. package/dist/{lib → libs}/utils.d.ts +0 -0
  64. package/dist/{lib → libs}/utils.js +0 -0
  65. package/dist/locale/about/en.json +3 -0
  66. package/dist/locale/about/fa.json +3 -0
  67. package/dist/locale/coin/en.json +4 -0
  68. package/dist/locale/coin/fa.json +4 -0
  69. package/dist/locale/en.d.ts +56 -0
  70. package/dist/locale/en.js +16 -0
  71. package/dist/locale/fa.d.ts +59 -0
  72. package/dist/locale/fa.js +16 -0
  73. package/dist/locale/global/en.json +12 -0
  74. package/dist/locale/global/fa.json +16 -0
  75. package/dist/locale/home/en.json +11 -0
  76. package/dist/locale/home/fa.json +11 -0
  77. package/dist/locale/index.d.ts +201 -0
  78. package/dist/locale/index.js +7 -0
  79. package/dist/locale/meta/about/en.json +10 -0
  80. package/dist/locale/meta/about/fa.json +5 -0
  81. package/dist/locale/meta/en.json +15 -0
  82. package/dist/locale/meta/fa.json +15 -0
  83. package/dist/locale/meta/home/en.json +10 -0
  84. package/dist/locale/meta/home/fa.json +5 -0
  85. package/dist/middleware.d.ts +14 -0
  86. package/dist/middleware.js +57 -0
  87. package/dist/store/appStore.d.ts +1 -1
  88. package/dist/store/appStore.js +1 -1
  89. package/dist/tsconfig.build.tsbuildinfo +1 -1
  90. package/dist/utils/nextImageLoader.d.ts +9 -0
  91. package/dist/utils/nextImageLoader.js +15 -0
  92. package/package.json +10 -3
  93. package/README.md +0 -36
  94. package/dist/components/PostDetailPage.d.ts +0 -7
  95. package/dist/components/PostDetailPage.js +0 -47
  96. package/dist/components/PostPage.d.ts +0 -6
  97. package/dist/components/PostPage.js +0 -48
  98. package/dist/config/language.d.ts +0 -11
  99. package/dist/config/language.js +0 -6
@@ -0,0 +1,15 @@
1
+ {
2
+ "title": "Mohammad Felfelani",
3
+ "description": "AimoonHub",
4
+ "keywords": ["next.js", "react", "multilingual", "website"],
5
+ "openGraph": {
6
+ "title": "My Multilingual Website",
7
+ "description": "Explore our multilingual platform built with Next.js.",
8
+ "image": "/og-en.jpg"
9
+ },
10
+ "twitter": {
11
+ "title": "My Multilingual Website",
12
+ "description": "Welcome to our multilingual website!",
13
+ "image": "/twitter-en.jpg"
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "title": "آیمون‌هاب",
3
+ "description": "به وب‌سایت چندزبانه من خوش آمدید!",
4
+ "keywords": ["نکست", "ری‌اکت", "چندزبانه", "وب‌سایت"],
5
+ "openGraph": {
6
+ "title": "وب‌سایت چندزبانه من",
7
+ "description": "پلتفرم چندزبانه ما را که با Next.js ساخته شده، کشف کنید.",
8
+ "image": "/og-fa.jpg"
9
+ },
10
+ "twitter": {
11
+ "title": "وب‌سایت چندزبانه من",
12
+ "description": "به وب‌سایت چندزبانه ما خوش آمدید!",
13
+ "image": "/twitter-fa.jpg"
14
+ }
15
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "title": "Home",
3
+ "description": "Description Home",
4
+ "keywords": [
5
+ "njksdfjksdhfksdjhf",
6
+ "sdfsdfsdfsd",
7
+ "mufsdfsdfsdfsdltilingual",
8
+ "dfgdfgdfgdfg"
9
+ ]
10
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "title": "خانه",
3
+ "description": "توضیح برای متای خانه",
4
+ "keywords": ["منسیابتنسیا", "سیبسیب", "سیبسیبسی", "سیبسیبسیبسی"]
5
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @Author: Mohammad Felfelani
3
+ * @Email: mfelfelani72@gmail.com
4
+ * @Team:
5
+ * @Date: 2025-10-19
6
+ * @Description: Middleware with language and device detection
7
+ *
8
+ */
9
+ import { NextResponse } from "next/server";
10
+ import type { NextRequest } from "next/server";
11
+ export declare function middleware(request: NextRequest): NextResponse<unknown>;
12
+ export declare const config: {
13
+ matcher: string[];
14
+ };
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @Author: Mohammad Felfelani
3
+ * @Email: mfelfelani72@gmail.com
4
+ * @Team:
5
+ * @Date: 2025-10-19
6
+ * @Description: Middleware with language and device detection
7
+ *
8
+ */
9
+ import { NextResponse } from "next/server";
10
+ // Functions
11
+ import { detectDeviceFromUA } from "./libs/detectDeviceFromUA";
12
+ export function middleware(request) {
13
+ var _a, _b, _c;
14
+ const url = request.nextUrl.clone();
15
+ // ----------------------------
16
+ // Handle language
17
+ // ----------------------------
18
+ const cookieLang = (_a = request.cookies.get("app_lang")) === null || _a === void 0 ? void 0 : _a.value;
19
+ let defaultLang = "en";
20
+ if (cookieLang) {
21
+ try {
22
+ const parsed = JSON.parse(cookieLang);
23
+ if ((_b = parsed.state) === null || _b === void 0 ? void 0 : _b.lang) {
24
+ defaultLang = parsed.state.lang;
25
+ }
26
+ }
27
+ catch (error) {
28
+ defaultLang = cookieLang;
29
+ }
30
+ }
31
+ if (url.pathname === "/") {
32
+ url.pathname = `/${defaultLang}/${process.env.NEXT_PUBLIC_BASE_ROUTE}`;
33
+ return NextResponse.redirect(url);
34
+ }
35
+ // ----------------------------
36
+ // Handle device detection
37
+ // ----------------------------
38
+ const ua = request.headers.get("user-agent") || "";
39
+ const device = detectDeviceFromUA(ua);
40
+ const existingDevice = (_c = request.cookies.get("device-type")) === null || _c === void 0 ? void 0 : _c.value;
41
+ if (!existingDevice) {
42
+ const res = NextResponse.next();
43
+ res.cookies.set({
44
+ name: "device-type",
45
+ value: device,
46
+ path: "/",
47
+ maxAge: 60 * 60 * 24 * 365,
48
+ httpOnly: false,
49
+ sameSite: "lax",
50
+ });
51
+ return res;
52
+ }
53
+ return NextResponse.next();
54
+ }
55
+ export const config = {
56
+ matcher: ["/", "/:path*"],
57
+ };
@@ -1,4 +1,4 @@
1
- import { Lang } from "../config/language";
1
+ import { Lang } from "../configs/language";
2
2
  interface AppState {
3
3
  lang: Lang;
4
4
  dir: "ltr" | "rtl";
@@ -1,5 +1,5 @@
1
1
  import { create } from "zustand";
2
- import { languages } from "../config/language";
2
+ import { languages } from "../configs/language";
3
3
  function getInitialLang() {
4
4
  if (typeof window === "undefined")
5
5
  return "en";