@armoyu/ui 1.0.1 → 1.0.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.
Files changed (140) hide show
  1. package/dist/app/api/proxy/[...path]/route.d.ts +22 -0
  2. package/dist/app/api/proxy/[...path]/route.d.ts.map +1 -0
  3. package/dist/app/api/proxy/[...path]/route.js +89 -0
  4. package/dist/app/api/proxy/[...path]/route.js.map +1 -0
  5. package/dist/app/layout.d.ts.map +1 -1
  6. package/dist/app/layout.js +2 -5
  7. package/dist/app/layout.js.map +1 -1
  8. package/dist/components/RollingNumber.d.ts +6 -6
  9. package/dist/components/RollingNumber.js +23 -23
  10. package/dist/components/RollingNumber.js.map +1 -1
  11. package/dist/components/StatsGrid.d.ts +5 -5
  12. package/dist/components/modules/auth/Dashboard.d.ts +1 -1
  13. package/dist/components/modules/auth/PostCard.d.ts +24 -24
  14. package/dist/components/modules/auth/PostInteractionsModal.d.ts +11 -11
  15. package/dist/components/modules/auth/RepostModal.d.ts +21 -21
  16. package/dist/components/modules/auth/SidebarLeft.d.ts +1 -1
  17. package/dist/components/modules/auth/Stories.d.ts +1 -1
  18. package/dist/components/modules/auth/StoryViewer.d.ts +9 -9
  19. package/dist/components/modules/chat/ChatContainer.d.ts +1 -1
  20. package/dist/components/modules/chat/ChatInput.d.ts +4 -4
  21. package/dist/components/modules/chat/ChatList.d.ts +6 -6
  22. package/dist/components/modules/chat/ChatNotes.d.ts +1 -1
  23. package/dist/components/modules/community/GroupHeader.d.ts +10 -10
  24. package/dist/components/modules/community/GroupMenu.d.ts +9 -9
  25. package/dist/components/modules/community/SchoolCard.d.ts +6 -6
  26. package/dist/components/modules/community/SurveyCard.d.ts +6 -6
  27. package/dist/components/modules/guest/Introduction.d.ts +1 -1
  28. package/dist/components/modules/magaza/BackToStore.d.ts +1 -1
  29. package/dist/components/modules/magaza/StoreHeader.d.ts +5 -5
  30. package/dist/components/modules/news/NewsCard.d.ts +11 -11
  31. package/dist/components/modules/news/NewsComments.d.ts +1 -1
  32. package/dist/components/modules/profile/ProfileContent.d.ts +4 -4
  33. package/dist/components/modules/profile/ProfileHeader.d.ts +7 -7
  34. package/dist/components/modules/profile/ProfileStats.d.ts +1 -1
  35. package/dist/components/modules/profile/ProfileStats.js +14 -14
  36. package/dist/components/modules/profile/ProfileStats.js.map +1 -1
  37. package/dist/components/modules/profile/TeamSelectorModal.d.ts +10 -10
  38. package/dist/components/modules/stations/StationCard.d.ts +2 -2
  39. package/dist/components/modules/stations/StationQRModal.d.ts +9 -9
  40. package/dist/components/shared/FloatingChatButton.d.ts +4 -4
  41. package/dist/components/shared/Header.d.ts +1 -1
  42. package/dist/components/shared/LoginModal.d.ts +4 -4
  43. package/dist/components/shared/LoginModal.d.ts.map +1 -1
  44. package/dist/components/shared/LoginModal.js +65 -69
  45. package/dist/components/shared/LoginModal.js.map +1 -1
  46. package/dist/components/shared/MainLayoutWrapper.d.ts +3 -3
  47. package/dist/components/showcase/SocialTab.d.ts.map +1 -1
  48. package/dist/components/showcase/SocialTab.js +47 -2
  49. package/dist/components/showcase/SocialTab.js.map +1 -1
  50. package/dist/context/AuthContext.d.ts +18 -18
  51. package/dist/context/AuthContext.d.ts.map +1 -1
  52. package/dist/context/AuthContext.js +93 -74
  53. package/dist/context/AuthContext.js.map +1 -1
  54. package/dist/context/CartContext.d.ts +16 -16
  55. package/dist/context/SocketContext.d.ts +12 -12
  56. package/dist/index.d.ts +65 -65
  57. package/dist/lib/constants/educationData.d.ts +7 -7
  58. package/dist/lib/constants/seedData.d.ts +164 -164
  59. package/dist/lib/constants/stationData.d.ts +13 -13
  60. package/dist/lib/constants/surveyData.d.ts +2 -2
  61. package/dist/lib/constants/teamData.d.ts +12 -12
  62. package/package.json +13 -11
  63. package/next.config.ts +0 -13
  64. package/postcss.config.js +0 -6
  65. package/src/app/layout.tsx +0 -67
  66. package/src/app/page.tsx +0 -101
  67. package/src/components/Button.tsx +0 -41
  68. package/src/components/GenderStatsBar.tsx +0 -66
  69. package/src/components/RollingNumber.tsx +0 -50
  70. package/src/components/Slider.tsx +0 -114
  71. package/src/components/StatsGrid.tsx +0 -35
  72. package/src/components/ViewModeToggle.tsx +0 -39
  73. package/src/components/modules/auth/Dashboard.tsx +0 -649
  74. package/src/components/modules/auth/MediaLightbox.tsx +0 -112
  75. package/src/components/modules/auth/PostCard.tsx +0 -556
  76. package/src/components/modules/auth/PostInteractionsModal.tsx +0 -138
  77. package/src/components/modules/auth/RepostModal.tsx +0 -167
  78. package/src/components/modules/auth/SidebarLeft.tsx +0 -237
  79. package/src/components/modules/auth/Stories.tsx +0 -69
  80. package/src/components/modules/auth/StoryViewer.tsx +0 -146
  81. package/src/components/modules/chat/ChatContainer.tsx +0 -332
  82. package/src/components/modules/chat/ChatInput.tsx +0 -57
  83. package/src/components/modules/chat/ChatList.tsx +0 -179
  84. package/src/components/modules/chat/ChatMessage.tsx +0 -43
  85. package/src/components/modules/chat/ChatNotes.tsx +0 -58
  86. package/src/components/modules/community/GroupHeader.tsx +0 -111
  87. package/src/components/modules/community/GroupMenu.tsx +0 -82
  88. package/src/components/modules/community/SchoolCard.tsx +0 -104
  89. package/src/components/modules/community/SurveyCard.tsx +0 -149
  90. package/src/components/modules/forum/ForumBoard.tsx +0 -78
  91. package/src/components/modules/forum/ForumPost.tsx +0 -71
  92. package/src/components/modules/forum/NewTopicModal.tsx +0 -112
  93. package/src/components/modules/forum/TopicItem.tsx +0 -72
  94. package/src/components/modules/galleries/GalleryCard.tsx +0 -66
  95. package/src/components/modules/giveaways/GiveawayCard.tsx +0 -76
  96. package/src/components/modules/groups/ApplicationModal.tsx +0 -133
  97. package/src/components/modules/groups/GroupCard.tsx +0 -96
  98. package/src/components/modules/guest/Introduction.tsx +0 -60
  99. package/src/components/modules/magaza/BackToStore.tsx +0 -53
  100. package/src/components/modules/magaza/StoreHeader.tsx +0 -74
  101. package/src/components/modules/news/NewsCard.tsx +0 -66
  102. package/src/components/modules/news/NewsComments.tsx +0 -141
  103. package/src/components/modules/profile/CloudStorageModal.tsx +0 -200
  104. package/src/components/modules/profile/EditProfileModal.tsx +0 -191
  105. package/src/components/modules/profile/ProfileContent.tsx +0 -491
  106. package/src/components/modules/profile/ProfileHeader.tsx +0 -128
  107. package/src/components/modules/profile/ProfileStats.tsx +0 -72
  108. package/src/components/modules/profile/TeamSelectorModal.tsx +0 -129
  109. package/src/components/modules/stations/StationCard.tsx +0 -95
  110. package/src/components/modules/stations/StationQRModal.tsx +0 -102
  111. package/src/components/shared/FloatingChatButton.tsx +0 -57
  112. package/src/components/shared/Footer.tsx +0 -77
  113. package/src/components/shared/Header.tsx +0 -799
  114. package/src/components/shared/LoginModal.tsx +0 -208
  115. package/src/components/shared/MainLayoutWrapper.tsx +0 -15
  116. package/src/components/shared/PageWidth.tsx +0 -22
  117. package/src/components/showcase/CommunityTab.tsx +0 -22
  118. package/src/components/showcase/CorporateTab.tsx +0 -38
  119. package/src/components/showcase/GeneralTab.tsx +0 -41
  120. package/src/components/showcase/MessagesTab.tsx +0 -26
  121. package/src/components/showcase/ProfileTab.tsx +0 -20
  122. package/src/components/showcase/ShopTab.tsx +0 -24
  123. package/src/components/showcase/SocialTab.tsx +0 -28
  124. package/src/context/AuthContext.tsx +0 -104
  125. package/src/context/CartContext.tsx +0 -93
  126. package/src/context/ChatContext.tsx +0 -32
  127. package/src/context/LayoutContext.tsx +0 -29
  128. package/src/context/SocketContext.tsx +0 -50
  129. package/src/context/ThemeContext.tsx +0 -52
  130. package/src/index.ts +0 -96
  131. package/src/lib/constants/educationData.ts +0 -124
  132. package/src/lib/constants/punishmentData.ts +0 -201
  133. package/src/lib/constants/seedData.ts +0 -758
  134. package/src/lib/constants/stationData.ts +0 -170
  135. package/src/lib/constants/surveyData.ts +0 -53
  136. package/src/lib/constants/teamData.ts +0 -69
  137. package/src/lib/utils/numberFormat.ts +0 -16
  138. package/src/lib/utils/odpUtils.ts +0 -51
  139. package/src/types/index.ts +0 -1
  140. package/src/types/stats.ts +0 -17
@@ -1,75 +1,94 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { createContext, useContext, useState, useEffect } from 'react';
4
- import { Session } from '@armoyu/core';
5
- import { userList, MOCK_SESSION } from '../lib/constants/seedData';
6
- const AuthContext = createContext(undefined);
7
- export function AuthProvider({ children }) {
8
- const [user, setUser] = useState(null);
9
- const [session, setSession] = useState(null);
10
- const [isLoading, setIsLoading] = useState(true);
11
- const [isLoginModalOpen, setIsLoginModalOpen] = useState(false);
12
- useEffect(() => {
13
- // Check local storage for persistent login
14
- const savedUserStr = localStorage.getItem('armoyu_user');
15
- if (savedUserStr) {
16
- try {
17
- const savedData = JSON.parse(savedUserStr);
18
- const username = savedData.username;
19
- // Find user in seedData to maintain all object references
20
- const foundUser = userList.find((u) => u.username === username);
21
- if (foundUser) {
22
- setUser(foundUser);
23
- // If it's Berkay, use the mock session with notifications
24
- if (username === 'berkaytikenoglu') {
25
- setSession(MOCK_SESSION);
26
- }
27
- else {
28
- setSession(new Session({ user: foundUser, token: 'mock-token' }));
29
- }
30
- }
31
- }
32
- catch (e) {
33
- console.error('Failed to restore session', e);
34
- localStorage.removeItem('armoyu_user');
35
- }
36
- }
37
- // Explicitly set loading to false AFTER the check
38
- setIsLoading(false);
39
- }, []);
40
- const login = (userData) => {
41
- setUser(userData);
42
- // Handle session initialization
43
- if (userData.username === 'berkaytikenoglu') {
44
- setSession(MOCK_SESSION);
45
- }
46
- else {
47
- setSession(new Session({ user: userData, token: 'mock-token' }));
48
- }
49
- localStorage.setItem('armoyu_user', JSON.stringify({ username: userData.username }));
50
- setIsLoginModalOpen(false); // Close modal on success
51
- };
52
- const logout = () => {
53
- setUser(null);
54
- setSession(null);
55
- localStorage.removeItem('armoyu_user');
56
- };
57
- const updateUser = (updatedUser) => {
58
- setUser(updatedUser);
59
- if (session) {
60
- setSession(new Session({ ...session, user: updatedUser }));
61
- }
62
- };
63
- const updateSession = (updatedSession) => {
64
- setSession(updatedSession);
65
- };
66
- return (_jsx(AuthContext.Provider, { value: { user, session, login, logout, isLoading, isLoginModalOpen, setIsLoginModalOpen, updateUser, updateSession }, children: children }));
67
- }
68
- export function useAuth() {
69
- const context = useContext(AuthContext);
70
- if (context === undefined) {
71
- throw new Error('useAuth must be used within an AuthProvider');
72
- }
73
- return context;
74
- }
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { createContext, useContext, useState, useEffect } from 'react';
4
+ import { Session, armoyu } from '@armoyu/core';
5
+ const AuthContext = createContext(undefined);
6
+ export function AuthProvider({ children }) {
7
+ const [user, setUser] = useState(null);
8
+ const [session, setSession] = useState(null);
9
+ const [isLoading, setIsLoading] = useState(true);
10
+ const [isLoginModalOpen, setIsLoginModalOpen] = useState(false);
11
+ useEffect(() => {
12
+ async function restoreSession() {
13
+ // Check local storage for persistent token
14
+ const token = localStorage.getItem('armoyu_token');
15
+ if (token) {
16
+ try {
17
+ // Set token in core API client
18
+ armoyu.setToken(token);
19
+ // Request current user profile from real API
20
+ const me = await armoyu.auth.me();
21
+ if (me) {
22
+ setUser(me);
23
+ setSession(new Session({ user: me, token }));
24
+ console.log('[AuthContext] Session restored for:', me.username);
25
+ }
26
+ else {
27
+ // Token might be expired or invalid
28
+ localStorage.removeItem('armoyu_token');
29
+ armoyu.setToken(null);
30
+ }
31
+ }
32
+ catch (e) {
33
+ console.error('[AuthContext] Failed to restore session:', e);
34
+ localStorage.removeItem('armoyu_token');
35
+ armoyu.setToken(null);
36
+ }
37
+ }
38
+ setIsLoading(false);
39
+ }
40
+ restoreSession();
41
+ }, []);
42
+ const login = async (username, password) => {
43
+ try {
44
+ // Real API login via core library
45
+ const { user: loggedInUser, session: newSession } = await armoyu.auth.login(username, password);
46
+ setUser(loggedInUser);
47
+ setSession(newSession);
48
+ // Token is automatically stored in localStorage by armoyu.auth.login()
49
+ // but we ensure it matches our expectations
50
+ console.log('[AuthContext] Login successful for:', loggedInUser.username);
51
+ setIsLoginModalOpen(false);
52
+ }
53
+ catch (error) {
54
+ console.error('[AuthContext] Login failed:', error);
55
+ throw error; // Let the component handle the error UI
56
+ }
57
+ };
58
+ const logout = () => {
59
+ armoyu.auth.logout(); // Clears internal state and localStorage
60
+ setUser(null);
61
+ setSession(null);
62
+ };
63
+ const updateUser = (updatedUser) => {
64
+ setUser(updatedUser);
65
+ if (session) {
66
+ setSession(new Session({ ...session, user: updatedUser }));
67
+ }
68
+ };
69
+ const updateSession = (updatedSession) => {
70
+ setSession(updatedSession);
71
+ if (updatedSession.token) {
72
+ armoyu.setToken(updatedSession.token);
73
+ }
74
+ };
75
+ return (_jsx(AuthContext.Provider, { value: {
76
+ user,
77
+ session,
78
+ login,
79
+ logout,
80
+ isLoading,
81
+ isLoginModalOpen,
82
+ setIsLoginModalOpen,
83
+ updateUser,
84
+ updateSession
85
+ }, children: children }));
86
+ }
87
+ export function useAuth() {
88
+ const context = useContext(AuthContext);
89
+ if (context === undefined) {
90
+ throw new Error('useAuth must be used within an AuthProvider');
91
+ }
92
+ return context;
93
+ }
75
94
  //# sourceMappingURL=AuthContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuthContext.js","sourceRoot":"","sources":["../../src/context/AuthContext.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAQ,OAAO,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAcnE,MAAM,WAAW,GAAG,aAAa,CAA8B,SAAS,CAAC,CAAC;AAE1E,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAiC;IACtE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAc,IAAI,CAAC,CAAC;IACpD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CA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ACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,17 +1,17 @@
1
- import React from 'react';
2
- import { Product, CartItem } from '@armoyu/core';
3
- interface CartContextType {
4
- cart: CartItem[];
5
- addToCart: (product: Product, quantity?: number) => void;
6
- removeFromCart: (productId: string) => void;
7
- updateQuantity: (productId: string, quantity: number) => void;
8
- clearCart: () => void;
9
- totalItems: number;
10
- totalPrice: number;
11
- }
12
- export declare function CartProvider({ children }: {
13
- children: React.ReactNode;
14
- }): import("react/jsx-runtime").JSX.Element;
15
- export declare function useCart(): CartContextType;
16
- export {};
1
+ import React from 'react';
2
+ import { Product, CartItem } from '@armoyu/core';
3
+ interface CartContextType {
4
+ cart: CartItem[];
5
+ addToCart: (product: Product, quantity?: number) => void;
6
+ removeFromCart: (productId: string) => void;
7
+ updateQuantity: (productId: string, quantity: number) => void;
8
+ clearCart: () => void;
9
+ totalItems: number;
10
+ totalPrice: number;
11
+ }
12
+ export declare function CartProvider({ children }: {
13
+ children: React.ReactNode;
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ export declare function useCart(): CartContextType;
16
+ export {};
17
17
  //# sourceMappingURL=CartContext.d.ts.map
@@ -1,13 +1,13 @@
1
- import React from 'react';
2
- import { SocketEvent } from '@armoyu/core';
3
- interface SocketContextType {
4
- isConnected: boolean;
5
- emit: (event: SocketEvent, data: any) => void;
6
- on: (event: SocketEvent, callback: (data: any) => void) => () => void;
7
- }
8
- export declare function SocketProvider({ children }: {
9
- children: React.ReactNode;
10
- }): import("react/jsx-runtime").JSX.Element;
11
- export declare function useSocket(): SocketContextType;
12
- export {};
1
+ import React from 'react';
2
+ import { SocketEvent } from '@armoyu/core';
3
+ interface SocketContextType {
4
+ isConnected: boolean;
5
+ emit: (event: SocketEvent, data: any) => void;
6
+ on: (event: SocketEvent, callback: (data: any) => void) => () => void;
7
+ }
8
+ export declare function SocketProvider({ children }: {
9
+ children: React.ReactNode;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ export declare function useSocket(): SocketContextType;
12
+ export {};
13
13
  //# sourceMappingURL=SocketContext.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,66 +1,66 @@
1
- export * from './components/Button';
2
- export * from './components/Slider';
3
- export * from './components/RollingNumber';
4
- export * from './components/ViewModeToggle';
5
- export * from './components/GenderStatsBar';
6
- export * from './components/StatsGrid';
7
- export * from './context/AuthContext';
8
- export * from './context/CartContext';
9
- export * from './context/ChatContext';
10
- export * from './context/LayoutContext';
11
- export * from './context/SocketContext';
12
- export * from './context/ThemeContext';
13
- export * from './types';
14
- export * from './lib/constants/seedData';
15
- export * from './lib/constants/educationData';
16
- export * from './lib/constants/punishmentData';
17
- export * from './lib/constants/stationData';
18
- export * from './lib/constants/surveyData';
19
- export * from './lib/constants/teamData';
20
- export * from './lib/utils/odpUtils';
21
- export { Header } from './components/shared/Header';
22
- export { Footer } from './components/shared/Footer';
23
- export { LoginModal } from './components/shared/LoginModal';
24
- export { FloatingChatButton } from './components/shared/FloatingChatButton';
25
- export { MainLayoutWrapper } from './components/shared/MainLayoutWrapper';
26
- export { PageWidth } from './components/shared/PageWidth';
27
- export { Dashboard as AuthDashboard } from './components/modules/auth/Dashboard';
28
- export { Dashboard } from './components/modules/auth/Dashboard';
29
- export { PostCard } from './components/modules/auth/PostCard';
30
- export { PostInteractionsModal } from './components/modules/auth/PostInteractionsModal';
31
- export { RepostModal } from './components/modules/auth/RepostModal';
32
- export { SidebarLeft as AuthSidebarLeft } from './components/modules/auth/SidebarLeft';
33
- export { Stories } from './components/modules/auth/Stories';
34
- export { StoryViewer } from './components/modules/auth/StoryViewer';
35
- export { MediaLightbox, type PostMedia } from './components/modules/auth/MediaLightbox';
36
- export { ChatContainer } from './components/modules/chat/ChatContainer';
37
- export { ChatInput } from './components/modules/chat/ChatInput';
38
- export { ChatList } from './components/modules/chat/ChatList';
39
- export { ChatMessage } from './components/modules/chat/ChatMessage';
40
- export { ChatNotes } from './components/modules/chat/ChatNotes';
41
- export { GroupHeader } from './components/modules/community/GroupHeader';
42
- export { GroupMenu } from './components/modules/community/GroupMenu';
43
- export { SchoolCard } from './components/modules/community/SchoolCard';
44
- export { SurveyCard } from './components/modules/community/SurveyCard';
45
- export { ForumBoard } from './components/modules/forum/ForumBoard';
46
- export { ForumPost } from './components/modules/forum/ForumPost';
47
- export { NewTopicModal } from './components/modules/forum/NewTopicModal';
48
- export { TopicItem } from './components/modules/forum/TopicItem';
49
- export { GalleryCard } from './components/modules/galleries/GalleryCard';
50
- export { GiveawayCard } from './components/modules/giveaways/GiveawayCard';
51
- export { GroupCard } from './components/modules/groups/GroupCard';
52
- export { ApplicationModal as GroupApplicationModal } from './components/modules/groups/ApplicationModal';
53
- export { Introduction } from './components/modules/guest/Introduction';
54
- export { BackToStore } from './components/modules/magaza/BackToStore';
55
- export { StoreHeader } from './components/modules/magaza/StoreHeader';
56
- export { NewsCard } from './components/modules/news/NewsCard';
57
- export { NewsComments } from './components/modules/news/NewsComments';
58
- export { ProfileHeader } from './components/modules/profile/ProfileHeader';
59
- export { ProfileStats } from './components/modules/profile/ProfileStats';
60
- export { ProfileContent } from './components/modules/profile/ProfileContent';
61
- export { EditProfileModal } from './components/modules/profile/EditProfileModal';
62
- export { TeamSelectorModal } from './components/modules/profile/TeamSelectorModal';
63
- export { CloudStorageModal } from './components/modules/profile/CloudStorageModal';
64
- export { StationCard } from './components/modules/stations/StationCard';
65
- export { StationQRModal } from './components/modules/stations/StationQRModal';
1
+ export * from './components/Button';
2
+ export * from './components/Slider';
3
+ export * from './components/RollingNumber';
4
+ export * from './components/ViewModeToggle';
5
+ export * from './components/GenderStatsBar';
6
+ export * from './components/StatsGrid';
7
+ export * from './context/AuthContext';
8
+ export * from './context/CartContext';
9
+ export * from './context/ChatContext';
10
+ export * from './context/LayoutContext';
11
+ export * from './context/SocketContext';
12
+ export * from './context/ThemeContext';
13
+ export * from './types';
14
+ export * from './lib/constants/seedData';
15
+ export * from './lib/constants/educationData';
16
+ export * from './lib/constants/punishmentData';
17
+ export * from './lib/constants/stationData';
18
+ export * from './lib/constants/surveyData';
19
+ export * from './lib/constants/teamData';
20
+ export * from './lib/utils/odpUtils';
21
+ export { Header } from './components/shared/Header';
22
+ export { Footer } from './components/shared/Footer';
23
+ export { LoginModal } from './components/shared/LoginModal';
24
+ export { FloatingChatButton } from './components/shared/FloatingChatButton';
25
+ export { MainLayoutWrapper } from './components/shared/MainLayoutWrapper';
26
+ export { PageWidth } from './components/shared/PageWidth';
27
+ export { Dashboard as AuthDashboard } from './components/modules/auth/Dashboard';
28
+ export { Dashboard } from './components/modules/auth/Dashboard';
29
+ export { PostCard } from './components/modules/auth/PostCard';
30
+ export { PostInteractionsModal } from './components/modules/auth/PostInteractionsModal';
31
+ export { RepostModal } from './components/modules/auth/RepostModal';
32
+ export { SidebarLeft as AuthSidebarLeft } from './components/modules/auth/SidebarLeft';
33
+ export { Stories } from './components/modules/auth/Stories';
34
+ export { StoryViewer } from './components/modules/auth/StoryViewer';
35
+ export { MediaLightbox, type PostMedia } from './components/modules/auth/MediaLightbox';
36
+ export { ChatContainer } from './components/modules/chat/ChatContainer';
37
+ export { ChatInput } from './components/modules/chat/ChatInput';
38
+ export { ChatList } from './components/modules/chat/ChatList';
39
+ export { ChatMessage } from './components/modules/chat/ChatMessage';
40
+ export { ChatNotes } from './components/modules/chat/ChatNotes';
41
+ export { GroupHeader } from './components/modules/community/GroupHeader';
42
+ export { GroupMenu } from './components/modules/community/GroupMenu';
43
+ export { SchoolCard } from './components/modules/community/SchoolCard';
44
+ export { SurveyCard } from './components/modules/community/SurveyCard';
45
+ export { ForumBoard } from './components/modules/forum/ForumBoard';
46
+ export { ForumPost } from './components/modules/forum/ForumPost';
47
+ export { NewTopicModal } from './components/modules/forum/NewTopicModal';
48
+ export { TopicItem } from './components/modules/forum/TopicItem';
49
+ export { GalleryCard } from './components/modules/galleries/GalleryCard';
50
+ export { GiveawayCard } from './components/modules/giveaways/GiveawayCard';
51
+ export { GroupCard } from './components/modules/groups/GroupCard';
52
+ export { ApplicationModal as GroupApplicationModal } from './components/modules/groups/ApplicationModal';
53
+ export { Introduction } from './components/modules/guest/Introduction';
54
+ export { BackToStore } from './components/modules/magaza/BackToStore';
55
+ export { StoreHeader } from './components/modules/magaza/StoreHeader';
56
+ export { NewsCard } from './components/modules/news/NewsCard';
57
+ export { NewsComments } from './components/modules/news/NewsComments';
58
+ export { ProfileHeader } from './components/modules/profile/ProfileHeader';
59
+ export { ProfileStats } from './components/modules/profile/ProfileStats';
60
+ export { ProfileContent } from './components/modules/profile/ProfileContent';
61
+ export { EditProfileModal } from './components/modules/profile/EditProfileModal';
62
+ export { TeamSelectorModal } from './components/modules/profile/TeamSelectorModal';
63
+ export { CloudStorageModal } from './components/modules/profile/CloudStorageModal';
64
+ export { StationCard } from './components/modules/stations/StationCard';
65
+ export { StationQRModal } from './components/modules/stations/StationQRModal';
66
66
  //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,8 @@
1
- import { School, Faculty, Classroom, SchoolTeam } from '@armoyu/core';
2
- export declare const MOCK_EDUCATION_DATA: (userList: any[]) => {
3
- schools: School[];
4
- faculties: Faculty[];
5
- teams: SchoolTeam[];
6
- classrooms: Classroom[];
7
- };
1
+ import { School, Faculty, Classroom, SchoolTeam } from '@armoyu/core';
2
+ export declare const MOCK_EDUCATION_DATA: (userList: any[]) => {
3
+ schools: School[];
4
+ faculties: Faculty[];
5
+ teams: SchoolTeam[];
6
+ classrooms: Classroom[];
7
+ };
8
8
  //# sourceMappingURL=educationData.d.ts.map