use-weather-forecast 0.1.207 → 0.1.209
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/dist/index.cjs +30 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -23
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1263,33 +1263,40 @@ var styles = {
|
|
|
1263
1263
|
hourCard: { minWidth: 72, textAlign: "center", padding: 8, borderRadius: 8, background: "#f9fafb" },
|
|
1264
1264
|
dayRow: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 10, padding: "8px 0", borderBottom: "1px solid #f3f4f6" },
|
|
1265
1265
|
// Fluid: fills whatever container it is dropped into (e.g. the full
|
|
1266
|
-
// sidebar/column width on desktop)
|
|
1267
|
-
//
|
|
1268
|
-
//
|
|
1266
|
+
// sidebar/column width on desktop). Current conditions sit on the left and
|
|
1267
|
+
// the upcoming days on the right; the two halves wrap into a stack when the
|
|
1268
|
+
// container gets narrow.
|
|
1269
|
+
//
|
|
1270
|
+
// The card is deliberately **short**: on the homepage it sits under the
|
|
1271
|
+
// trending-news widget and above the chat input, and every pixel it takes is
|
|
1272
|
+
// one the input box loses on a laptop screen. Padding, the gap between its
|
|
1273
|
+
// two rows and the two display sizes (temperature and clock) are what set
|
|
1274
|
+
// its height — raising any of them pushes the input below the fold, so
|
|
1275
|
+
// prefer trimming content over growing the card.
|
|
1269
1276
|
compactRoot: {
|
|
1270
1277
|
fontFamily: "system-ui, sans-serif",
|
|
1271
1278
|
display: "flex",
|
|
1272
1279
|
flexDirection: "row",
|
|
1273
1280
|
flexWrap: "wrap",
|
|
1274
|
-
alignItems: "
|
|
1275
|
-
gap:
|
|
1276
|
-
padding: "
|
|
1281
|
+
alignItems: "center",
|
|
1282
|
+
gap: 20,
|
|
1283
|
+
padding: "12px 16px",
|
|
1277
1284
|
borderRadius: 16,
|
|
1278
1285
|
width: "100%",
|
|
1279
1286
|
boxSizing: "border-box"
|
|
1280
1287
|
},
|
|
1281
|
-
// Current conditions form two
|
|
1282
|
-
//
|
|
1283
|
-
//
|
|
1284
|
-
compactBody: { display: "flex", flexDirection: "column", justifyContent: "
|
|
1285
|
-
compactRow: { display: "flex", alignItems: "center", justifyContent: "space-between", flexWrap: "wrap", gap: "
|
|
1286
|
-
compactCity: { fontSize:
|
|
1287
|
-
compactHeader: { display: "flex", alignItems: "center", flexWrap: "wrap", gap:
|
|
1288
|
-
compactTemp: { fontSize:
|
|
1289
|
-
compactTime: { fontSize:
|
|
1290
|
-
compactSeconds: { fontSize:
|
|
1291
|
-
compactDate: { fontSize: 11, opacity: 0.7, marginTop:
|
|
1292
|
-
compactStats: { display: "flex", flexWrap: "wrap", gap: "
|
|
1288
|
+
// Current conditions form two rows down the left side of the card (rather
|
|
1289
|
+
// than five stacked lines), so the card stays short and each row uses the
|
|
1290
|
+
// full available width.
|
|
1291
|
+
compactBody: { display: "flex", flexDirection: "column", justifyContent: "center", gap: 8, flex: "1.6 1 240px", minWidth: 0 },
|
|
1292
|
+
compactRow: { display: "flex", alignItems: "center", justifyContent: "space-between", flexWrap: "wrap", gap: "6px 16px" },
|
|
1293
|
+
compactCity: { fontSize: 14, fontWeight: 700, lineHeight: 1.2 },
|
|
1294
|
+
compactHeader: { display: "flex", alignItems: "center", flexWrap: "wrap", gap: 10 },
|
|
1295
|
+
compactTemp: { fontSize: 26, fontWeight: 600, lineHeight: 1 },
|
|
1296
|
+
compactTime: { fontSize: 20, fontWeight: 600, lineHeight: 1.1 },
|
|
1297
|
+
compactSeconds: { fontSize: 12, fontWeight: 500, opacity: 0.6, marginLeft: 2 },
|
|
1298
|
+
compactDate: { fontSize: 11, opacity: 0.7, marginTop: 2 },
|
|
1299
|
+
compactStats: { display: "flex", flexWrap: "wrap", gap: "4px 16px", fontSize: 12, opacity: 0.9 },
|
|
1293
1300
|
// Three equal columns on the right side of the card, each stacking
|
|
1294
1301
|
// weekday / icon / high-low, vertically centered against the current
|
|
1295
1302
|
// conditions and nudged over behind a divider so the two halves read as
|
|
@@ -1298,15 +1305,15 @@ var styles = {
|
|
|
1298
1305
|
display: "grid",
|
|
1299
1306
|
gridTemplateColumns: "repeat(3, 1fr)",
|
|
1300
1307
|
alignContent: "center",
|
|
1301
|
-
gap:
|
|
1308
|
+
gap: 10,
|
|
1302
1309
|
flex: "1 1 190px",
|
|
1303
1310
|
minWidth: 0,
|
|
1304
|
-
paddingLeft:
|
|
1311
|
+
paddingLeft: 18,
|
|
1305
1312
|
borderLeft: "1px solid currentColor",
|
|
1306
1313
|
borderLeftColor: "rgba(128,128,128,0.25)",
|
|
1307
1314
|
fontSize: 11
|
|
1308
1315
|
},
|
|
1309
|
-
upcomingDay: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap:
|
|
1316
|
+
upcomingDay: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: 3, textAlign: "center" },
|
|
1310
1317
|
upcomingDayName: { opacity: 0.7, whiteSpace: "nowrap" },
|
|
1311
1318
|
upcomingTemps: { whiteSpace: "nowrap" },
|
|
1312
1319
|
compactStat: { display: "flex", alignItems: "center", gap: 6, whiteSpace: "nowrap" },
|
|
@@ -1380,9 +1387,9 @@ function SingleWeatherForecast(props) {
|
|
|
1380
1387
|
data.location?.region ? `, ${data.location.region}` : ""
|
|
1381
1388
|
] }),
|
|
1382
1389
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: styles.compactHeader, children: [
|
|
1383
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(WeatherIcon, { condition: data.current.icon, width:
|
|
1390
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(WeatherIcon, { condition: data.current.icon, width: 26, height: 26, title: "Current weather" }),
|
|
1384
1391
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("strong", { style: styles.compactTemp, children: data.current.temperature }),
|
|
1385
|
-
renderUnitSwitch(
|
|
1392
|
+
renderUnitSwitch(12)
|
|
1386
1393
|
] })
|
|
1387
1394
|
] }),
|
|
1388
1395
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: styles.compactRow, children: [
|