@qodin-co/sol 0.1.8 → 0.1.9
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.
Potentially problematic release.
This version of @qodin-co/sol might be problematic. Click here for more details.
- package/dist/devtools/index.js +1 -1
- package/dist/index.js +34 -24
- package/dist/index.js.map +1 -1
- package/dist/{solar-theme-provider-DsXhcLfP.js → solar-theme-provider-CXILKRrU.js} +156 -152
- package/dist/solar-theme-provider-CXILKRrU.js.map +1 -0
- package/package.json +1 -1
- package/dist/solar-theme-provider-DsXhcLfP.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import React, { Children, Component, Fragment, createContext, createElement, forwardRef, isValidElement, useCallback, useContext, useEffect, useId, useInsertionEffect, useLayoutEffect, useMemo, useRef, useState
|
|
2
|
+
import React, { Children, Component, Fragment, createContext, createElement, forwardRef, isValidElement, useCallback, useContext, useEffect, useId, useInsertionEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region rolldown:runtime
|
|
@@ -7419,18 +7419,18 @@ function newChildrenMap() {
|
|
|
7419
7419
|
*
|
|
7420
7420
|
* @public
|
|
7421
7421
|
*/
|
|
7422
|
-
function usePresence(subscribe
|
|
7422
|
+
function usePresence(subscribe = true) {
|
|
7423
7423
|
const context = useContext(PresenceContext);
|
|
7424
7424
|
if (context === null) return [true, null];
|
|
7425
7425
|
const { isPresent, onExitComplete, register } = context;
|
|
7426
7426
|
const id$2 = useId();
|
|
7427
7427
|
useEffect(() => {
|
|
7428
|
-
if (subscribe
|
|
7429
|
-
}, [subscribe
|
|
7430
|
-
const safeToRemove = useCallback(() => subscribe
|
|
7428
|
+
if (subscribe) register(id$2);
|
|
7429
|
+
}, [subscribe]);
|
|
7430
|
+
const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id$2), [
|
|
7431
7431
|
id$2,
|
|
7432
7432
|
onExitComplete,
|
|
7433
|
-
subscribe
|
|
7433
|
+
subscribe
|
|
7434
7434
|
]);
|
|
7435
7435
|
return !isPresent && onExitComplete ? [false, safeToRemove] : [true];
|
|
7436
7436
|
}
|
|
@@ -19704,7 +19704,7 @@ function withAlpha(color$1, alpha$1) {
|
|
|
19704
19704
|
return `rgba(${parts[0]},${parts[1]},${parts[2]},${alpha$1})`;
|
|
19705
19705
|
}
|
|
19706
19706
|
function TideCloudRenderer({ w, h, colors: colors$1, opacity }) {
|
|
19707
|
-
const id$2 =
|
|
19707
|
+
const id$2 = useId().replace(/:/g, "");
|
|
19708
19708
|
const waveBand = (yBase, amp, phaseOff, pts = 80) => {
|
|
19709
19709
|
const top = Array.from({ length: pts }, (_, i$1) => {
|
|
19710
19710
|
const x = i$1 / (pts - 1) * w;
|
|
@@ -19768,7 +19768,7 @@ function TideCloudRenderer({ w, h, colors: colors$1, opacity }) {
|
|
|
19768
19768
|
});
|
|
19769
19769
|
}
|
|
19770
19770
|
function TideRainRenderer({ w, h, colors: colors$1, opacity }) {
|
|
19771
|
-
const id$2 =
|
|
19771
|
+
const id$2 = useId().replace(/:/g, "");
|
|
19772
19772
|
const drops = Array.from({ length: 28 }, (_, i$1) => ({
|
|
19773
19773
|
x: i$1 / 27 * w * 1.2 - w * .1,
|
|
19774
19774
|
delay: i$1 * .18 % 1.4,
|
|
@@ -19803,7 +19803,7 @@ function TideRainRenderer({ w, h, colors: colors$1, opacity }) {
|
|
|
19803
19803
|
});
|
|
19804
19804
|
}
|
|
19805
19805
|
function SundialCloudRenderer({ w, h, colors: colors$1, opacity }) {
|
|
19806
|
-
const id$2 =
|
|
19806
|
+
const id$2 = useId().replace(/:/g, "");
|
|
19807
19807
|
const slabs = [
|
|
19808
19808
|
{
|
|
19809
19809
|
x: w * .05,
|
|
@@ -19885,7 +19885,7 @@ function SundialCloudRenderer({ w, h, colors: colors$1, opacity }) {
|
|
|
19885
19885
|
});
|
|
19886
19886
|
}
|
|
19887
19887
|
function SundialRainRenderer({ w, h, colors: colors$1, opacity }) {
|
|
19888
|
-
const id$2 =
|
|
19888
|
+
const id$2 = useId().replace(/:/g, "");
|
|
19889
19889
|
const streaks = Array.from({ length: 22 }, (_, i$1) => ({
|
|
19890
19890
|
x: i$1 / 21 * w * 1.1 - w * .05,
|
|
19891
19891
|
delay: i$1 * .22 % 1.6,
|
|
@@ -19920,7 +19920,7 @@ function SundialRainRenderer({ w, h, colors: colors$1, opacity }) {
|
|
|
19920
19920
|
});
|
|
19921
19921
|
}
|
|
19922
19922
|
function VoidCloudRenderer({ w, h, colors: colors$1, opacity }) {
|
|
19923
|
-
const id$2 =
|
|
19923
|
+
const id$2 = useId().replace(/:/g, "");
|
|
19924
19924
|
return /* @__PURE__ */ jsxs("svg", {
|
|
19925
19925
|
"aria-hidden": "true",
|
|
19926
19926
|
width: w,
|
|
@@ -19961,7 +19961,7 @@ function VoidCloudRenderer({ w, h, colors: colors$1, opacity }) {
|
|
|
19961
19961
|
});
|
|
19962
19962
|
}
|
|
19963
19963
|
function VoidThunderRenderer({ w, h, colors: colors$1, opacity }) {
|
|
19964
|
-
const id$2 =
|
|
19964
|
+
const id$2 = useId().replace(/:/g, "");
|
|
19965
19965
|
const flashColor = colors$1?.thunderColor ?? "#FFFFFF";
|
|
19966
19966
|
return /* @__PURE__ */ jsxs("div", {
|
|
19967
19967
|
style: {
|
|
@@ -21602,122 +21602,6 @@ function AuroraCompact({ phase, blend, time: time$1, location, temperature, weat
|
|
|
21602
21602
|
});
|
|
21603
21603
|
}
|
|
21604
21604
|
|
|
21605
|
-
//#endregion
|
|
21606
|
-
//#region node_modules/@usefy/use-local-storage/dist/index.mjs
|
|
21607
|
-
var listeners = /* @__PURE__ */ new Map();
|
|
21608
|
-
function subscribe(key, listener) {
|
|
21609
|
-
if (!listeners.has(key)) listeners.set(key, /* @__PURE__ */ new Set());
|
|
21610
|
-
const keyListeners = listeners.get(key);
|
|
21611
|
-
keyListeners.add(listener);
|
|
21612
|
-
return () => {
|
|
21613
|
-
keyListeners.delete(listener);
|
|
21614
|
-
if (keyListeners.size === 0) listeners.delete(key);
|
|
21615
|
-
};
|
|
21616
|
-
}
|
|
21617
|
-
function notifyListeners(key) {
|
|
21618
|
-
const keyListeners = listeners.get(key);
|
|
21619
|
-
if (keyListeners) keyListeners.forEach((listener) => listener());
|
|
21620
|
-
}
|
|
21621
|
-
function resolveInitialValue(initialValue) {
|
|
21622
|
-
return typeof initialValue === "function" ? initialValue() : initialValue;
|
|
21623
|
-
}
|
|
21624
|
-
function useLocalStorage(key, initialValue, options = {}) {
|
|
21625
|
-
const { serializer = JSON.stringify, deserializer = JSON.parse, syncTabs = true, onError } = options;
|
|
21626
|
-
const serializerRef = useRef(serializer);
|
|
21627
|
-
const deserializerRef = useRef(deserializer);
|
|
21628
|
-
const onErrorRef = useRef(onError);
|
|
21629
|
-
const initialValueRef = useRef(initialValue);
|
|
21630
|
-
serializerRef.current = serializer;
|
|
21631
|
-
deserializerRef.current = deserializer;
|
|
21632
|
-
onErrorRef.current = onError;
|
|
21633
|
-
initialValueRef.current = initialValue;
|
|
21634
|
-
const cacheRef = useRef(null);
|
|
21635
|
-
const isClient = typeof window !== "undefined";
|
|
21636
|
-
return [
|
|
21637
|
-
useSyncExternalStore(useCallback((onStoreChange) => {
|
|
21638
|
-
const unsubscribeStore = subscribe(key, onStoreChange);
|
|
21639
|
-
let handleStorageEvent = null;
|
|
21640
|
-
if (isClient && syncTabs) {
|
|
21641
|
-
handleStorageEvent = (event) => {
|
|
21642
|
-
if (event.key === key) onStoreChange();
|
|
21643
|
-
};
|
|
21644
|
-
window.addEventListener("storage", handleStorageEvent);
|
|
21645
|
-
}
|
|
21646
|
-
return () => {
|
|
21647
|
-
unsubscribeStore();
|
|
21648
|
-
if (handleStorageEvent) window.removeEventListener("storage", handleStorageEvent);
|
|
21649
|
-
};
|
|
21650
|
-
}, [
|
|
21651
|
-
key,
|
|
21652
|
-
syncTabs,
|
|
21653
|
-
isClient
|
|
21654
|
-
]), useCallback(() => {
|
|
21655
|
-
if (!isClient) return resolveInitialValue(initialValueRef.current);
|
|
21656
|
-
try {
|
|
21657
|
-
const rawValue = window.localStorage.getItem(key);
|
|
21658
|
-
if (cacheRef.current && cacheRef.current.rawValue === rawValue) return cacheRef.current.parsedValue;
|
|
21659
|
-
let parsedValue;
|
|
21660
|
-
if (rawValue !== null) parsedValue = deserializerRef.current(rawValue);
|
|
21661
|
-
else parsedValue = resolveInitialValue(initialValueRef.current);
|
|
21662
|
-
cacheRef.current = {
|
|
21663
|
-
rawValue,
|
|
21664
|
-
parsedValue
|
|
21665
|
-
};
|
|
21666
|
-
return parsedValue;
|
|
21667
|
-
} catch (error) {
|
|
21668
|
-
onErrorRef.current?.(error);
|
|
21669
|
-
const fallbackValue = resolveInitialValue(initialValueRef.current);
|
|
21670
|
-
cacheRef.current = {
|
|
21671
|
-
rawValue: null,
|
|
21672
|
-
parsedValue: fallbackValue
|
|
21673
|
-
};
|
|
21674
|
-
return fallbackValue;
|
|
21675
|
-
}
|
|
21676
|
-
}, [key, isClient]), useCallback(() => {
|
|
21677
|
-
return resolveInitialValue(initialValueRef.current);
|
|
21678
|
-
}, [])),
|
|
21679
|
-
useCallback((value) => {
|
|
21680
|
-
try {
|
|
21681
|
-
const currentValue = (() => {
|
|
21682
|
-
try {
|
|
21683
|
-
const item = window.localStorage.getItem(key);
|
|
21684
|
-
if (item !== null) return deserializerRef.current(item);
|
|
21685
|
-
return resolveInitialValue(initialValueRef.current);
|
|
21686
|
-
} catch {
|
|
21687
|
-
return resolveInitialValue(initialValueRef.current);
|
|
21688
|
-
}
|
|
21689
|
-
})();
|
|
21690
|
-
const valueToStore = value instanceof Function ? value(currentValue) : value;
|
|
21691
|
-
if (typeof window !== "undefined") {
|
|
21692
|
-
const serialized = serializerRef.current(valueToStore);
|
|
21693
|
-
window.localStorage.setItem(key, serialized);
|
|
21694
|
-
cacheRef.current = {
|
|
21695
|
-
rawValue: serialized,
|
|
21696
|
-
parsedValue: valueToStore
|
|
21697
|
-
};
|
|
21698
|
-
notifyListeners(key);
|
|
21699
|
-
}
|
|
21700
|
-
} catch (error) {
|
|
21701
|
-
onErrorRef.current?.(error);
|
|
21702
|
-
}
|
|
21703
|
-
}, [key]),
|
|
21704
|
-
useCallback(() => {
|
|
21705
|
-
try {
|
|
21706
|
-
if (typeof window !== "undefined") {
|
|
21707
|
-
window.localStorage.removeItem(key);
|
|
21708
|
-
cacheRef.current = {
|
|
21709
|
-
rawValue: null,
|
|
21710
|
-
parsedValue: resolveInitialValue(initialValueRef.current)
|
|
21711
|
-
};
|
|
21712
|
-
notifyListeners(key);
|
|
21713
|
-
}
|
|
21714
|
-
} catch (error) {
|
|
21715
|
-
onErrorRef.current?.(error);
|
|
21716
|
-
}
|
|
21717
|
-
}, [key])
|
|
21718
|
-
];
|
|
21719
|
-
}
|
|
21720
|
-
|
|
21721
21605
|
//#endregion
|
|
21722
21606
|
//#region src/shared/pill-weather-glyphs.tsx
|
|
21723
21607
|
const NIGHT_KEYWORDS = /moon|night|midnight|lunar|crescent|gibbous|waning|waxing|new-moon|full-moon/i;
|
|
@@ -26567,9 +26451,21 @@ function HorizonIcon$4({ color: color$1 }) {
|
|
|
26567
26451
|
}
|
|
26568
26452
|
function AuroraWidget({ phase, blend, expandDirection = "top-right", size = "lg", showFlag = false, showWeather = false, hoverEffect = true, weather: weatherCategoryOverride = null, latitude, longitude, timezone, simulatedDate, temperatureOverride, temperatureUnit = "C", forceExpanded, className = "", liveWeatherCategory, liveTemperatureC }) {
|
|
26569
26453
|
const { coordsReady } = useSolarTheme();
|
|
26570
|
-
const [storedExpanded, setStoredExpanded] =
|
|
26454
|
+
const [storedExpanded, setStoredExpanded] = useState(true);
|
|
26455
|
+
useEffect(() => {
|
|
26456
|
+
try {
|
|
26457
|
+
const raw = localStorage.getItem("aurora-widget-expanded");
|
|
26458
|
+
if (raw != null) setStoredExpanded(JSON.parse(raw));
|
|
26459
|
+
} catch {}
|
|
26460
|
+
}, []);
|
|
26461
|
+
const updateExpanded = useCallback((next) => {
|
|
26462
|
+
setStoredExpanded(next);
|
|
26463
|
+
try {
|
|
26464
|
+
localStorage.setItem("aurora-widget-expanded", JSON.stringify(next));
|
|
26465
|
+
} catch {}
|
|
26466
|
+
}, []);
|
|
26571
26467
|
const isExpanded = forceExpanded !== void 0 ? forceExpanded : storedExpanded;
|
|
26572
|
-
const setIsExpanded = forceExpanded !== void 0 ? () => {} :
|
|
26468
|
+
const setIsExpanded = forceExpanded !== void 0 ? () => {} : updateExpanded;
|
|
26573
26469
|
const origin = TRANSFORM_ORIGINS$9[expandDirection];
|
|
26574
26470
|
const yNudge = getYNudge$9(expandDirection);
|
|
26575
26471
|
const solar = useSolarPosition({
|
|
@@ -28084,9 +27980,21 @@ const CATEGORY_META$3 = {
|
|
|
28084
27980
|
};
|
|
28085
27981
|
function FoundryWidget({ phase, blend, expandDirection = "top-right", size = "lg", showFlag = false, showWeather = false, hoverEffect = true, weather: weatherCategoryOverride = null, latitude, longitude, timezone, simulatedDate, temperatureOverride, temperatureUnit = "C", forceExpanded, customPalettes, className = "", liveWeatherCategory, liveTemperatureC }) {
|
|
28086
27982
|
const { coordsReady } = useSolarTheme();
|
|
28087
|
-
const [storedExpanded, setStoredExpanded] =
|
|
27983
|
+
const [storedExpanded, setStoredExpanded] = useState(true);
|
|
27984
|
+
useEffect(() => {
|
|
27985
|
+
try {
|
|
27986
|
+
const raw = localStorage.getItem("solar-widget-expanded");
|
|
27987
|
+
if (raw != null) setStoredExpanded(JSON.parse(raw));
|
|
27988
|
+
} catch {}
|
|
27989
|
+
}, []);
|
|
27990
|
+
const updateExpanded = useCallback((next) => {
|
|
27991
|
+
setStoredExpanded(next);
|
|
27992
|
+
try {
|
|
27993
|
+
localStorage.setItem("solar-widget-expanded", JSON.stringify(next));
|
|
27994
|
+
} catch {}
|
|
27995
|
+
}, []);
|
|
28088
27996
|
const isExpanded = forceExpanded !== void 0 ? forceExpanded : storedExpanded;
|
|
28089
|
-
const setIsExpanded = forceExpanded !== void 0 ? () => {} :
|
|
27997
|
+
const setIsExpanded = forceExpanded !== void 0 ? () => {} : updateExpanded;
|
|
28090
27998
|
const origin = TRANSFORM_ORIGINS$8[expandDirection];
|
|
28091
27999
|
const yNudge = getYNudge$8(expandDirection);
|
|
28092
28000
|
const solar = useSolarPosition({
|
|
@@ -32130,9 +32038,21 @@ function HorizonIcon$2({ color: color$1 }) {
|
|
|
32130
32038
|
}
|
|
32131
32039
|
function MeridianWidget({ phase, blend, expandDirection = "top-right", size = "lg", showFlag = false, showWeather = false, hoverEffect = true, weather: weatherCategoryOverride = null, latitude, longitude, timezone, simulatedDate, temperatureOverride, temperatureUnit = "C", forceExpanded, className = "", liveWeatherCategory, liveTemperatureC }) {
|
|
32132
32040
|
const { coordsReady } = useSolarTheme();
|
|
32133
|
-
const [storedExpanded, setStoredExpanded] =
|
|
32041
|
+
const [storedExpanded, setStoredExpanded] = useState(true);
|
|
32042
|
+
useEffect(() => {
|
|
32043
|
+
try {
|
|
32044
|
+
const raw = localStorage.getItem("meridian-widget-expanded");
|
|
32045
|
+
if (raw != null) setStoredExpanded(JSON.parse(raw));
|
|
32046
|
+
} catch {}
|
|
32047
|
+
}, []);
|
|
32048
|
+
const updateExpanded = useCallback((next) => {
|
|
32049
|
+
setStoredExpanded(next);
|
|
32050
|
+
try {
|
|
32051
|
+
localStorage.setItem("meridian-widget-expanded", JSON.stringify(next));
|
|
32052
|
+
} catch {}
|
|
32053
|
+
}, []);
|
|
32134
32054
|
const isExpanded = forceExpanded !== void 0 ? forceExpanded : storedExpanded;
|
|
32135
|
-
const setIsExpanded = forceExpanded !== void 0 ? () => {} :
|
|
32055
|
+
const setIsExpanded = forceExpanded !== void 0 ? () => {} : updateExpanded;
|
|
32136
32056
|
const origin = TRANSFORM_ORIGINS$7[expandDirection];
|
|
32137
32057
|
const yNudge = getYNudge$7(expandDirection);
|
|
32138
32058
|
const solar = useSolarPosition({
|
|
@@ -34262,9 +34182,21 @@ function HorizonIcon$1({ color: color$1 }) {
|
|
|
34262
34182
|
}
|
|
34263
34183
|
function MineralWidget({ phase, blend, expandDirection = "top-right", size = "lg", showFlag = false, showWeather = false, hoverEffect = true, weather: weatherCategoryOverride = null, latitude, longitude, timezone, simulatedDate, temperatureOverride, temperatureUnit = "C", forceExpanded, className = "", liveWeatherCategory, liveTemperatureC }) {
|
|
34264
34184
|
const { coordsReady } = useSolarTheme();
|
|
34265
|
-
const [storedExpanded, setStoredExpanded] =
|
|
34185
|
+
const [storedExpanded, setStoredExpanded] = useState(true);
|
|
34186
|
+
useEffect(() => {
|
|
34187
|
+
try {
|
|
34188
|
+
const raw = localStorage.getItem("mineral-widget-expanded");
|
|
34189
|
+
if (raw != null) setStoredExpanded(JSON.parse(raw));
|
|
34190
|
+
} catch {}
|
|
34191
|
+
}, []);
|
|
34192
|
+
const updateExpanded = useCallback((next) => {
|
|
34193
|
+
setStoredExpanded(next);
|
|
34194
|
+
try {
|
|
34195
|
+
localStorage.setItem("mineral-widget-expanded", JSON.stringify(next));
|
|
34196
|
+
} catch {}
|
|
34197
|
+
}, []);
|
|
34266
34198
|
const isExpanded = forceExpanded !== void 0 ? forceExpanded : storedExpanded;
|
|
34267
|
-
const setIsExpanded = forceExpanded !== void 0 ? () => {} :
|
|
34199
|
+
const setIsExpanded = forceExpanded !== void 0 ? () => {} : updateExpanded;
|
|
34268
34200
|
const origin = TRANSFORM_ORIGINS$6[expandDirection];
|
|
34269
34201
|
const yNudge = getYNudge$6(expandDirection);
|
|
34270
34202
|
const solar = useSolarPosition({
|
|
@@ -36223,9 +36155,21 @@ const CATEGORY_META = {
|
|
|
36223
36155
|
const SERIF = "'Georgia','Times New Roman',serif";
|
|
36224
36156
|
function PaperWidget({ phase, blend, expandDirection = "top-right", size = "lg", showFlag = false, showWeather = false, hoverEffect = true, weather: weatherCategoryOverride = null, latitude, longitude, timezone, simulatedDate, temperatureOverride, temperatureUnit = "C", forceExpanded, className = "", liveWeatherCategory, liveTemperatureC }) {
|
|
36225
36157
|
const { coordsReady } = useSolarTheme();
|
|
36226
|
-
const [storedExpanded, setStoredExpanded] =
|
|
36158
|
+
const [storedExpanded, setStoredExpanded] = useState(true);
|
|
36159
|
+
useEffect(() => {
|
|
36160
|
+
try {
|
|
36161
|
+
const raw = localStorage.getItem("paper-widget-expanded");
|
|
36162
|
+
if (raw != null) setStoredExpanded(JSON.parse(raw));
|
|
36163
|
+
} catch {}
|
|
36164
|
+
}, []);
|
|
36165
|
+
const updateExpanded = useCallback((next) => {
|
|
36166
|
+
setStoredExpanded(next);
|
|
36167
|
+
try {
|
|
36168
|
+
localStorage.setItem("paper-widget-expanded", JSON.stringify(next));
|
|
36169
|
+
} catch {}
|
|
36170
|
+
}, []);
|
|
36227
36171
|
const isExpanded = forceExpanded !== void 0 ? forceExpanded : storedExpanded;
|
|
36228
|
-
const setIsExpanded = forceExpanded !== void 0 ? () => {} :
|
|
36172
|
+
const setIsExpanded = forceExpanded !== void 0 ? () => {} : updateExpanded;
|
|
36229
36173
|
const origin = TRANSFORM_ORIGINS$5[expandDirection];
|
|
36230
36174
|
const yNudge = getYNudge$5(expandDirection);
|
|
36231
36175
|
const solar = useSolarPosition({
|
|
@@ -37008,7 +36952,7 @@ function usePaperCompactOrbRaf(refs) {
|
|
|
37008
36952
|
function InkWashTrack({ trackW, trackH, pal, isDaytime, initX, washRef, featherRef, outerRef, coreRef, wrapGRef, orbOpacity = 1 }) {
|
|
37009
36953
|
const orbR = isDaytime ? trackH * .48 : trackH * .36;
|
|
37010
36954
|
const lineY = trackH / 2 + trackH * .05;
|
|
37011
|
-
const filterId =
|
|
36955
|
+
const filterId = `pw${useId().replace(/:/g, "")}`;
|
|
37012
36956
|
return /* @__PURE__ */ jsxs("svg", {
|
|
37013
36957
|
"aria-hidden": "true",
|
|
37014
36958
|
width: trackW,
|
|
@@ -37159,7 +37103,7 @@ function PaperCompact({ phase, blend, time: time$1, location, temperature, weath
|
|
|
37159
37103
|
if (!timezone || !showFlag) return null;
|
|
37160
37104
|
return getTimezone(timezone)?.countries?.[0] ?? null;
|
|
37161
37105
|
}, [timezone, showFlag]);
|
|
37162
|
-
const grainId =
|
|
37106
|
+
const grainId = `pg${useId().replace(/:/g, "")}`;
|
|
37163
37107
|
const trackW = size.width - size.px * 2;
|
|
37164
37108
|
const isItalic = ITALIC_PHASES.has(phase);
|
|
37165
37109
|
const row1H = size.labelSize + 2;
|
|
@@ -44821,9 +44765,21 @@ const SPRING_CONTENT$3 = {
|
|
|
44821
44765
|
};
|
|
44822
44766
|
function ParchmentWidget({ phase, blend, expandDirection = "top-right", size = "lg", showFlag = false, showWeather = false, hoverEffect = true, weather: weatherCategoryOverride = null, latitude, longitude, timezone, simulatedDate, temperatureUnit = "C", forceExpanded, className = "", liveWeatherCategory, liveTemperatureC }) {
|
|
44823
44767
|
const { coordsReady } = useSolarTheme();
|
|
44824
|
-
const [storedExpanded, setStoredExpanded] =
|
|
44768
|
+
const [storedExpanded, setStoredExpanded] = useState(true);
|
|
44769
|
+
useEffect(() => {
|
|
44770
|
+
try {
|
|
44771
|
+
const raw = localStorage.getItem("solar-widget-parchment-expanded");
|
|
44772
|
+
if (raw != null) setStoredExpanded(JSON.parse(raw));
|
|
44773
|
+
} catch {}
|
|
44774
|
+
}, []);
|
|
44775
|
+
const updateExpanded = useCallback((next) => {
|
|
44776
|
+
setStoredExpanded(next);
|
|
44777
|
+
try {
|
|
44778
|
+
localStorage.setItem("solar-widget-parchment-expanded", JSON.stringify(next));
|
|
44779
|
+
} catch {}
|
|
44780
|
+
}, []);
|
|
44825
44781
|
const isExpanded = forceExpanded !== void 0 ? forceExpanded : storedExpanded;
|
|
44826
|
-
const setIsExpanded = forceExpanded !== void 0 ? () => {} :
|
|
44782
|
+
const setIsExpanded = forceExpanded !== void 0 ? () => {} : updateExpanded;
|
|
44827
44783
|
const origin = TRANSFORM_ORIGINS$4[expandDirection];
|
|
44828
44784
|
const yNudge = getYNudge$4(expandDirection);
|
|
44829
44785
|
const solar = useSolarPosition({
|
|
@@ -46019,9 +45975,21 @@ function useCountryCode$1(timezone) {
|
|
|
46019
45975
|
}
|
|
46020
45976
|
function SignalWidget({ phase, blend, expandDirection = "top-right", size = "lg", showFlag = false, showWeather = false, hoverEffect = true, weather: weatherCategoryOverride = null, latitude, longitude, timezone, simulatedDate, temperatureOverride, temperatureUnit = "C", forceExpanded, className = "", liveWeatherCategory, liveTemperatureC }) {
|
|
46021
45977
|
const { coordsReady } = useSolarTheme();
|
|
46022
|
-
const [storedExpanded, setStoredExpanded] =
|
|
45978
|
+
const [storedExpanded, setStoredExpanded] = useState(true);
|
|
45979
|
+
useEffect(() => {
|
|
45980
|
+
try {
|
|
45981
|
+
const raw = localStorage.getItem("signal-widget-expanded");
|
|
45982
|
+
if (raw != null) setStoredExpanded(JSON.parse(raw));
|
|
45983
|
+
} catch {}
|
|
45984
|
+
}, []);
|
|
45985
|
+
const updateExpanded = useCallback((next) => {
|
|
45986
|
+
setStoredExpanded(next);
|
|
45987
|
+
try {
|
|
45988
|
+
localStorage.setItem("signal-widget-expanded", JSON.stringify(next));
|
|
45989
|
+
} catch {}
|
|
45990
|
+
}, []);
|
|
46023
45991
|
const isExpanded = forceExpanded !== void 0 ? forceExpanded : storedExpanded;
|
|
46024
|
-
const setIsExpanded = forceExpanded !== void 0 ? () => {} :
|
|
45992
|
+
const setIsExpanded = forceExpanded !== void 0 ? () => {} : updateExpanded;
|
|
46025
45993
|
const origin = TRANSFORM_ORIGINS$3[expandDirection];
|
|
46026
45994
|
const yNudge = getYNudge$3(expandDirection);
|
|
46027
45995
|
const solar = useSolarPosition({
|
|
@@ -47592,7 +47560,7 @@ function ArcTrack({ progress: progress$1, trackW, trackH, pal, orbOpacity = 1 })
|
|
|
47592
47560
|
for (const el of orbGroupRef.current?.querySelectorAll("[data-orb-fill]") ?? []) el.style.fill = pal.orbFill;
|
|
47593
47561
|
for (const el of orbGroupRef.current?.querySelectorAll("[data-orb-glow]") ?? []) el.style.fill = pal.orbGlow;
|
|
47594
47562
|
});
|
|
47595
|
-
const filterId =
|
|
47563
|
+
const filterId = `sd${useId().replace(/:/g, "")}`;
|
|
47596
47564
|
const ROMAN_TICKS$1 = [
|
|
47597
47565
|
"VI",
|
|
47598
47566
|
"IX",
|
|
@@ -48597,9 +48565,21 @@ const SPRING_CONTENT$2 = {
|
|
|
48597
48565
|
};
|
|
48598
48566
|
function SundialWidget({ phase, blend, expandDirection = "top-right", size = "lg", showFlag = false, showWeather = false, hoverEffect = true, weather: weatherOverride = null, latitude, longitude, timezone, simulatedDate, temperatureOverride, temperatureUnit = "C", forceExpanded, className = "", liveWeatherCategory, liveTemperatureC }) {
|
|
48599
48567
|
const { coordsReady } = useSolarTheme();
|
|
48600
|
-
const [stored, setStored] =
|
|
48568
|
+
const [stored, setStored] = useState(true);
|
|
48569
|
+
useEffect(() => {
|
|
48570
|
+
try {
|
|
48571
|
+
const raw = localStorage.getItem("sundial-widget-expanded");
|
|
48572
|
+
if (raw != null) setStored(JSON.parse(raw));
|
|
48573
|
+
} catch {}
|
|
48574
|
+
}, []);
|
|
48575
|
+
const updateExpanded = useCallback((next) => {
|
|
48576
|
+
setStored(next);
|
|
48577
|
+
try {
|
|
48578
|
+
localStorage.setItem("sundial-widget-expanded", JSON.stringify(next));
|
|
48579
|
+
} catch {}
|
|
48580
|
+
}, []);
|
|
48601
48581
|
const isExpanded = forceExpanded !== void 0 ? forceExpanded : stored;
|
|
48602
|
-
const setIsExpanded = forceExpanded !== void 0 ? () => {} :
|
|
48582
|
+
const setIsExpanded = forceExpanded !== void 0 ? () => {} : updateExpanded;
|
|
48603
48583
|
const origin = TRANSFORM_ORIGINS$2[expandDirection];
|
|
48604
48584
|
const yNudge = getYNudge$2(expandDirection);
|
|
48605
48585
|
const solar = useSolarPosition({
|
|
@@ -50754,9 +50734,21 @@ const SPRING_CONTENT$1 = {
|
|
|
50754
50734
|
};
|
|
50755
50735
|
function TideWidget({ phase, blend, expandDirection = "top-right", size = "lg", showFlag = false, showWeather = false, hoverEffect = true, weather: weatherOverride = null, latitude, longitude, timezone, simulatedDate, temperatureOverride, temperatureUnit = "C", forceExpanded, className = "", liveWeatherCategory, liveTemperatureC }) {
|
|
50756
50736
|
const { coordsReady } = useSolarTheme();
|
|
50757
|
-
const [stored, setStored] =
|
|
50737
|
+
const [stored, setStored] = useState(true);
|
|
50738
|
+
useEffect(() => {
|
|
50739
|
+
try {
|
|
50740
|
+
const raw = localStorage.getItem("tide-widget-expanded");
|
|
50741
|
+
if (raw != null) setStored(JSON.parse(raw));
|
|
50742
|
+
} catch {}
|
|
50743
|
+
}, []);
|
|
50744
|
+
const updateExpanded = useCallback((next) => {
|
|
50745
|
+
setStored(next);
|
|
50746
|
+
try {
|
|
50747
|
+
localStorage.setItem("tide-widget-expanded", JSON.stringify(next));
|
|
50748
|
+
} catch {}
|
|
50749
|
+
}, []);
|
|
50758
50750
|
const isExpanded = forceExpanded !== void 0 ? forceExpanded : stored;
|
|
50759
|
-
const setIsExpanded = forceExpanded !== void 0 ? () => {} :
|
|
50751
|
+
const setIsExpanded = forceExpanded !== void 0 ? () => {} : updateExpanded;
|
|
50760
50752
|
const origin = TRANSFORM_ORIGINS$1[expandDirection];
|
|
50761
50753
|
const yNudge = getYNudge$1(expandDirection);
|
|
50762
50754
|
const solar = useSolarPosition({
|
|
@@ -52548,9 +52540,21 @@ const SPRING_CONTENT = {
|
|
|
52548
52540
|
};
|
|
52549
52541
|
function VoidWidget({ phase, blend, expandDirection = "top-right", size = "lg", showFlag = false, showWeather = false, hoverEffect = true, weather: weatherOverride = null, latitude, longitude, timezone, simulatedDate, temperatureOverride, temperatureUnit = "C", forceExpanded, className = "", liveWeatherCategory, liveTemperatureC }) {
|
|
52550
52542
|
const { coordsReady } = useSolarTheme();
|
|
52551
|
-
const [stored, setStored] =
|
|
52543
|
+
const [stored, setStored] = useState(true);
|
|
52544
|
+
useEffect(() => {
|
|
52545
|
+
try {
|
|
52546
|
+
const raw = localStorage.getItem("void-widget-expanded");
|
|
52547
|
+
if (raw != null) setStored(JSON.parse(raw));
|
|
52548
|
+
} catch {}
|
|
52549
|
+
}, []);
|
|
52550
|
+
const updateExpanded = useCallback((next) => {
|
|
52551
|
+
setStored(next);
|
|
52552
|
+
try {
|
|
52553
|
+
localStorage.setItem("void-widget-expanded", JSON.stringify(next));
|
|
52554
|
+
} catch {}
|
|
52555
|
+
}, []);
|
|
52552
52556
|
const isExpanded = forceExpanded !== void 0 ? forceExpanded : stored;
|
|
52553
|
-
const setIsExpanded = forceExpanded !== void 0 ? () => {} :
|
|
52557
|
+
const setIsExpanded = forceExpanded !== void 0 ? () => {} : updateExpanded;
|
|
52554
52558
|
const origin = TRANSFORM_ORIGINS[expandDirection];
|
|
52555
52559
|
const yNudge = getYNudge(expandDirection);
|
|
52556
52560
|
const solar = useSolarPosition({
|
|
@@ -53717,4 +53721,4 @@ function SolarThemeProvider({ children, initialDesign = "foundry", isolated = fa
|
|
|
53717
53721
|
|
|
53718
53722
|
//#endregion
|
|
53719
53723
|
export { getSessionIsLive as a, setSessionTimeMinutes as c, clearSessionTimeMinutes as i, lerpHex as l, useSolarTheme as n, getSessionTimeMinutes as o, SKINS as r, setSessionLive as s, SolarThemeProvider as t };
|
|
53720
|
-
//# sourceMappingURL=solar-theme-provider-
|
|
53724
|
+
//# sourceMappingURL=solar-theme-provider-CXILKRrU.js.map
|