@justanarthur/modo-ui-notch 0.3.0 → 0.4.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.
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 +34 -0
  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-xq5hc5gv.js → chunk-2b6gpn8k.js} +177 -66
  43. package/dist/shared/chunk-3hcnf4yx.js +481 -0
  44. package/dist/shared/{chunk-416tsgbc.d.ts → chunk-42wab62s.d.ts} +23 -1
  45. package/dist/shared/{chunk-pfhy5e4q.d.ts → chunk-6tnq6p89.d.ts} +2 -0
  46. package/dist/shared/{chunk-qdzemt2v.js → chunk-93dtpjz7.js} +401 -89
  47. package/dist/shared/{chunk-da177e8r.d.ts → chunk-a6njb8db.d.ts} +16 -1
  48. package/dist/shared/{chunk-2818esrq.d.ts → chunk-ab8mdg0n.d.ts} +10 -1
  49. package/dist/shared/{chunk-3thgcfcq.d.ts → chunk-evqpf92s.d.ts} +18 -1
  50. package/dist/shared/{chunk-mt0k6v8x.js → chunk-gcyspvgr.js} +147 -39
  51. package/dist/shared/{chunk-t0hcxh89.d.ts → chunk-gkj0hjrn.d.ts} +12 -0
  52. package/dist/shared/{chunk-wkg17nxs.d.ts → chunk-n739am8j.d.ts} +13 -2
  53. package/dist/shared/{chunk-ym0xbses.js → chunk-nwzpekvy.js} +274 -18
  54. package/dist/shared/{chunk-bvtyjcce.d.ts → chunk-sbrtesdg.d.ts} +16 -1
  55. package/dist/shared/{chunk-7fvnrtz4.d.ts → chunk-swc7dqpw.d.ts} +12 -2
  56. package/dist/shared/{chunk-j77cx8dp.js → chunk-t9wqhgzt.js} +325 -58
  57. package/dist/shared/{chunk-9m0xbg5v.js → chunk-wayv5rhr.js} +1 -1
  58. package/dist/shared/{chunk-x7f3g82r.js → chunk-wf0jtzhs.js} +12 -2
  59. package/dist/shared/{chunk-9c7ewvkk.js → chunk-yq5svpk7.js} +162 -19
  60. package/dist/shared/{chunk-cc9nwbtf.js → chunk-z3tj1ydg.js} +3 -0
  61. package/dist/styles.css +60 -0
  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 +1 -1
  70. package/dist/shared/chunk-s2jeqqan.js +0 -243
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-ndf79pv5.js";
6
6
  import {
7
7
  widget_default
8
- } from "./chunk-x7f3g82r.js";
8
+ } from "./chunk-wf0jtzhs.js";
9
9
  import {
10
10
  MINUTE2,
11
11
  useEdgeClock2
@@ -13,11 +13,13 @@ import {
13
13
 
14
14
  // blocks/activities/weather/index.tsx
15
15
  import Button from "@justanarthur/modo-ui/components/actions/button";
16
+ import Sparkline from "@justanarthur/modo-ui/components/data-display/sparkline";
16
17
  import { useSize } from "@justanarthur/modo-ui/lib/size-context";
17
18
  import { SURFACE_BG } from "@justanarthur/modo-ui/lib/surface-classes";
18
19
  import { useLift } from "@justanarthur/modo-ui/lib/surface-context";
19
20
  import { cn } from "@justanarthur/modo-ui/lib/utils";
20
21
  import Skeleton from "@justanarthur/modo-ui/primitives/content/skeleton";
22
+ import ScrollArea from "@justanarthur/modo-ui/primitives/layout/scroll-area";
21
23
  import {
22
24
  ArrowDown,
23
25
  ArrowUp,
@@ -38,6 +40,9 @@ import {
38
40
  Moon,
39
41
  RotateCw,
40
42
  Sun,
43
+ Sunrise,
44
+ Sunset,
45
+ Thermometer,
41
46
  Umbrella,
42
47
  WifiOff,
43
48
  Wind
@@ -88,8 +93,11 @@ var HUE = {
88
93
  };
89
94
  var HERO_GLYPH = { default: 30, compact: 24 };
90
95
  var STRIP_GLYPH = { default: 16, compact: 14 };
96
+ var SHEET_GLYPH = { default: 44, compact: 36 };
91
97
  var WET = 30;
92
98
  var HOURS = 6;
99
+ var DAY_HOURS = 24;
100
+ var WEEK = 7;
93
101
  function conditionFromCode2(code) {
94
102
  if (code === 0)
95
103
  return "clear";
@@ -129,6 +137,18 @@ var degrees = (celsius, unit) => Math.round(unit === "fahrenheit" ? celsius * 9
129
137
  var temp = (celsius, unit) => `${degrees(celsius, unit)}°`;
130
138
  var speed = (kmh, unit) => unit === "fahrenheit" ? `${Math.round(kmh / 1.609)} mph` : `${Math.round(kmh)} km/h`;
131
139
  var hourOf = (ms, locale) => new Date(ms).toLocaleTimeString(locale, { hour: "numeric" });
140
+ var clockOf = (ms, locale) => new Date(ms).toLocaleTimeString(locale, { hour: "numeric", minute: "2-digit" });
141
+ function uvLevel(uv) {
142
+ if (uv < 3)
143
+ return "Low";
144
+ if (uv < 6)
145
+ return "Moderate";
146
+ if (uv < 8)
147
+ return "High";
148
+ if (uv < 11)
149
+ return "Very high";
150
+ return "Extreme";
151
+ }
132
152
  function ago(ms) {
133
153
  const minutes = Math.floor(ms / MINUTE2);
134
154
  if (minutes < 1)
@@ -218,6 +238,122 @@ function Tomorrow({ day, unit }) {
218
238
  })
219
239
  });
220
240
  }
241
+ function HourStrip({ hours, unit, locale }) {
242
+ const size = useSize();
243
+ const temperatures = hours.map((hour) => hour.temperature);
244
+ const low = Math.min(...temperatures);
245
+ const wet = hours.some((hour) => (hour.precipitation ?? 0) >= WET);
246
+ return /* @__PURE__ */ jsx(ScrollArea, {
247
+ orientation: "horizontal",
248
+ viewportClassName: "scroll-fade-x",
249
+ children: /* @__PURE__ */ jsxs("div", {
250
+ className: "flex w-max flex-col gap-1.5 pb-3 tabular-nums",
251
+ children: [
252
+ /* @__PURE__ */ jsx("div", {
253
+ className: "flex",
254
+ children: hours.map((hour, i) => /* @__PURE__ */ jsxs("div", {
255
+ className: "flex w-12 shrink-0 flex-col items-center gap-1.5",
256
+ children: [
257
+ /* @__PURE__ */ jsx("span", {
258
+ className: "whitespace-nowrap text-caption text-muted-foreground",
259
+ children: i === 0 ? "Now" : hourOf(hour.time, locale)
260
+ }),
261
+ /* @__PURE__ */ jsx(Glyph, {
262
+ condition: hour.condition,
263
+ isDay: hour.isDay,
264
+ size: STRIP_GLYPH[size.variant],
265
+ className: hueFor(hour.condition, hour.isDay)
266
+ })
267
+ ]
268
+ }, hour.time))
269
+ }),
270
+ /* @__PURE__ */ jsx("div", {
271
+ className: "px-6",
272
+ children: /* @__PURE__ */ jsx(Sparkline, {
273
+ values: temperatures.map((value) => value - low),
274
+ max: Math.max(...temperatures) - low,
275
+ label: `Temperature over the next ${hours.length} hours`,
276
+ tone: "muted"
277
+ })
278
+ }),
279
+ /* @__PURE__ */ jsx("div", {
280
+ className: "flex",
281
+ children: hours.map((hour) => /* @__PURE__ */ jsxs("div", {
282
+ className: "flex w-12 shrink-0 flex-col items-center gap-0.5",
283
+ children: [
284
+ /* @__PURE__ */ jsx("span", {
285
+ className: "text-body text-foreground",
286
+ children: temp(hour.temperature, unit)
287
+ }),
288
+ wet && /* @__PURE__ */ jsx("span", {
289
+ className: "h-4 text-caption text-status-info",
290
+ children: (hour.precipitation ?? 0) >= WET && `${hour.precipitation}%`
291
+ })
292
+ ]
293
+ }, hour.time))
294
+ })
295
+ ]
296
+ })
297
+ });
298
+ }
299
+ function Week({ days, unit, locale }) {
300
+ const low = Math.min(...days.map((day) => day.low));
301
+ const span = Math.max(...days.map((day) => day.high)) - low || 1;
302
+ return days.map((day, i) => /* @__PURE__ */ jsxs("div", {
303
+ className: "flex h-8 min-w-0 items-center gap-3 text-body tabular-nums",
304
+ children: [
305
+ /* @__PURE__ */ jsx("span", {
306
+ className: "w-12 shrink-0 truncate text-foreground",
307
+ children: i === 0 ? "Today" : new Date(day.date).toLocaleDateString(locale, { weekday: "short" })
308
+ }),
309
+ /* @__PURE__ */ jsx(Glyph, {
310
+ condition: day.condition,
311
+ size: 16,
312
+ className: hueFor(day.condition)
313
+ }),
314
+ /* @__PURE__ */ jsx("span", {
315
+ className: "w-9 shrink-0 text-caption text-status-info",
316
+ children: (day.precipitation ?? 0) >= WET && `${day.precipitation}%`
317
+ }),
318
+ /* @__PURE__ */ jsx("span", {
319
+ className: "w-8 shrink-0 text-right text-muted-foreground",
320
+ children: temp(day.low, unit)
321
+ }),
322
+ /* @__PURE__ */ jsx("span", {
323
+ className: "relative h-1 min-w-12 flex-1 rounded-full bg-active",
324
+ children: /* @__PURE__ */ jsx("span", {
325
+ className: "absolute inset-y-0 rounded-full bg-foreground",
326
+ style: { left: `${(day.low - low) / span * 100}%`, width: `${(day.high - day.low) / span * 100}%` }
327
+ })
328
+ }),
329
+ /* @__PURE__ */ jsx("span", {
330
+ className: "w-8 shrink-0 text-foreground",
331
+ children: temp(day.high, unit)
332
+ })
333
+ ]
334
+ }, day.date));
335
+ }
336
+ function Detail({ icon: Icon, label, children }) {
337
+ return /* @__PURE__ */ jsxs("div", {
338
+ className: "flex h-8 min-w-0 items-center gap-2 text-body",
339
+ children: [
340
+ /* @__PURE__ */ jsx(Icon, {
341
+ "aria-hidden": true,
342
+ size: 14,
343
+ strokeWidth: 1.5,
344
+ className: "shrink-0 text-muted-foreground"
345
+ }),
346
+ /* @__PURE__ */ jsx("span", {
347
+ className: "min-w-0 flex-1 truncate text-muted-foreground",
348
+ children: label
349
+ }),
350
+ /* @__PURE__ */ jsx("span", {
351
+ className: "shrink-0 whitespace-nowrap tabular-nums text-foreground",
352
+ children
353
+ })
354
+ ]
355
+ });
356
+ }
221
357
  function Loading({ location, className }) {
222
358
  return /* @__PURE__ */ jsx(widget_default, {
223
359
  className,
@@ -335,6 +471,7 @@ var Weather2 = Object.assign(function Weather({
335
471
  onRefresh,
336
472
  onRequestAccess,
337
473
  onOpenSettings,
474
+ layout = "fit",
338
475
  className
339
476
  }) {
340
477
  const size = useSize();
@@ -399,6 +536,141 @@ var Weather2 = Object.assign(function Weather({
399
536
  const freshness = status === "offline" ? `Offline · ${fresh}` : status === "error" ? `Not updated · ${fresh}` : fresh;
400
537
  const feels = current.apparent !== undefined && `Feels like ${temp(current.apparent, unit)}`;
401
538
  const soon = rain && `${LABEL[rain.condition]} around ${hourOf(rain.time, locale)}`;
539
+ const header = /* @__PURE__ */ jsx(widget_default.Header, {
540
+ icon: MapPin,
541
+ trailing: /* @__PURE__ */ jsxs(Fragment, {
542
+ children: [
543
+ /* @__PURE__ */ jsx("span", {
544
+ className: "whitespace-nowrap pr-1 text-caption",
545
+ children: freshness
546
+ }),
547
+ onRefresh && /* @__PURE__ */ jsx(widget_default.Action, {
548
+ icon: RotateCw,
549
+ label: "Refresh",
550
+ onClick: onRefresh
551
+ })
552
+ ]
553
+ }),
554
+ children: location ?? "Current location"
555
+ });
556
+ if (layout === "tall") {
557
+ const week = days.slice(0, WEEK);
558
+ return /* @__PURE__ */ jsxs(widget_default.Sheet, {
559
+ className,
560
+ children: [
561
+ /* @__PURE__ */ jsxs("div", {
562
+ className: "flex min-w-0 flex-col gap-2",
563
+ children: [
564
+ header,
565
+ /* @__PURE__ */ jsxs("div", {
566
+ className: "flex min-w-0 items-center gap-5",
567
+ children: [
568
+ /* @__PURE__ */ jsxs("div", {
569
+ className: "flex shrink-0 items-center gap-3",
570
+ children: [
571
+ /* @__PURE__ */ jsx(Glyph, {
572
+ condition: current.condition,
573
+ isDay: current.isDay,
574
+ size: SHEET_GLYPH[size.variant],
575
+ className: hueFor(current.condition, current.isDay)
576
+ }),
577
+ /* @__PURE__ */ jsx(widget_default.Figure, {
578
+ value: degrees(current.temperature, unit),
579
+ unit: unit === "fahrenheit" ? "°F" : "°C"
580
+ })
581
+ ]
582
+ }),
583
+ /* @__PURE__ */ jsxs("div", {
584
+ className: "flex min-w-0 flex-1 flex-col gap-0.5",
585
+ children: [
586
+ /* @__PURE__ */ jsx(widget_default.Title, {
587
+ children: LABEL[current.condition]
588
+ }),
589
+ today && /* @__PURE__ */ jsx(widget_default.Subtitle, {
590
+ children: [`H ${temp(today.high, unit)}`, `L ${temp(today.low, unit)}`, soon].filter(Boolean).join(" · ")
591
+ })
592
+ ]
593
+ })
594
+ ]
595
+ })
596
+ ]
597
+ }),
598
+ ahead.length > 1 && /* @__PURE__ */ jsx(widget_default.Section, {
599
+ label: "Next 24 hours",
600
+ children: /* @__PURE__ */ jsx(HourStrip, {
601
+ hours: ahead.slice(0, DAY_HOURS),
602
+ unit,
603
+ locale
604
+ })
605
+ }),
606
+ /* @__PURE__ */ jsxs("div", {
607
+ className: "flex min-w-0 items-start gap-5",
608
+ children: [
609
+ week.length > 0 && /* @__PURE__ */ jsx(widget_default.Section, {
610
+ label: `${week.length}-day forecast`,
611
+ className: "flex-1",
612
+ children: /* @__PURE__ */ jsx(Week, {
613
+ days: week,
614
+ unit,
615
+ locale
616
+ })
617
+ }),
618
+ /* @__PURE__ */ jsxs(widget_default.Section, {
619
+ label: "Details",
620
+ className: "w-[38%] shrink-0 border-l border-border pl-5",
621
+ children: [
622
+ current.apparent !== undefined && /* @__PURE__ */ jsx(Detail, {
623
+ icon: Thermometer,
624
+ label: "Feels like",
625
+ children: temp(current.apparent, unit)
626
+ }),
627
+ today?.precipitation !== undefined && /* @__PURE__ */ jsxs(Detail, {
628
+ icon: Umbrella,
629
+ label: "Chance of rain",
630
+ children: [
631
+ today.precipitation,
632
+ "%"
633
+ ]
634
+ }),
635
+ current.wind !== undefined && /* @__PURE__ */ jsx(Detail, {
636
+ icon: Wind,
637
+ label: "Wind",
638
+ children: speed(current.wind, unit)
639
+ }),
640
+ current.humidity !== undefined && /* @__PURE__ */ jsxs(Detail, {
641
+ icon: Droplets,
642
+ label: "Humidity",
643
+ children: [
644
+ Math.round(current.humidity),
645
+ "%"
646
+ ]
647
+ }),
648
+ current.uv !== undefined && /* @__PURE__ */ jsxs(Detail, {
649
+ icon: Sun,
650
+ label: "UV index",
651
+ children: [
652
+ Math.round(current.uv),
653
+ " · ",
654
+ uvLevel(current.uv)
655
+ ]
656
+ }),
657
+ today?.sunrise !== undefined && /* @__PURE__ */ jsx(Detail, {
658
+ icon: Sunrise,
659
+ label: "Sunrise",
660
+ children: clockOf(today.sunrise, locale)
661
+ }),
662
+ today?.sunset !== undefined && /* @__PURE__ */ jsx(Detail, {
663
+ icon: Sunset,
664
+ label: "Sunset",
665
+ children: clockOf(today.sunset, locale)
666
+ })
667
+ ]
668
+ })
669
+ ]
670
+ })
671
+ ]
672
+ });
673
+ }
402
674
  return /* @__PURE__ */ jsxs(widget_default, {
403
675
  className,
404
676
  aside: ahead.length > 0 && /* @__PURE__ */ jsxs(Fragment, {
@@ -421,23 +693,7 @@ var Weather2 = Object.assign(function Weather({
421
693
  ]
422
694
  }),
423
695
  children: [
424
- /* @__PURE__ */ jsx(widget_default.Header, {
425
- icon: MapPin,
426
- trailing: /* @__PURE__ */ jsxs(Fragment, {
427
- children: [
428
- /* @__PURE__ */ jsx("span", {
429
- className: "whitespace-nowrap pr-1 text-caption",
430
- children: freshness
431
- }),
432
- onRefresh && /* @__PURE__ */ jsx(widget_default.Action, {
433
- icon: RotateCw,
434
- label: "Refresh",
435
- onClick: onRefresh
436
- })
437
- ]
438
- }),
439
- children: location ?? "Current location"
440
- }),
696
+ header,
441
697
  /* @__PURE__ */ jsxs("div", {
442
698
  className: "flex min-w-0 items-center gap-2.5",
443
699
  children: [
@@ -1,3 +1,4 @@
1
+ import { WidgetLayout2 } from "./chunk-42wab62s.js";
1
2
  import { JSX as JSX_1kxb } from "react";
2
3
  type PomodoroPhase2 = "focus" | "short-break" | "long-break";
3
4
  /** A Pomodoro cycle's lengths, in minutes, and how many focus rounds come before the long break. */
@@ -48,6 +49,10 @@ interface ClockProps2 {
48
49
  onValueChange?: (run: PomodoroRun2 | null) => void;
49
50
  /** Called when a phase reaches zero, with the next one, which waits paused to be started: show `Clock.PhaseDone`. */
50
51
  onPhaseEnd?: (ended: PomodoroRun2, next: PomodoroRun2) => void;
52
+ /** The focus rounds finished today, shown at the tall snap as a row of dots and the time focused. Left out, the tall view leaves the line out. */
53
+ completedToday?: number;
54
+ /** `tall` is the open island's tall snap: the time larger, every world clock as a column, the Pomodoro's whole cycle as a strip and its lengths, today's finished rounds; a run lists every phase of its cycle. Defaults to `'fit'`. */
55
+ layout?: WidgetLayout2;
51
56
  /** Classes for the root, which fills its container. */
52
57
  className?: string;
53
58
  }
@@ -106,6 +111,16 @@ declare function ClockPhaseDone2({ ended, pomodoro, onStart }: ClockPhaseDonePro
106
111
  * `advancePomodoro` and `resumePomodoro` build the same runs for a host
107
112
  * that keeps time itself.
108
113
  *
114
+ * At the open island's tall snap (`layout="tall"`) it becomes a sheet: the
115
+ * time and the date as the hero with Start focus beside them; every world
116
+ * clock as a column, the city, the time large, and its day, offset and
117
+ * whether it's day or night there; the Pomodoro's whole cycle as a strip, each phase
118
+ * as long as its minutes in its hue, over its three lengths in columns;
119
+ * and today's finished rounds (`completedToday`) as dots with the time
120
+ * focused. A run puts its ring large beside the time left and the
121
+ * controls, then lists every phase of its cycle, done, now and when each
122
+ * starts, under the strip filling as it goes.
123
+ *
109
124
  * The other forms are parts: `Clock.Leading` and `Clock.Trailing` for the
110
125
  * compact island's wings (the ring and `mm:ss`, nothing without a run),
111
126
  * `Clock.Minimal`, the ring, for the split island's bubble, and
@@ -114,7 +129,7 @@ declare function ClockPhaseDone2({ ended, pomodoro, onStart }: ClockPhaseDonePro
114
129
  *
115
130
  * @example {@include ./examples.mdx}
116
131
  */
117
- declare const Clock2: (({ zones, seconds, hour12, timeZone, locale, now: nowProp, pomodoro, value, defaultValue, onValueChange, onPhaseEnd, className }: ClockProps2) => Element_12xgc) & {
132
+ declare const Clock2: (({ zones, seconds, hour12, timeZone, locale, now: nowProp, pomodoro, value, defaultValue, onValueChange, onPhaseEnd, completedToday, layout, className }: ClockProps2) => Element_12xgc) & {
118
133
  Leading: typeof ClockLeading2;
119
134
  Trailing: typeof ClockTrailing2;
120
135
  Minimal: typeof ClockMinimal2;
@@ -1,3 +1,4 @@
1
+ import { WidgetLayout2 } from "./chunk-42wab62s.js";
1
2
  import { SizeVariant } from "@justanarthur/modo-ui/lib/size-context";
2
3
  import { JSX as JSX_1kxb } from "react";
3
4
  /** One reading of the system. */
@@ -51,10 +52,12 @@ interface SystemStatsProps2 {
51
52
  disk?: StatsDisk2;
52
53
  /** Seconds since the last boot. */
53
54
  uptime?: number;
54
- /** The busiest processes, in any order: the top three list beside the hero, by CPU. */
55
+ /** The busiest processes, in any order: the top three list beside the hero, by CPU; the top eight at the tall snap. */
55
56
  processes?: StatsProcess2[];
56
57
  /** Step on the size ladder. Omitted, it follows the surrounding SizeProvider. */
57
58
  size?: SizeVariant;
59
+ /** `tall` is the open island's tall snap: CPU and memory side by side, each with its trend; the network's in and out as one graph beside the battery and the disk as gauges; and the top eight processes as a table. Defaults to `'fit'`. */
60
+ layout?: WidgetLayout2;
58
61
  /** Classes for the root, which fills its container. */
59
62
  className?: string;
60
63
  }
@@ -91,13 +94,20 @@ declare function SystemStatsMinimal2({ sample }: {
91
94
  * lands (about a second after opening) the figures are dashes over the
92
95
  * Sparkline's baseline.
93
96
  *
97
+ * At the open island's tall snap (`layout="tall"`) it becomes a sheet: CPU
98
+ * and memory pressure side by side, each its figure large over its trend
99
+ * and a line on what it means (the hero's column first); then the
100
+ * network's in and out as one graph, its rates over it, beside the battery
101
+ * and the startup disk as Meter bars; then the top eight processes as a
102
+ * table, each with its share of the CPU as a line and the memory it holds.
103
+ *
94
104
  * `SystemStats.Leading` and `SystemStats.Trailing` show the CPU load in the
95
105
  * compact island's wings, `SystemStats.Minimal` as a ring in the split
96
106
  * island's bubble.
97
107
  *
98
108
  * @example {@include ./examples.mdx}
99
109
  */
100
- declare const SystemStats2: (({ samples, hero, battery, disk, uptime, processes, size, className }: SystemStatsProps2) => Element_12xgc) & {
110
+ declare const SystemStats2: (({ samples, hero, battery, disk, uptime, processes, size, layout, className }: SystemStatsProps2) => Element_12xgc) & {
101
111
  Leading: typeof SystemStatsLeading2;
102
112
  Trailing: typeof SystemStatsTrailing2;
103
113
  Minimal: typeof SystemStatsMinimal2;