@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,112 +0,0 @@
1
- 'use client';
2
- import React, { useState, useEffect, useCallback } from 'react';
3
- import { createPortal } from 'react-dom';
4
-
5
- export interface PostMedia {
6
- type: 'image' | 'video';
7
- url: string;
8
- }
9
-
10
- interface MediaLightboxProps {
11
- isOpen: boolean;
12
- onClose: () => void;
13
- media: PostMedia[];
14
- initialIndex?: number;
15
- }
16
-
17
- export function MediaLightbox({ isOpen, onClose, media, initialIndex = 0 }: MediaLightboxProps) {
18
- const [currentIndex, setCurrentIndex] = useState(initialIndex);
19
- const [mounted, setMounted] = useState(false);
20
-
21
- const handlePrev = useCallback((e?: React.MouseEvent | KeyboardEvent) => {
22
- e?.stopPropagation();
23
- setCurrentIndex(prev => (prev === 0 ? media.length - 1 : prev - 1));
24
- }, [media.length]);
25
-
26
- const handleNext = useCallback((e?: React.MouseEvent | KeyboardEvent) => {
27
- e?.stopPropagation();
28
- setCurrentIndex(prev => (prev === media.length - 1 ? 0 : prev + 1));
29
- }, [media.length]);
30
-
31
- useEffect(() => {
32
- setMounted(true);
33
- if (isOpen) {
34
- setCurrentIndex(initialIndex);
35
- document.body.style.overflow = 'hidden';
36
- }
37
-
38
- // Klavye Desteği
39
- const handleKeyDown = (e: KeyboardEvent) => {
40
- if (!isOpen) return;
41
- if (e.key === 'ArrowLeft') handlePrev(e);
42
- if (e.key === 'ArrowRight') handleNext(e);
43
- if (e.key === 'Escape') onClose();
44
- };
45
-
46
- window.addEventListener('keydown', handleKeyDown);
47
- return () => {
48
- document.body.style.overflow = '';
49
- window.removeEventListener('keydown', handleKeyDown);
50
- };
51
- }, [isOpen, initialIndex, handlePrev, handleNext, onClose]);
52
-
53
- if (!isOpen || !media || media.length === 0 || !mounted) return null;
54
-
55
- const currentMedia = media[currentIndex];
56
-
57
- const modalContent = (
58
- <div className="fixed inset-0 z-[9999] flex items-center justify-center animate-in fade-in duration-200">
59
- {/* Background Dar Overlay */}
60
- <div className="absolute inset-0 bg-[#0a0a0f]/95 backdrop-blur-md" onClick={onClose} />
61
-
62
- {/* Kapat Butonu */}
63
- <button onClick={onClose} className="absolute top-4 md:top-6 right-4 md:right-6 text-white/50 hover:text-white bg-white/10 hover:bg-white/20 p-2.5 md:p-3 rounded-full transition-all z-[10001] border border-white/10 active:scale-90">
64
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
65
- </button>
66
-
67
- {/* İndeks Sayacı */}
68
- {media.length > 1 && (
69
- <div className="absolute top-4 md:top-6 left-4 md:left-6 text-white bg-white/10 px-4 py-1.5 rounded-full font-black text-[10px] tracking-widest z-[10001] border border-white/10 backdrop-blur-md uppercase">
70
- {currentIndex + 1} / {media.length}
71
- </div>
72
- )}
73
-
74
- {/* Sol Gezinme Oku */}
75
- {media.length > 1 && (
76
- <button onClick={(e) => handlePrev(e)} className="absolute left-4 md:left-8 top-1/2 -translate-y-1/2 text-white/40 hover:text-white bg-white/5 hover:bg-white/10 p-4 md:p-5 rounded-full transition-all z-[10001] border border-transparent hover:border-white/10 backdrop-blur-md group active:scale-90">
77
- <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round" className="group-hover:-translate-x-0.5 transition-transform"><polyline points="15 18 9 12 15 6"></polyline></svg>
78
- </button>
79
- )}
80
-
81
- {/* Sağ Gezinme Oku */}
82
- {media.length > 1 && (
83
- <button onClick={(e) => handleNext(e)} className="absolute right-4 md:right-8 top-1/2 -translate-y-1/2 text-white/40 hover:text-white bg-white/5 hover:bg-white/10 p-4 md:p-5 rounded-full transition-all z-[10001] border border-transparent hover:border-white/10 backdrop-blur-md group active:scale-90">
84
- <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round" className="group-hover:translate-x-0.5 transition-transform"><polyline points="9 18 15 12 9 6"></polyline></svg>
85
- </button>
86
- )}
87
-
88
- {/* Medya Render Motoru */}
89
- <div className="relative w-full h-full max-w-7xl max-h-[92vh] flex items-center justify-center p-4 md:p-12 z-[10000]" onClick={onClose}>
90
- {currentMedia.type === 'video' ? (
91
- // eslint-disable-next-line jsx-a11y/media-has-caption
92
- <video
93
- src={currentMedia.url}
94
- controls
95
- autoPlay
96
- className="max-w-full max-h-full rounded-2xl shadow-[0_0_80px_rgba(0,0,0,0.8)] object-contain animate-in zoom-in-95 duration-500 ring-1 ring-white/10"
97
- onClick={(e) => e.stopPropagation()}
98
- />
99
- ) : (
100
- <img
101
- src={currentMedia.url}
102
- alt="Galeri Medyası"
103
- className="max-w-full max-h-full rounded-2xl shadow-[0_0_80px_rgba(0,0,0,0.8)] object-contain animate-in zoom-in-95 duration-500 ring-1 ring-white/10"
104
- onClick={(e) => e.stopPropagation()}
105
- />
106
- )}
107
- </div>
108
- </div>
109
- );
110
-
111
- return createPortal(modalContent, document.body);
112
- }