@justanarthur/modo-ui-notch 0.3.0 → 0.4.1

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.
Files changed (70) hide show
  1. package/blocks/activities/agenda/examples.mdx +8 -0
  2. package/blocks/activities/agenda/index.tsx +164 -16
  3. package/blocks/activities/clock/examples.mdx +16 -0
  4. package/blocks/activities/clock/index.tsx +357 -59
  5. package/blocks/activities/now-playing/examples.mdx +8 -0
  6. package/blocks/activities/now-playing/index.tsx +140 -54
  7. package/blocks/activities/weather/examples.mdx +9 -1
  8. package/blocks/activities/weather/index.tsx +241 -12
  9. package/blocks/app/expanded-island/index.tsx +3 -1
  10. package/blocks/app/settings-window/examples.mdx +8 -0
  11. package/blocks/app/settings-window/index.tsx +8 -3
  12. package/blocks/system/clipboard/examples.mdx +8 -0
  13. package/blocks/system/clipboard/index.tsx +262 -52
  14. package/blocks/system/recent-files/examples.mdx +14 -0
  15. package/blocks/system/recent-files/index.tsx +110 -25
  16. package/blocks/system/system-stats/examples.mdx +8 -0
  17. package/blocks/system/system-stats/index.tsx +211 -4
  18. package/components/island/widget/index.tsx +38 -4
  19. package/dist/blocks/activities/agenda/index.d.ts +2 -1
  20. package/dist/blocks/activities/agenda/index.js +2 -2
  21. package/dist/blocks/activities/clock/index.d.ts +2 -1
  22. package/dist/blocks/activities/clock/index.js +2 -2
  23. package/dist/blocks/activities/now-playing/index.d.ts +2 -1
  24. package/dist/blocks/activities/now-playing/index.js +2 -2
  25. package/dist/blocks/activities/weather/index.d.ts +2 -1
  26. package/dist/blocks/activities/weather/index.js +2 -2
  27. package/dist/blocks/app/expanded-island/index.d.ts +1 -1
  28. package/dist/blocks/app/expanded-island/index.js +1 -1
  29. package/dist/blocks/app/settings-window/index.d.ts +1 -1
  30. package/dist/blocks/app/settings-window/index.js +1 -1
  31. package/dist/blocks/system/clipboard/index.d.ts +2 -1
  32. package/dist/blocks/system/clipboard/index.js +2 -2
  33. package/dist/blocks/system/recent-files/index.d.ts +2 -1
  34. package/dist/blocks/system/recent-files/index.js +2 -2
  35. package/dist/blocks/system/system-stats/index.d.ts +2 -1
  36. package/dist/blocks/system/system-stats/index.js +2 -2
  37. package/dist/components/island/widget/index.d.ts +2 -2
  38. package/dist/components/island/widget/index.js +3 -1
  39. package/dist/index.d.ts +11 -11
  40. package/dist/index.js +12 -10
  41. package/dist/shared/{chunk-2m5dz8nf.d.ts → chunk-0ym9mcqc.d.ts} +6 -2
  42. package/dist/shared/{chunk-7fvnrtz4.d.ts → chunk-1v35ck2y.d.ts} +12 -2
  43. package/dist/shared/{chunk-wkg17nxs.d.ts → chunk-2bqmmfg9.d.ts} +13 -2
  44. package/dist/shared/{chunk-mt0k6v8x.js → chunk-2nxwdn5s.js} +147 -39
  45. package/dist/shared/{chunk-pfhy5e4q.d.ts → chunk-6tnq6p89.d.ts} +2 -0
  46. package/dist/shared/{chunk-bvtyjcce.d.ts → chunk-72s4sqwh.d.ts} +16 -1
  47. package/dist/shared/{chunk-t0hcxh89.d.ts → chunk-9b8b7fw6.d.ts} +12 -0
  48. package/dist/shared/{chunk-xq5hc5gv.js → chunk-a059ccj0.js} +177 -66
  49. package/dist/shared/{chunk-qdzemt2v.js → chunk-cry81asr.js} +401 -89
  50. package/dist/shared/{chunk-da177e8r.d.ts → chunk-fr9jf804.d.ts} +16 -1
  51. package/dist/shared/{chunk-9c7ewvkk.js → chunk-kbk4bp6p.js} +162 -19
  52. package/dist/shared/{chunk-3thgcfcq.d.ts → chunk-kv0w8vhq.d.ts} +18 -1
  53. package/dist/shared/{chunk-416tsgbc.d.ts → chunk-nqjermbr.d.ts} +25 -3
  54. package/dist/shared/chunk-p3nezxvx.js +481 -0
  55. package/dist/shared/{chunk-2818esrq.d.ts → chunk-sen170mz.d.ts} +10 -1
  56. package/dist/shared/{chunk-9m0xbg5v.js → chunk-wayv5rhr.js} +1 -1
  57. package/dist/shared/{chunk-ym0xbses.js → chunk-ygnrrqta.js} +274 -18
  58. package/dist/shared/{chunk-j77cx8dp.js → chunk-yw478nmj.js} +325 -58
  59. package/dist/shared/{chunk-cc9nwbtf.js → chunk-z3tj1ydg.js} +3 -0
  60. package/dist/shared/{chunk-x7f3g82r.js → chunk-zxsw11dr.js} +14 -4
  61. package/dist/styles.css +61 -1
  62. package/mock/clipboard.tsx +34 -0
  63. package/mock/clock.tsx +3 -3
  64. package/mock/data.ts +48 -0
  65. package/mock/files.tsx +14 -1
  66. package/mock/island-content.tsx +47 -15
  67. package/mock/system.ts +3 -0
  68. package/mock/weather.tsx +42 -12
  69. package/package.json +2 -2
  70. package/dist/shared/chunk-s2jeqqan.js +0 -243
@@ -0,0 +1,481 @@
1
+ "use client";
2
+
3
+ import {
4
+ widget_default
5
+ } from "./chunk-zxsw11dr.js";
6
+
7
+ // blocks/system/system-stats/index.tsx
8
+ import Sparkline from "@justanarthur/modo-ui/components/data-display/sparkline";
9
+ import Table from "@justanarthur/modo-ui/components/data-display/table";
10
+ import Meter from "@justanarthur/modo-ui/components/feedback/meter";
11
+ import { cn } from "@justanarthur/modo-ui/lib/utils";
12
+ import {
13
+ Activity,
14
+ ArrowDown,
15
+ ArrowUp,
16
+ BatteryCharging,
17
+ BatteryFull,
18
+ BatteryLow,
19
+ BatteryMedium,
20
+ Cpu,
21
+ HardDrive,
22
+ MemoryStick,
23
+ Network
24
+ } from "lucide-react";
25
+ import { jsx, jsxs } from "react/jsx-runtime";
26
+ /*!
27
+ * Local addition: a notch app's system load, the busiest figure as the hero
28
+ * with its trend, the rest as facts and the busiest processes beside it.
29
+ * Rebuilt from Just Notch's stats plugin (`System`, `Tile`, `Measuring`,
30
+ * `CpuLoad`) on the kit's Widget frame and modo-ui's Sparkline and Meter:
31
+ * the readings come in as props.
32
+ */
33
+ var ROWS = 3;
34
+ var SHEET_ROWS = 8;
35
+ var percent = (v) => `${Math.round(v * 100)}%`;
36
+ var share = (v) => v < 0.1 ? `${(v * 100).toFixed(1)}%` : percent(v);
37
+ function bytes(n) {
38
+ if (n >= 100000000000)
39
+ return `${Math.round(n / 1e9)} GB`;
40
+ if (n >= 1e9)
41
+ return `${(n / 1e9).toFixed(1)} GB`;
42
+ return `${Math.round(n / 1e6)} MB`;
43
+ }
44
+ function rate(bps) {
45
+ if (bps >= 1e6)
46
+ return `${(bps / 1e6).toFixed(1)} MB/s`;
47
+ if (bps >= 1000)
48
+ return `${Math.round(bps / 1000)} KB/s`;
49
+ return `${Math.round(bps)} B/s`;
50
+ }
51
+ function span(seconds) {
52
+ const minutes = Math.floor(seconds / 60);
53
+ const hours = Math.floor(minutes / 60);
54
+ const days = Math.floor(hours / 24);
55
+ if (days)
56
+ return `${days} d ${hours % 24} h`;
57
+ if (hours)
58
+ return `${hours} h ${minutes % 60} min`;
59
+ return `${minutes} min`;
60
+ }
61
+ var clock = (minutes) => `${Math.floor(minutes / 60)}:${String(Math.round(minutes % 60)).padStart(2, "0")}`;
62
+ function toneOf(load) {
63
+ if (load >= 0.9)
64
+ return "error";
65
+ if (load >= 0.75)
66
+ return "warning";
67
+ return "current";
68
+ }
69
+ function verdict(load) {
70
+ if (load >= 0.9)
71
+ return "Under strain";
72
+ if (load >= 0.6)
73
+ return "Busy";
74
+ if (load >= 0.2)
75
+ return "Steady";
76
+ return "Idle";
77
+ }
78
+ var pressureOf = (sample) => sample.memoryPressure ?? sample.memoryUsed / sample.memoryTotal;
79
+ function batteryIcon({ level, charging }) {
80
+ if (charging)
81
+ return BatteryCharging;
82
+ if (level <= 20)
83
+ return BatteryLow;
84
+ if (level <= 70)
85
+ return BatteryMedium;
86
+ return BatteryFull;
87
+ }
88
+ function BatteryItem({ battery }) {
89
+ const left = battery.minutesLeft === undefined ? undefined : clock(battery.minutesLeft);
90
+ return /* @__PURE__ */ jsxs(widget_default.MetaItem, {
91
+ icon: batteryIcon(battery),
92
+ children: [
93
+ battery.level,
94
+ "%",
95
+ left && ` · ${left} ${battery.charging ? "to full" : "left"}`
96
+ ]
97
+ });
98
+ }
99
+ function Facts({ last, hero, battery, disk }) {
100
+ const dash = "–";
101
+ return /* @__PURE__ */ jsxs("div", {
102
+ className: "flex min-w-0 flex-col gap-1",
103
+ children: [
104
+ /* @__PURE__ */ jsxs(widget_default.Meta, {
105
+ children: [
106
+ hero === "cpu" ? /* @__PURE__ */ jsx(widget_default.MetaItem, {
107
+ icon: MemoryStick,
108
+ children: last ? `${bytes(last.memoryUsed)} of ${bytes(last.memoryTotal)}` : dash
109
+ }) : /* @__PURE__ */ jsx(widget_default.MetaItem, {
110
+ icon: Cpu,
111
+ children: last ? `${percent(last.cpu)} CPU` : dash
112
+ }),
113
+ /* @__PURE__ */ jsx(widget_default.MetaItem, {
114
+ icon: ArrowDown,
115
+ children: last ? rate(last.netIn) : dash
116
+ }),
117
+ /* @__PURE__ */ jsx(widget_default.MetaItem, {
118
+ icon: ArrowUp,
119
+ children: last ? rate(last.netOut) : dash
120
+ })
121
+ ]
122
+ }),
123
+ (battery || disk) && /* @__PURE__ */ jsxs(widget_default.Meta, {
124
+ children: [
125
+ battery && /* @__PURE__ */ jsx(BatteryItem, {
126
+ battery
127
+ }),
128
+ disk && /* @__PURE__ */ jsxs(widget_default.MetaItem, {
129
+ icon: HardDrive,
130
+ children: [
131
+ bytes(disk.free),
132
+ " free"
133
+ ]
134
+ })
135
+ ]
136
+ })
137
+ ]
138
+ });
139
+ }
140
+ function Processes({ processes }) {
141
+ const top = [...processes].sort((a, b) => b.cpu - a.cpu);
142
+ const more = top.length - ROWS;
143
+ return /* @__PURE__ */ jsxs(widget_default.Section, {
144
+ label: "Top processes",
145
+ trailing: /* @__PURE__ */ jsx("span", {
146
+ children: "CPU · memory"
147
+ }),
148
+ children: [
149
+ top.slice(0, ROWS).map((process) => /* @__PURE__ */ jsx(widget_default.Row, {
150
+ leading: share(process.cpu),
151
+ trailing: process.memory !== undefined && bytes(process.memory),
152
+ children: process.name
153
+ }, process.id)),
154
+ more > 0 && /* @__PURE__ */ jsxs("span", {
155
+ className: "flex h-6 items-center pl-17.5 text-caption text-muted-foreground",
156
+ children: [
157
+ more,
158
+ " more"
159
+ ]
160
+ })
161
+ ]
162
+ });
163
+ }
164
+ function Trend({ label, icon: Icon, value, unit, series, caption, className }) {
165
+ return /* @__PURE__ */ jsxs("div", {
166
+ className: cn("flex min-w-0 flex-col gap-1", className),
167
+ "aria-busy": value === undefined,
168
+ children: [
169
+ /* @__PURE__ */ jsx(widget_default.Header, {
170
+ icon: Icon,
171
+ children: label
172
+ }),
173
+ /* @__PURE__ */ jsx(widget_default.Figure, {
174
+ value: value === undefined ? "–" : percent(value),
175
+ unit
176
+ }),
177
+ /* @__PURE__ */ jsx(Sparkline, {
178
+ values: series,
179
+ max: 1,
180
+ area: true,
181
+ tone: toneOf(value ?? 0),
182
+ label: value === undefined ? `${label}, measuring` : `${label}, ${percent(value)}`,
183
+ className: cn("my-1 h-14 w-full", value === undefined && "text-muted-foreground")
184
+ }),
185
+ /* @__PURE__ */ jsx(widget_default.Subtitle, {
186
+ children: caption
187
+ })
188
+ ]
189
+ });
190
+ }
191
+ function batteryTone({ level, charging }) {
192
+ if (charging)
193
+ return "default";
194
+ if (level <= 10)
195
+ return "error";
196
+ if (level <= 20)
197
+ return "warning";
198
+ return "default";
199
+ }
200
+ function ProcessTable({ processes }) {
201
+ const top = [...processes].sort((a, b) => b.cpu - a.cpu).slice(0, SHEET_ROWS);
202
+ const head = "text-caption weight-normal text-muted-foreground";
203
+ return /* @__PURE__ */ jsx(widget_default.Section, {
204
+ label: "Top processes",
205
+ trailing: /* @__PURE__ */ jsx("span", {
206
+ children: "by CPU"
207
+ }),
208
+ children: /* @__PURE__ */ jsxs(Table, {
209
+ children: [
210
+ /* @__PURE__ */ jsx(Table.Header, {
211
+ children: /* @__PURE__ */ jsxs(Table.Row, {
212
+ children: [
213
+ /* @__PURE__ */ jsx(Table.Head, {
214
+ className: head,
215
+ children: "Name"
216
+ }),
217
+ /* @__PURE__ */ jsx(Table.Head, {
218
+ className: cn(head, "text-right"),
219
+ children: "CPU"
220
+ }),
221
+ /* @__PURE__ */ jsx(Table.Head, {
222
+ className: cn(head, "w-24 text-right"),
223
+ children: "Memory"
224
+ })
225
+ ]
226
+ })
227
+ }),
228
+ /* @__PURE__ */ jsx(Table.Body, {
229
+ children: top.map((process) => /* @__PURE__ */ jsxs(Table.Row, {
230
+ children: [
231
+ /* @__PURE__ */ jsx(Table.Cell, {
232
+ className: "text-foreground",
233
+ children: process.name
234
+ }),
235
+ /* @__PURE__ */ jsx(Table.Cell, {
236
+ children: /* @__PURE__ */ jsxs("span", {
237
+ className: "flex items-center justify-end gap-3",
238
+ children: [
239
+ /* @__PURE__ */ jsx(Meter, {
240
+ variant: "line",
241
+ value: process.cpu,
242
+ label: `${process.name}, CPU`,
243
+ className: "w-24"
244
+ }),
245
+ /* @__PURE__ */ jsx("span", {
246
+ className: "w-12 text-right tabular-nums",
247
+ children: share(process.cpu)
248
+ })
249
+ ]
250
+ })
251
+ }),
252
+ /* @__PURE__ */ jsx(Table.Cell, {
253
+ className: "text-right tabular-nums",
254
+ children: process.memory === undefined ? "–" : bytes(process.memory)
255
+ })
256
+ ]
257
+ }, process.id))
258
+ })
259
+ ]
260
+ })
261
+ });
262
+ }
263
+ function Sheet({ samples, hero, battery, disk, uptime, processes, size, className }) {
264
+ const last = samples.at(-1);
265
+ const busiest = processes?.length ? processes.reduce((a, b) => b.cpu > a.cpu ? b : a).name : undefined;
266
+ const cpu = /* @__PURE__ */ jsx(Trend, {
267
+ label: "CPU",
268
+ icon: Cpu,
269
+ value: last?.cpu,
270
+ unit: "load",
271
+ series: samples.map((s) => s.cpu),
272
+ caption: last ? [verdict(last.cpu), busiest && `${busiest} is busiest`].filter(Boolean).join(" · ") : "Measuring…"
273
+ }, "cpu");
274
+ const memory = /* @__PURE__ */ jsx(Trend, {
275
+ label: "Memory",
276
+ icon: MemoryStick,
277
+ value: last && pressureOf(last),
278
+ unit: "pressure",
279
+ series: samples.map(pressureOf),
280
+ caption: last ? `${bytes(last.memoryUsed)} of ${bytes(last.memoryTotal)} in use` : "Measuring…"
281
+ }, "memory");
282
+ const [first, second] = hero === "cpu" ? [cpu, memory] : [memory, cpu];
283
+ const left = battery?.minutesLeft === undefined ? undefined : clock(battery.minutesLeft);
284
+ return /* @__PURE__ */ jsxs(widget_default.Sheet, {
285
+ size,
286
+ className,
287
+ children: [
288
+ /* @__PURE__ */ jsxs("div", {
289
+ className: "flex min-w-0 flex-col gap-2",
290
+ children: [
291
+ /* @__PURE__ */ jsx(widget_default.Header, {
292
+ icon: Activity,
293
+ children: uptime === undefined ? "System" : `System · up ${span(uptime)}`
294
+ }),
295
+ /* @__PURE__ */ jsxs("div", {
296
+ className: "grid grid-cols-2 divide-x divide-border [&>*]:px-6 [&>*:first-child]:pl-0 [&>*:last-child]:pr-0",
297
+ children: [
298
+ first,
299
+ second
300
+ ]
301
+ })
302
+ ]
303
+ }),
304
+ /* @__PURE__ */ jsxs("div", {
305
+ className: "grid auto-cols-fr grid-flow-col divide-x divide-border [&>*]:px-6 [&>*:first-child]:pl-0 [&>*:last-child]:pr-0",
306
+ children: [
307
+ /* @__PURE__ */ jsxs("div", {
308
+ className: "flex min-w-0 flex-col gap-1",
309
+ "aria-busy": !last,
310
+ children: [
311
+ /* @__PURE__ */ jsx(widget_default.Header, {
312
+ icon: Network,
313
+ children: "Network"
314
+ }),
315
+ /* @__PURE__ */ jsxs("div", {
316
+ className: "flex min-w-0 items-baseline gap-5",
317
+ children: [
318
+ /* @__PURE__ */ jsxs("span", {
319
+ className: "flex items-center gap-1.5 whitespace-nowrap text-title weight-semibold tabular-nums text-foreground",
320
+ children: [
321
+ /* @__PURE__ */ jsx(ArrowDown, {
322
+ size: 16,
323
+ strokeWidth: 1.5,
324
+ "aria-label": "In",
325
+ className: "text-muted-foreground"
326
+ }),
327
+ last ? rate(last.netIn) : "–"
328
+ ]
329
+ }),
330
+ /* @__PURE__ */ jsxs("span", {
331
+ className: "flex items-center gap-1.5 whitespace-nowrap text-title weight-semibold tabular-nums text-muted-foreground",
332
+ children: [
333
+ /* @__PURE__ */ jsx(ArrowUp, {
334
+ size: 16,
335
+ strokeWidth: 1.5,
336
+ "aria-label": "Out"
337
+ }),
338
+ last ? rate(last.netOut) : "–"
339
+ ]
340
+ })
341
+ ]
342
+ }),
343
+ /* @__PURE__ */ jsx(Sparkline, {
344
+ values: samples.map((s) => s.netIn),
345
+ secondary: samples.map((s) => s.netOut),
346
+ area: true,
347
+ label: last ? `Network, ${rate(last.netIn)} in, ${rate(last.netOut)} out` : "Network, measuring",
348
+ className: cn("my-1 h-12 w-full", !last && "text-muted-foreground")
349
+ })
350
+ ]
351
+ }),
352
+ (battery || disk) && /* @__PURE__ */ jsxs("div", {
353
+ className: "flex min-w-0 flex-col justify-center gap-4",
354
+ children: [
355
+ battery && /* @__PURE__ */ jsx(Meter, {
356
+ label: battery.charging ? "Battery, charging" : "Battery",
357
+ value: battery.level,
358
+ max: 100,
359
+ tone: batteryTone(battery),
360
+ detail: `${battery.level}%${left ? ` · ${left} ${battery.charging ? "to full" : "left"}` : ""}`
361
+ }),
362
+ disk && /* @__PURE__ */ jsx(Meter, {
363
+ label: "Startup disk",
364
+ value: disk.total - disk.free,
365
+ max: disk.total,
366
+ detail: `${bytes(disk.free)} free of ${bytes(disk.total)}`
367
+ })
368
+ ]
369
+ })
370
+ ]
371
+ }),
372
+ processes?.length ? /* @__PURE__ */ jsx(ProcessTable, {
373
+ processes
374
+ }) : null
375
+ ]
376
+ });
377
+ }
378
+ function SystemStatsLeading2() {
379
+ return /* @__PURE__ */ jsx(Cpu, {
380
+ size: 16,
381
+ strokeWidth: 1.5,
382
+ className: "text-muted-foreground"
383
+ });
384
+ }
385
+ function SystemStatsTrailing2({ sample }) {
386
+ if (!sample)
387
+ return /* @__PURE__ */ jsx("span", {
388
+ className: "text-caption weight-semibold text-muted-foreground",
389
+ children: "–"
390
+ });
391
+ return /* @__PURE__ */ jsx("span", {
392
+ className: "text-caption weight-semibold tabular-nums text-foreground",
393
+ children: percent(sample.cpu)
394
+ });
395
+ }
396
+ function SystemStatsMinimal2({ sample }) {
397
+ const load = sample?.cpu ?? 0;
398
+ return /* @__PURE__ */ jsx(Meter, {
399
+ variant: "ring",
400
+ className: "size-5.5",
401
+ size: "compact",
402
+ value: load,
403
+ label: sample ? `CPU, ${percent(load)}` : "CPU, measuring"
404
+ });
405
+ }
406
+ var SystemStats2 = Object.assign(function SystemStats({
407
+ samples,
408
+ hero = "cpu",
409
+ battery,
410
+ disk,
411
+ uptime,
412
+ processes,
413
+ size,
414
+ layout = "fit",
415
+ className
416
+ }) {
417
+ if (layout === "tall")
418
+ return /* @__PURE__ */ jsx(Sheet, {
419
+ size,
420
+ samples,
421
+ hero,
422
+ battery,
423
+ disk,
424
+ uptime,
425
+ processes,
426
+ className
427
+ });
428
+ const last = samples.at(-1);
429
+ const series = hero === "cpu" ? samples.map((s) => s.cpu) : samples.map(pressureOf);
430
+ const load = last ? hero === "cpu" ? last.cpu : pressureOf(last) : 0;
431
+ const name = hero === "cpu" ? "CPU" : "Memory pressure";
432
+ const busiest = processes?.length ? processes.reduce((a, b) => b.cpu > a.cpu ? b : a).name : undefined;
433
+ return /* @__PURE__ */ jsxs(widget_default, {
434
+ size,
435
+ className: cn("h-full", className),
436
+ aside: processes?.length ? /* @__PURE__ */ jsx(Processes, {
437
+ processes
438
+ }) : undefined,
439
+ children: [
440
+ /* @__PURE__ */ jsx(widget_default.Header, {
441
+ icon: Activity,
442
+ children: uptime === undefined ? "System" : `System · up ${span(uptime)}`
443
+ }),
444
+ /* @__PURE__ */ jsxs("div", {
445
+ className: "flex min-w-0 items-end gap-4",
446
+ "aria-busy": !last,
447
+ children: [
448
+ /* @__PURE__ */ jsx(widget_default.Figure, {
449
+ value: last ? percent(load) : "–",
450
+ unit: hero === "cpu" ? "CPU" : "pressure",
451
+ className: "shrink-0"
452
+ }),
453
+ /* @__PURE__ */ jsx(Sparkline, {
454
+ values: series,
455
+ max: 1,
456
+ area: true,
457
+ tone: toneOf(load),
458
+ label: last ? `${name}, ${percent(load)}` : `${name}, measuring`,
459
+ className: cn("mb-1.5 h-9 min-w-0 flex-1", !last && "text-muted-foreground")
460
+ })
461
+ ]
462
+ }),
463
+ /* @__PURE__ */ jsx(widget_default.Subtitle, {
464
+ className: "mb-1",
465
+ children: last ? [verdict(load), busiest && `${busiest} is busiest`].filter(Boolean).join(" · ") : "Measuring…"
466
+ }),
467
+ /* @__PURE__ */ jsx(Facts, {
468
+ last,
469
+ hero,
470
+ battery,
471
+ disk
472
+ })
473
+ ]
474
+ });
475
+ }, {
476
+ Leading: SystemStatsLeading2,
477
+ Trailing: SystemStatsTrailing2,
478
+ Minimal: SystemStatsMinimal2
479
+ });
480
+ var system_stats_default = SystemStats2;
481
+ export { SystemStatsLeading2, SystemStatsTrailing2, SystemStatsMinimal2, SystemStats2, system_stats_default };
@@ -1,3 +1,4 @@
1
+ import { WidgetLayout2 } from "./chunk-nqjermbr.js";
1
2
  import { Artwork2 } from "./chunk-gejenfap.js";
2
3
  import { ReactNode } from "react";
3
4
  import { JSX as JSX_1kxb } from "react";
@@ -65,6 +66,8 @@ interface NowPlayingProps2 {
65
66
  emptyDescription?: ReactNode;
66
67
  /** The empty state's way forward, such as a Button that opens a player. */
67
68
  emptyActions?: ReactNode;
69
+ /** `tall` is the open island's tall snap: the artwork large, the title on the display role, a full-width scrubber and the transport under it, and where it plays from and to as rows. Defaults to `'fit'`. */
70
+ layout?: WidgetLayout2;
68
71
  /** Classes for the root, which fills its container. */
69
72
  className?: string;
70
73
  }
@@ -122,6 +125,12 @@ declare function NowPlayingFlash2({ track, playing }: {
122
125
  * `defaultPlaying`; the toggles are the same. Without a track it says
123
126
  * nothing is playing and how to change that.
124
127
  *
128
+ * At the open island's tall snap (`layout="tall"`) it becomes a sheet: the
129
+ * artwork large beside the source, the title on the display role, the
130
+ * artist and the album on lines of their own; then the scrubber across the
131
+ * whole width with the transport and the toggles in one row under it; then
132
+ * where it plays from and to, the app and the output device, as rows.
133
+ *
125
134
  * The other forms are parts: `NowPlaying.Leading` and `NowPlaying.Trailing`
126
135
  * for the compact island's wings (the artwork, and the tinted Equalizer that
127
136
  * settles when paused), `NowPlaying.Minimal` for the split island's bubble
@@ -130,7 +139,7 @@ declare function NowPlayingFlash2({ track, playing }: {
130
139
  *
131
140
  * @example {@include ./examples.mdx}
132
141
  */
133
- declare const NowPlaying2: (({ track, playing: playingProp, defaultPlaying, onPlayingChange, onPrevious, onNext, onSeek, shuffle: shuffleProp, defaultShuffle, onShuffleChange, repeat: repeatProp, defaultRepeat, onRepeatChange, liked: likedProp, defaultLiked, onLikedChange, emptyDescription, emptyActions, className }: NowPlayingProps2) => Element_12xgc) & {
142
+ declare const NowPlaying2: (({ track, playing: playingProp, defaultPlaying, onPlayingChange, onPrevious, onNext, onSeek, shuffle: shuffleProp, defaultShuffle, onShuffleChange, repeat: repeatProp, defaultRepeat, onRepeatChange, liked: likedProp, defaultLiked, onLikedChange, emptyDescription, emptyActions, layout, className }: NowPlayingProps2) => Element_12xgc) & {
134
143
  Artwork2: typeof NowPlayingArtwork2;
135
144
  Leading: typeof NowPlayingLeading2;
136
145
  Trailing: typeof NowPlayingTrailing2;
@@ -91,7 +91,7 @@ function ExpandedIsland2({
91
91
  }),
92
92
  /* @__PURE__ */ jsx(ScrollArea, {
93
93
  className: "min-h-0 flex-1",
94
- viewportClassName: "scroll-fade [&>div]:flex [&>div]:min-h-full [&>div]:flex-col",
94
+ viewportClassName: "scroll-fade [&>div]:flex [&>div]:min-h-full [&>div]:flex-col [&>div]:!min-w-0",
95
95
  children: /* @__PURE__ */ jsx(motion.div, {
96
96
  className: "flex flex-1 flex-col py-1 [&>*]:flex-1",
97
97
  style: { paddingInline: INSET2 },