napp-wallet-post-feed-test 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +157 -0
- package/dist/0ae4e6254fc19607c79e.woff2 +0 -0
- package/dist/1f38a564cd9eae27ebc3.woff2 +0 -0
- package/dist/432.napp.bundle.js +1 -0
- package/dist/661bd6b7245d5205d3e1.woff2 +0 -0
- package/dist/Post.browser.js +24 -0
- package/dist/Post.js +606 -0
- package/dist/components/CodeSplitting.js +88 -0
- package/dist/components/Deeplink/Deeplink.js +813 -0
- package/dist/components/EditPostModal.js +916 -0
- package/dist/components/ErrorBoundary.js +74 -0
- package/dist/components/ExpandedTest/ExpandableText.js +38 -0
- package/dist/components/FilterDropdown.js +71 -0
- package/dist/components/ImagePreloader.js +1194 -0
- package/dist/components/Loader.js +42 -0
- package/dist/components/LoadingSkeletons.js +978 -0
- package/dist/components/MediaRenderer.js +759 -0
- package/dist/components/MemoryManager.js +302 -0
- package/dist/components/PostCard.js +446 -0
- package/dist/components/PostViews.js +247 -0
- package/dist/components/Postfeed.js +251 -0
- package/dist/components/Svgloader.js +231 -0
- package/dist/components/UploadPostModal.js +1352 -0
- package/dist/components/VideoPlayer.js +1304 -0
- package/dist/components/ViewPostModal/MediaPreloadManager.js +379 -0
- package/dist/components/ViewPostModal/README.md +164 -0
- package/dist/components/ViewPostModal/ShareModal.js +96 -0
- package/dist/components/ViewPostModal/VirtualPost.js +248 -0
- package/dist/components/ViewPostModal/useBodyScrollLock.js +42 -0
- package/dist/components/ViewPostModal/useDeviceDetection.js +38 -0
- package/dist/components/ViewPostModal/useFullscreenManager.js +43 -0
- package/dist/components/ViewPostModal/useNavigationManager.js +185 -0
- package/dist/components/ViewPostModal/usePostDataManager.js +143 -0
- package/dist/components/ViewPostModal/usePreloadManager.js +97 -0
- package/dist/components/ViewPostModal/useShareManager.js +76 -0
- package/dist/components/ViewPostModal.js +552 -0
- package/dist/components/VirtualPostFeed.js +475 -0
- package/dist/components/hooks/useFeedVisibility.js +72 -0
- package/dist/components/hooks/useIntersectionObserver.js +54 -0
- package/dist/components/hooks/usePerformanceMonitor.js +159 -0
- package/dist/components/hooks/usePostApi.js +381 -0
- package/dist/components/hooks/usePostState.js +116 -0
- package/dist/components/useImagePreloading.js +231 -0
- package/dist/e7461d69dbbff1310a5c.woff2 +0 -0
- package/dist/helper/Helper.js +504 -0
- package/dist/index.browser.js +5 -0
- package/dist/index.js +3 -0
- package/dist/napp.bundle.js +2 -0
- package/dist/napp.bundle.js.LICENSE.txt +733 -0
- package/dist/style/post.css +5751 -0
- package/dist/style/post.css.map +1 -0
- package/dist/style/post.purged.css +3236 -0
- package/dist/style/post.scss +5910 -0
- package/dist/utils/bootstrap.js +4 -0
- package/dist/utils/ffmpegLoader.js +40 -0
- package/package.json +70 -0
|
@@ -0,0 +1,978 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import PropTypes from 'prop-types';
|
|
15
|
+
|
|
16
|
+
// Get theme-aware colors based on the actual theme used in the app
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
var getThemeColors = function getThemeColors() {
|
|
19
|
+
var _document$body, _document$body2;
|
|
20
|
+
// Check if we're in a dark theme environment
|
|
21
|
+
var isDarkTheme = ((_document$body = document.body) === null || _document$body === void 0 ? void 0 : _document$body.style.backgroundColor) === '#03001c' || ((_document$body2 = document.body) === null || _document$body2 === void 0 ? void 0 : _document$body2.classList.contains('dark')) || window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
22
|
+
if (isDarkTheme) {
|
|
23
|
+
return {
|
|
24
|
+
primary: '#4231c0',
|
|
25
|
+
background: '#03001c',
|
|
26
|
+
cardBackground: '#0b111d',
|
|
27
|
+
skeletonLight: '#1a1a2e',
|
|
28
|
+
skeletonDark: '#16213e',
|
|
29
|
+
text: '#ffffff',
|
|
30
|
+
border: '#2d3748',
|
|
31
|
+
shimmerLight: '#232c39',
|
|
32
|
+
shimmerDark: '#2c3542'
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Light theme fallback
|
|
37
|
+
return {
|
|
38
|
+
primary: '#4231c0',
|
|
39
|
+
background: '#ffffff',
|
|
40
|
+
cardBackground: '#f8f9fa',
|
|
41
|
+
skeletonLight: '#e9ecef',
|
|
42
|
+
skeletonDark: '#dee2e6',
|
|
43
|
+
text: '#000000',
|
|
44
|
+
border: '#ced4da',
|
|
45
|
+
shimmerLight: '#f6f7f8',
|
|
46
|
+
shimmerDark: '#e9ecef'
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// Enhanced skeleton animation styles with theme-aware colors
|
|
51
|
+
var skeletonStyles = {
|
|
52
|
+
shimmer: {
|
|
53
|
+
background: "linear-gradient(90deg, ".concat(getThemeColors().skeletonLight, " 25%, ").concat(getThemeColors().skeletonDark, " 50%, ").concat(getThemeColors().skeletonLight, " 75%)"),
|
|
54
|
+
backgroundSize: '200% 100%',
|
|
55
|
+
animation: 'shimmer 1.5s infinite'
|
|
56
|
+
},
|
|
57
|
+
pulse: {
|
|
58
|
+
backgroundColor: getThemeColors().skeletonDark,
|
|
59
|
+
animation: 'pulse 1.5s ease-in-out infinite'
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// CSS animations for skeletons
|
|
64
|
+
var skeletonAnimations = "\n @keyframes shimmer {\n 0% { background-position: -200% 0; }\n 100% { background-position: 200% 0; }\n }\n \n @keyframes pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n \n @keyframes fadeIn {\n from { opacity: 0; transform: translateY(10px); }\n to { opacity: 1; transform: translateY(0); }\n }\n \n @keyframes placeHolderShimmer {\n 0% { background-position: -800px 0; }\n 100% { background-position: 800px 0; }\n }\n";
|
|
65
|
+
|
|
66
|
+
// Inject animations into document head
|
|
67
|
+
if (typeof document !== 'undefined') {
|
|
68
|
+
var style = document.createElement('style');
|
|
69
|
+
style.textContent = skeletonAnimations;
|
|
70
|
+
if (!document.head.querySelector('#skeleton-animations')) {
|
|
71
|
+
style.id = 'skeleton-animations';
|
|
72
|
+
document.head.appendChild(style);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Enhanced Post Card Skeleton
|
|
78
|
+
*/
|
|
79
|
+
export var PostCardSkeleton = function PostCardSkeleton(_ref) {
|
|
80
|
+
var _ref$showMedia = _ref.showMedia,
|
|
81
|
+
showMedia = _ref$showMedia === void 0 ? true : _ref$showMedia,
|
|
82
|
+
_ref$showActions = _ref.showActions,
|
|
83
|
+
showActions = _ref$showActions === void 0 ? true : _ref$showActions;
|
|
84
|
+
var colors = getThemeColors();
|
|
85
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
86
|
+
className: "post-card-skeleton",
|
|
87
|
+
style: {
|
|
88
|
+
padding: '15px',
|
|
89
|
+
margin: '10px 0',
|
|
90
|
+
backgroundColor: colors.cardBackground,
|
|
91
|
+
boxShadow: "0 2px 4px ".concat(colors.border),
|
|
92
|
+
animation: 'fadeIn 0.3s ease-out',
|
|
93
|
+
border: "1px solid ".concat(colors.border)
|
|
94
|
+
},
|
|
95
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
96
|
+
style: {
|
|
97
|
+
display: 'flex',
|
|
98
|
+
alignItems: 'center',
|
|
99
|
+
marginBottom: '15px'
|
|
100
|
+
},
|
|
101
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
102
|
+
style: _objectSpread(_objectSpread({
|
|
103
|
+
width: '40px',
|
|
104
|
+
height: '40px',
|
|
105
|
+
borderRadius: '50%'
|
|
106
|
+
}, skeletonStyles.shimmer), {}, {
|
|
107
|
+
marginRight: '12px'
|
|
108
|
+
})
|
|
109
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
110
|
+
style: {
|
|
111
|
+
flex: 1
|
|
112
|
+
},
|
|
113
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
114
|
+
style: _objectSpread(_objectSpread({
|
|
115
|
+
height: '16px',
|
|
116
|
+
width: '120px'
|
|
117
|
+
}, skeletonStyles.shimmer), {}, {
|
|
118
|
+
marginBottom: '6px'
|
|
119
|
+
})
|
|
120
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
121
|
+
style: _objectSpread({
|
|
122
|
+
height: '12px',
|
|
123
|
+
width: '80px'
|
|
124
|
+
}, skeletonStyles.shimmer)
|
|
125
|
+
})]
|
|
126
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
127
|
+
style: _objectSpread({
|
|
128
|
+
width: '24px',
|
|
129
|
+
height: '24px',
|
|
130
|
+
borderRadius: '50%'
|
|
131
|
+
}, skeletonStyles.pulse)
|
|
132
|
+
})]
|
|
133
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
134
|
+
style: {
|
|
135
|
+
marginBottom: '15px'
|
|
136
|
+
},
|
|
137
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
138
|
+
style: _objectSpread(_objectSpread({
|
|
139
|
+
height: '18px',
|
|
140
|
+
width: '90%'
|
|
141
|
+
}, skeletonStyles.shimmer), {}, {
|
|
142
|
+
marginBottom: '8px'
|
|
143
|
+
})
|
|
144
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
145
|
+
style: _objectSpread(_objectSpread({
|
|
146
|
+
height: '14px',
|
|
147
|
+
width: '70%'
|
|
148
|
+
}, skeletonStyles.shimmer), {}, {
|
|
149
|
+
marginBottom: '6px'
|
|
150
|
+
})
|
|
151
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
152
|
+
style: _objectSpread({
|
|
153
|
+
height: '14px',
|
|
154
|
+
width: '60%'
|
|
155
|
+
}, skeletonStyles.shimmer)
|
|
156
|
+
})]
|
|
157
|
+
}), showMedia && /*#__PURE__*/_jsx("div", {
|
|
158
|
+
style: _objectSpread(_objectSpread({
|
|
159
|
+
height: '200px'
|
|
160
|
+
}, skeletonStyles.shimmer), {}, {
|
|
161
|
+
marginBottom: '15px'
|
|
162
|
+
})
|
|
163
|
+
}), showActions && /*#__PURE__*/_jsxs("div", {
|
|
164
|
+
style: {
|
|
165
|
+
display: 'flex',
|
|
166
|
+
justifyContent: 'space-between',
|
|
167
|
+
alignItems: 'center'
|
|
168
|
+
},
|
|
169
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
170
|
+
style: {
|
|
171
|
+
display: 'flex',
|
|
172
|
+
gap: '20px'
|
|
173
|
+
},
|
|
174
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
175
|
+
style: _objectSpread({
|
|
176
|
+
width: '60px',
|
|
177
|
+
height: '20px',
|
|
178
|
+
borderRadius: '10px'
|
|
179
|
+
}, skeletonStyles.pulse)
|
|
180
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
181
|
+
style: _objectSpread({
|
|
182
|
+
width: '60px',
|
|
183
|
+
height: '20px',
|
|
184
|
+
borderRadius: '10px'
|
|
185
|
+
}, skeletonStyles.pulse)
|
|
186
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
187
|
+
style: _objectSpread({
|
|
188
|
+
width: '60px',
|
|
189
|
+
height: '20px',
|
|
190
|
+
borderRadius: '10px'
|
|
191
|
+
}, skeletonStyles.pulse)
|
|
192
|
+
})]
|
|
193
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
194
|
+
style: _objectSpread({
|
|
195
|
+
width: '40px',
|
|
196
|
+
height: '20px',
|
|
197
|
+
borderRadius: '10px'
|
|
198
|
+
}, skeletonStyles.pulse)
|
|
199
|
+
})]
|
|
200
|
+
})]
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Enhanced Media Grid Skeleton with better preloading
|
|
206
|
+
*/
|
|
207
|
+
export var MediaGridSkeleton = function MediaGridSkeleton(_ref2) {
|
|
208
|
+
var _ref2$itemCount = _ref2.itemCount,
|
|
209
|
+
itemCount = _ref2$itemCount === void 0 ? 3 : _ref2$itemCount,
|
|
210
|
+
_ref2$aspectRatio = _ref2.aspectRatio,
|
|
211
|
+
aspectRatio = _ref2$aspectRatio === void 0 ? '16/9' : _ref2$aspectRatio,
|
|
212
|
+
_ref2$className = _ref2.className,
|
|
213
|
+
className = _ref2$className === void 0 ? '' : _ref2$className;
|
|
214
|
+
var colors = getThemeColors();
|
|
215
|
+
var getGridLayout = function getGridLayout() {
|
|
216
|
+
switch (itemCount) {
|
|
217
|
+
case 1:
|
|
218
|
+
return {
|
|
219
|
+
gridTemplateColumns: '1fr',
|
|
220
|
+
gridTemplateRows: '1fr'
|
|
221
|
+
};
|
|
222
|
+
case 2:
|
|
223
|
+
return {
|
|
224
|
+
gridTemplateColumns: '1fr 1fr',
|
|
225
|
+
gridTemplateRows: '1fr',
|
|
226
|
+
gap: '4px'
|
|
227
|
+
};
|
|
228
|
+
case 3:
|
|
229
|
+
return {
|
|
230
|
+
gridTemplateColumns: '1fr 1fr',
|
|
231
|
+
gridTemplateRows: '1fr 1fr',
|
|
232
|
+
gap: '4px'
|
|
233
|
+
};
|
|
234
|
+
default:
|
|
235
|
+
return {
|
|
236
|
+
gridTemplateColumns: '1fr 1fr',
|
|
237
|
+
gridTemplateRows: '1fr 1fr',
|
|
238
|
+
gap: '4px'
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
var _aspectRatio$split$ma = aspectRatio.split('/').map(Number),
|
|
243
|
+
_aspectRatio$split$ma2 = _slicedToArray(_aspectRatio$split$ma, 2),
|
|
244
|
+
width = _aspectRatio$split$ma2[0],
|
|
245
|
+
height = _aspectRatio$split$ma2[1];
|
|
246
|
+
var paddingTop = height / width * 100;
|
|
247
|
+
|
|
248
|
+
// Enhanced skeleton styles with better animations
|
|
249
|
+
var enhancedSkeletonStyles = {
|
|
250
|
+
shimmer: {
|
|
251
|
+
background: "linear-gradient(90deg, ".concat(colors.skeletonLight, " 25%, ").concat(colors.skeletonDark, " 50%, ").concat(colors.skeletonLight, " 75%)"),
|
|
252
|
+
backgroundSize: '200% 100%',
|
|
253
|
+
animation: 'shimmer 1.5s infinite',
|
|
254
|
+
position: 'relative',
|
|
255
|
+
overflow: 'hidden'
|
|
256
|
+
},
|
|
257
|
+
pulse: {
|
|
258
|
+
backgroundColor: colors.skeletonDark,
|
|
259
|
+
animation: 'pulse 1.5s ease-in-out infinite',
|
|
260
|
+
position: 'relative'
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
// Staggered animation delays for grid items
|
|
265
|
+
var getStaggeredDelay = function getStaggeredDelay(index) {
|
|
266
|
+
return "".concat(index * 0.1, "s");
|
|
267
|
+
};
|
|
268
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
269
|
+
className: "enhanced-media-grid-skeleton ".concat(className),
|
|
270
|
+
style: _objectSpread(_objectSpread({
|
|
271
|
+
display: 'grid'
|
|
272
|
+
}, getGridLayout()), {}, {
|
|
273
|
+
overflow: 'hidden',
|
|
274
|
+
position: 'relative',
|
|
275
|
+
width: '100%',
|
|
276
|
+
height: '100%',
|
|
277
|
+
minHeight: '200px'
|
|
278
|
+
}),
|
|
279
|
+
children: [Array.from({
|
|
280
|
+
length: Math.min(itemCount, 3)
|
|
281
|
+
}).map(function (_, index) {
|
|
282
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
283
|
+
className: "grid-skeleton-item grid-skeleton-item-".concat(index),
|
|
284
|
+
style: _objectSpread({
|
|
285
|
+
position: 'relative',
|
|
286
|
+
width: '100%',
|
|
287
|
+
height: '100%',
|
|
288
|
+
animationDelay: getStaggeredDelay(index)
|
|
289
|
+
}, enhancedSkeletonStyles.shimmer),
|
|
290
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
291
|
+
className: "skeleton-shimmer-overlay",
|
|
292
|
+
style: {
|
|
293
|
+
position: 'absolute',
|
|
294
|
+
top: 0,
|
|
295
|
+
left: 0,
|
|
296
|
+
right: 0,
|
|
297
|
+
bottom: 0,
|
|
298
|
+
background: "linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%)",
|
|
299
|
+
animation: 'shimmer 2s infinite',
|
|
300
|
+
animationDelay: getStaggeredDelay(index)
|
|
301
|
+
}
|
|
302
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
303
|
+
style: {
|
|
304
|
+
position: 'absolute',
|
|
305
|
+
top: '2px',
|
|
306
|
+
left: '2px',
|
|
307
|
+
right: '2px',
|
|
308
|
+
bottom: '2px',
|
|
309
|
+
border: "1px solid ".concat(colors.border),
|
|
310
|
+
opacity: 0.3
|
|
311
|
+
}
|
|
312
|
+
})]
|
|
313
|
+
}, index);
|
|
314
|
+
}), itemCount > 3 && /*#__PURE__*/_jsxs("div", {
|
|
315
|
+
className: "extra-items-overlay",
|
|
316
|
+
style: {
|
|
317
|
+
position: 'absolute',
|
|
318
|
+
top: '50%',
|
|
319
|
+
left: '50%',
|
|
320
|
+
transform: 'translate(-50%, -50%)',
|
|
321
|
+
backgroundColor: colors.primary,
|
|
322
|
+
color: colors.text,
|
|
323
|
+
padding: '8px 12px',
|
|
324
|
+
borderRadius: '6px',
|
|
325
|
+
fontSize: '14px',
|
|
326
|
+
fontWeight: 'bold',
|
|
327
|
+
boxShadow: "0 2px 8px rgba(0,0,0,0.2)",
|
|
328
|
+
zIndex: 10,
|
|
329
|
+
animation: 'pulse 2s ease-in-out infinite'
|
|
330
|
+
},
|
|
331
|
+
children: ["+", itemCount - 3]
|
|
332
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
333
|
+
className: "grid-loading-indicator",
|
|
334
|
+
style: {
|
|
335
|
+
position: 'absolute',
|
|
336
|
+
top: '8px',
|
|
337
|
+
right: '8px',
|
|
338
|
+
width: '20px',
|
|
339
|
+
height: '20px',
|
|
340
|
+
borderRadius: '50%',
|
|
341
|
+
border: "2px solid ".concat(colors.border),
|
|
342
|
+
borderTop: "2px solid ".concat(colors.primary),
|
|
343
|
+
animation: 'spin 1s linear infinite',
|
|
344
|
+
zIndex: 5
|
|
345
|
+
}
|
|
346
|
+
})]
|
|
347
|
+
});
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Enhanced Post Grid Skeleton for feed
|
|
352
|
+
*/
|
|
353
|
+
export var PostGridSkeleton = function PostGridSkeleton(_ref3) {
|
|
354
|
+
var _ref3$count = _ref3.count,
|
|
355
|
+
count = _ref3$count === void 0 ? 6 : _ref3$count,
|
|
356
|
+
_ref3$className = _ref3.className,
|
|
357
|
+
className = _ref3$className === void 0 ? '' : _ref3$className;
|
|
358
|
+
var colors = getThemeColors();
|
|
359
|
+
return /*#__PURE__*/_jsx("div", {
|
|
360
|
+
className: "post-grid-skeleton ".concat(className),
|
|
361
|
+
style: {
|
|
362
|
+
display: 'grid',
|
|
363
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',
|
|
364
|
+
gap: '16px',
|
|
365
|
+
padding: '16px'
|
|
366
|
+
},
|
|
367
|
+
children: Array.from({
|
|
368
|
+
length: count
|
|
369
|
+
}).map(function (_, index) {
|
|
370
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
371
|
+
className: "post-grid-item-skeleton",
|
|
372
|
+
style: {
|
|
373
|
+
backgroundColor: colors.cardBackground,
|
|
374
|
+
borderRadius: '12px',
|
|
375
|
+
padding: '16px',
|
|
376
|
+
border: "1px solid ".concat(colors.border),
|
|
377
|
+
animation: 'fadeIn 0.3s ease-out',
|
|
378
|
+
animationDelay: "".concat(index * 0.1, "s"),
|
|
379
|
+
opacity: 0,
|
|
380
|
+
animationFillMode: 'forwards'
|
|
381
|
+
},
|
|
382
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
383
|
+
style: {
|
|
384
|
+
display: 'flex',
|
|
385
|
+
alignItems: 'center',
|
|
386
|
+
marginBottom: '12px'
|
|
387
|
+
},
|
|
388
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
389
|
+
style: _objectSpread(_objectSpread({
|
|
390
|
+
width: '40px',
|
|
391
|
+
height: '40px',
|
|
392
|
+
borderRadius: '50%'
|
|
393
|
+
}, skeletonStyles.shimmer), {}, {
|
|
394
|
+
marginRight: '12px'
|
|
395
|
+
})
|
|
396
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
397
|
+
style: {
|
|
398
|
+
flex: 1
|
|
399
|
+
},
|
|
400
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
401
|
+
style: _objectSpread(_objectSpread({
|
|
402
|
+
height: '14px',
|
|
403
|
+
width: '80px'
|
|
404
|
+
}, skeletonStyles.shimmer), {}, {
|
|
405
|
+
marginBottom: '4px'
|
|
406
|
+
})
|
|
407
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
408
|
+
style: _objectSpread({
|
|
409
|
+
height: '12px',
|
|
410
|
+
width: '60px'
|
|
411
|
+
}, skeletonStyles.shimmer)
|
|
412
|
+
})]
|
|
413
|
+
})]
|
|
414
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
415
|
+
style: {
|
|
416
|
+
marginBottom: '12px'
|
|
417
|
+
},
|
|
418
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
419
|
+
style: _objectSpread(_objectSpread({
|
|
420
|
+
height: '16px',
|
|
421
|
+
width: '90%'
|
|
422
|
+
}, skeletonStyles.shimmer), {}, {
|
|
423
|
+
marginBottom: '6px'
|
|
424
|
+
})
|
|
425
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
426
|
+
style: _objectSpread({
|
|
427
|
+
height: '12px',
|
|
428
|
+
width: '70%'
|
|
429
|
+
}, skeletonStyles.shimmer)
|
|
430
|
+
})]
|
|
431
|
+
}), /*#__PURE__*/_jsx(MediaGridSkeleton, {
|
|
432
|
+
itemCount: Math.floor(Math.random() * 3) + 1,
|
|
433
|
+
aspectRatio: "16/9"
|
|
434
|
+
})]
|
|
435
|
+
}, index);
|
|
436
|
+
})
|
|
437
|
+
});
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Enhanced Feed Loading Skeleton with grid layout
|
|
442
|
+
*/
|
|
443
|
+
export var FeedLoadingSkeleton = function FeedLoadingSkeleton(_ref4) {
|
|
444
|
+
var _ref4$count = _ref4.count,
|
|
445
|
+
count = _ref4$count === void 0 ? 3 : _ref4$count,
|
|
446
|
+
_ref4$layout = _ref4.layout,
|
|
447
|
+
layout = _ref4$layout === void 0 ? 'list' : _ref4$layout;
|
|
448
|
+
if (layout === 'grid') {
|
|
449
|
+
return /*#__PURE__*/_jsx(PostGridSkeleton, {
|
|
450
|
+
count: count
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
return /*#__PURE__*/_jsx("div", {
|
|
454
|
+
className: "feed-loading-skeleton",
|
|
455
|
+
children: Array.from({
|
|
456
|
+
length: count
|
|
457
|
+
}).map(function (_, index) {
|
|
458
|
+
return /*#__PURE__*/_jsx(PostCardSkeleton, {
|
|
459
|
+
showMedia: index % 2 === 0 // Alternate showing media
|
|
460
|
+
,
|
|
461
|
+
showActions: true
|
|
462
|
+
}, index);
|
|
463
|
+
})
|
|
464
|
+
});
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Modal Loading Skeleton
|
|
469
|
+
*/
|
|
470
|
+
export var ModalLoadingSkeleton = function ModalLoadingSkeleton() {
|
|
471
|
+
var colors = getThemeColors();
|
|
472
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
473
|
+
className: "modal-loading-skeleton",
|
|
474
|
+
style: {
|
|
475
|
+
padding: '20px',
|
|
476
|
+
textAlign: 'center',
|
|
477
|
+
backgroundColor: colors.cardBackground
|
|
478
|
+
},
|
|
479
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
480
|
+
style: _objectSpread(_objectSpread({
|
|
481
|
+
width: '60px',
|
|
482
|
+
height: '60px',
|
|
483
|
+
borderRadius: '50%'
|
|
484
|
+
}, skeletonStyles.shimmer), {}, {
|
|
485
|
+
margin: '0 auto 20px'
|
|
486
|
+
})
|
|
487
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
488
|
+
style: _objectSpread(_objectSpread({
|
|
489
|
+
height: '20px',
|
|
490
|
+
width: '200px'
|
|
491
|
+
}, skeletonStyles.shimmer), {}, {
|
|
492
|
+
margin: '0 auto 10px'
|
|
493
|
+
})
|
|
494
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
495
|
+
style: _objectSpread(_objectSpread({
|
|
496
|
+
height: '16px',
|
|
497
|
+
width: '150px'
|
|
498
|
+
}, skeletonStyles.shimmer), {}, {
|
|
499
|
+
margin: '0 auto'
|
|
500
|
+
})
|
|
501
|
+
})]
|
|
502
|
+
});
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Video Player Skeleton
|
|
507
|
+
*/
|
|
508
|
+
export var VideoPlayerSkeleton = function VideoPlayerSkeleton(_ref5) {
|
|
509
|
+
var _ref5$aspectRatio = _ref5.aspectRatio,
|
|
510
|
+
aspectRatio = _ref5$aspectRatio === void 0 ? '16/9' : _ref5$aspectRatio;
|
|
511
|
+
var colors = getThemeColors();
|
|
512
|
+
var _aspectRatio$split$ma3 = aspectRatio.split('/').map(Number),
|
|
513
|
+
_aspectRatio$split$ma4 = _slicedToArray(_aspectRatio$split$ma3, 2),
|
|
514
|
+
width = _aspectRatio$split$ma4[0],
|
|
515
|
+
height = _aspectRatio$split$ma4[1];
|
|
516
|
+
var paddingTop = height / width * 100;
|
|
517
|
+
return /*#__PURE__*/_jsx("div", {
|
|
518
|
+
style: {
|
|
519
|
+
position: 'relative',
|
|
520
|
+
width: '100%',
|
|
521
|
+
paddingTop: "".concat(paddingTop, "%"),
|
|
522
|
+
backgroundColor: colors.skeletonLight,
|
|
523
|
+
overflow: 'hidden'
|
|
524
|
+
},
|
|
525
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
526
|
+
style: {
|
|
527
|
+
position: 'absolute',
|
|
528
|
+
top: '50%',
|
|
529
|
+
left: '50%',
|
|
530
|
+
transform: 'translate(-50%, -50%)',
|
|
531
|
+
width: '60px',
|
|
532
|
+
height: '60px',
|
|
533
|
+
borderRadius: '50%',
|
|
534
|
+
backgroundColor: colors.primary,
|
|
535
|
+
display: 'flex',
|
|
536
|
+
alignItems: 'center',
|
|
537
|
+
justifyContent: 'center',
|
|
538
|
+
color: colors.text,
|
|
539
|
+
fontSize: '24px'
|
|
540
|
+
},
|
|
541
|
+
children: /*#__PURE__*/_jsx("i", {
|
|
542
|
+
className: "fas fa-play"
|
|
543
|
+
})
|
|
544
|
+
})
|
|
545
|
+
});
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Profile Skeleton
|
|
550
|
+
*/
|
|
551
|
+
export var ProfileSkeleton = function ProfileSkeleton(_ref6) {
|
|
552
|
+
var _ref6$size = _ref6.size,
|
|
553
|
+
size = _ref6$size === void 0 ? 'medium' : _ref6$size;
|
|
554
|
+
var sizes = {
|
|
555
|
+
small: {
|
|
556
|
+
width: '32px',
|
|
557
|
+
height: '32px'
|
|
558
|
+
},
|
|
559
|
+
medium: {
|
|
560
|
+
width: '40px',
|
|
561
|
+
height: '40px'
|
|
562
|
+
},
|
|
563
|
+
large: {
|
|
564
|
+
width: '60px',
|
|
565
|
+
height: '60px'
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
return /*#__PURE__*/_jsx("div", {
|
|
569
|
+
style: _objectSpread(_objectSpread({}, sizes[size]), {}, {
|
|
570
|
+
borderRadius: '50%'
|
|
571
|
+
}, skeletonStyles.shimmer)
|
|
572
|
+
});
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Text Skeleton
|
|
577
|
+
*/
|
|
578
|
+
export var TextSkeleton = function TextSkeleton(_ref7) {
|
|
579
|
+
var _ref7$lines = _ref7.lines,
|
|
580
|
+
lines = _ref7$lines === void 0 ? 1 : _ref7$lines,
|
|
581
|
+
_ref7$width = _ref7.width,
|
|
582
|
+
width = _ref7$width === void 0 ? '100%' : _ref7$width,
|
|
583
|
+
_ref7$height = _ref7.height,
|
|
584
|
+
height = _ref7$height === void 0 ? '16px' : _ref7$height;
|
|
585
|
+
return /*#__PURE__*/_jsx("div", {
|
|
586
|
+
children: Array.from({
|
|
587
|
+
length: lines
|
|
588
|
+
}).map(function (_, index) {
|
|
589
|
+
return /*#__PURE__*/_jsx("div", {
|
|
590
|
+
style: _objectSpread(_objectSpread({
|
|
591
|
+
height: height,
|
|
592
|
+
width: index === lines - 1 ? '60%' : width
|
|
593
|
+
}, skeletonStyles.shimmer), {}, {
|
|
594
|
+
marginBottom: index < lines - 1 ? '8px' : '0'
|
|
595
|
+
})
|
|
596
|
+
}, index);
|
|
597
|
+
})
|
|
598
|
+
});
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Image Loader Skeleton (consolidated from PostcardLoader)
|
|
603
|
+
*/
|
|
604
|
+
export var PostImageLoader = function PostImageLoader(_ref8) {
|
|
605
|
+
var _ref8$aspectRatio = _ref8.aspectRatio,
|
|
606
|
+
aspectRatio = _ref8$aspectRatio === void 0 ? '16/9' : _ref8$aspectRatio,
|
|
607
|
+
_ref8$className = _ref8.className,
|
|
608
|
+
className = _ref8$className === void 0 ? '' : _ref8$className;
|
|
609
|
+
var colors = getThemeColors();
|
|
610
|
+
return /*#__PURE__*/_jsx("div", {
|
|
611
|
+
className: "post-image-skeleton ".concat(className),
|
|
612
|
+
style: {
|
|
613
|
+
aspectRatio: aspectRatio,
|
|
614
|
+
backgroundColor: colors.skeletonLight,
|
|
615
|
+
position: 'relative',
|
|
616
|
+
overflow: 'hidden'
|
|
617
|
+
},
|
|
618
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
619
|
+
className: "post-feed-img-loader enhanced-skeleton",
|
|
620
|
+
style: {
|
|
621
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
622
|
+
backgroundSize: '800px 104px',
|
|
623
|
+
animation: 'placeHolderShimmer 2s linear infinite',
|
|
624
|
+
width: '100%',
|
|
625
|
+
height: '100%',
|
|
626
|
+
minHeight: '98px'
|
|
627
|
+
},
|
|
628
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
629
|
+
className: "skeleton-shimmer"
|
|
630
|
+
})
|
|
631
|
+
})
|
|
632
|
+
});
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Video Loader Skeleton (consolidated from PostcardLoader)
|
|
637
|
+
*/
|
|
638
|
+
export var PostVideoLoader = function PostVideoLoader(_ref9) {
|
|
639
|
+
var _ref9$aspectRatio = _ref9.aspectRatio,
|
|
640
|
+
aspectRatio = _ref9$aspectRatio === void 0 ? '16/9' : _ref9$aspectRatio,
|
|
641
|
+
_ref9$className = _ref9.className,
|
|
642
|
+
className = _ref9$className === void 0 ? '' : _ref9$className;
|
|
643
|
+
var colors = getThemeColors();
|
|
644
|
+
return /*#__PURE__*/_jsx("div", {
|
|
645
|
+
className: "post-video-skeleton ".concat(className),
|
|
646
|
+
style: {
|
|
647
|
+
aspectRatio: aspectRatio,
|
|
648
|
+
backgroundColor: colors.skeletonLight,
|
|
649
|
+
position: 'relative',
|
|
650
|
+
overflow: 'hidden'
|
|
651
|
+
},
|
|
652
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
653
|
+
className: "post-feed-img-loader enhanced-skeleton",
|
|
654
|
+
style: {
|
|
655
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
656
|
+
backgroundSize: '800px 104px',
|
|
657
|
+
animation: 'placeHolderShimmer 2s linear infinite',
|
|
658
|
+
width: '100%',
|
|
659
|
+
height: '100%',
|
|
660
|
+
minHeight: '98px'
|
|
661
|
+
},
|
|
662
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
663
|
+
className: "skeleton-shimmer"
|
|
664
|
+
})
|
|
665
|
+
})
|
|
666
|
+
});
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Profile Loader Skeleton (consolidated from PostcardLoader)
|
|
671
|
+
*/
|
|
672
|
+
export var PostProfileLoader = function PostProfileLoader(_ref0) {
|
|
673
|
+
var _ref0$size = _ref0.size,
|
|
674
|
+
size = _ref0$size === void 0 ? '40px' : _ref0$size,
|
|
675
|
+
_ref0$className = _ref0.className,
|
|
676
|
+
className = _ref0$className === void 0 ? '' : _ref0$className;
|
|
677
|
+
var colors = getThemeColors();
|
|
678
|
+
return /*#__PURE__*/_jsx("div", {
|
|
679
|
+
className: "post-profile-skeleton ".concat(className),
|
|
680
|
+
style: {
|
|
681
|
+
width: size,
|
|
682
|
+
height: size,
|
|
683
|
+
backgroundColor: colors.skeletonLight,
|
|
684
|
+
borderRadius: '50%',
|
|
685
|
+
position: 'relative',
|
|
686
|
+
overflow: 'hidden'
|
|
687
|
+
},
|
|
688
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
689
|
+
className: "poster-profile-img-loader enhanced-skeleton",
|
|
690
|
+
style: {
|
|
691
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
692
|
+
backgroundSize: '800px 104px',
|
|
693
|
+
animation: 'placeHolderShimmer 2s linear infinite',
|
|
694
|
+
width: '100%',
|
|
695
|
+
height: '100%'
|
|
696
|
+
},
|
|
697
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
698
|
+
className: "skeleton-shimmer"
|
|
699
|
+
})
|
|
700
|
+
})
|
|
701
|
+
});
|
|
702
|
+
};
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Complete Post Loader (consolidated from PostcardLoader)
|
|
706
|
+
*/
|
|
707
|
+
export var CompletePostLoader = function CompletePostLoader() {
|
|
708
|
+
var colors = getThemeColors();
|
|
709
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
710
|
+
className: "post-card-skeleton enhanced-skeleton-card",
|
|
711
|
+
style: {
|
|
712
|
+
backgroundColor: colors.cardBackground,
|
|
713
|
+
padding: '15px',
|
|
714
|
+
margin: '10px 0',
|
|
715
|
+
border: "1px solid ".concat(colors.border)
|
|
716
|
+
},
|
|
717
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
718
|
+
className: "skeleton-profile-section",
|
|
719
|
+
style: {
|
|
720
|
+
display: 'flex',
|
|
721
|
+
alignItems: 'center',
|
|
722
|
+
marginBottom: '15px'
|
|
723
|
+
},
|
|
724
|
+
children: [/*#__PURE__*/_jsx(PostProfileLoader, {
|
|
725
|
+
size: "40px"
|
|
726
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
727
|
+
className: "skeleton-profile-info",
|
|
728
|
+
style: {
|
|
729
|
+
flex: 1,
|
|
730
|
+
marginLeft: '12px'
|
|
731
|
+
},
|
|
732
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
733
|
+
className: "poster-profile-name-loader enhanced-skeleton",
|
|
734
|
+
style: {
|
|
735
|
+
height: '16px',
|
|
736
|
+
width: '120px',
|
|
737
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
738
|
+
backgroundSize: '800px 104px',
|
|
739
|
+
animation: 'placeHolderShimmer 2s linear infinite',
|
|
740
|
+
marginBottom: '6px'
|
|
741
|
+
},
|
|
742
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
743
|
+
className: "skeleton-shimmer"
|
|
744
|
+
})
|
|
745
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
746
|
+
className: "post-date-loader enhanced-skeleton",
|
|
747
|
+
style: {
|
|
748
|
+
height: '12px',
|
|
749
|
+
width: '80px',
|
|
750
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
751
|
+
backgroundSize: '800px 104px',
|
|
752
|
+
animation: 'placeHolderShimmer 2s linear infinite'
|
|
753
|
+
},
|
|
754
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
755
|
+
className: "skeleton-shimmer"
|
|
756
|
+
})
|
|
757
|
+
})]
|
|
758
|
+
})]
|
|
759
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
760
|
+
className: "skeleton-content-section",
|
|
761
|
+
style: {
|
|
762
|
+
marginBottom: '15px'
|
|
763
|
+
},
|
|
764
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
765
|
+
className: "post-profile-title enhanced-skeleton",
|
|
766
|
+
style: {
|
|
767
|
+
height: '18px',
|
|
768
|
+
width: '90%',
|
|
769
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
770
|
+
backgroundSize: '800px 104px',
|
|
771
|
+
animation: 'placeHolderShimmer 2s linear infinite',
|
|
772
|
+
marginBottom: '8px'
|
|
773
|
+
},
|
|
774
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
775
|
+
className: "skeleton-shimmer"
|
|
776
|
+
})
|
|
777
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
778
|
+
className: "post-profile-title enhanced-skeleton",
|
|
779
|
+
style: {
|
|
780
|
+
height: '14px',
|
|
781
|
+
width: '70%',
|
|
782
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
783
|
+
backgroundSize: '800px 104px',
|
|
784
|
+
animation: 'placeHolderShimmer 2s linear infinite'
|
|
785
|
+
},
|
|
786
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
787
|
+
className: "skeleton-shimmer"
|
|
788
|
+
})
|
|
789
|
+
})]
|
|
790
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
791
|
+
className: "skeleton-media-section",
|
|
792
|
+
style: {
|
|
793
|
+
marginBottom: '15px'
|
|
794
|
+
},
|
|
795
|
+
children: /*#__PURE__*/_jsx(PostImageLoader, {
|
|
796
|
+
aspectRatio: "16/9"
|
|
797
|
+
})
|
|
798
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
799
|
+
className: "skeleton-actions-section",
|
|
800
|
+
style: {
|
|
801
|
+
display: 'flex',
|
|
802
|
+
justifyContent: 'space-between',
|
|
803
|
+
alignItems: 'center'
|
|
804
|
+
},
|
|
805
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
806
|
+
style: {
|
|
807
|
+
display: 'flex',
|
|
808
|
+
gap: '20px'
|
|
809
|
+
},
|
|
810
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
811
|
+
className: "filter-btn-loader enhanced-skeleton",
|
|
812
|
+
style: {
|
|
813
|
+
width: '60px',
|
|
814
|
+
height: '20px',
|
|
815
|
+
borderRadius: '10px',
|
|
816
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
817
|
+
backgroundSize: '800px 104px',
|
|
818
|
+
animation: 'placeHolderShimmer 2s linear infinite'
|
|
819
|
+
},
|
|
820
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
821
|
+
className: "skeleton-shimmer"
|
|
822
|
+
})
|
|
823
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
824
|
+
className: "filter-btn-loader enhanced-skeleton",
|
|
825
|
+
style: {
|
|
826
|
+
width: '60px',
|
|
827
|
+
height: '20px',
|
|
828
|
+
borderRadius: '10px',
|
|
829
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
830
|
+
backgroundSize: '800px 104px',
|
|
831
|
+
animation: 'placeHolderShimmer 2s linear infinite'
|
|
832
|
+
},
|
|
833
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
834
|
+
className: "skeleton-shimmer"
|
|
835
|
+
})
|
|
836
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
837
|
+
className: "filter-btn-loader enhanced-skeleton",
|
|
838
|
+
style: {
|
|
839
|
+
width: '60px',
|
|
840
|
+
height: '20px',
|
|
841
|
+
borderRadius: '10px',
|
|
842
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
843
|
+
backgroundSize: '800px 104px',
|
|
844
|
+
animation: 'placeHolderShimmer 2s linear infinite'
|
|
845
|
+
},
|
|
846
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
847
|
+
className: "skeleton-shimmer"
|
|
848
|
+
})
|
|
849
|
+
})]
|
|
850
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
851
|
+
style: {
|
|
852
|
+
width: '40px',
|
|
853
|
+
height: '20px',
|
|
854
|
+
borderRadius: '10px',
|
|
855
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
856
|
+
backgroundSize: '800px 104px',
|
|
857
|
+
animation: 'placeHolderShimmer 2s linear infinite'
|
|
858
|
+
},
|
|
859
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
860
|
+
className: "skeleton-shimmer"
|
|
861
|
+
})
|
|
862
|
+
})]
|
|
863
|
+
})]
|
|
864
|
+
});
|
|
865
|
+
};
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* View Post Modal Skeleton (consolidated from PostcardLoader)
|
|
869
|
+
*/
|
|
870
|
+
export var ViewPostModalSkeleton = function ViewPostModalSkeleton() {
|
|
871
|
+
var colors = getThemeColors();
|
|
872
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
873
|
+
className: "view-post-modal-skeleton",
|
|
874
|
+
style: {
|
|
875
|
+
backgroundColor: colors.cardBackground,
|
|
876
|
+
padding: '20px'
|
|
877
|
+
},
|
|
878
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
879
|
+
className: "modal-header-skeleton",
|
|
880
|
+
style: {
|
|
881
|
+
display: 'flex',
|
|
882
|
+
justifyContent: 'space-between',
|
|
883
|
+
alignItems: 'center',
|
|
884
|
+
marginBottom: '20px'
|
|
885
|
+
},
|
|
886
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
887
|
+
className: "close-button-skeleton enhanced-skeleton",
|
|
888
|
+
style: {
|
|
889
|
+
width: '24px',
|
|
890
|
+
height: '24px',
|
|
891
|
+
borderRadius: '50%',
|
|
892
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
893
|
+
backgroundSize: '800px 104px',
|
|
894
|
+
animation: 'placeHolderShimmer 2s linear infinite'
|
|
895
|
+
},
|
|
896
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
897
|
+
className: "skeleton-shimmer"
|
|
898
|
+
})
|
|
899
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
900
|
+
className: "title-skeleton enhanced-skeleton",
|
|
901
|
+
style: {
|
|
902
|
+
height: '20px',
|
|
903
|
+
width: '200px',
|
|
904
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
905
|
+
backgroundSize: '800px 104px',
|
|
906
|
+
animation: 'placeHolderShimmer 2s linear infinite'
|
|
907
|
+
},
|
|
908
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
909
|
+
className: "skeleton-shimmer"
|
|
910
|
+
})
|
|
911
|
+
})]
|
|
912
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
913
|
+
className: "modal-body-skeleton",
|
|
914
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
915
|
+
className: "media-skeleton enhanced-skeleton",
|
|
916
|
+
style: {
|
|
917
|
+
height: '300px',
|
|
918
|
+
background: "linear-gradient(to right, ".concat(colors.shimmerLight, " 8%, ").concat(colors.shimmerDark, " 18%, ").concat(colors.shimmerLight, " 33%)"),
|
|
919
|
+
backgroundSize: '800px 104px',
|
|
920
|
+
animation: 'placeHolderShimmer 2s linear infinite'
|
|
921
|
+
},
|
|
922
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
923
|
+
className: "skeleton-shimmer"
|
|
924
|
+
})
|
|
925
|
+
})
|
|
926
|
+
})]
|
|
927
|
+
});
|
|
928
|
+
};
|
|
929
|
+
|
|
930
|
+
// PropTypes
|
|
931
|
+
PostCardSkeleton.propTypes = {
|
|
932
|
+
showMedia: PropTypes.bool,
|
|
933
|
+
showActions: PropTypes.bool
|
|
934
|
+
};
|
|
935
|
+
MediaGridSkeleton.propTypes = {
|
|
936
|
+
itemCount: PropTypes.number,
|
|
937
|
+
aspectRatio: PropTypes.string
|
|
938
|
+
};
|
|
939
|
+
FeedLoadingSkeleton.propTypes = {
|
|
940
|
+
count: PropTypes.number
|
|
941
|
+
};
|
|
942
|
+
VideoPlayerSkeleton.propTypes = {
|
|
943
|
+
aspectRatio: PropTypes.string
|
|
944
|
+
};
|
|
945
|
+
ProfileSkeleton.propTypes = {
|
|
946
|
+
size: PropTypes.oneOf(['small', 'medium', 'large'])
|
|
947
|
+
};
|
|
948
|
+
TextSkeleton.propTypes = {
|
|
949
|
+
lines: PropTypes.number,
|
|
950
|
+
width: PropTypes.string,
|
|
951
|
+
height: PropTypes.string
|
|
952
|
+
};
|
|
953
|
+
PostImageLoader.propTypes = {
|
|
954
|
+
aspectRatio: PropTypes.string,
|
|
955
|
+
className: PropTypes.string
|
|
956
|
+
};
|
|
957
|
+
PostVideoLoader.propTypes = {
|
|
958
|
+
aspectRatio: PropTypes.string,
|
|
959
|
+
className: PropTypes.string
|
|
960
|
+
};
|
|
961
|
+
PostProfileLoader.propTypes = {
|
|
962
|
+
size: PropTypes.string,
|
|
963
|
+
className: PropTypes.string
|
|
964
|
+
};
|
|
965
|
+
export default {
|
|
966
|
+
PostCardSkeleton: PostCardSkeleton,
|
|
967
|
+
MediaGridSkeleton: MediaGridSkeleton,
|
|
968
|
+
FeedLoadingSkeleton: FeedLoadingSkeleton,
|
|
969
|
+
ModalLoadingSkeleton: ModalLoadingSkeleton,
|
|
970
|
+
VideoPlayerSkeleton: VideoPlayerSkeleton,
|
|
971
|
+
ProfileSkeleton: ProfileSkeleton,
|
|
972
|
+
TextSkeleton: TextSkeleton,
|
|
973
|
+
PostImageLoader: PostImageLoader,
|
|
974
|
+
PostVideoLoader: PostVideoLoader,
|
|
975
|
+
PostProfileLoader: PostProfileLoader,
|
|
976
|
+
CompletePostLoader: CompletePostLoader,
|
|
977
|
+
ViewPostModalSkeleton: ViewPostModalSkeleton
|
|
978
|
+
};
|