@ponti-studios/ui 0.7.0 → 0.7.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/package.json
CHANGED
|
@@ -158,6 +158,10 @@ function getOnlineSnapshot() {
|
|
|
158
158
|
return navigator.onLine;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
function getOnlineServerSnapshot() {
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
|
|
161
165
|
export interface UpdateGuardCopy {
|
|
162
166
|
offlineReady?: string;
|
|
163
167
|
newContentAvailable?: string;
|
|
@@ -192,7 +196,7 @@ function UpdateGuardClient({
|
|
|
192
196
|
updateServiceWorker,
|
|
193
197
|
} = useRegisterSW({ serviceWorkerPath });
|
|
194
198
|
|
|
195
|
-
const isOnline = useSyncExternalStore(subscribeOnline, getOnlineSnapshot,
|
|
199
|
+
const isOnline = useSyncExternalStore(subscribeOnline, getOnlineSnapshot, getOnlineServerSnapshot);
|
|
196
200
|
|
|
197
201
|
const closePrompt = () => {
|
|
198
202
|
setOfflineReady(false);
|
|
@@ -44,7 +44,7 @@ export function FilterSelect({
|
|
|
44
44
|
);
|
|
45
45
|
|
|
46
46
|
return (
|
|
47
|
-
<div className={cn("space-y-2 min-w-36", className)}>
|
|
47
|
+
<div className={cn("space-y-2 min-w-36 bg-background", className)}>
|
|
48
48
|
<Label htmlFor={selectId}>{label}</Label>
|
|
49
49
|
<Select value={value} onValueChange={onChange} items={items}>
|
|
50
50
|
<SelectTrigger
|
|
@@ -29,6 +29,10 @@ function mediaQuery(query: string, options?: MediaQueryOptions) {
|
|
|
29
29
|
return mql.matches;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
function getServerSnapshot() {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
|
|
32
36
|
/**
|
|
33
37
|
* Listens for changes to a media query and returns a boolean indicating whether the query matches.
|
|
34
38
|
* @param query - The media query string to listen for.
|
|
@@ -61,5 +65,5 @@ export function useMediaQuery(query: string) {
|
|
|
61
65
|
return mediaQuery(query);
|
|
62
66
|
}, [query]);
|
|
63
67
|
|
|
64
|
-
return useSyncExternalStore(subscribe, getSnapshot,
|
|
68
|
+
return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
65
69
|
}
|