@digilogiclabs/saas-factory-ui 0.16.0 → 0.16.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.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +26 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -23
- package/dist/index.mjs.map +1 -1
- package/dist/web/index.d.mts +1 -1
- package/dist/web/index.d.ts +1 -1
- package/dist/web/index.js +26 -23
- package/dist/web/index.js.map +1 -1
- package/dist/web/index.mjs +26 -23
- package/dist/web/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2396,8 +2396,8 @@ function LavaLamp({
|
|
|
2396
2396
|
const dimensionsRef = (0, import_react4.useRef)({ width: 0, height: 0, baseY: 0 });
|
|
2397
2397
|
const isHoldingRef = (0, import_react4.useRef)(false);
|
|
2398
2398
|
const currentFormingBlobRef = (0, import_react4.useRef)(null);
|
|
2399
|
-
const isMobile = typeof window !== "undefined" && (window.innerWidth <= 768 || /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
|
|
2400
|
-
const isLowEnd = isMobile && typeof window !== "undefined" && (window.devicePixelRatio <= 1.5 || navigator.hardwareConcurrency <= 4);
|
|
2399
|
+
const isMobile = typeof window !== "undefined" && typeof navigator !== "undefined" && (window.innerWidth <= 768 || /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
|
|
2400
|
+
const isLowEnd = isMobile && typeof window !== "undefined" && typeof navigator !== "undefined" && (window.devicePixelRatio <= 1.5 || navigator.hardwareConcurrency && navigator.hardwareConcurrency <= 4);
|
|
2401
2401
|
(0, import_react4.useEffect)(() => {
|
|
2402
2402
|
setIsClient(true);
|
|
2403
2403
|
}, []);
|
|
@@ -3702,7 +3702,7 @@ var VideoPlayer = React20.forwardRef(
|
|
|
3702
3702
|
if (currentVideo) {
|
|
3703
3703
|
onVideoEnd?.(currentVideo);
|
|
3704
3704
|
}
|
|
3705
|
-
if (loop && !playlist.length) {
|
|
3705
|
+
if (loop && (!playlist || !playlist.length)) {
|
|
3706
3706
|
videoRef.current?.play();
|
|
3707
3707
|
return;
|
|
3708
3708
|
}
|
|
@@ -6041,7 +6041,7 @@ var FixedAudioBar = ({
|
|
|
6041
6041
|
const triggerHaptic = (type = "light") => {
|
|
6042
6042
|
if (hapticFeedback && "vibrate" in navigator) {
|
|
6043
6043
|
const patterns = { light: 10, medium: 20, heavy: 30 };
|
|
6044
|
-
navigator.vibrate(patterns[type]);
|
|
6044
|
+
typeof navigator !== "undefined" && navigator.vibrate && navigator.vibrate(patterns[type]);
|
|
6045
6045
|
}
|
|
6046
6046
|
};
|
|
6047
6047
|
const progressPercentage = track ? currentTime / track.duration * 100 : 0;
|
|
@@ -7892,7 +7892,7 @@ var import_framer_motion11 = require("framer-motion");
|
|
|
7892
7892
|
var import_lucide_react20 = require("lucide-react");
|
|
7893
7893
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
7894
7894
|
var AudioFeed = ({
|
|
7895
|
-
items,
|
|
7895
|
+
items = [],
|
|
7896
7896
|
loading = false,
|
|
7897
7897
|
error = null,
|
|
7898
7898
|
hasMore = true,
|
|
@@ -7931,16 +7931,17 @@ var AudioFeed = ({
|
|
|
7931
7931
|
const [showSortPanel, setShowSortPanel] = (0, import_react13.useState)(false);
|
|
7932
7932
|
const [visibleItems, setVisibleItems] = (0, import_react13.useState)(itemsPerPage);
|
|
7933
7933
|
const [isLoadingMore, setIsLoadingMore] = (0, import_react13.useState)(false);
|
|
7934
|
-
const [isOnline, setIsOnline] = (0, import_react13.useState)(navigator.onLine);
|
|
7934
|
+
const [isOnline, setIsOnline] = (0, import_react13.useState)(typeof navigator !== "undefined" ? navigator.onLine : true);
|
|
7935
7935
|
const feedRef = (0, import_react13.useRef)(null);
|
|
7936
7936
|
const loadingRef = (0, import_react13.useRef)(null);
|
|
7937
7937
|
const triggerHaptic = (0, import_react13.useCallback)((type = "light") => {
|
|
7938
|
-
if (hapticFeedback && "vibrate" in navigator) {
|
|
7938
|
+
if (hapticFeedback && typeof navigator !== "undefined" && "vibrate" in navigator) {
|
|
7939
7939
|
const patterns = { light: 10, medium: 20, heavy: 30 };
|
|
7940
7940
|
navigator.vibrate(patterns[type]);
|
|
7941
7941
|
}
|
|
7942
7942
|
}, [hapticFeedback]);
|
|
7943
7943
|
(0, import_react13.useEffect)(() => {
|
|
7944
|
+
if (typeof window === "undefined") return;
|
|
7944
7945
|
const handleOnline = () => setIsOnline(true);
|
|
7945
7946
|
const handleOffline = () => setIsOnline(false);
|
|
7946
7947
|
window.addEventListener("online", handleOnline);
|
|
@@ -8041,7 +8042,7 @@ var AudioFeed = ({
|
|
|
8041
8042
|
return timeAgo;
|
|
8042
8043
|
}
|
|
8043
8044
|
};
|
|
8044
|
-
if (loading && !items.length) {
|
|
8045
|
+
if (loading && (!items || !items.length)) {
|
|
8045
8046
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: cn("space-y-4", className), children: loadingComponent || /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "animate-pulse", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-4 p-4 bg-card rounded-lg border", children: [
|
|
8046
8047
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-16 h-16 bg-muted rounded-lg" }),
|
|
8047
8048
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
@@ -8068,7 +8069,7 @@ var AudioFeed = ({
|
|
|
8068
8069
|
] })
|
|
8069
8070
|
] }) });
|
|
8070
8071
|
}
|
|
8071
|
-
if (!loading && !items.length) {
|
|
8072
|
+
if (!loading && (!items || !items.length)) {
|
|
8072
8073
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: cn("text-center py-12", className), children: emptyComponent || /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "space-y-4", children: [
|
|
8073
8074
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react20.Music, { className: "w-12 h-12 text-muted-foreground mx-auto" }),
|
|
8074
8075
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { children: [
|
|
@@ -9947,7 +9948,7 @@ var CommentInput = ({
|
|
|
9947
9948
|
const triggerHaptic = (0, import_react16.useCallback)((type = "light") => {
|
|
9948
9949
|
if (hapticFeedback && "vibrate" in navigator) {
|
|
9949
9950
|
const patterns = { light: 10, medium: 20, heavy: 30 };
|
|
9950
|
-
navigator.vibrate(patterns[type]);
|
|
9951
|
+
typeof navigator !== "undefined" && navigator.vibrate && navigator.vibrate(patterns[type]);
|
|
9951
9952
|
}
|
|
9952
9953
|
}, [hapticFeedback]);
|
|
9953
9954
|
const handleSubmit = async (e) => {
|
|
@@ -10128,7 +10129,7 @@ var CommentItem = ({
|
|
|
10128
10129
|
const triggerHaptic = (0, import_react16.useCallback)((type = "light") => {
|
|
10129
10130
|
if (hapticFeedback && "vibrate" in navigator) {
|
|
10130
10131
|
const patterns = { light: 10, medium: 20, heavy: 30 };
|
|
10131
|
-
navigator.vibrate(patterns[type]);
|
|
10132
|
+
typeof navigator !== "undefined" && navigator.vibrate && navigator.vibrate(patterns[type]);
|
|
10132
10133
|
}
|
|
10133
10134
|
}, [hapticFeedback]);
|
|
10134
10135
|
const handleLike = async () => {
|
|
@@ -12064,11 +12065,11 @@ var NotificationCenter = ({
|
|
|
12064
12065
|
return b.timestamp.getTime() - a.timestamp.getTime();
|
|
12065
12066
|
});
|
|
12066
12067
|
const allCounts = {
|
|
12067
|
-
all: notifications
|
|
12068
|
-
unread: notifications
|
|
12069
|
-
social: notifications
|
|
12070
|
-
content: notifications
|
|
12071
|
-
system: notifications
|
|
12068
|
+
all: notifications?.length || 0,
|
|
12069
|
+
unread: notifications?.filter((n) => !n.isRead)?.length || 0,
|
|
12070
|
+
social: notifications?.filter((n) => notificationConfig[n.type]?.category === "social")?.length || 0,
|
|
12071
|
+
content: notifications?.filter((n) => notificationConfig[n.type]?.category === "content")?.length || 0,
|
|
12072
|
+
system: notifications?.filter((n) => notificationConfig[n.type]?.category === "system")?.length || 0
|
|
12072
12073
|
};
|
|
12073
12074
|
return { filteredNotifications: filtered, counts: allCounts };
|
|
12074
12075
|
}, [notifications, activeFilter, groupSimilar]);
|
|
@@ -12495,7 +12496,7 @@ var AdvancedPlayer = ({
|
|
|
12495
12496
|
const triggerHaptic = (0, import_react20.useCallback)((type = "light") => {
|
|
12496
12497
|
if (hapticFeedback && "vibrate" in navigator) {
|
|
12497
12498
|
const patterns = { light: 10, medium: 20, heavy: 30 };
|
|
12498
|
-
navigator.vibrate(patterns[type]);
|
|
12499
|
+
typeof navigator !== "undefined" && navigator.vibrate && navigator.vibrate(patterns[type]);
|
|
12499
12500
|
}
|
|
12500
12501
|
}, [hapticFeedback]);
|
|
12501
12502
|
const formatTime = (0, import_react20.useCallback)((seconds) => {
|
|
@@ -12952,7 +12953,7 @@ var CollaboratorItem = ({
|
|
|
12952
12953
|
const triggerHaptic = (0, import_react21.useCallback)((type = "light") => {
|
|
12953
12954
|
if (hapticFeedback && "vibrate" in navigator) {
|
|
12954
12955
|
const patterns = { light: 10, medium: 20, heavy: 30 };
|
|
12955
|
-
navigator.vibrate(patterns[type]);
|
|
12956
|
+
typeof navigator !== "undefined" && navigator.vibrate && navigator.vibrate(patterns[type]);
|
|
12956
12957
|
}
|
|
12957
12958
|
}, [hapticFeedback]);
|
|
12958
12959
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center justify-between p-3 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800 group", children: [
|
|
@@ -13169,7 +13170,7 @@ var LiveSessionControls = ({
|
|
|
13169
13170
|
const triggerHaptic = (0, import_react21.useCallback)((type = "light") => {
|
|
13170
13171
|
if (hapticFeedback && "vibrate" in navigator) {
|
|
13171
13172
|
const patterns = { light: 10, medium: 20, heavy: 30 };
|
|
13172
|
-
navigator.vibrate(patterns[type]);
|
|
13173
|
+
typeof navigator !== "undefined" && navigator.vibrate && navigator.vibrate(patterns[type]);
|
|
13173
13174
|
}
|
|
13174
13175
|
}, [hapticFeedback]);
|
|
13175
13176
|
const handleStartSession = async () => {
|
|
@@ -13357,7 +13358,7 @@ var CollaborativePlaylist = ({
|
|
|
13357
13358
|
const triggerHaptic = (0, import_react21.useCallback)((type = "light") => {
|
|
13358
13359
|
if (hapticFeedback && "vibrate" in navigator) {
|
|
13359
13360
|
const patterns = { light: 10, medium: 20, heavy: 30 };
|
|
13360
|
-
navigator.vibrate(patterns[type]);
|
|
13361
|
+
typeof navigator !== "undefined" && navigator.vibrate && navigator.vibrate(patterns[type]);
|
|
13361
13362
|
}
|
|
13362
13363
|
}, [hapticFeedback]);
|
|
13363
13364
|
(0, import_react21.useEffect)(() => {
|
|
@@ -13379,7 +13380,9 @@ var CollaborativePlaylist = ({
|
|
|
13379
13380
|
};
|
|
13380
13381
|
const handleCopyInviteLink = async () => {
|
|
13381
13382
|
try {
|
|
13382
|
-
|
|
13383
|
+
if (typeof navigator !== "undefined" && navigator.clipboard) {
|
|
13384
|
+
await navigator.clipboard.writeText(inviteLink);
|
|
13385
|
+
}
|
|
13383
13386
|
setLinkCopied(true);
|
|
13384
13387
|
setTimeout(() => setLinkCopied(false), 2e3);
|
|
13385
13388
|
triggerHaptic("light");
|
|
@@ -14483,7 +14486,7 @@ var SwipeableCard = ({
|
|
|
14483
14486
|
active: { scale: 1.02 }
|
|
14484
14487
|
};
|
|
14485
14488
|
const renderActionIndicator = (actions, side) => {
|
|
14486
|
-
if (!showActionIndicator || actions.length === 0) return null;
|
|
14489
|
+
if (!showActionIndicator || !actions || actions.length === 0) return null;
|
|
14487
14490
|
const action = actions[0];
|
|
14488
14491
|
const opacity = side === "left" ? leftOpacity : rightOpacity;
|
|
14489
14492
|
const scale = side === "left" ? leftScale : rightScale;
|
|
@@ -14795,7 +14798,7 @@ var checkWebPSupport = () => {
|
|
|
14795
14798
|
};
|
|
14796
14799
|
var generateOptimizedUrl = (src, webpSupported, mobileOptimization) => {
|
|
14797
14800
|
if (!mobileOptimization) return src;
|
|
14798
|
-
const url = new URL(src, window.location.origin);
|
|
14801
|
+
const url = new URL(src, typeof window !== "undefined" ? window.location.origin : "http://localhost");
|
|
14799
14802
|
const params = new URLSearchParams(url.search);
|
|
14800
14803
|
if (mobileOptimization.quality) {
|
|
14801
14804
|
params.set("q", mobileOptimization.quality.toString());
|