@qodin-co/sol 0.1.3
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 +470 -0
- package/dist/devtools/index.d.ts +16 -0
- package/dist/devtools/index.d.ts.map +1 -0
- package/dist/devtools/index.js +372 -0
- package/dist/devtools/index.js.map +1 -0
- package/dist/index.d.ts +362 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +293 -0
- package/dist/index.js.map +1 -0
- package/dist/solar-theme-provider-WbsezzLH.js +53734 -0
- package/dist/solar-theme-provider-WbsezzLH.js.map +1 -0
- package/dist/styles.css +2 -0
- package/package.json +78 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/hooks/useSolarPosition.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* useSolarPosition.ts
|
|
8
|
+
*
|
|
9
|
+
* Computes real solar position (altitude, azimuth, sunrise, solar noon, sunset)
|
|
10
|
+
* from geographic coordinates + current time. No external deps required.
|
|
11
|
+
*
|
|
12
|
+
* Algorithm: NOAA Solar Calculator equations (accurate to ~1 minute)
|
|
13
|
+
* https://gml.noaa.gov/grad/solcalc/solareqns.PDF
|
|
14
|
+
*/
|
|
15
|
+
interface SolarTimes {
|
|
16
|
+
/** Minutes from midnight (local) */
|
|
17
|
+
sunrise: number;
|
|
18
|
+
solarNoon: number;
|
|
19
|
+
sunset: number;
|
|
20
|
+
/** Civil twilight — when sky starts brightening */
|
|
21
|
+
dawnCivil: number;
|
|
22
|
+
/** Civil twilight — when sky finishes darkening */
|
|
23
|
+
duskCivil: number;
|
|
24
|
+
}
|
|
25
|
+
type SolarPhase = 'night' | 'dawn' | 'sunrise' | 'morning' | 'solar-noon' | 'afternoon' | 'sunset' | 'dusk' | 'midnight';
|
|
26
|
+
interface SolarPosition {
|
|
27
|
+
/** Sun altitude in degrees (-90 to 90). Negative = below horizon */
|
|
28
|
+
altitude: number;
|
|
29
|
+
/** Sun azimuth in degrees (0=N, 90=E, 180=S, 270=W) */
|
|
30
|
+
azimuth: number;
|
|
31
|
+
/** 0–1 progress of the day arc (0=sunrise, 0.5=solar noon, 1=sunset) */
|
|
32
|
+
dayProgress: number;
|
|
33
|
+
/** 0–1 progress of the night arc (0=sunset, 0.5=solar midnight, 1=next sunrise) */
|
|
34
|
+
nightProgress: number;
|
|
35
|
+
/** Whether the sun is above the horizon */
|
|
36
|
+
isDaytime: boolean;
|
|
37
|
+
/** Current named phase */
|
|
38
|
+
phase: SolarPhase;
|
|
39
|
+
/** Today's solar event times */
|
|
40
|
+
times: SolarTimes;
|
|
41
|
+
/** Minutes from midnight (local), 0–1440 */
|
|
42
|
+
localMinutes: number;
|
|
43
|
+
}
|
|
44
|
+
interface SolarBlend {
|
|
45
|
+
phase: SolarPhase;
|
|
46
|
+
nextPhase: SolarPhase;
|
|
47
|
+
/** 0 = just entered phase, 1 = about to leave (ease-in-out applied) */
|
|
48
|
+
t: number;
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/widgets/compact-widget.shell.d.ts
|
|
52
|
+
type WeatherCategory$1 = 'clear' | 'partly-cloudy' | 'overcast' | 'fog' | 'drizzle' | 'rain' | 'heavy-rain' | 'snow' | 'heavy-snow' | 'thunder';
|
|
53
|
+
type CompactSize = 'sm' | 'md' | 'lg';
|
|
54
|
+
interface CompactSkinProps {
|
|
55
|
+
phase: SolarPhase;
|
|
56
|
+
blend: SolarBlend;
|
|
57
|
+
time: string;
|
|
58
|
+
location: string;
|
|
59
|
+
flag?: string;
|
|
60
|
+
temperature?: string;
|
|
61
|
+
weather?: WeatherCategory$1 | null;
|
|
62
|
+
liveWeatherCategory: WeatherCategory$1 | null;
|
|
63
|
+
liveTemperatureC: number | null;
|
|
64
|
+
latitude?: number | null;
|
|
65
|
+
longitude?: number | null;
|
|
66
|
+
timezone?: string | null;
|
|
67
|
+
simulatedDate?: Date;
|
|
68
|
+
showFlag: boolean;
|
|
69
|
+
showWeather: boolean;
|
|
70
|
+
showTemperature: boolean;
|
|
71
|
+
size: CompactSize;
|
|
72
|
+
palette: WidgetPalette;
|
|
73
|
+
}
|
|
74
|
+
interface CompactWidgetProps {
|
|
75
|
+
design?: DesignMode;
|
|
76
|
+
overridePhase?: SolarPhase | null;
|
|
77
|
+
time?: string;
|
|
78
|
+
location?: string;
|
|
79
|
+
flag?: string;
|
|
80
|
+
temperature?: string;
|
|
81
|
+
weather?: WeatherCategory$1 | null;
|
|
82
|
+
showFlag?: boolean;
|
|
83
|
+
showWeather?: boolean;
|
|
84
|
+
showTemperature?: boolean;
|
|
85
|
+
size?: CompactSize;
|
|
86
|
+
latitude?: number | null;
|
|
87
|
+
longitude?: number | null;
|
|
88
|
+
timezone?: string | null;
|
|
89
|
+
/** Explicit simulated date. Falls back to ctx.simulatedDate (from SolarDevTools)
|
|
90
|
+
* then to real current time. */
|
|
91
|
+
simulatedDate?: Date;
|
|
92
|
+
className?: string;
|
|
93
|
+
}
|
|
94
|
+
declare function CompactWidget({
|
|
95
|
+
design: designOverride,
|
|
96
|
+
overridePhase,
|
|
97
|
+
time,
|
|
98
|
+
location,
|
|
99
|
+
flag,
|
|
100
|
+
temperature,
|
|
101
|
+
weather,
|
|
102
|
+
showFlag,
|
|
103
|
+
showWeather,
|
|
104
|
+
showTemperature,
|
|
105
|
+
size,
|
|
106
|
+
latitude,
|
|
107
|
+
longitude,
|
|
108
|
+
timezone,
|
|
109
|
+
simulatedDate: simulatedDateProp,
|
|
110
|
+
className
|
|
111
|
+
}: CompactWidgetProps): react_jsx_runtime0.JSX.Element;
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/widgets/solar-widget.shell.d.ts
|
|
114
|
+
type ExpandDirection = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
115
|
+
type WidgetSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
116
|
+
type WeatherCategory = 'clear' | 'partly-cloudy' | 'overcast' | 'fog' | 'drizzle' | 'rain' | 'heavy-rain' | 'snow' | 'heavy-snow' | 'thunder';
|
|
117
|
+
type CustomPalettes = Partial<Record<SolarPhase, {
|
|
118
|
+
bg: [string, string, string];
|
|
119
|
+
}>>;
|
|
120
|
+
interface SolarWidgetProps {
|
|
121
|
+
expandDirection?: ExpandDirection;
|
|
122
|
+
size?: WidgetSize;
|
|
123
|
+
showFlag?: boolean;
|
|
124
|
+
showWeather?: boolean;
|
|
125
|
+
hoverEffect?: boolean;
|
|
126
|
+
customPalettes?: CustomPalettes;
|
|
127
|
+
phaseOverride?: SolarPhase;
|
|
128
|
+
weatherCategoryOverride?: WeatherCategory | null;
|
|
129
|
+
/** Explicit simulated date. Falls back to ctx.simulatedDate (from SolarDevTools)
|
|
130
|
+
* then to real current time. */
|
|
131
|
+
simulatedDate?: Date;
|
|
132
|
+
/** Lock the widget state: `true` = always expanded, `false` = always collapsed.
|
|
133
|
+
* Omit or pass `undefined` for default localStorage-driven behaviour. */
|
|
134
|
+
forceExpanded?: boolean;
|
|
135
|
+
}
|
|
136
|
+
declare function SolarWidget({
|
|
137
|
+
expandDirection,
|
|
138
|
+
size,
|
|
139
|
+
showFlag,
|
|
140
|
+
showWeather,
|
|
141
|
+
hoverEffect,
|
|
142
|
+
customPalettes,
|
|
143
|
+
phaseOverride,
|
|
144
|
+
weatherCategoryOverride,
|
|
145
|
+
simulatedDate: simulatedDateProp,
|
|
146
|
+
forceExpanded
|
|
147
|
+
}: SolarWidgetProps): react_jsx_runtime0.JSX.Element;
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/skins/types/widget-skin.types.d.ts
|
|
150
|
+
interface ShaderImage {
|
|
151
|
+
/** Path to the image, relative to /public — e.g. '/images/solar-rays.png' */
|
|
152
|
+
src: string;
|
|
153
|
+
/**
|
|
154
|
+
* Opacity of the image layer. 0–1.
|
|
155
|
+
* Defaults to 0.18 if omitted — subtle enough to not compete with the shader.
|
|
156
|
+
*/
|
|
157
|
+
opacity?: number;
|
|
158
|
+
/** CSS mask-position for the image mask. Defaults to 'center center'.
|
|
159
|
+
* e.g. 'center 30%' to push the rays slightly upward. */
|
|
160
|
+
objectPosition?: string;
|
|
161
|
+
}
|
|
162
|
+
interface ShaderPalette {
|
|
163
|
+
colors: [string, string, string, string];
|
|
164
|
+
colorBack: string;
|
|
165
|
+
opacity: number;
|
|
166
|
+
vignette: string;
|
|
167
|
+
cssFallback: string;
|
|
168
|
+
/**
|
|
169
|
+
* Optional per-phase image overlay.
|
|
170
|
+
* When set, SolarShaderBg renders this image between the WebGL shader
|
|
171
|
+
* and the vignette, blended and faded per the ShaderImage config.
|
|
172
|
+
* Takes precedence over SkinDefinition.defaultImage.
|
|
173
|
+
*/
|
|
174
|
+
image?: ShaderImage;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Controls the MOVEMENT CHARACTER of the background shader for each phase.
|
|
178
|
+
* This is intentionally separate from ShaderPalette (color) so that skins can
|
|
179
|
+
* express distinct motion personalities without touching color tokens.
|
|
180
|
+
*
|
|
181
|
+
* Each skin provides a full Record<SolarPhase, ShaderMotion> via the optional
|
|
182
|
+
* `shaderMotion` field on SkinDefinition. If omitted, SolarShaderBg falls back
|
|
183
|
+
* to the universal PHASE_MOTION defaults in solar-shader-bg.tsx.
|
|
184
|
+
*
|
|
185
|
+
* Design intent:
|
|
186
|
+
* Void → barely alive. All values near-zero.
|
|
187
|
+
* Parchment → completely still. speed=0, distortion=0.
|
|
188
|
+
* Signal → mechanical twitch. speed low, distortion low, grainOverlay high.
|
|
189
|
+
* Meridian → airy drift. half the universal values.
|
|
190
|
+
* Sundial → slow, ancient. low speed, low swirl.
|
|
191
|
+
* Paper → gentle organic breath. medium everything.
|
|
192
|
+
* Foundry → rich, heavy. full universal values.
|
|
193
|
+
* Mineral → crystalline facets. high swirl, lower distortion.
|
|
194
|
+
* Tide → wave rhythm. high distortion, moderate swirl.
|
|
195
|
+
* Aurora → dramatic at night, calm at day. speed peaks at midnight.
|
|
196
|
+
*/
|
|
197
|
+
interface ShaderMotion {
|
|
198
|
+
/** Organic mesh noise 0–1. High = flowing, liquid. Low = crystalline, solid. */
|
|
199
|
+
distortion: number;
|
|
200
|
+
/** Vortex intensity 0–1. High = dramatic spiral. Low = gentle drift. */
|
|
201
|
+
swirl: number;
|
|
202
|
+
/** Animation speed multiplier. 0 = frozen. >1 = fast. */
|
|
203
|
+
speed: number;
|
|
204
|
+
/** Photographic film grain 0–1. Higher in dark, still skins. */
|
|
205
|
+
grainOverlay: number;
|
|
206
|
+
}
|
|
207
|
+
interface PhaseVars {
|
|
208
|
+
textPrimary: string;
|
|
209
|
+
textSecondary: string;
|
|
210
|
+
accent: string;
|
|
211
|
+
surface: string;
|
|
212
|
+
bgBase: string;
|
|
213
|
+
bgDeep: string;
|
|
214
|
+
}
|
|
215
|
+
interface WidgetPalette {
|
|
216
|
+
/** Three gradient stops for the widget background */
|
|
217
|
+
bg: [string, string, string];
|
|
218
|
+
/** Text/icon color for this phase */
|
|
219
|
+
textColor: string;
|
|
220
|
+
/** Accent/highlight color */
|
|
221
|
+
accentColor: string;
|
|
222
|
+
/** Orb fill color */
|
|
223
|
+
orb: string;
|
|
224
|
+
/** Outer glow color (rgba string) */
|
|
225
|
+
outerGlow: string;
|
|
226
|
+
/** 'light' | 'dim' | 'dark' — controls icon rendering mode */
|
|
227
|
+
mode: 'light' | 'dim' | 'dark';
|
|
228
|
+
}
|
|
229
|
+
interface SkinDefinition {
|
|
230
|
+
/** Unique identifier — used as the key in SKINS map and stored in context */
|
|
231
|
+
id: DesignMode;
|
|
232
|
+
/** Human-readable name shown in the dropdown */
|
|
233
|
+
label: string;
|
|
234
|
+
/** Short description shown in the dropdown */
|
|
235
|
+
description: string;
|
|
236
|
+
/**
|
|
237
|
+
* Per-phase CSS variable tokens.
|
|
238
|
+
* SolarThemeProvider reads these instead of its own hardcoded PHASE_VARS.
|
|
239
|
+
*/
|
|
240
|
+
phaseVars: Record<SolarPhase, PhaseVars>;
|
|
241
|
+
/**
|
|
242
|
+
* Per-phase widget palette tokens.
|
|
243
|
+
* Used by the skin's pill/card component.
|
|
244
|
+
*/
|
|
245
|
+
widgetPalettes: Record<SolarPhase, WidgetPalette>;
|
|
246
|
+
/**
|
|
247
|
+
* Per-phase shader palettes.
|
|
248
|
+
* SolarShaderBg reads colors, opacity, vignette, and cssFallback from here.
|
|
249
|
+
*/
|
|
250
|
+
shaderPalettes: Record<SolarPhase, ShaderPalette>;
|
|
251
|
+
/**
|
|
252
|
+
* Optional per-phase shader motion personality.
|
|
253
|
+
*
|
|
254
|
+
* Defines HOW the background moves for this skin — distortion, swirl, speed,
|
|
255
|
+
* and grain — independently of color. Each skin has a distinct motion
|
|
256
|
+
* character that reinforces its aesthetic identity:
|
|
257
|
+
* - Void barely moves (near-zero everything)
|
|
258
|
+
* - Parchment is completely still (speed=0)
|
|
259
|
+
* - Aurora pulses hard at night, sleeps during the day
|
|
260
|
+
* - Mineral uses crystalline low-distortion/high-swirl
|
|
261
|
+
* - Tide uses wave-like rolling distortion
|
|
262
|
+
*
|
|
263
|
+
* If omitted, SolarShaderBg falls back to universal PHASE_MOTION defaults.
|
|
264
|
+
*/
|
|
265
|
+
shaderMotion?: Record<SolarPhase, ShaderMotion>;
|
|
266
|
+
/**
|
|
267
|
+
* Optional global fallback image for the shader background layer.
|
|
268
|
+
*
|
|
269
|
+
* Applied to ALL phases unless a phase-specific `image` is set inside
|
|
270
|
+
* that phase's ShaderPalette entry (per-phase takes precedence).
|
|
271
|
+
*
|
|
272
|
+
* Use this for skins that should always show the same atmospheric image
|
|
273
|
+
* regardless of phase — e.g. the solar-rays PNG faded at 18% opacity.
|
|
274
|
+
*
|
|
275
|
+
* Example:
|
|
276
|
+
* defaultImage: {
|
|
277
|
+
* src: '/images/solar-rays.png',
|
|
278
|
+
* opacity: 0.18,
|
|
279
|
+
* }
|
|
280
|
+
*/
|
|
281
|
+
defaultImage?: ShaderImage;
|
|
282
|
+
/**
|
|
283
|
+
* The React component that renders the actual widget pill + expanded card.
|
|
284
|
+
* Receives WidgetSkinProps and is fully responsible for its own visual output.
|
|
285
|
+
*/
|
|
286
|
+
Component: React.ComponentType<WidgetSkinProps>;
|
|
287
|
+
/**
|
|
288
|
+
* Optional compact variant of the widget.
|
|
289
|
+
* Receives CompactSkinProps and renders a slim pill/bar format.
|
|
290
|
+
*/
|
|
291
|
+
CompactComponent?: React.ComponentType<CompactSkinProps>;
|
|
292
|
+
}
|
|
293
|
+
interface WidgetSkinProps {
|
|
294
|
+
phase: SolarPhase;
|
|
295
|
+
blend: SolarBlend;
|
|
296
|
+
expanded: boolean;
|
|
297
|
+
onToggle: () => void;
|
|
298
|
+
expandDirection: ExpandDirection;
|
|
299
|
+
size: WidgetSize;
|
|
300
|
+
time: string;
|
|
301
|
+
location: string;
|
|
302
|
+
flag?: string;
|
|
303
|
+
weather?: WeatherCategory | null;
|
|
304
|
+
liveWeatherCategory?: WeatherCategory | null;
|
|
305
|
+
liveTemperatureC?: number | null;
|
|
306
|
+
temperature?: string;
|
|
307
|
+
sunriseTime?: string;
|
|
308
|
+
sunsetTime?: string;
|
|
309
|
+
latitude?: number | null;
|
|
310
|
+
longitude?: number | null;
|
|
311
|
+
timezone?: string | null;
|
|
312
|
+
simulatedDate?: Date;
|
|
313
|
+
showFlag: boolean;
|
|
314
|
+
showWeather: boolean;
|
|
315
|
+
hoverEffect: boolean;
|
|
316
|
+
forceExpanded?: boolean;
|
|
317
|
+
palette: WidgetPalette;
|
|
318
|
+
}
|
|
319
|
+
type DesignMode = 'foundry' | 'paper' | 'signal' | 'meridian' | 'mineral' | 'aurora' | 'tide' | 'sundial' | 'void' | 'parchment';
|
|
320
|
+
//#endregion
|
|
321
|
+
//#region src/provider/solar-theme-provider.d.ts
|
|
322
|
+
interface SolarTheme {
|
|
323
|
+
phase: SolarPhase;
|
|
324
|
+
isDaytime: boolean;
|
|
325
|
+
brightness: number;
|
|
326
|
+
mode: 'light' | 'dim' | 'dark';
|
|
327
|
+
accentColor: string;
|
|
328
|
+
solarPosition: SolarPosition | null;
|
|
329
|
+
timezone: string | null;
|
|
330
|
+
latitude: number | null;
|
|
331
|
+
longitude: number | null;
|
|
332
|
+
coordsReady: boolean;
|
|
333
|
+
setOverridePhase: (phase: SolarPhase | null) => void;
|
|
334
|
+
blend: SolarBlend;
|
|
335
|
+
design: DesignMode;
|
|
336
|
+
setDesign: (design: DesignMode) => void;
|
|
337
|
+
activeSkin: SkinDefinition;
|
|
338
|
+
/** Simulated date pushed by SolarDevTools when scrubbing the timeline.
|
|
339
|
+
* Widgets read this as a fallback when no simulatedDate prop is passed. */
|
|
340
|
+
simulatedDate: Date | undefined;
|
|
341
|
+
setSimulatedDate: (date: Date | undefined) => void;
|
|
342
|
+
}
|
|
343
|
+
declare function useSolarTheme(): SolarTheme;
|
|
344
|
+
interface Props {
|
|
345
|
+
children: ReactNode;
|
|
346
|
+
initialDesign?: DesignMode;
|
|
347
|
+
/**
|
|
348
|
+
* When true, the provider renders a wrapper <div style="display:contents">
|
|
349
|
+
* and scopes all CSS vars to that element via a unique #id selector rather
|
|
350
|
+
* than :root. Use this when multiple providers exist on the same page
|
|
351
|
+
* (e.g. a skin showcase / test page). Defaults to false.
|
|
352
|
+
*/
|
|
353
|
+
isolated?: boolean;
|
|
354
|
+
}
|
|
355
|
+
declare function SolarThemeProvider({
|
|
356
|
+
children,
|
|
357
|
+
initialDesign,
|
|
358
|
+
isolated
|
|
359
|
+
}: Props): react_jsx_runtime0.JSX.Element;
|
|
360
|
+
//#endregion
|
|
361
|
+
export { type CompactSize, CompactWidget, type DesignMode, type ExpandDirection, type SkinDefinition, type SolarBlend, type SolarPhase, type SolarTheme, SolarThemeProvider, SolarWidget, type WeatherCategory, type WidgetPalette, type WidgetSize, useSolarTheme };
|
|
362
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/hooks/useSolarPosition.tsx","../src/widgets/compact-widget.shell.tsx","../src/widgets/solar-widget.shell.tsx","../src/skins/types/widget-skin.types.ts","../src/provider/solar-theme-provider.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAgBA;AAWA;AAWA;AAmBA;;UAzCiB,UAAA;;ECIL,OAAA,EAAA,MAAA;EAYA,SAAA,EAAA,MAAW;EAgFN,MAAA,EAAA,MAAA;EACR;EACA,SAAA,EAAA,MAAA;EAKG;EACW,SAAA,EAAA,MAAA;;AASf,KDtGI,UAAA,GCsGJ,OAAA,GAAA,MAAA,GAAA,SAAA,GAAA,SAAA,GAAA,YAAA,GAAA,WAAA,GAAA,QAAA,GAAA,MAAA,GAAA,UAAA;AACG,UD5FM,aAAA,CC4FN;EAAa;EAKP,QAAA,EAAA,MAAA;EACN;EACO,OAAA,EAAA,MAAA;EAKN;EAIH,WAAA,EAAA,MAAA;EAMS;EAAI,aAAA,EAAA,MAAA;EA4BN;EACN,SAAA,EAAA,OAAA;EACR;EACA,KAAA,EDrIO,UCqIP;EACA;EACA,KAAA,EDrIO,UCqIP;EACA;EACA,YAAA,EAAA,MAAA;;AAEA,UDpIe,UAAA,CCoIf;EACA,KAAA,EDpIO,UCoIP;EACA,SAAA,EDpIW,UCoIX;EACA;EACA,CAAA,EAAA,MAAA;;;;KA7KU,iBAAA;KAYA,WAAA;ADhBK,UCgGA,gBAAA,CDhGU;EAWf,KAAA,ECsFH,UDtFa;EAWL,KAAA,EC4ER,UD5EqB;EAmBb,IAAA,EAAA,MAAA;;;;ECrCL,OAAA,CAAA,EAmGA,iBAnGe,GAAA,IAAA;EAYf,mBAAW,EAwFA,iBAxFA,GAAA,IAAA;EAgFN,gBAAA,EAAA,MAAgB,GAAA,IAAA;EACxB,QAAA,CAAA,EAAA,MAAA,GAAA,IAAA;EACA,SAAA,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EAWL,UAAA,EAAA,MAAa;EAmBb,IAAA,EAAA,OAAU,GAAA,KAAA,GAAA,MAClB;;iBIVQ;;EH5BL,QAAA,EAAA,MAAA,GAAA,IAAe;EAYf,SAAA,EAAA,MAAW,GAAA,IAAA;EAgFN,WAAA,EAAA,OAAgB;EACxB,gBAAA,EAAA,CAAA,KAAA,EG5DmB,UH4DnB,GAAA,IAAA,EAAA,GAAA,IAAA;EACA,KAAA,EG5DA,UH4DA;EAKG,MAAA,EGhEF,UHgEE;EACW,SAAA,EAAA,CAAA,MAAA,EGhED,UHgEC,EAAA,GAAA,IAAA;EAKL,UAAA,EGpEJ,cHoEI;EAIV;;EACgB,aAAA,EGtEP,IHsEO,GAAA,SAAA;EAKP,gBAAA,EAAA,CAAA,IAAkB,EG1ER,IH0EQ,GAAA,SAAA,EAAA,GAAA,IAAA;;AAEjB,iBGsIF,aAAA,CAAA,CHtIE,EGsIe,UHtIf;UG4IR,KAAA,CHvIE;EAIH,QAAA,EGoIG,SHpIH;EAMS,aAAA,CAAA,EG+HA,UH/HA;EAAI;AA4BtB;;;;;EAKE,QAAA,CAAA,EAAA,OAAA;;AAEA,iBGsGc,kBAAA,CHtGd;EAAA,QAAA;EAAA,aAAA;EAAA;AAAA,CAAA,EG0GC,KH1GD,CAAA,EG0GM,kBAAA,CAAA,GAAA,CAAA,OH1GN"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { l as lerpHex, n as useSolarTheme, r as SKINS, t as SolarThemeProvider } from "./solar-theme-provider-WbsezzLH.js";
|
|
2
|
+
import { useEffect, useMemo, useState } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/widgets/solar-widget.shell.tsx
|
|
6
|
+
const PALETTES = SKINS.foundry.widgetPalettes;
|
|
7
|
+
const WMO_MAP$1 = {
|
|
8
|
+
0: "clear",
|
|
9
|
+
1: "clear",
|
|
10
|
+
2: "partly-cloudy",
|
|
11
|
+
3: "overcast",
|
|
12
|
+
45: "fog",
|
|
13
|
+
48: "fog",
|
|
14
|
+
51: "drizzle",
|
|
15
|
+
53: "drizzle",
|
|
16
|
+
55: "drizzle",
|
|
17
|
+
61: "rain",
|
|
18
|
+
63: "rain",
|
|
19
|
+
65: "heavy-rain",
|
|
20
|
+
71: "snow",
|
|
21
|
+
73: "snow",
|
|
22
|
+
75: "heavy-snow",
|
|
23
|
+
80: "rain",
|
|
24
|
+
82: "heavy-rain",
|
|
25
|
+
85: "snow",
|
|
26
|
+
86: "heavy-snow",
|
|
27
|
+
95: "thunder",
|
|
28
|
+
96: "thunder",
|
|
29
|
+
99: "thunder"
|
|
30
|
+
};
|
|
31
|
+
async function fetchWeather$1(lat, lon) {
|
|
32
|
+
const url = new URL("https://api.open-meteo.com/v1/forecast");
|
|
33
|
+
url.searchParams.set("latitude", String(lat));
|
|
34
|
+
url.searchParams.set("longitude", String(lon));
|
|
35
|
+
url.searchParams.set("current", "temperature_2m,weather_code");
|
|
36
|
+
url.searchParams.set("forecast_days", "1");
|
|
37
|
+
const data = await fetch(url.toString()).then((r) => r.json());
|
|
38
|
+
return {
|
|
39
|
+
temperatureC: Math.round(data.current.temperature_2m),
|
|
40
|
+
category: WMO_MAP$1[data.current.weather_code] ?? "clear"
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function useWeatherData$1(lat, lon) {
|
|
44
|
+
const [weather, setWeather] = useState(null);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (!lat || !lon) return;
|
|
47
|
+
let dead = false;
|
|
48
|
+
fetchWeather$1(lat, lon).then((w) => {
|
|
49
|
+
if (!dead) setWeather(w);
|
|
50
|
+
}).catch(() => {});
|
|
51
|
+
const id = setInterval(() => fetchWeather$1(lat, lon).then((w) => {
|
|
52
|
+
if (!dead) setWeather(w);
|
|
53
|
+
}).catch(() => {}), 1800 * 1e3);
|
|
54
|
+
return () => {
|
|
55
|
+
dead = true;
|
|
56
|
+
clearInterval(id);
|
|
57
|
+
};
|
|
58
|
+
}, [lat, lon]);
|
|
59
|
+
return weather;
|
|
60
|
+
}
|
|
61
|
+
function blendWidgetPalette(from, to, t) {
|
|
62
|
+
return {
|
|
63
|
+
bg: [
|
|
64
|
+
lerpHex(from.bg[0], to.bg[0], t),
|
|
65
|
+
lerpHex(from.bg[1], to.bg[1], t),
|
|
66
|
+
lerpHex(from.bg[2], to.bg[2], t)
|
|
67
|
+
],
|
|
68
|
+
textColor: lerpHex(from.textColor, to.textColor, t),
|
|
69
|
+
accentColor: lerpHex(from.accentColor, to.accentColor, t),
|
|
70
|
+
orb: lerpHex(from.orb, to.orb, t),
|
|
71
|
+
outerGlow: from.outerGlow,
|
|
72
|
+
mode: t < .5 ? from.mode : to.mode
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function SolarWidget({ expandDirection = "bottom-right", size = "lg", showFlag = false, showWeather = false, hoverEffect = false, customPalettes, phaseOverride, weatherCategoryOverride, simulatedDate: simulatedDateProp, forceExpanded }) {
|
|
76
|
+
const { phase, blend, activeSkin, timezone, latitude, longitude, simulatedDate: ctxSimulatedDate } = useSolarTheme();
|
|
77
|
+
const simulatedDate = simulatedDateProp ?? ctxSimulatedDate;
|
|
78
|
+
const [expanded, setExpanded] = useState(false);
|
|
79
|
+
const activePhase = phaseOverride ?? phase;
|
|
80
|
+
const activeBlend = phaseOverride ? {
|
|
81
|
+
phase: phaseOverride,
|
|
82
|
+
nextPhase: phaseOverride,
|
|
83
|
+
t: 0
|
|
84
|
+
} : blend;
|
|
85
|
+
const fromPalette = activeSkin.widgetPalettes[activeBlend.phase];
|
|
86
|
+
const toPalette = activeSkin.widgetPalettes[activeBlend.nextPhase];
|
|
87
|
+
const blendedPalette = useMemo(() => blendWidgetPalette(fromPalette, toPalette, activeBlend.t), [
|
|
88
|
+
fromPalette,
|
|
89
|
+
toPalette,
|
|
90
|
+
activeBlend.t
|
|
91
|
+
]);
|
|
92
|
+
const finalPalette = useMemo(() => {
|
|
93
|
+
if (!customPalettes?.[activePhase]) return blendedPalette;
|
|
94
|
+
return {
|
|
95
|
+
...blendedPalette,
|
|
96
|
+
bg: customPalettes[activePhase]?.bg
|
|
97
|
+
};
|
|
98
|
+
}, [
|
|
99
|
+
blendedPalette,
|
|
100
|
+
customPalettes,
|
|
101
|
+
activePhase
|
|
102
|
+
]);
|
|
103
|
+
const time = useMemo(() => {
|
|
104
|
+
const d = simulatedDate ?? /* @__PURE__ */ new Date();
|
|
105
|
+
const opts = {
|
|
106
|
+
hour: "2-digit",
|
|
107
|
+
minute: "2-digit",
|
|
108
|
+
hour12: false
|
|
109
|
+
};
|
|
110
|
+
if (timezone) opts.timeZone = timezone;
|
|
111
|
+
return new Intl.DateTimeFormat(void 0, opts).format(d);
|
|
112
|
+
}, [simulatedDate, timezone]);
|
|
113
|
+
const liveWeather = useWeatherData$1(latitude ?? null, longitude ?? null);
|
|
114
|
+
const liveWeatherCategory = showWeather ? weatherCategoryOverride ?? liveWeather?.category ?? null : null;
|
|
115
|
+
const liveTemperatureC = liveWeather?.temperatureC ?? null;
|
|
116
|
+
const SkinComponent = activeSkin.Component;
|
|
117
|
+
return /* @__PURE__ */ jsx(SkinComponent, {
|
|
118
|
+
phase: activePhase,
|
|
119
|
+
blend: activeBlend,
|
|
120
|
+
expanded,
|
|
121
|
+
onToggle: () => setExpanded((v) => !v),
|
|
122
|
+
expandDirection,
|
|
123
|
+
size,
|
|
124
|
+
time,
|
|
125
|
+
location: "",
|
|
126
|
+
showFlag,
|
|
127
|
+
showWeather,
|
|
128
|
+
hoverEffect,
|
|
129
|
+
weather: weatherCategoryOverride,
|
|
130
|
+
liveWeatherCategory,
|
|
131
|
+
liveTemperatureC,
|
|
132
|
+
palette: finalPalette,
|
|
133
|
+
latitude,
|
|
134
|
+
longitude,
|
|
135
|
+
timezone,
|
|
136
|
+
simulatedDate,
|
|
137
|
+
forceExpanded
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/widgets/compact-widget.shell.tsx
|
|
143
|
+
const WMO_MAP = {
|
|
144
|
+
0: "clear",
|
|
145
|
+
1: "clear",
|
|
146
|
+
2: "partly-cloudy",
|
|
147
|
+
3: "overcast",
|
|
148
|
+
45: "fog",
|
|
149
|
+
48: "fog",
|
|
150
|
+
51: "drizzle",
|
|
151
|
+
53: "drizzle",
|
|
152
|
+
55: "drizzle",
|
|
153
|
+
61: "rain",
|
|
154
|
+
63: "rain",
|
|
155
|
+
65: "heavy-rain",
|
|
156
|
+
71: "snow",
|
|
157
|
+
73: "snow",
|
|
158
|
+
75: "heavy-snow",
|
|
159
|
+
80: "rain",
|
|
160
|
+
82: "heavy-rain",
|
|
161
|
+
85: "snow",
|
|
162
|
+
86: "heavy-snow",
|
|
163
|
+
95: "thunder",
|
|
164
|
+
96: "thunder",
|
|
165
|
+
99: "thunder"
|
|
166
|
+
};
|
|
167
|
+
async function fetchWeather(lat, lon) {
|
|
168
|
+
const url = new URL("https://api.open-meteo.com/v1/forecast");
|
|
169
|
+
url.searchParams.set("latitude", String(lat));
|
|
170
|
+
url.searchParams.set("longitude", String(lon));
|
|
171
|
+
url.searchParams.set("current", "temperature_2m,weather_code");
|
|
172
|
+
url.searchParams.set("forecast_days", "1");
|
|
173
|
+
const data = await fetch(url.toString()).then((r) => r.json());
|
|
174
|
+
return {
|
|
175
|
+
temperatureC: Math.round(data.current.temperature_2m),
|
|
176
|
+
category: WMO_MAP[data.current.weather_code] ?? "clear"
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
function useWeatherData(lat, lon) {
|
|
180
|
+
const [weather, setWeather] = useState(null);
|
|
181
|
+
useEffect(() => {
|
|
182
|
+
if (!lat || !lon) return;
|
|
183
|
+
let dead = false;
|
|
184
|
+
fetchWeather(lat, lon).then((w) => {
|
|
185
|
+
if (!dead) setWeather(w);
|
|
186
|
+
}).catch(() => {});
|
|
187
|
+
const id = setInterval(() => fetchWeather(lat, lon).then((w) => {
|
|
188
|
+
if (!dead) setWeather(w);
|
|
189
|
+
}).catch(() => {}), 1800 * 1e3);
|
|
190
|
+
return () => {
|
|
191
|
+
dead = true;
|
|
192
|
+
clearInterval(id);
|
|
193
|
+
};
|
|
194
|
+
}, [lat, lon]);
|
|
195
|
+
return weather;
|
|
196
|
+
}
|
|
197
|
+
function blendPalette(skin, blend) {
|
|
198
|
+
const from = skin.widgetPalettes[blend.phase];
|
|
199
|
+
const to = skin.widgetPalettes[blend.nextPhase];
|
|
200
|
+
const t = blend.t;
|
|
201
|
+
if (t === 0) return from;
|
|
202
|
+
const lerp = (a, b) => lerpHex(a, b, t);
|
|
203
|
+
return {
|
|
204
|
+
bg: [
|
|
205
|
+
lerp(from.bg[0], to.bg[0]),
|
|
206
|
+
lerp(from.bg[1], to.bg[1]),
|
|
207
|
+
lerp(from.bg[2], to.bg[2])
|
|
208
|
+
],
|
|
209
|
+
textColor: lerp(from.textColor, to.textColor),
|
|
210
|
+
accentColor: lerp(from.accentColor, to.accentColor),
|
|
211
|
+
orb: lerp(from.orb, to.orb),
|
|
212
|
+
outerGlow: lerp(from.outerGlow, to.outerGlow),
|
|
213
|
+
mode: from.mode
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function CompactWidget({ design: designOverride, overridePhase, time, location = "", flag, temperature, weather = null, showFlag = false, showWeather = false, showTemperature = true, size = "md", latitude, longitude, timezone, simulatedDate: simulatedDateProp, className = "" }) {
|
|
217
|
+
const ctx = useSolarTheme();
|
|
218
|
+
const simulatedDate = simulatedDateProp ?? ctx.simulatedDate;
|
|
219
|
+
const skin = useMemo(() => {
|
|
220
|
+
if (!designOverride || designOverride === ctx.design) return ctx.activeSkin;
|
|
221
|
+
return ctx.activeSkin;
|
|
222
|
+
}, [
|
|
223
|
+
designOverride,
|
|
224
|
+
ctx.design,
|
|
225
|
+
ctx.activeSkin
|
|
226
|
+
]);
|
|
227
|
+
const phase = overridePhase ?? ctx.phase;
|
|
228
|
+
const blend = overridePhase ? {
|
|
229
|
+
phase: overridePhase,
|
|
230
|
+
nextPhase: overridePhase,
|
|
231
|
+
t: 0
|
|
232
|
+
} : ctx.blend;
|
|
233
|
+
const palette = useMemo(() => blendPalette(skin, blend), [skin, blend]);
|
|
234
|
+
const resolvedLat = latitude ?? ctx.latitude;
|
|
235
|
+
const resolvedLon = longitude ?? ctx.longitude;
|
|
236
|
+
const resolvedTz = timezone ?? ctx.timezone;
|
|
237
|
+
const liveWeather = useWeatherData(resolvedLat ?? null, resolvedLon ?? null);
|
|
238
|
+
const liveWeatherCategory = showWeather ? weather ?? liveWeather?.category ?? null : null;
|
|
239
|
+
const liveTemperatureC = liveWeather?.temperatureC ?? null;
|
|
240
|
+
const props = {
|
|
241
|
+
phase,
|
|
242
|
+
blend,
|
|
243
|
+
time: useMemo(() => {
|
|
244
|
+
if (time) return time;
|
|
245
|
+
const d = simulatedDate ?? /* @__PURE__ */ new Date();
|
|
246
|
+
const opts = {
|
|
247
|
+
hour: "2-digit",
|
|
248
|
+
minute: "2-digit",
|
|
249
|
+
hour12: false
|
|
250
|
+
};
|
|
251
|
+
if (resolvedTz) opts.timeZone = resolvedTz;
|
|
252
|
+
return new Intl.DateTimeFormat(void 0, opts).format(d);
|
|
253
|
+
}, [
|
|
254
|
+
time,
|
|
255
|
+
simulatedDate,
|
|
256
|
+
resolvedTz
|
|
257
|
+
]),
|
|
258
|
+
location,
|
|
259
|
+
flag,
|
|
260
|
+
temperature,
|
|
261
|
+
weather,
|
|
262
|
+
liveWeatherCategory,
|
|
263
|
+
liveTemperatureC,
|
|
264
|
+
latitude: resolvedLat,
|
|
265
|
+
longitude: resolvedLon,
|
|
266
|
+
timezone: resolvedTz,
|
|
267
|
+
simulatedDate,
|
|
268
|
+
showFlag,
|
|
269
|
+
showWeather,
|
|
270
|
+
showTemperature,
|
|
271
|
+
size,
|
|
272
|
+
palette
|
|
273
|
+
};
|
|
274
|
+
const CompactComponent = skin.CompactComponent;
|
|
275
|
+
if (!CompactComponent) return /* @__PURE__ */ jsxs("div", {
|
|
276
|
+
className,
|
|
277
|
+
style: {
|
|
278
|
+
opacity: .4,
|
|
279
|
+
fontSize: 11,
|
|
280
|
+
color: "#888"
|
|
281
|
+
},
|
|
282
|
+
children: ["Compact not implemented for ", skin.id]
|
|
283
|
+
});
|
|
284
|
+
return /* @__PURE__ */ jsx("div", {
|
|
285
|
+
className,
|
|
286
|
+
style: { isolation: "isolate" },
|
|
287
|
+
children: /* @__PURE__ */ jsx(CompactComponent, { ...props })
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
//#endregion
|
|
292
|
+
export { CompactWidget, SolarThemeProvider, SolarWidget, useSolarTheme };
|
|
293
|
+
//# sourceMappingURL=index.js.map
|