@brika/plugin-weather 0.3.0
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 +62 -0
- package/icon.svg +32 -0
- package/locales/en/plugin.json +137 -0
- package/locales/fr/plugin.json +137 -0
- package/package.json +181 -0
- package/src/__tests__/utils.test.ts +360 -0
- package/src/api.ts +116 -0
- package/src/bricks/compact.tsx +60 -0
- package/src/bricks/current.tsx +133 -0
- package/src/bricks/forecast.tsx +136 -0
- package/src/bricks/shared.tsx +49 -0
- package/src/index.tsx +13 -0
- package/src/types.ts +53 -0
- package/src/use-weather.ts +75 -0
- package/src/utils.ts +160 -0
- package/src/weather-store.ts +128 -0
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Weather Plugin
|
|
2
|
+
|
|
3
|
+
Beautiful weather display plugin for Brika with current conditions, multi-day forecasts, and compact temperature widgets. Uses the free [Open-Meteo API](https://open-meteo.com/) — no API key required.
|
|
4
|
+
|
|
5
|
+
## Bricks
|
|
6
|
+
|
|
7
|
+
### Current Weather
|
|
8
|
+
|
|
9
|
+
Live weather conditions with dynamic gradient backgrounds that change based on weather.
|
|
10
|
+
|
|
11
|
+
- **Sizes:** 1×1 to 12×8
|
|
12
|
+
- **Displays:** Temperature, feels-like, humidity, wind speed/direction, pressure
|
|
13
|
+
- **Layouts:** Compact (1-2 cols), medium (3-4 cols), large (5+ cols) — content adapts to available space
|
|
14
|
+
|
|
15
|
+
### Weather Forecast
|
|
16
|
+
|
|
17
|
+
Multi-day weather forecast with daily highs, lows, and condition icons.
|
|
18
|
+
|
|
19
|
+
- **Sizes:** 2×1 to 12×6
|
|
20
|
+
- **Displays:** Up to 7 days of forecast data
|
|
21
|
+
- **Layouts:** Vertical list (narrow) or horizontal grid (wide) — adapts to brick dimensions
|
|
22
|
+
- **Config:** Number of forecast days (1-7)
|
|
23
|
+
|
|
24
|
+
### Temperature (Compact)
|
|
25
|
+
|
|
26
|
+
Minimal temperature and condition display for small spaces.
|
|
27
|
+
|
|
28
|
+
- **Sizes:** 1×1 to 3×3
|
|
29
|
+
- **Displays:** Current temperature, weather icon, condition label
|
|
30
|
+
|
|
31
|
+
## Configuration
|
|
32
|
+
|
|
33
|
+
### Plugin Preferences
|
|
34
|
+
|
|
35
|
+
| Preference | Type | Default | Description |
|
|
36
|
+
|---|---|---|---|
|
|
37
|
+
| City | text | _(auto-detect)_ | City name for weather data |
|
|
38
|
+
| Temperature Unit | dropdown | Celsius | Celsius or Fahrenheit |
|
|
39
|
+
|
|
40
|
+
Each brick can also override the city and unit via its own config.
|
|
41
|
+
|
|
42
|
+
**City resolution order:** brick config → plugin preference → device location → Zurich (fallback)
|
|
43
|
+
|
|
44
|
+
## Data Source
|
|
45
|
+
|
|
46
|
+
Weather data is fetched from [Open-Meteo](https://open-meteo.com/) and polled every 10 minutes. Polling is reference-counted — multiple bricks showing the same city share a single polling timer.
|
|
47
|
+
|
|
48
|
+
Supports 50 WMO weather codes mapped to 9 condition types (clear, partly cloudy, cloudy, fog, drizzle, rain, snow, showers, thunderstorm), each with its own icon, gradient background, and accent color.
|
|
49
|
+
|
|
50
|
+
## Localization
|
|
51
|
+
|
|
52
|
+
Fully translated in English and French, covering weather conditions, stats labels, day names, and all UI strings.
|
|
53
|
+
|
|
54
|
+
## Development
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Type-check
|
|
58
|
+
bun run tsc
|
|
59
|
+
|
|
60
|
+
# Run tests
|
|
61
|
+
bun test
|
|
62
|
+
```
|
package/icon.svg
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="512" height="512" fill="url(#paint0_linear_3_4)"/>
|
|
3
|
+
<circle cx="345" cy="214" r="92" fill="url(#paint1_linear_3_4)"/>
|
|
4
|
+
<foreignObject x="46" y="133" width="382" height="285"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(15px);clip-path:url(#bgblur_0_3_4_clip_path);height:100%;width:100%"></div></foreignObject><g filter="url(#filter0_i_3_4)" data-figma-bg-blur-radius="30">
|
|
5
|
+
<path d="M321 387.876C363.918 385.512 398 349.535 398 305.5C398 259.936 361.511 223 316.5 223C310.914 223 305.46 223.569 300.19 224.652C288.048 188.794 254.27 163 214.5 163C165.13 163 124.993 202.751 124.018 252.16C96.1918 260.995 76 287.355 76 318.5C76 356.375 105.861 387.174 143 387.984V388H321V387.876Z" fill="url(#paint2_linear_3_4)"/>
|
|
6
|
+
</g>
|
|
7
|
+
<defs>
|
|
8
|
+
<filter id="filter0_i_3_4" x="46" y="133" width="382" height="285" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
9
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
10
|
+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
11
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
12
|
+
<feOffset dx="3" dy="2"/>
|
|
13
|
+
<feGaussianBlur stdDeviation="5"/>
|
|
14
|
+
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
|
15
|
+
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.4 0"/>
|
|
16
|
+
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_4"/>
|
|
17
|
+
</filter>
|
|
18
|
+
<clipPath id="bgblur_0_3_4_clip_path" transform="translate(-46 -133)"><path d="M321 387.876C363.918 385.512 398 349.535 398 305.5C398 259.936 361.511 223 316.5 223C310.914 223 305.46 223.569 300.19 224.652C288.048 188.794 254.27 163 214.5 163C165.13 163 124.993 202.751 124.018 252.16C96.1918 260.995 76 287.355 76 318.5C76 356.375 105.861 387.174 143 387.984V388H321V387.876Z"/>
|
|
19
|
+
</clipPath><linearGradient id="paint0_linear_3_4" x1="256" y1="0" x2="256" y2="512" gradientUnits="userSpaceOnUse">
|
|
20
|
+
<stop stop-color="#2654AA"/>
|
|
21
|
+
<stop offset="1" stop-color="#49A2F7"/>
|
|
22
|
+
</linearGradient>
|
|
23
|
+
<linearGradient id="paint1_linear_3_4" x1="345" y1="122" x2="345" y2="306" gradientUnits="userSpaceOnUse">
|
|
24
|
+
<stop stop-color="#FFC600"/>
|
|
25
|
+
<stop offset="1" stop-color="#FEE400"/>
|
|
26
|
+
</linearGradient>
|
|
27
|
+
<linearGradient id="paint2_linear_3_4" x1="237" y1="163" x2="237" y2="388" gradientUnits="userSpaceOnUse">
|
|
28
|
+
<stop stop-color="white"/>
|
|
29
|
+
<stop offset="1" stop-color="white" stop-opacity="0.5"/>
|
|
30
|
+
</linearGradient>
|
|
31
|
+
</defs>
|
|
32
|
+
</svg>
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Weather",
|
|
3
|
+
"description": "Beautiful weather display with current conditions, forecast, and compact widget",
|
|
4
|
+
"preferences": {
|
|
5
|
+
"city": {
|
|
6
|
+
"title": "City",
|
|
7
|
+
"description": "City name for weather data (leave empty for auto-detect)"
|
|
8
|
+
},
|
|
9
|
+
"unit": {
|
|
10
|
+
"title": "Temperature Unit",
|
|
11
|
+
"options": {
|
|
12
|
+
"celsius": "Celsius",
|
|
13
|
+
"fahrenheit": "Fahrenheit"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"bricks": {
|
|
18
|
+
"current": {
|
|
19
|
+
"name": "Current Weather",
|
|
20
|
+
"description": "Live weather conditions with beautiful background imagery",
|
|
21
|
+
"config": {
|
|
22
|
+
"city": {
|
|
23
|
+
"label": "City Override",
|
|
24
|
+
"description": "Override the plugin-level city for this brick"
|
|
25
|
+
},
|
|
26
|
+
"unit": {
|
|
27
|
+
"label": "Temperature Unit",
|
|
28
|
+
"description": "Override the plugin-level unit for this brick",
|
|
29
|
+
"options": {
|
|
30
|
+
"default": "Use plugin default",
|
|
31
|
+
"celsius": "Celsius",
|
|
32
|
+
"fahrenheit": "Fahrenheit"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"forecast": {
|
|
38
|
+
"name": "Weather Forecast",
|
|
39
|
+
"description": "Multi-day weather forecast with highs, lows, and conditions",
|
|
40
|
+
"config": {
|
|
41
|
+
"city": {
|
|
42
|
+
"label": "City Override",
|
|
43
|
+
"description": "Override the plugin-level city for this brick"
|
|
44
|
+
},
|
|
45
|
+
"unit": {
|
|
46
|
+
"label": "Temperature Unit",
|
|
47
|
+
"description": "Override the plugin-level unit for this brick",
|
|
48
|
+
"options": {
|
|
49
|
+
"default": "Use plugin default",
|
|
50
|
+
"celsius": "Celsius",
|
|
51
|
+
"fahrenheit": "Fahrenheit"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"days": {
|
|
55
|
+
"label": "Forecast Days",
|
|
56
|
+
"description": "Number of days to show (1-7)"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"compact": {
|
|
61
|
+
"name": "Temperature",
|
|
62
|
+
"description": "Compact temperature and condition display",
|
|
63
|
+
"config": {
|
|
64
|
+
"city": {
|
|
65
|
+
"label": "City Override",
|
|
66
|
+
"description": "Override the plugin-level city for this brick"
|
|
67
|
+
},
|
|
68
|
+
"unit": {
|
|
69
|
+
"label": "Temperature Unit",
|
|
70
|
+
"description": "Override the plugin-level unit for this brick",
|
|
71
|
+
"options": {
|
|
72
|
+
"default": "Use plugin default",
|
|
73
|
+
"celsius": "Celsius",
|
|
74
|
+
"fahrenheit": "Fahrenheit"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"conditions": {
|
|
81
|
+
"clearSky": "Clear Sky",
|
|
82
|
+
"mainlyClear": "Mainly Clear",
|
|
83
|
+
"partlyCloudy": "Partly Cloudy",
|
|
84
|
+
"overcast": "Overcast",
|
|
85
|
+
"fog": "Fog",
|
|
86
|
+
"rimeFog": "Rime Fog",
|
|
87
|
+
"lightDrizzle": "Light Drizzle",
|
|
88
|
+
"drizzle": "Drizzle",
|
|
89
|
+
"denseDrizzle": "Dense Drizzle",
|
|
90
|
+
"freezingDrizzle": "Freezing Drizzle",
|
|
91
|
+
"heavyFreezingDrizzle": "Heavy Freezing Drizzle",
|
|
92
|
+
"lightRain": "Light Rain",
|
|
93
|
+
"rain": "Rain",
|
|
94
|
+
"heavyRain": "Heavy Rain",
|
|
95
|
+
"freezingRain": "Freezing Rain",
|
|
96
|
+
"heavyFreezingRain": "Heavy Freezing Rain",
|
|
97
|
+
"lightSnow": "Light Snow",
|
|
98
|
+
"snow": "Snow",
|
|
99
|
+
"heavySnow": "Heavy Snow",
|
|
100
|
+
"snowGrains": "Snow Grains",
|
|
101
|
+
"lightShowers": "Light Showers",
|
|
102
|
+
"showers": "Showers",
|
|
103
|
+
"heavyShowers": "Heavy Showers",
|
|
104
|
+
"snowShowers": "Snow Showers",
|
|
105
|
+
"heavySnowShowers": "Heavy Snow Showers",
|
|
106
|
+
"thunderstorm": "Thunderstorm",
|
|
107
|
+
"thunderstormHail": "Thunderstorm + Hail",
|
|
108
|
+
"severeThunderstorm": "Severe Thunderstorm",
|
|
109
|
+
"unknown": "Unknown"
|
|
110
|
+
},
|
|
111
|
+
"stats": {
|
|
112
|
+
"feelsLike": "Feels like",
|
|
113
|
+
"feelsLikeTemp": "Feels like {{temp}}",
|
|
114
|
+
"humidity": "Humidity",
|
|
115
|
+
"wind": "Wind",
|
|
116
|
+
"pressure": "Pressure"
|
|
117
|
+
},
|
|
118
|
+
"days": {
|
|
119
|
+
"today": "Today",
|
|
120
|
+
"tomorrow": "Tomorrow",
|
|
121
|
+
"mon": "Mon",
|
|
122
|
+
"tue": "Tue",
|
|
123
|
+
"wed": "Wed",
|
|
124
|
+
"thu": "Thu",
|
|
125
|
+
"fri": "Fri",
|
|
126
|
+
"sat": "Sat",
|
|
127
|
+
"sun": "Sun"
|
|
128
|
+
},
|
|
129
|
+
"ui": {
|
|
130
|
+
"forecast": "Forecast",
|
|
131
|
+
"dayForecast": "{{count}}-Day Forecast",
|
|
132
|
+
"locationForecast": "{{name}} Forecast",
|
|
133
|
+
"locationDayForecast": "{{name}} — {{count}}-Day Forecast",
|
|
134
|
+
"noData": "No data",
|
|
135
|
+
"updated": "Updated {{time}}"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Météo",
|
|
3
|
+
"description": "Affichage météo avec conditions actuelles, prévisions et widget compact",
|
|
4
|
+
"preferences": {
|
|
5
|
+
"city": {
|
|
6
|
+
"title": "Ville",
|
|
7
|
+
"description": "Nom de la ville pour les données météo (laisser vide pour détection automatique)"
|
|
8
|
+
},
|
|
9
|
+
"unit": {
|
|
10
|
+
"title": "Unité de température",
|
|
11
|
+
"options": {
|
|
12
|
+
"celsius": "Celsius",
|
|
13
|
+
"fahrenheit": "Fahrenheit"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"bricks": {
|
|
18
|
+
"current": {
|
|
19
|
+
"name": "Météo actuelle",
|
|
20
|
+
"description": "Conditions météo en direct avec de belles images de fond",
|
|
21
|
+
"config": {
|
|
22
|
+
"city": {
|
|
23
|
+
"label": "Ville (remplacement)",
|
|
24
|
+
"description": "Remplacer la ville du plugin pour cette brique"
|
|
25
|
+
},
|
|
26
|
+
"unit": {
|
|
27
|
+
"label": "Unité de température",
|
|
28
|
+
"description": "Remplacer l'unité du plugin pour cette brique",
|
|
29
|
+
"options": {
|
|
30
|
+
"default": "Utiliser la valeur du plugin",
|
|
31
|
+
"celsius": "Celsius",
|
|
32
|
+
"fahrenheit": "Fahrenheit"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"forecast": {
|
|
38
|
+
"name": "Prévisions météo",
|
|
39
|
+
"description": "Prévisions météo sur plusieurs jours avec max, min et conditions",
|
|
40
|
+
"config": {
|
|
41
|
+
"city": {
|
|
42
|
+
"label": "Ville (remplacement)",
|
|
43
|
+
"description": "Remplacer la ville du plugin pour cette brique"
|
|
44
|
+
},
|
|
45
|
+
"unit": {
|
|
46
|
+
"label": "Unité de température",
|
|
47
|
+
"description": "Remplacer l'unité du plugin pour cette brique",
|
|
48
|
+
"options": {
|
|
49
|
+
"default": "Utiliser la valeur du plugin",
|
|
50
|
+
"celsius": "Celsius",
|
|
51
|
+
"fahrenheit": "Fahrenheit"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"days": {
|
|
55
|
+
"label": "Jours de prévisions",
|
|
56
|
+
"description": "Nombre de jours à afficher (1-7)"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"compact": {
|
|
61
|
+
"name": "Température",
|
|
62
|
+
"description": "Affichage compact de la température et des conditions",
|
|
63
|
+
"config": {
|
|
64
|
+
"city": {
|
|
65
|
+
"label": "Ville (remplacement)",
|
|
66
|
+
"description": "Remplacer la ville du plugin pour cette brique"
|
|
67
|
+
},
|
|
68
|
+
"unit": {
|
|
69
|
+
"label": "Unité de température",
|
|
70
|
+
"description": "Remplacer l'unité du plugin pour cette brique",
|
|
71
|
+
"options": {
|
|
72
|
+
"default": "Utiliser la valeur du plugin",
|
|
73
|
+
"celsius": "Celsius",
|
|
74
|
+
"fahrenheit": "Fahrenheit"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"conditions": {
|
|
81
|
+
"clearSky": "Ciel dégagé",
|
|
82
|
+
"mainlyClear": "Principalement dégagé",
|
|
83
|
+
"partlyCloudy": "Partiellement nuageux",
|
|
84
|
+
"overcast": "Couvert",
|
|
85
|
+
"fog": "Brouillard",
|
|
86
|
+
"rimeFog": "Brouillard givrant",
|
|
87
|
+
"lightDrizzle": "Bruine légère",
|
|
88
|
+
"drizzle": "Bruine",
|
|
89
|
+
"denseDrizzle": "Bruine dense",
|
|
90
|
+
"freezingDrizzle": "Bruine verglaçante",
|
|
91
|
+
"heavyFreezingDrizzle": "Forte bruine verglaçante",
|
|
92
|
+
"lightRain": "Pluie légère",
|
|
93
|
+
"rain": "Pluie",
|
|
94
|
+
"heavyRain": "Forte pluie",
|
|
95
|
+
"freezingRain": "Pluie verglaçante",
|
|
96
|
+
"heavyFreezingRain": "Forte pluie verglaçante",
|
|
97
|
+
"lightSnow": "Neige légère",
|
|
98
|
+
"snow": "Neige",
|
|
99
|
+
"heavySnow": "Forte neige",
|
|
100
|
+
"snowGrains": "Grésil",
|
|
101
|
+
"lightShowers": "Averses légères",
|
|
102
|
+
"showers": "Averses",
|
|
103
|
+
"heavyShowers": "Fortes averses",
|
|
104
|
+
"snowShowers": "Averses de neige",
|
|
105
|
+
"heavySnowShowers": "Fortes averses de neige",
|
|
106
|
+
"thunderstorm": "Orage",
|
|
107
|
+
"thunderstormHail": "Orage avec grêle",
|
|
108
|
+
"severeThunderstorm": "Orage violent",
|
|
109
|
+
"unknown": "Inconnu"
|
|
110
|
+
},
|
|
111
|
+
"stats": {
|
|
112
|
+
"feelsLike": "Ressenti",
|
|
113
|
+
"feelsLikeTemp": "Ressenti {{temp}}",
|
|
114
|
+
"humidity": "Humidité",
|
|
115
|
+
"wind": "Vent",
|
|
116
|
+
"pressure": "Pression"
|
|
117
|
+
},
|
|
118
|
+
"days": {
|
|
119
|
+
"today": "Aujourd'hui",
|
|
120
|
+
"tomorrow": "Demain",
|
|
121
|
+
"mon": "Lun",
|
|
122
|
+
"tue": "Mar",
|
|
123
|
+
"wed": "Mer",
|
|
124
|
+
"thu": "Jeu",
|
|
125
|
+
"fri": "Ven",
|
|
126
|
+
"sat": "Sam",
|
|
127
|
+
"sun": "Dim"
|
|
128
|
+
},
|
|
129
|
+
"ui": {
|
|
130
|
+
"forecast": "Prévisions",
|
|
131
|
+
"dayForecast": "Prévisions {{count}} jours",
|
|
132
|
+
"locationForecast": "Prévisions {{name}}",
|
|
133
|
+
"locationDayForecast": "{{name}} — Prévisions {{count}} jours",
|
|
134
|
+
"noData": "Aucune donnée",
|
|
135
|
+
"updated": "Mis à jour {{time}}"
|
|
136
|
+
}
|
|
137
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schema.brika.dev/plugin.schema.json",
|
|
3
|
+
"name": "@brika/plugin-weather",
|
|
4
|
+
"displayName": "Weather",
|
|
5
|
+
"version": "0.3.0",
|
|
6
|
+
"description": "Beautiful weather display with current conditions, forecast, and compact widget",
|
|
7
|
+
"author": "BRIKA Team",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/maxscharwath/brika.git",
|
|
12
|
+
"directory": "plugins/weather"
|
|
13
|
+
},
|
|
14
|
+
"icon": "./icon.svg",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"brika",
|
|
17
|
+
"brika-plugin",
|
|
18
|
+
"weather",
|
|
19
|
+
"forecast",
|
|
20
|
+
"temperature"
|
|
21
|
+
],
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "./src/index.tsx",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": "./src/index.tsx"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"brika": "^0.3.0"
|
|
29
|
+
},
|
|
30
|
+
"permissions": [
|
|
31
|
+
"location"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"link": "bun link",
|
|
35
|
+
"tsc": "bunx --bun tsc --noEmit",
|
|
36
|
+
"prepublishOnly": "brika-verify-plugin"
|
|
37
|
+
},
|
|
38
|
+
"preferences": [
|
|
39
|
+
{
|
|
40
|
+
"name": "city",
|
|
41
|
+
"type": "text",
|
|
42
|
+
"label": "City",
|
|
43
|
+
"description": "City name for weather data (leave empty for auto-detect)",
|
|
44
|
+
"default": ""
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "unit",
|
|
48
|
+
"type": "dropdown",
|
|
49
|
+
"label": "Temperature Unit",
|
|
50
|
+
"options": [
|
|
51
|
+
{
|
|
52
|
+
"value": "celsius"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"value": "fahrenheit"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"default": "celsius"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"bricks": [
|
|
62
|
+
{
|
|
63
|
+
"id": "current",
|
|
64
|
+
"name": "Current Weather",
|
|
65
|
+
"description": "Live weather conditions with beautiful background imagery",
|
|
66
|
+
"category": "info",
|
|
67
|
+
"icon": "cloud-sun",
|
|
68
|
+
"color": "#f59e0b",
|
|
69
|
+
"config": [
|
|
70
|
+
{
|
|
71
|
+
"type": "text",
|
|
72
|
+
"name": "city",
|
|
73
|
+
"label": "City",
|
|
74
|
+
"description": "City name (leave empty for auto-detect or plugin default)"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "dropdown",
|
|
78
|
+
"name": "unit",
|
|
79
|
+
"label": "Temperature Unit",
|
|
80
|
+
"options": [
|
|
81
|
+
{
|
|
82
|
+
"value": "default"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"value": "celsius"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"value": "fahrenheit"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"default": "default"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "forecast",
|
|
97
|
+
"name": "Weather Forecast",
|
|
98
|
+
"description": "Multi-day weather forecast with highs, lows, and conditions",
|
|
99
|
+
"category": "info",
|
|
100
|
+
"icon": "calendar-days",
|
|
101
|
+
"color": "#3b82f6",
|
|
102
|
+
"config": [
|
|
103
|
+
{
|
|
104
|
+
"type": "text",
|
|
105
|
+
"name": "city",
|
|
106
|
+
"label": "City",
|
|
107
|
+
"description": "City name (leave empty for auto-detect or plugin default)"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"type": "dropdown",
|
|
111
|
+
"name": "unit",
|
|
112
|
+
"label": "Temperature Unit",
|
|
113
|
+
"options": [
|
|
114
|
+
{
|
|
115
|
+
"value": "default"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"value": "celsius"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"value": "fahrenheit"
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"default": "default"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "number",
|
|
128
|
+
"name": "days",
|
|
129
|
+
"label": "Forecast Days",
|
|
130
|
+
"description": "Number of days to show (1-7)",
|
|
131
|
+
"default": 7,
|
|
132
|
+
"min": 1,
|
|
133
|
+
"max": 7,
|
|
134
|
+
"step": 1
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "compact",
|
|
140
|
+
"name": "Temperature",
|
|
141
|
+
"description": "Compact temperature and condition display",
|
|
142
|
+
"category": "info",
|
|
143
|
+
"icon": "thermometer",
|
|
144
|
+
"color": "#ef4444",
|
|
145
|
+
"config": [
|
|
146
|
+
{
|
|
147
|
+
"type": "text",
|
|
148
|
+
"name": "city",
|
|
149
|
+
"label": "City",
|
|
150
|
+
"description": "City name (leave empty for auto-detect or plugin default)"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"type": "dropdown",
|
|
154
|
+
"name": "unit",
|
|
155
|
+
"label": "Temperature Unit",
|
|
156
|
+
"options": [
|
|
157
|
+
{
|
|
158
|
+
"value": "default"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"value": "celsius"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"value": "fahrenheit"
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
"default": "default"
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"dependencies": {
|
|
173
|
+
"@brika/sdk": "0.3.0"
|
|
174
|
+
},
|
|
175
|
+
"files": [
|
|
176
|
+
"src",
|
|
177
|
+
"locales",
|
|
178
|
+
"icon.svg",
|
|
179
|
+
"README.md"
|
|
180
|
+
]
|
|
181
|
+
}
|