@oxyhq/services 5.4.8 → 5.5.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 (154) hide show
  1. package/lib/commonjs/core/index.js +0 -59
  2. package/lib/commonjs/core/index.js.map +1 -1
  3. package/lib/commonjs/index.js +174 -17
  4. package/lib/commonjs/index.js.map +1 -1
  5. package/lib/commonjs/ui/components/FollowButton.js +8 -23
  6. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  7. package/lib/commonjs/ui/components/OxyProvider.js +49 -38
  8. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  9. package/lib/commonjs/ui/components/OxySignInButton.js +2 -8
  10. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  11. package/lib/commonjs/ui/hooks/index.js +15 -2
  12. package/lib/commonjs/ui/hooks/index.js.map +1 -1
  13. package/lib/commonjs/ui/hooks/useAuthFetch.js +182 -0
  14. package/lib/commonjs/ui/hooks/useAuthFetch.js.map +1 -0
  15. package/lib/commonjs/ui/hooks/useFollow.js +10 -29
  16. package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
  17. package/lib/commonjs/ui/hooks/useOxyFollow.js +190 -0
  18. package/lib/commonjs/ui/hooks/useOxyFollow.js.map +1 -0
  19. package/lib/commonjs/ui/index.js +183 -0
  20. package/lib/commonjs/ui/index.js.map +1 -1
  21. package/lib/commonjs/ui/screens/AccountCenterScreen.js +18 -14
  22. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  23. package/lib/commonjs/ui/screens/AppInfoScreen.js +37 -19
  24. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  25. package/lib/commonjs/ui/screens/FileManagementScreen.js +27 -9
  26. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  27. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +2 -8
  28. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  29. package/lib/commonjs/ui/store/index.js +51 -255
  30. package/lib/commonjs/ui/store/index.js.map +1 -1
  31. package/lib/commonjs/ui/store/setupOxyStore.js +63 -0
  32. package/lib/commonjs/ui/store/setupOxyStore.js.map +1 -0
  33. package/lib/commonjs/ui/store/slices/authSlice.js +56 -0
  34. package/lib/commonjs/ui/store/slices/authSlice.js.map +1 -0
  35. package/lib/commonjs/ui/store/slices/followSlice.js +238 -0
  36. package/lib/commonjs/ui/store/slices/followSlice.js.map +1 -0
  37. package/lib/commonjs/ui/store/slices/index.js +129 -0
  38. package/lib/commonjs/ui/store/slices/index.js.map +1 -0
  39. package/lib/commonjs/ui/store/slices/types.js +19 -0
  40. package/lib/commonjs/ui/store/slices/types.js.map +1 -0
  41. package/lib/commonjs/ui/styles/index.js +11 -0
  42. package/lib/commonjs/ui/styles/index.js.map +1 -1
  43. package/lib/commonjs/ui/styles/shadows.js +123 -0
  44. package/lib/commonjs/ui/styles/shadows.js.map +1 -0
  45. package/lib/module/core/index.js +0 -59
  46. package/lib/module/core/index.js.map +1 -1
  47. package/lib/module/index.js +14 -10
  48. package/lib/module/index.js.map +1 -1
  49. package/lib/module/ui/components/FollowButton.js +8 -23
  50. package/lib/module/ui/components/FollowButton.js.map +1 -1
  51. package/lib/module/ui/components/OxyProvider.js +49 -38
  52. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  53. package/lib/module/ui/components/OxySignInButton.js +2 -8
  54. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  55. package/lib/module/ui/hooks/index.js +2 -1
  56. package/lib/module/ui/hooks/index.js.map +1 -1
  57. package/lib/module/ui/hooks/useAuthFetch.js +177 -0
  58. package/lib/module/ui/hooks/useAuthFetch.js.map +1 -0
  59. package/lib/module/ui/hooks/useFollow.js +10 -29
  60. package/lib/module/ui/hooks/useFollow.js.map +1 -1
  61. package/lib/module/ui/hooks/useOxyFollow.js +186 -0
  62. package/lib/module/ui/hooks/useOxyFollow.js.map +1 -0
  63. package/lib/module/ui/index.js +12 -2
  64. package/lib/module/ui/index.js.map +1 -1
  65. package/lib/module/ui/screens/AccountCenterScreen.js +5 -1
  66. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  67. package/lib/module/ui/screens/AppInfoScreen.js +37 -19
  68. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  69. package/lib/module/ui/screens/FileManagementScreen.js +27 -9
  70. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  71. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +2 -8
  72. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  73. package/lib/module/ui/store/index.js +23 -249
  74. package/lib/module/ui/store/index.js.map +1 -1
  75. package/lib/module/ui/store/setupOxyStore.js +59 -0
  76. package/lib/module/ui/store/setupOxyStore.js.map +1 -0
  77. package/lib/module/ui/store/slices/authSlice.js +48 -0
  78. package/lib/module/ui/store/slices/authSlice.js.map +1 -0
  79. package/lib/module/ui/store/slices/followSlice.js +232 -0
  80. package/lib/module/ui/store/slices/followSlice.js.map +1 -0
  81. package/lib/module/ui/store/slices/index.js +11 -0
  82. package/lib/module/ui/store/slices/index.js.map +1 -0
  83. package/lib/module/ui/store/slices/types.js +15 -0
  84. package/lib/module/ui/store/slices/types.js.map +1 -0
  85. package/lib/module/ui/styles/index.js +1 -0
  86. package/lib/module/ui/styles/index.js.map +1 -1
  87. package/lib/module/ui/styles/shadows.js +119 -0
  88. package/lib/module/ui/styles/shadows.js.map +1 -0
  89. package/lib/typescript/core/index.d.ts +0 -28
  90. package/lib/typescript/core/index.d.ts.map +1 -1
  91. package/lib/typescript/index.d.ts +3 -5
  92. package/lib/typescript/index.d.ts.map +1 -1
  93. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
  94. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  95. package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -1
  96. package/lib/typescript/ui/hooks/index.d.ts +2 -1
  97. package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
  98. package/lib/typescript/ui/hooks/useAuthFetch.d.ts +33 -0
  99. package/lib/typescript/ui/hooks/useAuthFetch.d.ts.map +1 -0
  100. package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
  101. package/lib/typescript/ui/hooks/useOxyFollow.d.ts +81 -0
  102. package/lib/typescript/ui/hooks/useOxyFollow.d.ts.map +1 -0
  103. package/lib/typescript/ui/index.d.ts +3 -1
  104. package/lib/typescript/ui/index.d.ts.map +1 -1
  105. package/lib/typescript/ui/navigation/types.d.ts +22 -4
  106. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  107. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  108. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
  109. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
  110. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
  111. package/lib/typescript/ui/store/index.d.ts +19 -58
  112. package/lib/typescript/ui/store/index.d.ts.map +1 -1
  113. package/lib/typescript/ui/store/setupOxyStore.d.ts +29 -0
  114. package/lib/typescript/ui/store/setupOxyStore.d.ts.map +1 -0
  115. package/lib/typescript/ui/store/slices/authSlice.d.ts +32 -0
  116. package/lib/typescript/ui/store/slices/authSlice.d.ts.map +1 -0
  117. package/lib/typescript/ui/store/slices/followSlice.d.ts +120 -0
  118. package/lib/typescript/ui/store/slices/followSlice.d.ts.map +1 -0
  119. package/lib/typescript/ui/store/slices/index.d.ts +9 -0
  120. package/lib/typescript/ui/store/slices/index.d.ts.map +1 -0
  121. package/lib/typescript/ui/store/slices/types.d.ts +16 -0
  122. package/lib/typescript/ui/store/slices/types.d.ts.map +1 -0
  123. package/lib/typescript/ui/styles/index.d.ts +1 -0
  124. package/lib/typescript/ui/styles/index.d.ts.map +1 -1
  125. package/lib/typescript/ui/styles/shadows.d.ts +233 -0
  126. package/lib/typescript/ui/styles/shadows.d.ts.map +1 -0
  127. package/package.json +14 -15
  128. package/src/__tests__/ui/hooks/useOxyFollow.test.tsx +92 -0
  129. package/src/__tests__/ui/store/setupOxyStore.test.ts +50 -0
  130. package/src/__tests__/validate-structure.js +91 -0
  131. package/src/__tests__/validation.js +42 -0
  132. package/src/core/index.ts +0 -66
  133. package/src/index.ts +36 -4
  134. package/src/ui/components/FollowButton.tsx +11 -25
  135. package/src/ui/components/OxyProvider.tsx +48 -33
  136. package/src/ui/components/OxySignInButton.tsx +2 -6
  137. package/src/ui/hooks/index.ts +2 -1
  138. package/src/ui/hooks/useAuthFetch.ts +200 -0
  139. package/src/ui/hooks/useFollow.ts +10 -30
  140. package/src/ui/hooks/useOxyFollow.ts +188 -0
  141. package/src/ui/index.ts +34 -2
  142. package/src/ui/navigation/types.ts +24 -4
  143. package/src/ui/screens/AccountCenterScreen.tsx +5 -7
  144. package/src/ui/screens/AppInfoScreen.tsx +40 -23
  145. package/src/ui/screens/FileManagementScreen.tsx +268 -248
  146. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +2 -5
  147. package/src/ui/store/index.ts +31 -245
  148. package/src/ui/store/setupOxyStore.ts +58 -0
  149. package/src/ui/store/slices/authSlice.ts +43 -0
  150. package/src/ui/store/slices/followSlice.ts +207 -0
  151. package/src/ui/store/slices/index.ts +31 -0
  152. package/src/ui/store/slices/types.ts +33 -0
  153. package/src/ui/styles/index.ts +1 -0
  154. package/src/ui/styles/shadows.ts +112 -0
@@ -3,269 +3,65 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.toggleFollowUser = exports.store = exports.setFollowingStatus = exports.selectIsUserBeingFetched = exports.resetFollowState = exports.logout = exports.loginSuccess = exports.loginStart = exports.loginFailure = exports.fetchFollowStatus = exports.clearFollowError = void 0;
7
- var _toolkit = require("@reduxjs/toolkit");
8
- const initialAuthState = {
9
- user: null,
10
- isAuthenticated: false,
11
- isLoading: false,
12
- error: null
13
- };
14
- const initialFollowState = {
15
- followingUsers: {},
16
- loadingUsers: {},
17
- fetchingUsers: {},
18
- errors: {}
6
+ var _exportNames = {
7
+ store: true,
8
+ selectIsUserBeingFetched: true,
9
+ setupOxyStore: true,
10
+ oxyReducers: true
19
11
  };
20
-
21
- // Async thunk for fetching follow status from backend with deduplication
22
- const fetchFollowStatus = exports.fetchFollowStatus = (0, _toolkit.createAsyncThunk)('follow/fetchFollowStatus', async ({
23
- userId,
24
- oxyServices
25
- }, {
26
- rejectWithValue
27
- }) => {
28
- try {
29
- // Use the proper core service method
30
- const response = await oxyServices.getFollowStatus(userId);
31
- return {
32
- userId,
33
- isFollowing: response.isFollowing
34
- };
35
- } catch (error) {
36
- // Ignore authentication errors when user isn't signed in - don't update state
37
- if (error?.status === 401 || error?.message?.includes('Authentication')) {
38
- return rejectWithValue('Not authenticated');
39
- }
40
- // Log other failures and reject to not update state
41
- console.warn(`Failed to fetch follow status for user ${userId}:`, error);
42
- return rejectWithValue(error?.message || 'Failed to fetch follow status');
43
- }
44
- }, {
45
- // Prevent duplicate requests for the same user ID
46
- condition: ({
47
- userId
48
- }, {
49
- getState
50
- }) => {
51
- const state = getState();
52
- // Defensive check for follow state
53
- if (!state.follow?.fetchingUsers) {
54
- return true; // Allow request if state not initialized
55
- }
56
- const isAlreadyFetching = state.follow.fetchingUsers[userId];
57
- if (isAlreadyFetching) {
58
- console.log(`⚡ Deduplicating fetch request for user ${userId} - already in progress`);
59
- return false; // Cancel this request
60
- }
61
- return true; // Allow this request
62
- }
63
- });
64
-
65
- // Async thunk for following/unfollowing users using core services
66
- const toggleFollowUser = exports.toggleFollowUser = (0, _toolkit.createAsyncThunk)('follow/toggleFollowUser', async ({
67
- userId,
68
- oxyServices,
69
- isCurrentlyFollowing
70
- }, {
71
- rejectWithValue,
72
- dispatch
73
- }) => {
74
- try {
75
- let response;
76
- let newFollowState;
77
- if (isCurrentlyFollowing) {
78
- // Use the core service to unfollow user
79
- response = await oxyServices.unfollowUser(userId);
80
- newFollowState = false;
81
- } else {
82
- // Use the core service to follow user
83
- response = await oxyServices.followUser(userId);
84
- newFollowState = true;
85
- }
86
-
87
- // Check if the response indicates success (different APIs might return different formats)
88
- const isSuccess = response.success !== false && response.action !== 'error';
89
- if (isSuccess) {
90
- return {
91
- userId,
92
- isFollowing: newFollowState,
93
- message: response.message || `Successfully ${newFollowState ? 'followed' : 'unfollowed'} user`
94
- };
95
- } else {
96
- return rejectWithValue(response.message || `Failed to ${newFollowState ? 'follow' : 'unfollow'} user`);
97
- }
98
- } catch (error) {
99
- // Enhanced error handling with state mismatch detection
100
- let errorMessage = 'Network error occurred';
101
- if (error?.message) {
102
- errorMessage = error.message;
103
- } else if (error?.response?.data?.message) {
104
- errorMessage = error.response.data.message;
105
- } else if (error?.data?.message) {
106
- errorMessage = error.data.message;
107
- }
108
-
109
- // Handle state mismatch errors by syncing with backend
110
- if (errorMessage.includes('Not following this user') && isCurrentlyFollowing) {
111
- console.warn(`State mismatch detected for user ${userId}: Frontend thinks following, backend says not following. Syncing state...`);
112
- // Auto-sync with backend state
113
- try {
114
- const actualStatus = await oxyServices.getFollowStatus(userId);
115
- dispatch({
116
- type: 'follow/setFollowingStatus',
117
- payload: {
118
- userId,
119
- isFollowing: actualStatus.isFollowing
120
- }
121
- });
122
- return rejectWithValue('State synced with backend. Please try again.');
123
- } catch (syncError) {
124
- console.error('Failed to sync state with backend:', syncError);
125
- }
126
- } else if (errorMessage.includes('Already following this user') && !isCurrentlyFollowing) {
127
- console.warn(`State mismatch detected for user ${userId}: Frontend thinks not following, backend says following. Syncing state...`);
128
- // Auto-sync with backend state
129
- try {
130
- const actualStatus = await oxyServices.getFollowStatus(userId);
131
- dispatch({
132
- type: 'follow/setFollowingStatus',
133
- payload: {
134
- userId,
135
- isFollowing: actualStatus.isFollowing
136
- }
137
- });
138
- return rejectWithValue('State synced with backend. Please try again.');
139
- } catch (syncError) {
140
- console.error('Failed to sync state with backend:', syncError);
141
- }
142
- }
143
- return rejectWithValue(errorMessage);
12
+ Object.defineProperty(exports, "oxyReducers", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _setupOxyStore.oxyReducers;
144
16
  }
145
17
  });
146
- const authSlice = (0, _toolkit.createSlice)({
147
- name: 'auth',
148
- initialState: initialAuthState,
149
- reducers: {
150
- loginStart(state) {
151
- state.isLoading = true;
152
- state.error = null;
153
- },
154
- loginSuccess(state, action) {
155
- state.isLoading = false;
156
- state.isAuthenticated = true;
157
- state.user = action.payload;
158
- },
159
- loginFailure(state, action) {
160
- state.isLoading = false;
161
- state.error = action.payload;
162
- },
163
- logout(state) {
164
- state.user = null;
165
- state.isAuthenticated = false;
166
- }
18
+ exports.selectIsUserBeingFetched = void 0;
19
+ Object.defineProperty(exports, "setupOxyStore", {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _setupOxyStore.setupOxyStore;
167
23
  }
168
24
  });
169
- const followSlice = (0, _toolkit.createSlice)({
170
- name: 'follow',
171
- initialState: initialFollowState,
172
- reducers: {
173
- setFollowingStatus(state, action) {
174
- const {
175
- userId,
176
- isFollowing
177
- } = action.payload;
178
- state.followingUsers[userId] = isFollowing;
179
- state.errors[userId] = null;
180
- },
181
- clearFollowError(state, action) {
182
- const userId = action.payload;
183
- state.errors[userId] = null;
184
- },
185
- resetFollowState(state) {
186
- state.followingUsers = {};
187
- state.loadingUsers = {};
188
- state.fetchingUsers = {};
189
- state.errors = {};
25
+ exports.store = void 0;
26
+ var _slices = require("./slices");
27
+ Object.keys(_slices).forEach(function (key) {
28
+ if (key === "default" || key === "__esModule") return;
29
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
30
+ if (key in exports && exports[key] === _slices[key]) return;
31
+ Object.defineProperty(exports, key, {
32
+ enumerable: true,
33
+ get: function () {
34
+ return _slices[key];
190
35
  }
191
- },
192
- extraReducers: builder => {
193
- builder
194
- // Handle fetchFollowStatus
195
- .addCase(fetchFollowStatus.pending, (state, action) => {
196
- const {
197
- userId
198
- } = action.meta.arg;
199
- state.fetchingUsers[userId] = true;
200
- state.errors[userId] = null;
201
- }).addCase(fetchFollowStatus.fulfilled, (state, action) => {
202
- const {
203
- userId,
204
- isFollowing
205
- } = action.payload;
206
- state.followingUsers[userId] = isFollowing;
207
- state.fetchingUsers[userId] = false;
208
- state.errors[userId] = null;
209
- }).addCase(fetchFollowStatus.rejected, (state, action) => {
210
- const {
211
- userId
212
- } = action.meta.arg;
213
- state.fetchingUsers[userId] = false;
214
- // Don't update follow state on fetch errors - preserve existing/initial state
215
- if (action.payload !== 'Not authenticated') {
216
- console.warn(`Failed to fetch follow status for user ${userId}:`, action.payload);
217
- }
218
- })
219
- // Handle toggleFollowUser
220
- .addCase(toggleFollowUser.pending, (state, action) => {
221
- const {
222
- userId
223
- } = action.meta.arg;
224
- state.loadingUsers[userId] = true;
225
- state.errors[userId] = null;
226
- }).addCase(toggleFollowUser.fulfilled, (state, action) => {
227
- const {
228
- userId,
229
- isFollowing
230
- } = action.payload;
231
- state.followingUsers[userId] = isFollowing;
232
- state.loadingUsers[userId] = false;
233
- state.errors[userId] = null;
234
- }).addCase(toggleFollowUser.rejected, (state, action) => {
235
- const {
236
- userId
237
- } = action.meta.arg;
238
- state.loadingUsers[userId] = false;
239
- state.errors[userId] = action.error.message || 'Failed to update follow status';
240
- });
241
- }
36
+ });
242
37
  });
243
- const {
244
- loginStart,
245
- loginSuccess,
246
- loginFailure,
247
- logout
248
- } = authSlice.actions;
249
- exports.logout = logout;
250
- exports.loginFailure = loginFailure;
251
- exports.loginSuccess = loginSuccess;
252
- exports.loginStart = loginStart;
253
- const {
254
- setFollowingStatus,
255
- clearFollowError,
256
- resetFollowState
257
- } = followSlice.actions;
38
+ var _setupOxyStore = require("./setupOxyStore");
39
+ var _toolkit = require("@reduxjs/toolkit");
40
+ /**
41
+ * OxyHQ Services Redux Store
42
+ * Framework-agnostic, tree-shakable Redux integration
43
+ *
44
+ * This module exports individual slices, reducers, actions, selectors, and helpers
45
+ * for easy integration into any Redux store without internal dependencies.
46
+ */
258
47
 
259
- // Selectors for follow state
260
- exports.resetFollowState = resetFollowState;
261
- exports.clearFollowError = clearFollowError;
262
- exports.setFollowingStatus = setFollowingStatus;
263
- const selectIsUserBeingFetched = (state, userId) => state.follow?.fetchingUsers?.[userId] ?? false;
264
- exports.selectIsUserBeingFetched = selectIsUserBeingFetched;
48
+ // Export individual slices and their components
49
+
50
+ // Export setup helper for easy integration
51
+
52
+ // Export types for external store integration
53
+
54
+ // For backward compatibility: create a legacy store instance
55
+ // This will be deprecated in favor of setupOxyStore()
56
+
57
+ /**
58
+ * @deprecated Use setupOxyStore() instead to integrate with your app's store
59
+ * This internal store will be removed in a future version
60
+ */
265
61
  const store = exports.store = (0, _toolkit.configureStore)({
266
- reducer: {
267
- auth: authSlice.reducer,
268
- follow: followSlice.reducer
269
- }
62
+ reducer: (0, _setupOxyStore.setupOxyStore)()
270
63
  });
64
+ // Legacy selector (deprecated)
65
+ const selectIsUserBeingFetched = (state, userId) => state.follow.fetchingUsers[userId] ?? false;
66
+ exports.selectIsUserBeingFetched = selectIsUserBeingFetched;
271
67
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_toolkit","require","initialAuthState","user","isAuthenticated","isLoading","error","initialFollowState","followingUsers","loadingUsers","fetchingUsers","errors","fetchFollowStatus","exports","createAsyncThunk","userId","oxyServices","rejectWithValue","response","getFollowStatus","isFollowing","status","message","includes","console","warn","condition","getState","state","follow","isAlreadyFetching","log","toggleFollowUser","isCurrentlyFollowing","dispatch","newFollowState","unfollowUser","followUser","isSuccess","success","action","errorMessage","data","actualStatus","type","payload","syncError","authSlice","createSlice","name","initialState","reducers","loginStart","loginSuccess","loginFailure","logout","followSlice","setFollowingStatus","clearFollowError","resetFollowState","extraReducers","builder","addCase","pending","meta","arg","fulfilled","rejected","actions","selectIsUserBeingFetched","store","configureStore","reducer","auth"],"sourceRoot":"../../../../src","sources":["ui/store/index.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAqBA,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AClCa,KAAK,CAACjB,MAAM,CAACI,MAAM,CAAC,GAAGyB,MAAM,CAAClC,KAAK,CAACgB,OAAO,IAAI,gCAAgC;IACjF,CAAC,CAAC;EACN;AACF,CAAC,CAAC;AAEK,MAAM;EAAE8B,UAAU;EAAEC,YAAY;EAAEC,YAAY;EAAEC;AAAO,CAAC,GAAGR,SAAS,CAACqB,OAAO;AAACvD,OAAA,CAAA0C,MAAA,GAAAA,MAAA;AAAA1C,OAAA,CAAAyC,YAAA,GAAAA,YAAA;AAAAzC,OAAA,CAAAwC,YAAA,GAAAA,YAAA;AAAAxC,OAAA,CAAAuC,UAAA,GAAAA,UAAA;AAC7E,MAAM;EAAEK,kBAAkB;EAAEC,gBAAgB;EAAEC;AAAiB,CAAC,GAAGH,WAAW,CAACY,OAAO;;AAE7F;AAAAvD,OAAA,CAAA8C,gBAAA,GAAAA,gBAAA;AAAA9C,OAAA,CAAA6C,gBAAA,GAAAA,gBAAA;AAAA7C,OAAA,CAAA4C,kBAAA,GAAAA,kBAAA;AACO,MAAMY,wBAAwB,GAAGA,CAACzC,KAAgB,EAAEb,MAAc,KACvEa,KAAK,CAACC,MAAM,EAAEnB,aAAa,GAAGK,MAAM,CAAC,IAAI,KAAK;AAACF,OAAA,CAAAwD,wBAAA,GAAAA,wBAAA;AAE1C,MAAMC,KAAK,GAAAzD,OAAA,CAAAyD,KAAA,GAAG,IAAAC,uBAAc,EAAC;EAClCC,OAAO,EAAE;IACPC,IAAI,EAAE1B,SAAS,CAACyB,OAAO;IACvB3C,MAAM,EAAE2B,WAAW,CAACgB;EACtB;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_slices","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_setupOxyStore","_toolkit","store","configureStore","reducer","setupOxyStore","selectIsUserBeingFetched","state","userId","follow","fetchingUsers"],"sourceRoot":"../../../../src","sources":["ui/store/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AAGA,IAAAS,cAAA,GAAAb,OAAA;AAOA,IAAAc,QAAA,GAAAd,OAAA;AAnBA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAGA;;AAGA;;AAGA;AACA;;AAIA;AACA;AACA;AACA;AACO,MAAMe,KAAK,GAAAN,OAAA,CAAAM,KAAA,GAAG,IAAAC,uBAAc,EAAC;EAClCC,OAAO,EAAE,IAAAC,4BAAa,EAAC;AACzB,CAAC,CAAC;AAKF;AACO,MAAMC,wBAAwB,GAAGA,CAACC,KAAgB,EAAEC,MAAc,KACvED,KAAK,CAACE,MAAM,CAACC,aAAa,CAACF,MAAM,CAAC,IAAI,KAAK;AAACZ,OAAA,CAAAU,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.oxyReducers = void 0;
7
+ exports.setupOxyStore = setupOxyStore;
8
+ var _authSlice = require("./slices/authSlice");
9
+ var _followSlice = require("./slices/followSlice");
10
+ /**
11
+ * Setup helper for Oxy Store
12
+ * Returns all Oxy reducers ready to be spread into a host app's Redux store
13
+ *
14
+ * Usage:
15
+ * ```ts
16
+ * const store = configureStore({
17
+ * reducer: {
18
+ * ...setupOxyStore(),
19
+ * appSpecificReducer,
20
+ * },
21
+ * });
22
+ * ```
23
+ */
24
+ function setupOxyStore() {
25
+ return {
26
+ auth: _authSlice.authReducer,
27
+ follow: _followSlice.followReducer
28
+ };
29
+ }
30
+
31
+ /**
32
+ * Tree-shakable version where you can pick specific reducers
33
+ *
34
+ * Usage:
35
+ * ```ts
36
+ * const store = configureStore({
37
+ * reducer: {
38
+ * ...setupOxyStore.pick('auth'), // Only include auth
39
+ * // or
40
+ * ...setupOxyStore.pick('auth', 'follow'), // Include both
41
+ * appSpecificReducer,
42
+ * },
43
+ * });
44
+ * ```
45
+ */
46
+ setupOxyStore.pick = function (...keys) {
47
+ const allReducers = setupOxyStore();
48
+ const pickedReducers = {};
49
+ for (const key of keys) {
50
+ if (key in allReducers) {
51
+ // Use bracket notation with explicit typing
52
+ pickedReducers[key] = allReducers[key];
53
+ }
54
+ }
55
+ return pickedReducers;
56
+ };
57
+
58
+ // Export individual reducers for maximum flexibility
59
+ const oxyReducers = exports.oxyReducers = {
60
+ auth: _authSlice.authReducer,
61
+ follow: _followSlice.followReducer
62
+ };
63
+ //# sourceMappingURL=setupOxyStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_authSlice","require","_followSlice","setupOxyStore","auth","authReducer","follow","followReducer","pick","keys","allReducers","pickedReducers","key","oxyReducers","exports"],"sourceRoot":"../../../../src","sources":["ui/store/setupOxyStore.ts"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,aAAaA,CAAA,EAAG;EAC9B,OAAO;IACLC,IAAI,EAAEC,sBAAW;IACjBC,MAAM,EAAEC;EACV,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAJ,aAAa,CAACK,IAAI,GAAG,UAAS,GAAGC,IAA8B,EAAE;EAC/D,MAAMC,WAAW,GAAGP,aAAa,CAAC,CAAC;EACnC,MAAMQ,cAAc,GAAG,CAAC,CAA8C;EAEtE,KAAK,MAAMC,GAAG,IAAIH,IAAI,EAAE;IACtB,IAAIG,GAAG,IAAIF,WAAW,EAAE;MACtB;MACCC,cAAc,CAAyBC,GAAG,CAAC,GAAGF,WAAW,CAACE,GAAG,CAAC;IACjE;EACF;EAEA,OAAOD,cAAc;AACvB,CAAC;;AAED;AACO,MAAME,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzBT,IAAI,EAAEC,sBAAW;EACjBC,MAAM,EAAEC;AACV,CAAC","ignoreList":[]}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.logout = exports.loginSuccess = exports.loginStart = exports.loginFailure = exports.authSlice = exports.authSelectors = exports.authReducer = exports.authActions = void 0;
7
+ var _toolkit = require("@reduxjs/toolkit");
8
+ var _types = require("./types");
9
+ const authSlice = exports.authSlice = (0, _toolkit.createSlice)({
10
+ name: 'auth',
11
+ initialState: _types.initialAuthState,
12
+ reducers: {
13
+ loginStart(state) {
14
+ state.isLoading = true;
15
+ state.error = null;
16
+ },
17
+ loginSuccess(state, action) {
18
+ state.isLoading = false;
19
+ state.isAuthenticated = true;
20
+ state.user = action.payload;
21
+ },
22
+ loginFailure(state, action) {
23
+ state.isLoading = false;
24
+ state.error = action.payload;
25
+ },
26
+ logout(state) {
27
+ state.user = null;
28
+ state.isAuthenticated = false;
29
+ }
30
+ }
31
+ });
32
+
33
+ // Export actions
34
+ const authActions = exports.authActions = authSlice.actions;
35
+ const {
36
+ loginStart,
37
+ loginSuccess,
38
+ loginFailure,
39
+ logout
40
+ } = authSlice.actions;
41
+
42
+ // Export selectors
43
+ exports.logout = logout;
44
+ exports.loginFailure = loginFailure;
45
+ exports.loginSuccess = loginSuccess;
46
+ exports.loginStart = loginStart;
47
+ const authSelectors = exports.authSelectors = {
48
+ selectUser: state => state.auth.user,
49
+ selectIsAuthenticated: state => state.auth.isAuthenticated,
50
+ selectIsLoading: state => state.auth.isLoading,
51
+ selectError: state => state.auth.error
52
+ };
53
+
54
+ // Export reducer
55
+ const authReducer = exports.authReducer = authSlice.reducer;
56
+ //# sourceMappingURL=authSlice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_toolkit","require","_types","authSlice","exports","createSlice","name","initialState","initialAuthState","reducers","loginStart","state","isLoading","error","loginSuccess","action","isAuthenticated","user","payload","loginFailure","logout","authActions","actions","authSelectors","selectUser","auth","selectIsAuthenticated","selectIsLoading","selectError","authReducer","reducer"],"sourceRoot":"../../../../../src","sources":["ui/store/slices/authSlice.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAGA,IAAAC,MAAA,GAAAD,OAAA;AAEO,MAAME,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAAE,oBAAW,EAAC;EACnCC,IAAI,EAAE,MAAM;EACZC,YAAY,EAAEC,uBAAgB;EAC9BC,QAAQ,EAAE;IACRC,UAAUA,CAACC,KAAgB,EAAE;MAC3BA,KAAK,CAACC,SAAS,GAAG,IAAI;MACtBD,KAAK,CAACE,KAAK,GAAG,IAAI;IACpB,CAAC;IACDC,YAAYA,CAACH,KAAgB,EAAEI,MAA2B,EAAE;MAC1DJ,KAAK,CAACC,SAAS,GAAG,KAAK;MACvBD,KAAK,CAACK,eAAe,GAAG,IAAI;MAC5BL,KAAK,CAACM,IAAI,GAAGF,MAAM,CAACG,OAAO;IAC7B,CAAC;IACDC,YAAYA,CAACR,KAAgB,EAAEI,MAA6B,EAAE;MAC5DJ,KAAK,CAACC,SAAS,GAAG,KAAK;MACvBD,KAAK,CAACE,KAAK,GAAGE,MAAM,CAACG,OAAO;IAC9B,CAAC;IACDE,MAAMA,CAACT,KAAgB,EAAE;MACvBA,KAAK,CA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