|
14 | 14 | {
|
15 | 15 | "kind": "method",
|
16 | 16 | "name": "createRenderRoot",
|
17 |
| - "privacy": "protected" |
| 17 | + "privacy": "protected", |
| 18 | + "description": "Disable shadow-dom" |
18 | 19 | },
|
19 | 20 | {
|
20 | 21 | "kind": "method",
|
21 |
| - "name": "render" |
| 22 | + "name": "render", |
| 23 | + "privacy": "protected" |
| 24 | + }, |
| 25 | + { |
| 26 | + "kind": "field", |
| 27 | + "name": "Header", |
| 28 | + "privacy": "protected" |
22 | 29 | },
|
23 | 30 | {
|
24 | 31 | "kind": "field",
|
25 |
| - "name": "Header" |
| 32 | + "name": "Forecast", |
| 33 | + "privacy": "protected" |
26 | 34 | },
|
27 | 35 | {
|
28 | 36 | "kind": "field",
|
29 |
| - "name": "Forecast" |
| 37 | + "name": "Preview", |
| 38 | + "privacy": "protected" |
30 | 39 | },
|
31 | 40 | {
|
32 | 41 | "kind": "field",
|
33 |
| - "name": "Content" |
| 42 | + "name": "Content", |
| 43 | + "privacy": "protected" |
34 | 44 | },
|
35 | 45 | {
|
36 | 46 | "kind": "field",
|
37 |
| - "name": "ErrorContent" |
| 47 | + "name": "ErrorContent", |
| 48 | + "privacy": "protected" |
38 | 49 | },
|
39 | 50 | {
|
40 | 51 | "kind": "field",
|
41 | 52 | "name": "query",
|
42 | 53 | "type": {
|
43 | 54 | "text": "string"
|
44 | 55 | },
|
45 |
| - "default": "''", |
46 | 56 | "description": "The query to lookup via openweatherapi. <br/>\n<code>{city}</code> <br/>\n<code>{city}, {state}</code> <br/>\n<code>{city}, {state}, {country}</code> <br/>\n<code>{zip code}</code> <br/>\n<code>{zip code},{country code}</code>"
|
47 | 57 | },
|
48 | 58 | {
|
|
51 | 61 | "type": {
|
52 | 62 | "text": "string"
|
53 | 63 | },
|
54 |
| - "default": "''", |
55 | 64 | "description": "Your openweather API token"
|
56 | 65 | },
|
57 | 66 | {
|
|
60 | 69 | "type": {
|
61 | 70 | "text": "'Imperial' | 'Metric' | undefined"
|
62 | 71 | },
|
63 |
| - "default": "'Imperial'", |
64 |
| - "description": "The units to use for the weather" |
| 72 | + "description": "The units to use for the weather", |
| 73 | + "default": "'Imperial'" |
65 | 74 | },
|
66 | 75 | {
|
67 | 76 | "kind": "field",
|
68 | 77 | "name": "variant",
|
69 | 78 | "type": {
|
70 |
| - "text": "'stacked' | 'horizontal' | undefined" |
| 79 | + "text": "'stacked' | 'preview' | undefined" |
71 | 80 | },
|
72 |
| - "default": "'stacked'", |
73 |
| - "description": "Variant for pre-defined tw classes" |
| 81 | + "description": "Variant for pre-defined tw classes", |
| 82 | + "default": "'stacked'" |
74 | 83 | },
|
75 | 84 | {
|
76 | 85 | "kind": "field",
|
77 | 86 | "name": "cn",
|
78 | 87 | "type": {
|
79 |
| - "text": "typeof classNames | undefined" |
| 88 | + "text": "typeof defaultCn | undefined" |
80 | 89 | },
|
81 |
| - "default": "{\n wrapper: 'block',\n 'location-wrapper': '',\n location: 'text-2xl font-medium',\n today: `text-base ${secondaryTextColorClasses}`,\n description: `text-sm mb-3 capitalize ${secondaryTextColorClasses}`,\n time: `text-base mb-4 ${secondaryTextColorClasses}`,\n 'temp-wrapper-desktop': 'flex flex-col-reverse',\n 'temp-wrapper': 'flex horizontal',\n 'img-temp-wrapper': 'flex',\n img: 'h-[70px] w-[70px] mr-3 bg-inherit rounded',\n 'unit-toggle': `text-lg mt-1.5 ml-2 ${secondaryTextColorClasses}`,\n 'unit-toggle-active': `text-black dark:text-white`,\n temp: 'text-7xl',\n 'extra-info': `flex-col text-xs ml-6 mt-2 hidden sm:flex ${secondaryTextColorClasses}`,\n 'forecast-wrapper': 'flex flex-wrap gap-6 sm:gap-8 mt-4',\n 'forecast-item': 'flex flex-col items-center',\n 'forecast-item-title': `text-center text-sm font-medium mb-1 ${secondaryTextColorClasses}`,\n 'forecast-item-high': 'text-sm',\n 'forecast-item-low': `text-sm ${secondaryTextColorClasses}`,\n 'forecast-item-img': 'mb-1 bg-inherit',\n 'error-img': 'h-[120px] w-[120px] mb-4',\n 'error-text': 'text-2xl text-center',\n 'mobile-header': 'md:hidden',\n loading: 'text-center',\n}", |
82 |
| - "description": "Class names applied to elements" |
| 90 | + "description": "Class names applied to elements", |
| 91 | + "default": "{\n wrapper: 'block',\n location: 'text-2xl font-medium',\n today: `text-base ${grayTxt}`,\n description: `text-sm mb-3 capitalize ${grayTxt}`,\n time: `text-base mb-4 ${grayTxt}`,\n img: 'h-[70px] w-[70px] mr-3 bg-inherit rounded',\n 'img-loading': 'h-[70px] w-[70px] bg-gray-50 dark:bg-gray-800 mr-3 bg-inherit rounded',\n 'extra-info': `flex-col text-xs ml-6 mt-2 hidden sm:flex ${grayTxt}`,\n 'temp-wrapper': 'flex horizontal',\n 'temp-content': 'flex',\n temp: 'text-7xl',\n 'unit-toggle': `text-lg mt-1.5 ml-2 ${grayTxt}`,\n 'unit-toggle-active': `text-black dark:text-white`,\n 'forecast-wrapper': 'flex flex-wrap gap-6 sm:gap-8 mt-4',\n 'forecast-item': 'flex flex-col items-center',\n 'forecast-item-title': `text-center text-sm font-medium mb-1 ${grayTxt}`,\n 'forecast-item-high': 'text-sm',\n 'forecast-item-low': `text-sm ${grayTxt}`,\n 'forecast-item-img': 'mb-1 bg-inherit',\n 'forecast-item-img-loading': 'h-[48px] w-[48px] rounded-lg bg-gray-50 dark:bg-gray-800',\n error: 'text-sm',\n 'preview-wrapper': 'flex items-center',\n 'preview-img': 'h-6 w-6 mr-2 bg-inherit rounded',\n 'preview-img-loading': 'h-6 w-6 bg-gray-50 dark:bg-gray-800 rounded-xl',\n 'preview-temp': 'text-lg',\n 'preview-temp-content': 'flex',\n 'preview-unit-toggle': `text-xs mt-0.5 ml-1 ${grayTxt}`,\n}" |
83 | 92 | },
|
84 | 93 | {
|
85 | 94 | "kind": "field",
|
86 | 95 | "name": "icons",
|
87 | 96 | "type": {
|
88 | 97 | "text": "'default' | 'openweather' | undefined"
|
89 | 98 | },
|
90 |
| - "default": "'default'", |
91 | 99 | "description": "Icon type, defaults to a combination of material weather icons and openweather icons"
|
92 | 100 | },
|
93 | 101 | {
|
|
96 | 104 | "type": {
|
97 | 105 | "text": "string | undefined"
|
98 | 106 | },
|
99 |
| - "default": "'https://www.unpkg.com/lit-weather/icons/'", |
100 |
| - "description": "If you are self-hosting the iconset" |
| 107 | + "description": "If you are self-hosting the iconset", |
| 108 | + "default": "'https://www.unpkg.com/lit-weather/icons/'" |
101 | 109 | },
|
102 | 110 | {
|
103 | 111 | "kind": "field",
|
104 |
| - "name": "loading", |
| 112 | + "name": "_loading", |
105 | 113 | "type": {
|
106 | 114 | "text": "boolean | undefined"
|
107 | 115 | },
|
108 |
| - "default": "true", |
109 |
| - "description": "When true, a request is being made and the skeleton state is shown" |
| 116 | + "privacy": "protected", |
| 117 | + "description": "When true, a request is being made and the skeleton state is shown", |
| 118 | + "default": "true" |
110 | 119 | },
|
111 | 120 | {
|
112 | 121 | "kind": "field",
|
113 |
| - "name": "error", |
| 122 | + "name": "_error", |
114 | 123 | "type": {
|
115 | 124 | "text": "boolean | undefined"
|
116 | 125 | },
|
117 |
| - "default": "false", |
118 |
| - "description": "true when there is an error" |
| 126 | + "privacy": "protected", |
| 127 | + "description": "true when there is an error", |
| 128 | + "default": "false" |
119 | 129 | },
|
120 | 130 | {
|
121 | 131 | "kind": "field",
|
122 |
| - "name": "weekDayName", |
| 132 | + "name": "_weekDayName", |
123 | 133 | "type": {
|
124 | 134 | "text": "string | undefined"
|
125 | 135 | },
|
| 136 | + "privacy": "protected", |
126 | 137 | "description": "The day of the week"
|
127 | 138 | },
|
128 | 139 | {
|
129 | 140 | "kind": "field",
|
130 |
| - "name": "time", |
| 141 | + "name": "_time", |
131 | 142 | "type": {
|
132 | 143 | "text": "string | undefined"
|
133 | 144 | },
|
| 145 | + "privacy": "protected", |
134 | 146 | "description": "The current time"
|
135 | 147 | },
|
136 | 148 | {
|
137 | 149 | "kind": "field",
|
138 |
| - "name": "forecast", |
| 150 | + "name": "_forecast", |
139 | 151 | "type": {
|
140 |
| - "text": "Forecast | undefined" |
| 152 | + "text": "{\n weekDayName: string;\n high: number;\n low: number;\n weatherImgSrc: string;\n }[] | undefined" |
141 | 153 | },
|
142 |
| - "default": "[]", |
143 |
| - "description": "The forecast data" |
| 154 | + "privacy": "protected", |
| 155 | + "description": "The forecast data", |
| 156 | + "default": "[]" |
144 | 157 | },
|
145 | 158 | {
|
146 | 159 | "kind": "field",
|
147 |
| - "name": "data", |
| 160 | + "name": "_data", |
148 | 161 | "type": {
|
149 |
| - "text": "Data | undefined" |
| 162 | + "text": "{\n name?: string;\n id?: number;\n sunrise?: string;\n sunset?: string;\n temp?: number;\n description?: string;\n humidity?: string;\n wind?: string;\n weatherImgSrc?: string;\n fullForecastUrl?: string;\n tempFeelsLike?: number;\n }" |
150 | 163 | },
|
151 |
| - "default": "{}", |
152 |
| - "description": "API response for the current weather" |
| 164 | + "privacy": "protected", |
| 165 | + "description": "API response for the current weather", |
| 166 | + "default": "{}" |
| 167 | + }, |
| 168 | + { |
| 169 | + "kind": "field", |
| 170 | + "name": "_cn", |
| 171 | + "privacy": "protected", |
| 172 | + "default": "{\n wrapper: 'block',\n location: 'text-2xl font-medium',\n today: `text-base ${grayTxt}`,\n description: `text-sm mb-3 capitalize ${grayTxt}`,\n time: `text-base mb-4 ${grayTxt}`,\n img: 'h-[70px] w-[70px] mr-3 bg-inherit rounded',\n 'img-loading': 'h-[70px] w-[70px] bg-gray-50 dark:bg-gray-800 mr-3 bg-inherit rounded',\n 'extra-info': `flex-col text-xs ml-6 mt-2 hidden sm:flex ${grayTxt}`,\n 'temp-wrapper': 'flex horizontal',\n 'temp-content': 'flex',\n temp: 'text-7xl',\n 'unit-toggle': `text-lg mt-1.5 ml-2 ${grayTxt}`,\n 'unit-toggle-active': `text-black dark:text-white`,\n 'forecast-wrapper': 'flex flex-wrap gap-6 sm:gap-8 mt-4',\n 'forecast-item': 'flex flex-col items-center',\n 'forecast-item-title': `text-center text-sm font-medium mb-1 ${grayTxt}`,\n 'forecast-item-high': 'text-sm',\n 'forecast-item-low': `text-sm ${grayTxt}`,\n 'forecast-item-img': 'mb-1 bg-inherit',\n 'forecast-item-img-loading': 'h-[48px] w-[48px] rounded-lg bg-gray-50 dark:bg-gray-800',\n error: 'text-sm',\n 'preview-wrapper': 'flex items-center',\n 'preview-img': 'h-6 w-6 mr-2 bg-inherit rounded',\n 'preview-img-loading': 'h-6 w-6 bg-gray-50 dark:bg-gray-800 rounded-xl',\n 'preview-temp': 'text-lg',\n 'preview-temp-content': 'flex',\n 'preview-unit-toggle': `text-xs mt-0.5 ml-1 ${grayTxt}`,\n}", |
| 173 | + "description": "Applied classnames", |
| 174 | + "type": { |
| 175 | + "text": "object" |
| 176 | + } |
153 | 177 | },
|
154 | 178 | {
|
155 | 179 | "kind": "method",
|
|
180 | 204 | "name": "_generateRequests",
|
181 | 205 | "parameters": [
|
182 | 206 | {
|
183 |
| - "name": "key" |
| 207 | + "name": "key", |
| 208 | + "type": { |
| 209 | + "text": "typeof this.token" |
| 210 | + } |
184 | 211 | },
|
185 | 212 | {
|
186 |
| - "name": "query" |
| 213 | + "name": "query", |
| 214 | + "type": { |
| 215 | + "text": "typeof this.query" |
| 216 | + } |
187 | 217 | }
|
188 | 218 | ]
|
189 | 219 | },
|
|
192 | 222 | "name": "_getLocationParam",
|
193 | 223 | "parameters": [
|
194 | 224 | {
|
195 |
| - "name": "query" |
| 225 | + "name": "query", |
| 226 | + "type": { |
| 227 | + "text": "string" |
| 228 | + } |
196 | 229 | }
|
197 | 230 | ]
|
198 | 231 | },
|
|
201 | 234 | "name": "_getCurrentWeather",
|
202 | 235 | "parameters": [
|
203 | 236 | {
|
204 |
| - "name": "key" |
| 237 | + "name": "key", |
| 238 | + "type": { |
| 239 | + "text": "string" |
| 240 | + } |
205 | 241 | },
|
206 | 242 | {
|
207 |
| - "name": "locationParam" |
| 243 | + "name": "locationParam", |
| 244 | + "type": { |
| 245 | + "text": "string" |
| 246 | + } |
208 | 247 | }
|
209 | 248 | ]
|
210 | 249 | },
|
|
213 | 252 | "name": "_getForecast",
|
214 | 253 | "parameters": [
|
215 | 254 | {
|
216 |
| - "name": "key" |
| 255 | + "name": "key", |
| 256 | + "type": { |
| 257 | + "text": "string" |
| 258 | + } |
217 | 259 | },
|
218 | 260 | {
|
219 |
| - "name": "locationParam" |
| 261 | + "name": "locationParam", |
| 262 | + "type": { |
| 263 | + "text": "string" |
| 264 | + } |
220 | 265 | }
|
221 | 266 | ]
|
222 | 267 | },
|
223 | 268 | {
|
224 | 269 | "kind": "method",
|
225 |
| - "name": "_handleWeatherError", |
226 |
| - "parameters": [ |
227 |
| - { |
228 |
| - "name": "err" |
229 |
| - } |
230 |
| - ] |
| 270 | + "name": "_handleWeatherError" |
231 | 271 | },
|
232 | 272 | {
|
233 | 273 | "kind": "method",
|
234 | 274 | "name": "_computeForecast",
|
235 | 275 | "parameters": [
|
236 | 276 | {
|
237 |
| - "name": "items" |
| 277 | + "name": "items", |
| 278 | + "type": { |
| 279 | + "text": "any" |
| 280 | + } |
238 | 281 | }
|
239 | 282 | ]
|
240 | 283 | },
|
|
243 | 286 | "name": "_imgSrc",
|
244 | 287 | "parameters": [
|
245 | 288 | {
|
246 |
| - "name": "{ icon, id, dynamicDayOrNightString = false }" |
| 289 | + "name": "{\n icon,\n id,\n dynamicDayOrNightString = false,\n }", |
| 290 | + "type": { |
| 291 | + "text": "{\n icon: string;\n id: number;\n dynamicDayOrNightString?: boolean;\n }" |
| 292 | + } |
247 | 293 | }
|
248 | 294 | ]
|
249 | 295 | }
|
|
0 commit comments