forma-ui 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/dist/Interfaces/dictionary.d.ts +0 -25
- package/dist/Interfaces/dictionary.js +0 -8
- package/dist/Interfaces/global.d.ts +0 -21
- package/dist/Interfaces/global.js +0 -1
- package/dist/Interfaces/meta.d.ts +0 -39
- package/dist/Interfaces/meta.js +0 -8
- package/dist/app/[lang]/stores/LangStore.d.ts +0 -22
- package/dist/app/[lang]/stores/LangStore.js +0 -125
- package/dist/components/icon/icon.d.ts +0 -119
- package/dist/components/icon/icon.js +0 -454
- package/dist/components/ui/Accordion.d.ts +0 -17
- package/dist/components/ui/Accordion.js +0 -41
- package/dist/components/ui/Button.d.ts +0 -12
- package/dist/components/ui/Button.js +0 -48
- package/dist/components/ui/CheckBox.d.ts +0 -7
- package/dist/components/ui/CheckBox.js +0 -4
- package/dist/components/ui/Input.d.ts +0 -11
- package/dist/components/ui/Input.js +0 -176
- package/dist/components/ui/Input.types.d.ts +0 -45
- package/dist/components/ui/Input.types.js +0 -1
- package/dist/components/ui/Modal.d.ts +0 -9
- package/dist/components/ui/Modal.js +0 -52
- package/dist/components/ui/RadioButton.d.ts +0 -9
- package/dist/components/ui/RadioButton.js +0 -4
- package/dist/components/ui/Table.d.ts +0 -10
- package/dist/components/ui/Table.js +0 -4
- package/dist/components/ui/Tabs.d.ts +0 -10
- package/dist/components/ui/Tabs.js +0 -9
- package/dist/configs/language.d.ts +0 -39
- package/dist/configs/language.js +0 -50
- package/dist/configs/metadata.d.ts +0 -69
- package/dist/configs/metadata.js +0 -143
- package/dist/dictionaries/en.json +0 -18
- package/dist/dictionaries/fa.json +0 -18
- package/dist/dictionaries/index.d.ts +0 -35
- package/dist/dictionaries/index.js +0 -10
- package/dist/hooks/useDevice.d.ts +0 -21
- package/dist/hooks/useDevice.js +0 -49
- package/dist/hooks/useTranslation.d.ts +0 -4
- package/dist/hooks/useTranslation.js +0 -34
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -12
- package/dist/libs/api/axiosClient.d.ts +0 -9
- package/dist/libs/api/axiosClient.js +0 -34
- package/dist/libs/api/cns.d.ts +0 -16
- package/dist/libs/api/cns.js +0 -29
- package/dist/libs/api/usePostFetch.d.ts +0 -23
- package/dist/libs/api/usePostFetch.js +0 -17
- package/dist/libs/cn.d.ts +0 -1
- package/dist/libs/cn.js +0 -12
- package/dist/libs/cookieUtils.d.ts +0 -10
- package/dist/libs/cookieUtils.js +0 -28
- package/dist/libs/detectComponentResponsive.d.ts +0 -10
- package/dist/libs/detectComponentResponsive.js +0 -24
- package/dist/libs/detectDeviceFromUA.d.ts +0 -8
- package/dist/libs/detectDeviceFromUA.js +0 -14
- package/dist/libs/fonts.d.ts +0 -10
- package/dist/libs/fonts.js +0 -94
- package/dist/libs/metadataHelper.d.ts +0 -17
- package/dist/libs/metadataHelper.js +0 -20
- package/dist/libs/modal/Modal.d.ts +0 -9
- package/dist/libs/modal/Modal.js +0 -41
- package/dist/libs/translation.d.ts +0 -5
- package/dist/libs/translation.js +0 -30
- package/dist/libs/utils.d.ts +0 -2
- package/dist/libs/utils.js +0 -6
- package/dist/locale/about/en.json +0 -3
- package/dist/locale/about/fa.json +0 -3
- package/dist/locale/coin/en.json +0 -4
- package/dist/locale/coin/fa.json +0 -4
- package/dist/locale/en.d.ts +0 -56
- package/dist/locale/en.js +0 -16
- package/dist/locale/fa.d.ts +0 -59
- package/dist/locale/fa.js +0 -16
- package/dist/locale/global/en.json +0 -12
- package/dist/locale/global/fa.json +0 -16
- package/dist/locale/home/en.json +0 -11
- package/dist/locale/home/fa.json +0 -11
- package/dist/locale/index.d.ts +0 -201
- package/dist/locale/index.js +0 -7
- package/dist/locale/meta/about/en.json +0 -10
- package/dist/locale/meta/about/fa.json +0 -5
- package/dist/locale/meta/en.json +0 -15
- package/dist/locale/meta/fa.json +0 -15
- package/dist/locale/meta/home/en.json +0 -10
- package/dist/locale/meta/home/fa.json +0 -5
- package/dist/middleware.d.ts +0 -14
- package/dist/middleware.js +0 -57
- package/dist/store/appStore.d.ts +0 -8
- package/dist/store/appStore.js +0 -16
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/utils/nextImageLoader.d.ts +0 -9
- package/dist/utils/nextImageLoader.js +0 -15
package/dist/locale/index.d.ts
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
declare const dictionaries: {
|
|
2
|
-
en: {
|
|
3
|
-
mood_day: string;
|
|
4
|
-
mood_week: string;
|
|
5
|
-
aimoonhub: string;
|
|
6
|
-
welcome_title: string;
|
|
7
|
-
financial_markets: string;
|
|
8
|
-
cryptocurrencies: string;
|
|
9
|
-
welcome_description: string;
|
|
10
|
-
login_dashboard: string;
|
|
11
|
-
go_to_news: string;
|
|
12
|
-
welcome_title_2: string;
|
|
13
|
-
welcome_description_2: string;
|
|
14
|
-
loaderPage: string;
|
|
15
|
-
loading: string;
|
|
16
|
-
header: string;
|
|
17
|
-
home: string;
|
|
18
|
-
about_us: string;
|
|
19
|
-
contact_us: string;
|
|
20
|
-
features: string;
|
|
21
|
-
prices: string;
|
|
22
|
-
support: string;
|
|
23
|
-
login_telegram: string;
|
|
24
|
-
meta: {
|
|
25
|
-
title: string;
|
|
26
|
-
description: string;
|
|
27
|
-
keywords: string[];
|
|
28
|
-
openGraph: {
|
|
29
|
-
title: string;
|
|
30
|
-
description: string;
|
|
31
|
-
image: string;
|
|
32
|
-
};
|
|
33
|
-
twitter: {
|
|
34
|
-
title: string;
|
|
35
|
-
description: string;
|
|
36
|
-
image: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
meta_home: {
|
|
40
|
-
title: string;
|
|
41
|
-
description: string;
|
|
42
|
-
keywords: string[];
|
|
43
|
-
};
|
|
44
|
-
meta_about: {
|
|
45
|
-
title: string;
|
|
46
|
-
description: string;
|
|
47
|
-
keywords: string[];
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
fa: {
|
|
51
|
-
mood_day: string;
|
|
52
|
-
mood_week: string;
|
|
53
|
-
aimoonhub: string;
|
|
54
|
-
welcome_title: string;
|
|
55
|
-
financial_markets: string;
|
|
56
|
-
cryptocurrencies: string;
|
|
57
|
-
welcome_description: string;
|
|
58
|
-
login_dashboard: string;
|
|
59
|
-
go_to_news: string;
|
|
60
|
-
welcome_title_2: string;
|
|
61
|
-
welcome_description_2: string;
|
|
62
|
-
loaderPage: string;
|
|
63
|
-
loading: string;
|
|
64
|
-
coin: string;
|
|
65
|
-
sentiment: string;
|
|
66
|
-
news: string;
|
|
67
|
-
header: string;
|
|
68
|
-
home: string;
|
|
69
|
-
about_us: string;
|
|
70
|
-
contact_us: string;
|
|
71
|
-
features: string;
|
|
72
|
-
prices: string;
|
|
73
|
-
support: string;
|
|
74
|
-
login_telegram: string;
|
|
75
|
-
meta: {
|
|
76
|
-
title: string;
|
|
77
|
-
description: string;
|
|
78
|
-
keywords: string[];
|
|
79
|
-
openGraph: {
|
|
80
|
-
title: string;
|
|
81
|
-
description: string;
|
|
82
|
-
image: string;
|
|
83
|
-
};
|
|
84
|
-
twitter: {
|
|
85
|
-
title: string;
|
|
86
|
-
description: string;
|
|
87
|
-
image: string;
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
meta_home: {
|
|
91
|
-
title: string;
|
|
92
|
-
description: string;
|
|
93
|
-
keywords: string[];
|
|
94
|
-
};
|
|
95
|
-
meta_about: {
|
|
96
|
-
title: string;
|
|
97
|
-
description: string;
|
|
98
|
-
keywords: string[];
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
export type Lang = keyof typeof dictionaries;
|
|
103
|
-
export declare const getDictionary: (lang?: Lang) => {
|
|
104
|
-
mood_day: string;
|
|
105
|
-
mood_week: string;
|
|
106
|
-
aimoonhub: string;
|
|
107
|
-
welcome_title: string;
|
|
108
|
-
financial_markets: string;
|
|
109
|
-
cryptocurrencies: string;
|
|
110
|
-
welcome_description: string;
|
|
111
|
-
login_dashboard: string;
|
|
112
|
-
go_to_news: string;
|
|
113
|
-
welcome_title_2: string;
|
|
114
|
-
welcome_description_2: string;
|
|
115
|
-
loaderPage: string;
|
|
116
|
-
loading: string;
|
|
117
|
-
header: string;
|
|
118
|
-
home: string;
|
|
119
|
-
about_us: string;
|
|
120
|
-
contact_us: string;
|
|
121
|
-
features: string;
|
|
122
|
-
prices: string;
|
|
123
|
-
support: string;
|
|
124
|
-
login_telegram: string;
|
|
125
|
-
meta: {
|
|
126
|
-
title: string;
|
|
127
|
-
description: string;
|
|
128
|
-
keywords: string[];
|
|
129
|
-
openGraph: {
|
|
130
|
-
title: string;
|
|
131
|
-
description: string;
|
|
132
|
-
image: string;
|
|
133
|
-
};
|
|
134
|
-
twitter: {
|
|
135
|
-
title: string;
|
|
136
|
-
description: string;
|
|
137
|
-
image: string;
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
meta_home: {
|
|
141
|
-
title: string;
|
|
142
|
-
description: string;
|
|
143
|
-
keywords: string[];
|
|
144
|
-
};
|
|
145
|
-
meta_about: {
|
|
146
|
-
title: string;
|
|
147
|
-
description: string;
|
|
148
|
-
keywords: string[];
|
|
149
|
-
};
|
|
150
|
-
} | {
|
|
151
|
-
mood_day: string;
|
|
152
|
-
mood_week: string;
|
|
153
|
-
aimoonhub: string;
|
|
154
|
-
welcome_title: string;
|
|
155
|
-
financial_markets: string;
|
|
156
|
-
cryptocurrencies: string;
|
|
157
|
-
welcome_description: string;
|
|
158
|
-
login_dashboard: string;
|
|
159
|
-
go_to_news: string;
|
|
160
|
-
welcome_title_2: string;
|
|
161
|
-
welcome_description_2: string;
|
|
162
|
-
loaderPage: string;
|
|
163
|
-
loading: string;
|
|
164
|
-
coin: string;
|
|
165
|
-
sentiment: string;
|
|
166
|
-
news: string;
|
|
167
|
-
header: string;
|
|
168
|
-
home: string;
|
|
169
|
-
about_us: string;
|
|
170
|
-
contact_us: string;
|
|
171
|
-
features: string;
|
|
172
|
-
prices: string;
|
|
173
|
-
support: string;
|
|
174
|
-
login_telegram: string;
|
|
175
|
-
meta: {
|
|
176
|
-
title: string;
|
|
177
|
-
description: string;
|
|
178
|
-
keywords: string[];
|
|
179
|
-
openGraph: {
|
|
180
|
-
title: string;
|
|
181
|
-
description: string;
|
|
182
|
-
image: string;
|
|
183
|
-
};
|
|
184
|
-
twitter: {
|
|
185
|
-
title: string;
|
|
186
|
-
description: string;
|
|
187
|
-
image: string;
|
|
188
|
-
};
|
|
189
|
-
};
|
|
190
|
-
meta_home: {
|
|
191
|
-
title: string;
|
|
192
|
-
description: string;
|
|
193
|
-
keywords: string[];
|
|
194
|
-
};
|
|
195
|
-
meta_about: {
|
|
196
|
-
title: string;
|
|
197
|
-
description: string;
|
|
198
|
-
keywords: string[];
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
export {};
|
package/dist/locale/index.js
DELETED
package/dist/locale/meta/en.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/locale/meta/fa.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/middleware.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/middleware.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/store/appStore.d.ts
DELETED
package/dist/store/appStore.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { create } from "zustand";
|
|
2
|
-
import { languages } from "../configs/language";
|
|
3
|
-
function getInitialLang() {
|
|
4
|
-
if (typeof window === "undefined")
|
|
5
|
-
return "en";
|
|
6
|
-
const firstSegment = window.location.pathname.split("/")[1];
|
|
7
|
-
return firstSegment && firstSegment in languages
|
|
8
|
-
? firstSegment
|
|
9
|
-
: "en";
|
|
10
|
-
}
|
|
11
|
-
const initialLang = getInitialLang();
|
|
12
|
-
export const useAppStore = create((set) => ({
|
|
13
|
-
lang: initialLang,
|
|
14
|
-
dir: languages[initialLang].dir,
|
|
15
|
-
setLang: (lang) => set({ lang, dir: languages[lang].dir }),
|
|
16
|
-
}));
|