@vezham/react 26.1.0 → 26.3.1

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/index.css +2 -0
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +2 -1
  5. package/dist/lib/components/command/command-dialog.js +1 -1
  6. package/dist/lib/components/command/command-provider.js +1 -1
  7. package/dist/lib/components/command/index.d.ts +0 -1
  8. package/dist/lib/components/command/index.d.ts.map +1 -1
  9. package/dist/lib/components/panel/footer/control-center/control-center.js +1 -1
  10. package/dist/lib/components/panel/footer/control-center/editor.d.ts.map +1 -1
  11. package/dist/lib/components/panel/footer/control-center/editor.js +19 -24
  12. package/dist/lib/components/panel/footer/control-center/theme.d.ts.map +1 -1
  13. package/dist/lib/components/panel/footer/control-center/theme.js +2 -15
  14. package/dist/lib/components/panel/footer/control-center/variant.d.ts +3 -3
  15. package/dist/lib/components/panel/footer/control-center/variant.js +1 -1
  16. package/dist/lib/components/panel/footer/data.d.ts +1 -1
  17. package/dist/lib/components/panel/footer/data.js +1 -1
  18. package/dist/lib/components/panel/footer/index.d.ts +1 -1
  19. package/dist/lib/components/panel/footer/index.d.ts.map +1 -1
  20. package/dist/lib/components/panel/footer/index.js +10 -8
  21. package/dist/lib/components/panel/footer/notification-center/index.js +1 -1
  22. package/dist/lib/components/panel/footer/tamizhi/index.d.ts +3 -0
  23. package/dist/lib/components/panel/footer/tamizhi/index.d.ts.map +1 -0
  24. package/dist/lib/components/panel/footer/tamizhi/index.js +20 -0
  25. package/dist/lib/components/panel/footer/types.d.ts +1 -3
  26. package/dist/lib/components/panel/footer/types.d.ts.map +1 -1
  27. package/dist/lib/components/panel/footer/user-menu.d.ts +2 -2
  28. package/dist/lib/components/panel/footer/user-menu.d.ts.map +1 -1
  29. package/dist/lib/components/panel/footer/user-menu.js +127 -59
  30. package/dist/lib/components/panel/header/bookmarks/favorites/variant.js +2 -2
  31. package/dist/lib/components/panel/header/bookmarks/folder-modal/index.js +6 -6
  32. package/dist/lib/components/panel/header/bookmarks/index.js +1 -1
  33. package/dist/lib/components/panel/header/bookmarks/quick-access/index.js +9 -9
  34. package/dist/lib/components/panel/header/bookmarks/variant.js +22 -22
  35. package/dist/lib/components/panel/header/index.js +3 -3
  36. package/dist/lib/components/panel/info-panel/provider.d.ts.map +1 -1
  37. package/dist/lib/components/panel/info-panel/provider.js +20 -34
  38. package/dist/lib/components/panel/info-panel/types.d.ts +1 -1
  39. package/dist/lib/components/panel/info-panel/types.d.ts.map +1 -1
  40. package/dist/lib/components/panel/menu/index.js +4 -4
  41. package/dist/lib/components/panel/menu/variant.js +4 -4
  42. package/dist/lib/components/workspace-navigation/index.d.ts.map +1 -1
  43. package/dist/lib/components/workspace-navigation/index.js +1 -1
  44. package/dist/lib/layouts/app/index.d.ts +6 -3
  45. package/dist/lib/layouts/app/index.d.ts.map +1 -1
  46. package/dist/lib/layouts/app/index.js +36 -6
  47. package/dist/lib/layouts/menu-layout/home-navigation-bubble.js +3 -3
  48. package/dist/lib/layouts/menu-layout/index-md.d.ts.map +1 -1
  49. package/dist/lib/layouts/menu-layout/index-md.js +13 -27
  50. package/dist/lib/layouts/menu-layout/index-sm.d.ts.map +1 -1
  51. package/dist/lib/layouts/menu-layout/index-sm.js +7 -19
  52. package/dist/lib/layouts/section/toolbar.js +1 -1
  53. package/dist/lib/pages/settings/settings-content.d.ts.map +1 -1
  54. package/dist/lib/pages/settings/settings-content.js +14 -26
  55. package/dist/lib/workspace/action-dialog.d.ts +9 -0
  56. package/dist/lib/workspace/action-dialog.d.ts.map +1 -0
  57. package/dist/lib/workspace/action-dialog.js +86 -0
  58. package/dist/lib/workspace/actions-menu.d.ts +8 -0
  59. package/dist/lib/workspace/actions-menu.d.ts.map +1 -0
  60. package/dist/lib/workspace/actions-menu.js +47 -0
  61. package/dist/lib/workspace/create-dialog.d.ts +5 -0
  62. package/dist/lib/workspace/create-dialog.d.ts.map +1 -0
  63. package/dist/lib/workspace/create-dialog.js +108 -0
  64. package/dist/lib/workspace/index.d.ts +34 -0
  65. package/dist/lib/workspace/index.d.ts.map +1 -0
  66. package/dist/lib/workspace/index.js +128 -0
  67. package/dist/lib/workspace/menu.d.ts +18 -0
  68. package/dist/lib/workspace/menu.d.ts.map +1 -0
  69. package/dist/lib/workspace/menu.js +148 -0
  70. package/dist/lib/workspace/model.d.ts +17 -0
  71. package/dist/lib/workspace/model.d.ts.map +1 -0
  72. package/dist/lib/workspace/model.js +35 -0
  73. package/package.json +3 -2
  74. package/dist/lib/components/command/index.js +0 -3
  75. package/dist/lib/components/panel/footer/ai/chat-header.d.ts +0 -9
  76. package/dist/lib/components/panel/footer/ai/chat-header.d.ts.map +0 -1
  77. package/dist/lib/components/panel/footer/ai/chat-header.js +0 -63
  78. package/dist/lib/components/panel/footer/ai/composer.d.ts +0 -7
  79. package/dist/lib/components/panel/footer/ai/composer.d.ts.map +0 -1
  80. package/dist/lib/components/panel/footer/ai/composer.js +0 -77
  81. package/dist/lib/components/panel/footer/ai/content.d.ts +0 -13
  82. package/dist/lib/components/panel/footer/ai/content.d.ts.map +0 -1
  83. package/dist/lib/components/panel/footer/ai/content.js +0 -148
  84. package/dist/lib/components/panel/footer/ai/conversation.d.ts +0 -47
  85. package/dist/lib/components/panel/footer/ai/conversation.d.ts.map +0 -1
  86. package/dist/lib/components/panel/footer/ai/conversation.js +0 -222
  87. package/dist/lib/components/panel/footer/ai/index.d.ts +0 -3
  88. package/dist/lib/components/panel/footer/ai/index.d.ts.map +0 -1
  89. package/dist/lib/components/panel/footer/ai/index.js +0 -41
  90. package/dist/lib/components/panel/footer/ai/message-actions.d.ts +0 -8
  91. package/dist/lib/components/panel/footer/ai/message-actions.d.ts.map +0 -1
  92. package/dist/lib/components/panel/footer/ai/message-actions.js +0 -63
  93. package/dist/lib/components/panel/footer/ai/mock-result.d.ts +0 -6
  94. package/dist/lib/components/panel/footer/ai/mock-result.d.ts.map +0 -1
  95. package/dist/lib/components/panel/footer/ai/mock-result.js +0 -121
  96. package/dist/lib/components/panel/footer/ai/model-logo.d.ts +0 -5
  97. package/dist/lib/components/panel/footer/ai/model-logo.d.ts.map +0 -1
  98. package/dist/lib/components/panel/footer/ai/model-logo.js +0 -13
  99. package/dist/lib/components/panel/footer/ai/model-logos.d.ts +0 -2
  100. package/dist/lib/components/panel/footer/ai/model-logos.d.ts.map +0 -1
  101. package/dist/lib/components/panel/footer/ai/model-logos.js +0 -10
  102. package/dist/lib/components/panel/footer/ai/model-picker.d.ts +0 -8
  103. package/dist/lib/components/panel/footer/ai/model-picker.d.ts.map +0 -1
  104. package/dist/lib/components/panel/footer/ai/model-picker.js +0 -166
  105. package/dist/lib/components/panel/footer/ai/models.d.ts +0 -9
  106. package/dist/lib/components/panel/footer/ai/models.d.ts.map +0 -1
  107. package/dist/lib/components/panel/footer/ai/models.js +0 -72
  108. package/dist/lib/components/panel/footer/ai/permission-picker.d.ts +0 -5
  109. package/dist/lib/components/panel/footer/ai/permission-picker.d.ts.map +0 -1
  110. package/dist/lib/components/panel/footer/ai/permission-picker.js +0 -63
  111. package/dist/lib/components/panel/footer/ai/use-chat-scroll.d.ts +0 -9
  112. package/dist/lib/components/panel/footer/ai/use-chat-scroll.d.ts.map +0 -1
  113. package/dist/lib/components/panel/footer/ai/use-chat-scroll.js +0 -57
  114. package/dist/lib/components/panel/footer/preferences/data.d.ts +0 -14
  115. package/dist/lib/components/panel/footer/preferences/data.d.ts.map +0 -1
  116. package/dist/lib/components/panel/footer/preferences/data.js +0 -304
  117. package/dist/lib/components/panel/footer/preferences/modal.d.ts +0 -8
  118. package/dist/lib/components/panel/footer/preferences/modal.d.ts.map +0 -1
  119. package/dist/lib/components/panel/footer/preferences/modal.js +0 -75
  120. package/dist/lib/components/panel/footer/preferences/sidebar.d.ts +0 -9
  121. package/dist/lib/components/panel/footer/preferences/sidebar.d.ts.map +0 -1
  122. package/dist/lib/components/panel/footer/preferences/sidebar.js +0 -105
  123. package/dist/lib/components/panel/footer/preferences/user-settings/account/index.d.ts +0 -3
  124. package/dist/lib/components/panel/footer/preferences/user-settings/account/index.d.ts.map +0 -1
  125. package/dist/lib/components/panel/footer/preferences/user-settings/account/index.js +0 -16
  126. package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.d.ts +0 -3
  127. package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.d.ts.map +0 -1
  128. package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.js +0 -16
  129. package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.d.ts +0 -3
  130. package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.d.ts.map +0 -1
  131. package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.js +0 -101
  132. package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.d.ts +0 -3
  133. package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.d.ts.map +0 -1
  134. package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.js +0 -24
  135. package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.d.ts +0 -3
  136. package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.d.ts.map +0 -1
  137. package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.js +0 -103
  138. package/dist/lib/components/panel/footer/tabs.d.ts +0 -12
  139. package/dist/lib/components/panel/footer/tabs.d.ts.map +0 -1
  140. package/dist/lib/components/panel/footer/tabs.js +0 -23
@@ -1,9 +0,0 @@
1
- import type { Conversation } from './conversation';
2
- export declare const useChatScroll: (conversation: Conversation) => {
3
- viewportRef: import("react").RefObject<HTMLDivElement | null>;
4
- contentRef: import("react").RefObject<HTMLDivElement | null>;
5
- showJump: boolean;
6
- onScroll: () => void;
7
- scrollToBottom: () => void;
8
- };
9
- //# sourceMappingURL=use-chat-scroll.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-chat-scroll.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/footer/ai/use-chat-scroll.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,eAAO,MAAM,aAAa,GAAI,cAAc,YAAY;;;;;;CAsDvD,CAAA"}
@@ -1,57 +0,0 @@
1
- import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
2
- //#region src/lib/components/panel/footer/ai/use-chat-scroll.ts
3
- var useChatScroll = (conversation) => {
4
- const viewport = useRef(null);
5
- const content = useRef(null);
6
- const followLatest = useRef(true);
7
- const previousThread = useRef(conversation.activeId);
8
- const previousMessage = useRef(void 0);
9
- const [showJump, setShowJump] = useState(false);
10
- const scrollToBottom = useCallback(() => {
11
- const element = viewport.current;
12
- if (!element) return;
13
- followLatest.current = true;
14
- element.scrollTop = element.scrollHeight;
15
- setShowJump(false);
16
- }, []);
17
- const onScroll = useCallback(() => {
18
- const element = viewport.current;
19
- if (!element) return;
20
- const atBottom = element.scrollHeight - element.clientHeight - element.scrollTop <= 32;
21
- followLatest.current = atBottom;
22
- setShowJump(!atBottom);
23
- }, []);
24
- useLayoutEffect(() => {
25
- const last = conversation.messages.at(-1);
26
- if (previousThread.current !== conversation.activeId || last?.role === "user" && last.id !== previousMessage.current) followLatest.current = true;
27
- previousThread.current = conversation.activeId;
28
- previousMessage.current = last?.id;
29
- if (followLatest.current) scrollToBottom();
30
- }, [
31
- conversation.activeId,
32
- conversation.messages,
33
- scrollToBottom
34
- ]);
35
- useEffect(() => {
36
- const observer = new ResizeObserver(() => {
37
- if (followLatest.current) scrollToBottom();
38
- else onScroll();
39
- });
40
- if (viewport.current) observer.observe(viewport.current);
41
- if (content.current) observer.observe(content.current);
42
- return () => observer.disconnect();
43
- }, [
44
- conversation.activeId,
45
- onScroll,
46
- scrollToBottom
47
- ]);
48
- return {
49
- viewportRef: viewport,
50
- contentRef: content,
51
- showJump,
52
- onScroll,
53
- scrollToBottom
54
- };
55
- };
56
- //#endregion
57
- export { useChatScroll };
@@ -1,14 +0,0 @@
1
- export type SidebarItem = {
2
- id: string;
3
- label: string;
4
- icon?: string;
5
- href?: string;
6
- component?: React.ComponentType;
7
- children?: SidebarItem[];
8
- };
9
- export type SidebarSection = {
10
- title: string;
11
- items: SidebarItem[];
12
- };
13
- export declare const settingsSidebar: SidebarSection[];
14
- //# sourceMappingURL=data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/footer/preferences/data.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC/B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,cAAc,EAwT3C,CAAA"}
@@ -1,304 +0,0 @@
1
- import { AccountSettings } from "./user-settings/account/index.js";
2
- import { ContentSocialSettings } from "./user-settings/content-social/index.js";
3
- import { PrivacySettings } from "./user-settings/data-privacy/index.js";
4
- import { FamilyCenterSettings } from "./user-settings/family-center/index.js";
5
- import { ProfileSettings } from "./user-settings/profiles/index.js";
6
- //#region src/lib/components/panel/footer/preferences/data.ts
7
- var settingsSidebar = [
8
- {
9
- title: "",
10
- items: [{
11
- id: "profiles",
12
- label: "Arya Chan",
13
- component: ProfileSettings
14
- }]
15
- },
16
- {
17
- title: "USER SETTINGS",
18
- items: [
19
- {
20
- id: "account",
21
- label: "My Account",
22
- icon: "vx:user",
23
- component: AccountSettings
24
- },
25
- {
26
- id: "content-social",
27
- label: "Content & Social",
28
- icon: "vx:share",
29
- component: ContentSocialSettings
30
- },
31
- {
32
- id: "privacy",
33
- label: "Data & Privacy",
34
- icon: "vx:shield-check",
35
- component: PrivacySettings,
36
- children: [{
37
- id: "privacy-data",
38
- label: "How Discord Uses Your Data"
39
- }, {
40
- id: "privacy-request",
41
- label: "Request your Data"
42
- }]
43
- },
44
- {
45
- id: "family-center",
46
- label: "Family Center",
47
- icon: "vx:devices",
48
- component: FamilyCenterSettings
49
- },
50
- {
51
- id: "authorized-apps",
52
- label: "Authorized Apps",
53
- icon: "vx:devices"
54
- },
55
- {
56
- id: "devices",
57
- label: "Devices",
58
- icon: "vx:devices"
59
- },
60
- {
61
- id: "connections",
62
- label: "Connections",
63
- icon: "vx:devices"
64
- },
65
- {
66
- id: "notifications",
67
- label: "Notifications",
68
- icon: "vx:devices",
69
- children: [
70
- {
71
- id: "notifications-overview",
72
- label: "Overview"
73
- },
74
- {
75
- id: "notifications-sounds",
76
- label: "Sounds"
77
- },
78
- {
79
- id: "notifications-badges",
80
- label: "Badges"
81
- },
82
- {
83
- id: "notifications-email",
84
- label: "Email"
85
- },
86
- {
87
- id: "notifications-advanced",
88
- label: "Advanced"
89
- }
90
- ]
91
- }
92
- ]
93
- },
94
- {
95
- title: "BILLING SETTINGS",
96
- items: [
97
- {
98
- id: "nitro",
99
- label: "Nitro",
100
- icon: "vx:star"
101
- },
102
- {
103
- id: "server-boost",
104
- label: "Server Boost",
105
- icon: "vx:card"
106
- },
107
- {
108
- id: "subscriptions",
109
- label: "Subscriptions",
110
- icon: "vx:card"
111
- },
112
- {
113
- id: "gift-inventory",
114
- label: "Gift Inventory",
115
- icon: "vx:card"
116
- },
117
- {
118
- id: "billing",
119
- label: "Billing",
120
- icon: "vx:wallet",
121
- children: [{
122
- id: "billing-payment-methods",
123
- label: "Payment Methods"
124
- }, {
125
- id: "billing-transaction-history",
126
- label: "Transaction History"
127
- }]
128
- }
129
- ]
130
- },
131
- {
132
- title: "APP SETTINGS",
133
- items: [
134
- {
135
- id: "appearance",
136
- label: "Appearance",
137
- icon: "vx:palette",
138
- children: [
139
- {
140
- id: "appearance-theme",
141
- label: "Theme"
142
- },
143
- {
144
- id: "appearance-in-appicon",
145
- label: "In-app Icon"
146
- },
147
- {
148
- id: "appearance-ui-density",
149
- label: "UI Density"
150
- },
151
- {
152
- id: "appearance-message-spacing",
153
- label: "Message Spacing"
154
- },
155
- {
156
- id: "appearance-scaling",
157
- label: "Scaling"
158
- }
159
- ]
160
- },
161
- {
162
- id: "accessibility",
163
- label: "Accessibility",
164
- icon: "vx:videocamera",
165
- children: [
166
- {
167
- id: "accessibility-colors",
168
- label: "Colors & Saturation"
169
- },
170
- {
171
- id: "accessibility-profile",
172
- label: "Profile Colors"
173
- },
174
- {
175
- id: "accessibility-contrast",
176
- label: "Contrast"
177
- },
178
- {
179
- id: "accessibility-reducedmotion",
180
- label: "Reduced Motion"
181
- },
182
- {
183
- id: "accessibility-chatinput",
184
- label: "Chat Input"
185
- },
186
- {
187
- id: "accessbility-textspeech",
188
- label: "Text Speech"
189
- }
190
- ]
191
- },
192
- {
193
- id: "voice-video",
194
- label: "Voice & Video",
195
- icon: "vx:videocamera",
196
- children: [
197
- {
198
- id: "voicevideo-camera",
199
- label: "Camera"
200
- },
201
- {
202
- id: "voicevideo-streaming",
203
- label: "Streaming"
204
- },
205
- {
206
- id: "voicevideo-sounds",
207
- label: "Sounds"
208
- },
209
- {
210
- id: "voicevideo-soundboard",
211
- label: "Soundboard"
212
- },
213
- {
214
- id: "voicevideo-advanced",
215
- label: "Advanced"
216
- }
217
- ]
218
- },
219
- {
220
- id: "chat",
221
- label: "Chat",
222
- icon: "vx:chat-round-dots",
223
- children: [
224
- {
225
- id: "chat-media",
226
- label: "Media"
227
- },
228
- {
229
- id: "chat-embeds",
230
- label: "Embeds and Link Previews"
231
- },
232
- {
233
- id: "chat-emoji",
234
- label: "Emoji"
235
- },
236
- {
237
- id: "chat-stickers",
238
- label: "Stickers"
239
- },
240
- {
241
- id: "chat-textbox",
242
- label: "Text box"
243
- },
244
- {
245
- id: "chat-threads",
246
- label: "Threads"
247
- }
248
- ]
249
- },
250
- {
251
- id: "keybinds",
252
- label: "Keybinds",
253
- icon: "vx:settings"
254
- },
255
- {
256
- id: "language-time",
257
- label: "Language & Time",
258
- icon: "vx:settings"
259
- },
260
- {
261
- id: "streamer-mode",
262
- label: "Streamer Mode",
263
- icon: "vx:settings"
264
- },
265
- {
266
- id: "advanced",
267
- label: "... Advanced",
268
- icon: "vx:settings"
269
- }
270
- ]
271
- },
272
- {
273
- title: "ACTIVITY SETTINGS",
274
- items: [{
275
- id: "activity",
276
- label: "Activity Privacy",
277
- icon: "vx:palette",
278
- children: [
279
- {
280
- id: "activity-sharing",
281
- label: "Activity Sharing"
282
- },
283
- {
284
- id: "activity-servers",
285
- label: "Servers I Share With"
286
- },
287
- {
288
- id: "activity-games",
289
- label: "Who Can Join My Games"
290
- }
291
- ]
292
- }]
293
- },
294
- {
295
- title: "",
296
- items: [{
297
- id: "logout",
298
- label: "Log Out",
299
- icon: "vx:palette"
300
- }]
301
- }
302
- ];
303
- //#endregion
304
- export { settingsSidebar };
@@ -1,8 +0,0 @@
1
- type Props = {
2
- open: boolean;
3
- onClose: () => void;
4
- defaultActiveTab?: string;
5
- };
6
- declare const UserInfoModal: ({ open, onClose, defaultActiveTab }: Props) => import("react").JSX.Element | null;
7
- export { UserInfoModal };
8
- //# sourceMappingURL=modal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/footer/preferences/modal.tsx"],"names":[],"mappings":"AAOA,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,aAAa,GAAI,qCAIpB,KAAK,uCASP,CAAA;AAsED,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -1,75 +0,0 @@
1
- import { SettingsSidebar, findItemById } from "./sidebar.js";
2
- import { useEffect, useRef, useState } from "react";
3
- import { Button, Surface } from "@vezham/react-v3";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- import { CloseCircle } from "@vezham/icons-react";
6
- //#region src/lib/components/panel/footer/preferences/modal.tsx
7
- var UserInfoModal = ({ open, onClose, defaultActiveTab = "account" }) => {
8
- if (!open) return null;
9
- return /* @__PURE__ */ jsx(UserInfoModalContent, {
10
- defaultActiveTab,
11
- onClose
12
- });
13
- };
14
- var UserInfoModalContent = ({ defaultActiveTab, onClose }) => {
15
- const [active, setActive] = useState(defaultActiveTab);
16
- const contentRef = useRef(null);
17
- useEffect(() => {
18
- const container = contentRef.current;
19
- if (!container) return;
20
- const sections = Array.from(container.querySelectorAll("[id]"));
21
- const observer = new IntersectionObserver((entries) => {
22
- const visible = entries.filter((entry) => entry.isIntersecting).sort((a, b) => b.intersectionRatio - a.intersectionRatio);
23
- if (visible.length > 0) {
24
- const id = visible[0].target.id;
25
- setActive(id);
26
- }
27
- }, {
28
- root: container,
29
- threshold: [
30
- .25,
31
- .5,
32
- .75
33
- ],
34
- rootMargin: "-20% 0px -60% 0px"
35
- });
36
- sections.forEach((section) => observer.observe(section));
37
- return () => observer.disconnect();
38
- }, []);
39
- const Component = findItemById(active)?.component;
40
- return /* @__PURE__ */ jsxs("div", {
41
- className: "fixed inset-0 z-[100] flex items-center justify-center",
42
- children: [/* @__PURE__ */ jsx("button", {
43
- type: "button",
44
- "aria-label": "Close preferences",
45
- className: "absolute inset-0 bg-black/60 backdrop-blur-sm",
46
- onClick: onClose
47
- }), /* @__PURE__ */ jsxs(Surface, {
48
- className: "relative z-10 flex h-[500px] w-[700px] rounded-2xl p-6",
49
- children: [
50
- /* @__PURE__ */ jsx(Button, {
51
- "aria-label": "Close preferences",
52
- isIconOnly: true,
53
- variant: "ghost",
54
- className: "absolute top-4 right-4",
55
- onPress: onClose,
56
- children: /* @__PURE__ */ jsx(CloseCircle, {
57
- size: 22,
58
- "aria-hidden": "true"
59
- })
60
- }),
61
- /* @__PURE__ */ jsx(SettingsSidebar, {
62
- active,
63
- onSelect: setActive
64
- }),
65
- /* @__PURE__ */ jsx("div", {
66
- ref: contentRef,
67
- className: "flex-1 overflow-auto p-6",
68
- children: Component ? /* @__PURE__ */ jsx(Component, {}) : /* @__PURE__ */ jsx("div", { children: "Select a setting" })
69
- })
70
- ]
71
- })]
72
- });
73
- };
74
- //#endregion
75
- export { UserInfoModal };
@@ -1,9 +0,0 @@
1
- import { SidebarItem } from './data';
2
- type Props = {
3
- active: string;
4
- onSelect: (id: string) => void;
5
- };
6
- declare const SettingsSidebar: ({ active, onSelect }: Props) => import("react").JSX.Element;
7
- declare const findItemById: (id: string) => SidebarItem | undefined;
8
- export { SettingsSidebar, findItemById };
9
- //# sourceMappingURL=sidebar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/footer/preferences/sidebar.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAmB,MAAM,QAAQ,CAAA;AAErD,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B,CAAA;AAED,QAAA,MAAM,eAAe,GAAI,sBAAsB,KAAK,gCAuInD,CAAA;AAED,QAAA,MAAM,YAAY,GAAI,IAAI,MAAM,4BAY/B,CAAA;AAED,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,CAAA"}
@@ -1,105 +0,0 @@
1
- "use client";
2
- import { AppIcon } from "../../../app-icon/index.js";
3
- import { useUser } from "../../../../store/users/useUserStore.js";
4
- import { settingsSidebar } from "./data.js";
5
- import { useState } from "react";
6
- import { Button, ScrollShadow } from "@vezham/react-v3";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
- //#region src/lib/components/panel/footer/preferences/sidebar.tsx
9
- var SettingsSidebar = ({ active, onSelect }) => {
10
- const [openGroups, setOpenGroups] = useState([]);
11
- const { user } = useUser();
12
- const names = user ? `${user.firstName} ${user.lastName}` : "Guest";
13
- const avatar = user?.avatar;
14
- const toggleGroup = (id) => {
15
- setOpenGroups((prev) => prev.includes(id) ? prev.filter((i) => i !== id) : [...prev, id]);
16
- };
17
- const renderItem = (item, level = 0) => {
18
- const hasChildren = item.children?.length;
19
- const isOpen = openGroups.includes(item.id) || Boolean(item.children?.some((child) => child.id === active));
20
- const isChildActive = item.children?.some((c) => c.id === active) || active.startsWith(item.id);
21
- if (item.id === "profiles") {
22
- const initials = names.split(" ").map((n) => n[0]).join("").slice(0, 2).toUpperCase();
23
- return /* @__PURE__ */ jsx("div", {
24
- className: "px-2",
25
- children: /* @__PURE__ */ jsxs("button", {
26
- type: "button",
27
- onClick: () => onSelect(item.id),
28
- className: `flex w-full items-center gap-4 rounded-xl p-2 px-2 ${active === item.id ? "bg-default-100" : "hover:bg-default-50"}`,
29
- children: [avatar ? /* @__PURE__ */ jsx("img", {
30
- alt: names,
31
- src: avatar,
32
- className: "h-10 w-10 rounded-full object-cover"
33
- }) : /* @__PURE__ */ jsx("div", {
34
- className: "flex h-10 w-10 items-center justify-center rounded-full bg-red-500 font-bold text-white",
35
- children: initials
36
- }), /* @__PURE__ */ jsxs("div", {
37
- className: "flex flex-col items-start",
38
- children: [/* @__PURE__ */ jsx("span", {
39
- className: "text-sm font-medium",
40
- children: names
41
- }), /* @__PURE__ */ jsx("span", {
42
- className: "text-default-500 text-xs",
43
- children: "Edit Profile"
44
- })]
45
- })]
46
- })
47
- }, item.id);
48
- }
49
- return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(Button, {
50
- variant: "ghost",
51
- onPress: () => {
52
- if (hasChildren) toggleGroup(item.id);
53
- onSelect(item.id);
54
- document.getElementById(item.id)?.scrollIntoView({
55
- behavior: "smooth",
56
- block: "start"
57
- });
58
- },
59
- className: `flex w-full items-center justify-between rounded-lg px-3 py-2 text-sm ${active === item.id || isChildActive ? "bg-default-100 font-medium" : "hover:bg-default-50"}`,
60
- style: { paddingLeft: 12 + level * 16 },
61
- children: [/* @__PURE__ */ jsxs("div", {
62
- className: "flex items-center gap-2",
63
- children: [item.icon && /* @__PURE__ */ jsx(AppIcon, {
64
- icon: item.icon,
65
- size: 18,
66
- "aria-hidden": "true"
67
- }), /* @__PURE__ */ jsx("span", {
68
- className: `${active === item.id ? "text-foreground font-medium" : isChildActive ? "text-foreground" : level > 0 ? "text-default-400" : "text-default-600"}`,
69
- children: item.label
70
- })]
71
- }), hasChildren && /* @__PURE__ */ jsx(AppIcon, {
72
- icon: isOpen ? "vx:chevron-down" : "vx:chevron-right",
73
- size: 16,
74
- "aria-hidden": "true"
75
- })]
76
- }), hasChildren && isOpen && /* @__PURE__ */ jsx("div", {
77
- className: "mt-1 space-y-1",
78
- children: item.children?.map((child) => renderItem(child, level + 1))
79
- })] }, item.id);
80
- };
81
- return /* @__PURE__ */ jsx(ScrollShadow, {
82
- className: "w-[240px] pr-2",
83
- children: /* @__PURE__ */ jsx("div", {
84
- className: "space-y-6",
85
- children: settingsSidebar.map((section) => /* @__PURE__ */ jsxs("div", { children: [section.title && /* @__PURE__ */ jsx("p", {
86
- className: "text-default-500 mb-2 px-3 text-xs font-semibold",
87
- children: section.title
88
- }), /* @__PURE__ */ jsx("div", {
89
- className: "space-y-1",
90
- children: section.items.map((item) => renderItem(item))
91
- })] }, section.title))
92
- })
93
- });
94
- };
95
- var findItemById = (id) => {
96
- for (const section of settingsSidebar) for (const item of section.items) {
97
- if (item.id === id) return item;
98
- if (item.children) {
99
- const found = item.children.find((c) => c.id === id);
100
- if (found) return found;
101
- }
102
- }
103
- };
104
- //#endregion
105
- export { SettingsSidebar, findItemById };
@@ -1,3 +0,0 @@
1
- declare const AccountSettings: () => import("react").JSX.Element;
2
- export { AccountSettings };
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/lib/components/panel/footer/preferences/user-settings/account/index.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,eAAe,mCAkBpB,CAAA;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
@@ -1,16 +0,0 @@
1
- import { CustomTabs } from "../../../tabs.js";
2
- import { jsx } from "react/jsx-runtime";
3
- //#region src/lib/components/panel/footer/preferences/user-settings/account/index.tsx
4
- var AccountSettings = () => {
5
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(CustomTabs, { tabs: [{
6
- id: "security",
7
- label: "Security",
8
- content: /* @__PURE__ */ jsx("p", { children: "View your project overview and recent activity." })
9
- }, {
10
- id: "standing",
11
- label: "Standing",
12
- content: /* @__PURE__ */ jsx("p", { children: "Track your metrics and analyze performance data." })
13
- }] }) });
14
- };
15
- //#endregion
16
- export { AccountSettings };
@@ -1,3 +0,0 @@
1
- declare const ContentSocialSettings: () => import("react").JSX.Element;
2
- export { ContentSocialSettings };
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/lib/components/panel/footer/preferences/user-settings/content-social/index.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,qBAAqB,mCAmB1B,CAAA;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
@@ -1,16 +0,0 @@
1
- import { CustomTabs } from "../../../tabs.js";
2
- import { jsx } from "react/jsx-runtime";
3
- //#region src/lib/components/panel/footer/preferences/user-settings/content-social/index.tsx
4
- var ContentSocialSettings = () => {
5
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(CustomTabs, { tabs: [{
6
- id: "discord",
7
- label: "Discord",
8
- content: /* @__PURE__ */ jsx("p", { children: "View your project overview and recent activity." })
9
- }, {
10
- id: "games",
11
- label: "Connected Games",
12
- content: /* @__PURE__ */ jsx("p", { children: "Track your metrics and analyze performance data." })
13
- }] }) });
14
- };
15
- //#endregion
16
- export { ContentSocialSettings };
@@ -1,3 +0,0 @@
1
- declare const PrivacySettings: () => import("react").JSX.Element;
2
- export { PrivacySettings };
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/lib/components/panel/footer/preferences/user-settings/data-privacy/index.tsx"],"names":[],"mappings":"AA+BA,QAAA,MAAM,eAAe,mCAqDpB,CAAA;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}