@justanarthur/modo-ui-notch 0.2.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.
- package/README.md +11 -11
- package/blocks/activities/agenda/examples.mdx +29 -5
- package/blocks/activities/agenda/index.tsx +438 -181
- package/blocks/activities/clock/examples.mdx +89 -0
- package/blocks/activities/clock/index.tsx +917 -0
- package/blocks/activities/now-playing/examples.mdx +40 -13
- package/blocks/activities/now-playing/index.tsx +399 -120
- package/blocks/activities/weather/examples.mdx +123 -0
- package/blocks/activities/weather/index.tsx +863 -0
- package/blocks/app/expanded-island/examples.mdx +8 -7
- package/blocks/app/expanded-island/index.tsx +22 -4
- package/blocks/app/settings-window/examples.mdx +14 -2
- package/blocks/app/settings-window/index.tsx +33 -10
- package/blocks/system/clipboard/examples.mdx +91 -0
- package/blocks/system/clipboard/index.tsx +773 -0
- package/blocks/system/recent-files/examples.mdx +80 -0
- package/blocks/system/recent-files/index.tsx +627 -0
- package/blocks/system/system-stats/examples.mdx +46 -9
- package/blocks/system/system-stats/index.tsx +445 -104
- package/components/indicators/media-scrubber/examples.mdx +8 -0
- package/components/indicators/media-scrubber/index.tsx +37 -13
- package/components/island/island/examples.mdx +4 -4
- package/components/island/island/index.tsx +2 -2
- package/components/island/island-flash/examples.mdx +15 -18
- package/components/island/island-flash/index.tsx +4 -4
- package/components/island/island-tabs/examples.mdx +5 -5
- package/components/island/widget/examples.mdx +76 -0
- package/components/island/widget/index.tsx +465 -0
- package/dist/blocks/activities/agenda/index.d.ts +2 -1
- package/dist/blocks/activities/agenda/index.js +3 -3
- package/dist/blocks/activities/clock/index.d.ts +3 -0
- package/dist/blocks/activities/clock/index.js +25 -0
- package/dist/blocks/activities/now-playing/index.d.ts +4 -2
- package/dist/blocks/activities/now-playing/index.js +5 -3
- package/dist/blocks/activities/weather/index.d.ts +3 -0
- package/dist/blocks/activities/weather/index.js +21 -0
- package/dist/blocks/app/expanded-island/index.d.ts +1 -1
- package/dist/blocks/app/expanded-island/index.js +4 -3
- package/dist/blocks/app/settings-window/index.d.ts +1 -1
- package/dist/blocks/app/settings-window/index.js +1 -1
- package/dist/blocks/system/clipboard/index.d.ts +3 -0
- package/dist/blocks/system/clipboard/index.js +17 -0
- package/dist/blocks/system/recent-files/index.d.ts +3 -0
- package/dist/blocks/system/recent-files/index.js +19 -0
- package/dist/blocks/system/system-stats/index.d.ts +3 -2
- package/dist/blocks/system/system-stats/index.js +4 -1
- package/dist/components/indicators/media-scrubber/index.d.ts +1 -1
- package/dist/components/indicators/media-scrubber/index.js +1 -1
- package/dist/components/island/island/index.d.ts +1 -1
- package/dist/components/island/island/index.js +2 -2
- package/dist/components/island/island-flash/index.d.ts +1 -1
- package/dist/components/island/island-flash/index.js +1 -1
- package/dist/components/island/island-tabs/index.js +2 -2
- package/dist/components/island/widget/index.d.ts +2 -0
- package/dist/components/island/widget/index.js +32 -0
- package/dist/index.d.ts +15 -15
- package/dist/index.js +104 -58
- package/dist/lib/artwork.d.ts +2 -0
- package/dist/lib/artwork.js +8 -0
- package/dist/lib/geometry.js +1 -1
- package/dist/shared/{chunk-yngkkxz2.d.ts → chunk-0ym9mcqc.d.ts} +10 -6
- package/dist/shared/chunk-2b6gpn8k.js +444 -0
- package/dist/shared/chunk-3hcnf4yx.js +481 -0
- package/dist/shared/chunk-42wab62s.d.ts +197 -0
- package/dist/shared/{chunk-zvh0d3qb.js → chunk-61t2dfte.js} +1 -1
- package/dist/shared/{chunk-9nhpg9t8.d.ts → chunk-6tnq6p89.d.ts} +9 -1
- package/dist/shared/{chunk-hpsabfsd.d.ts → chunk-81fpptwp.d.ts} +1 -1
- package/dist/shared/chunk-93dtpjz7.js +789 -0
- package/dist/shared/{chunk-wwjxs75m.js → chunk-9xtcv3sy.js} +26 -12
- package/dist/shared/chunk-a6njb8db.d.ts +129 -0
- package/dist/shared/chunk-ab8mdg0n.d.ts +149 -0
- package/dist/shared/chunk-evqpf92s.d.ts +168 -0
- package/dist/shared/{chunk-6c1jbefs.d.ts → chunk-fexwzycv.d.ts} +3 -3
- package/dist/shared/chunk-gcyspvgr.js +582 -0
- package/dist/shared/chunk-gejenfap.d.ts +25 -0
- package/dist/shared/chunk-gkj0hjrn.d.ts +136 -0
- package/dist/shared/{chunk-rr5e0g15.d.ts → chunk-j755a1a5.d.ts} +7 -1
- package/dist/shared/chunk-n739am8j.d.ts +112 -0
- package/dist/shared/{chunk-78w7qwp0.js → chunk-ndf79pv5.js} +1 -1
- package/dist/shared/chunk-nwzpekvy.js +774 -0
- package/dist/shared/{chunk-rpfwv3pz.js → chunk-r471sknr.js} +1 -1
- package/dist/shared/chunk-sbrtesdg.d.ts +138 -0
- package/dist/shared/chunk-swc7dqpw.d.ts +115 -0
- package/dist/shared/chunk-t9wqhgzt.js +765 -0
- package/dist/shared/chunk-w5h6ay93.js +72 -0
- package/dist/shared/{chunk-mp1nx0ez.js → chunk-wayv5rhr.js} +15 -4
- package/dist/shared/chunk-wf0jtzhs.js +295 -0
- package/dist/shared/{chunk-sbnrhy5m.js → chunk-y0188bbn.js} +2 -2
- package/dist/shared/chunk-yq5svpk7.js +524 -0
- package/dist/shared/{chunk-s33y1pcq.js → chunk-z3tj1ydg.js} +23 -10
- package/dist/styles.css +151 -49
- package/index.ts +7 -6
- package/lib/artwork.ts +112 -0
- package/lib/geometry.ts +1 -1
- package/mock/activities.tsx +9 -32
- package/mock/artwork.tsx +13 -1
- package/mock/clipboard.tsx +113 -0
- package/mock/clock.tsx +77 -0
- package/mock/data.ts +78 -44
- package/mock/files.tsx +83 -0
- package/mock/island-content.tsx +79 -122
- package/mock/screen.tsx +76 -0
- package/mock/settings.tsx +370 -91
- package/mock/system.ts +49 -0
- package/mock/weather.tsx +135 -0
- package/package.json +7 -2
- package/blocks/activities/shelf/examples.mdx +0 -33
- package/blocks/activities/shelf/index.tsx +0 -289
- package/blocks/activities/timer/examples.mdx +0 -52
- package/blocks/activities/timer/index.tsx +0 -292
- package/blocks/system/controls/examples.mdx +0 -34
- package/blocks/system/controls/index.tsx +0 -167
- package/blocks/system/devices/examples.mdx +0 -25
- package/blocks/system/devices/index.tsx +0 -172
- package/blocks/system/power-alert/examples.mdx +0 -32
- package/blocks/system/power-alert/index.tsx +0 -89
- package/components/indicators/battery-glyph/examples.mdx +0 -22
- package/components/indicators/battery-glyph/index.tsx +0 -91
- package/dist/blocks/activities/shelf/index.d.ts +0 -2
- package/dist/blocks/activities/shelf/index.js +0 -14
- package/dist/blocks/activities/timer/index.d.ts +0 -2
- package/dist/blocks/activities/timer/index.js +0 -19
- package/dist/blocks/system/controls/index.d.ts +0 -2
- package/dist/blocks/system/controls/index.js +0 -10
- package/dist/blocks/system/devices/index.d.ts +0 -2
- package/dist/blocks/system/devices/index.js +0 -12
- package/dist/blocks/system/power-alert/index.d.ts +0 -2
- package/dist/blocks/system/power-alert/index.js +0 -9
- package/dist/components/indicators/battery-glyph/index.d.ts +0 -2
- package/dist/components/indicators/battery-glyph/index.js +0 -9
- package/dist/shared/chunk-2qpcsv5h.d.ts +0 -45
- package/dist/shared/chunk-45gytfr1.d.ts +0 -84
- package/dist/shared/chunk-50ffk4r7.d.ts +0 -69
- package/dist/shared/chunk-5w0yck07.d.ts +0 -32
- package/dist/shared/chunk-7hr53mby.js +0 -116
- package/dist/shared/chunk-b8jb1w72.js +0 -145
- package/dist/shared/chunk-cpewy6yg.js +0 -178
- package/dist/shared/chunk-e3e4s4ds.d.ts +0 -77
- package/dist/shared/chunk-enm6td0p.js +0 -280
- package/dist/shared/chunk-fvedaas2.d.ts +0 -33
- package/dist/shared/chunk-gex38j8x.d.ts +0 -82
- package/dist/shared/chunk-hwtxpzg0.js +0 -69
- package/dist/shared/chunk-phb53x1f.js +0 -252
- package/dist/shared/chunk-r8esmjfs.d.ts +0 -42
- package/dist/shared/chunk-rcp1g9ca.js +0 -70
- package/dist/shared/chunk-rx9sphz2.js +0 -266
- package/dist/shared/chunk-xdeek16r.d.ts +0 -58
- package/dist/shared/chunk-xkzjk1tq.js +0 -206
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { WidgetLayout2 } from "./chunk-42wab62s.js";
|
|
2
|
+
import { JSX as JSX_1kxb } from "react";
|
|
3
|
+
type PomodoroPhase2 = "focus" | "short-break" | "long-break";
|
|
4
|
+
/** A Pomodoro cycle's lengths, in minutes, and how many focus rounds come before the long break. */
|
|
5
|
+
interface PomodoroSettings2 {
|
|
6
|
+
focus: number;
|
|
7
|
+
shortBreak: number;
|
|
8
|
+
longBreak: number;
|
|
9
|
+
rounds: number;
|
|
10
|
+
}
|
|
11
|
+
/** A Pomodoro phase: running while it has `endsAt`, paused while it has `remaining`. */
|
|
12
|
+
interface PomodoroRun2 {
|
|
13
|
+
phase: PomodoroPhase2;
|
|
14
|
+
/** The focus round it belongs to, from 1: a break follows its round. */
|
|
15
|
+
round: number;
|
|
16
|
+
/** The phase's whole length, in ms. */
|
|
17
|
+
total: number;
|
|
18
|
+
/** When it ends, in epoch ms, while it runs. */
|
|
19
|
+
endsAt?: number;
|
|
20
|
+
/** The time left, in ms, while it is paused. */
|
|
21
|
+
remaining?: number;
|
|
22
|
+
}
|
|
23
|
+
/** A world clock: a city and its IANA time zone. */
|
|
24
|
+
interface ClockZone2 {
|
|
25
|
+
city: string;
|
|
26
|
+
/** An IANA time zone: `America/Chicago`. */
|
|
27
|
+
timeZone: string;
|
|
28
|
+
}
|
|
29
|
+
interface ClockProps2 {
|
|
30
|
+
/** The world clocks beside the time, two or three. */
|
|
31
|
+
zones?: ClockZone2[];
|
|
32
|
+
/** Shows the seconds, re-rendering on each second's edge instead of each minute's. Defaults to `false`. */
|
|
33
|
+
seconds?: boolean;
|
|
34
|
+
/** A 12-hour clock (`true`) or a 24-hour one (`false`). Defaults to the locale's. */
|
|
35
|
+
hour12?: boolean;
|
|
36
|
+
/** The time zone of the main clock. Defaults to the system's. */
|
|
37
|
+
timeZone?: string;
|
|
38
|
+
/** Formats the time and the date. Defaults to the browser's locale. */
|
|
39
|
+
locale?: Intl.LocalesArgument;
|
|
40
|
+
/** The moment the clock shows, in epoch ms. Defaults to now, re-read on each minute (or second). */
|
|
41
|
+
now?: number;
|
|
42
|
+
/** The Pomodoro cycle's lengths, merged over 25 / 5 / 15 minutes and 4 rounds; `false` leaves the Pomodoro out. */
|
|
43
|
+
pomodoro?: Partial<PomodoroSettings2> | false;
|
|
44
|
+
/** The Pomodoro run (controlled); `null` shows the clock. */
|
|
45
|
+
value?: PomodoroRun2 | null;
|
|
46
|
+
/** The run at first (uncontrolled). Defaults to `null`. */
|
|
47
|
+
defaultValue?: PomodoroRun2 | null;
|
|
48
|
+
/** Called with the run a start, pause, resume, skip, +1 min or reset leaves (`null` after a reset). */
|
|
49
|
+
onValueChange?: (run: PomodoroRun2 | null) => void;
|
|
50
|
+
/** Called when a phase reaches zero, with the next one, which waits paused to be started: show `Clock.PhaseDone`. */
|
|
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;
|
|
56
|
+
/** Classes for the root, which fills its container. */
|
|
57
|
+
className?: string;
|
|
58
|
+
}
|
|
59
|
+
/** The first focus round, running from now. */
|
|
60
|
+
declare function startPomodoro2(pomodoro?: Partial<PomodoroSettings2>): PomodoroRun2;
|
|
61
|
+
/** The phase after `run`, paused at its whole length until it is started: what a phase reaching zero leaves. */
|
|
62
|
+
declare function advancePomodoro2(run: PomodoroRun2, pomodoro?: Partial<PomodoroSettings2>): PomodoroRun2;
|
|
63
|
+
/** `run` running from now, from the time it had left. */
|
|
64
|
+
declare function resumePomodoro2(run: PomodoroRun2): PomodoroRun2;
|
|
65
|
+
interface PartProps {
|
|
66
|
+
/** The Pomodoro run; without one the part shows nothing. */
|
|
67
|
+
run?: PomodoroRun2 | null;
|
|
68
|
+
}
|
|
69
|
+
type Element_12xgc = JSX_1kxb["Element"];
|
|
70
|
+
/** The compact island's left wing: the ring of the phase's time left. */
|
|
71
|
+
declare function ClockLeading2({ run }: PartProps): Element_12xgc | null;
|
|
72
|
+
/** The compact island's right wing: the phase's time left as `mm:ss`, muted while paused. */
|
|
73
|
+
declare function ClockTrailing2({ run }: PartProps): Element_12xgc | null;
|
|
74
|
+
/** The split island's bubble: the ring of the phase's time left. */
|
|
75
|
+
declare function ClockMinimal2({ run }: PartProps): Element_12xgc | null;
|
|
76
|
+
interface ClockPhaseDoneProps2 {
|
|
77
|
+
/** The phase that reached zero. */
|
|
78
|
+
ended: Pick<PomodoroRun2, "phase" | "round">;
|
|
79
|
+
/** The cycle's lengths, as given to the Clock. */
|
|
80
|
+
pomodoro?: Partial<PomodoroSettings2>;
|
|
81
|
+
/** Called by the button that starts the next phase; without it the button hides. */
|
|
82
|
+
onStart?: () => void;
|
|
83
|
+
}
|
|
84
|
+
/** The island's flash when a phase reaches zero: "Focus done — break time" or "Break over", and a button to start the next. */
|
|
85
|
+
declare function ClockPhaseDone2({ ended, pomodoro, onStart }: ClockPhaseDoneProps2): Element_12xgc;
|
|
86
|
+
/**
|
|
87
|
+
* A notch app's clock: the time as the hero, the date above it, the world
|
|
88
|
+
* clocks beside it, and a Pomodoro cycle that takes over while it runs.
|
|
89
|
+
*
|
|
90
|
+
* The time is set large in hours and minutes (`seconds` adds them, muted,
|
|
91
|
+
* and a tick on each second), on the locale's clock or the one `hour12`
|
|
92
|
+
* picks, with the time zone's name under it and the date on the line above.
|
|
93
|
+
* Beside it, past a hairline, the world clocks (`zones`): each city's time,
|
|
94
|
+
* how far it is from here (`−6h`), whether it's day or night there, and
|
|
95
|
+
* `Tomorrow` or `Yesterday` when its date differs. Nothing ticks between
|
|
96
|
+
* minutes; `now` pins the moment.
|
|
97
|
+
*
|
|
98
|
+
* Under the time the Pomodoro waits with its lengths (`pomodoro`: focus,
|
|
99
|
+
* short and long break in minutes, and the rounds before the long one) and
|
|
100
|
+
* a Start focus button. A run takes the widget over: the phase's ring in
|
|
101
|
+
* its hue (focus warm, a break green) as the picture, the time left as the
|
|
102
|
+
* hero, its round (`Focus 2 of 4`), when it ends and what comes next, and
|
|
103
|
+
* the next phases with their start times beside it. Pause / resume is the
|
|
104
|
+
* main action, with +1 min and skip beside it and reset at the top.
|
|
105
|
+
*
|
|
106
|
+
* The run is a value (`value` / `onValueChange`, or kept here from
|
|
107
|
+
* `defaultValue`): a running phase carries when it ends, a paused one the
|
|
108
|
+
* time it had left, so a host can persist it and pick it up after a
|
|
109
|
+
* reload. When a phase reaches zero the next one waits paused at its whole
|
|
110
|
+
* length and `onPhaseEnd` is called; the helpers `startPomodoro`,
|
|
111
|
+
* `advancePomodoro` and `resumePomodoro` build the same runs for a host
|
|
112
|
+
* that keeps time itself.
|
|
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
|
+
*
|
|
124
|
+
* The other forms are parts: `Clock.Leading` and `Clock.Trailing` for the
|
|
125
|
+
* compact island's wings (the ring and `mm:ss`, nothing without a run),
|
|
126
|
+
* `Clock.Minimal`, the ring, for the split island's bubble, and
|
|
127
|
+
* `Clock.PhaseDone`, the flash at a phase's end with a button to start the
|
|
128
|
+
* next.
|
|
129
|
+
*
|
|
130
|
+
* @example {@include ./examples.mdx}
|
|
131
|
+
*/
|
|
132
|
+
declare const Clock2: (({ zones, seconds, hour12, timeZone, locale, now: nowProp, pomodoro, value, defaultValue, onValueChange, onPhaseEnd, completedToday, layout, className }: ClockProps2) => Element_12xgc) & {
|
|
133
|
+
Leading: typeof ClockLeading2;
|
|
134
|
+
Trailing: typeof ClockTrailing2;
|
|
135
|
+
Minimal: typeof ClockMinimal2;
|
|
136
|
+
PhaseDone: typeof ClockPhaseDone2;
|
|
137
|
+
};
|
|
138
|
+
export { PomodoroPhase2, PomodoroSettings2, PomodoroRun2, ClockZone2, ClockProps2, startPomodoro2, advancePomodoro2, resumePomodoro2, ClockLeading2, ClockTrailing2, ClockMinimal2, ClockPhaseDoneProps2, ClockPhaseDone2, Clock2 };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { WidgetLayout2 } from "./chunk-42wab62s.js";
|
|
2
|
+
import { SizeVariant } from "@justanarthur/modo-ui/lib/size-context";
|
|
3
|
+
import { JSX as JSX_1kxb } from "react";
|
|
4
|
+
/** One reading of the system. */
|
|
5
|
+
interface StatsSample2 {
|
|
6
|
+
/** CPU load, from 0 to 1. */
|
|
7
|
+
cpu: number;
|
|
8
|
+
/** Memory in use, in bytes. */
|
|
9
|
+
memoryUsed: number;
|
|
10
|
+
/** All the memory, in bytes. */
|
|
11
|
+
memoryTotal: number;
|
|
12
|
+
/** Memory pressure, from 0 to 1, as the system judges it; without it the share in use stands in. */
|
|
13
|
+
memoryPressure?: number;
|
|
14
|
+
/** Network in, in bytes per second. */
|
|
15
|
+
netIn: number;
|
|
16
|
+
/** Network out, in bytes per second. */
|
|
17
|
+
netOut: number;
|
|
18
|
+
}
|
|
19
|
+
interface StatsBattery2 {
|
|
20
|
+
/** The charge, in percent (0 to 100). */
|
|
21
|
+
level: number;
|
|
22
|
+
/** A charger is connected. */
|
|
23
|
+
charging?: boolean;
|
|
24
|
+
/** Minutes until full while charging, else until empty. */
|
|
25
|
+
minutesLeft?: number;
|
|
26
|
+
}
|
|
27
|
+
interface StatsDisk2 {
|
|
28
|
+
/** Free space on the startup disk, in bytes. */
|
|
29
|
+
free: number;
|
|
30
|
+
/** The disk's size, in bytes. */
|
|
31
|
+
total: number;
|
|
32
|
+
}
|
|
33
|
+
interface StatsProcess2 {
|
|
34
|
+
/** What tells it apart: its pid. */
|
|
35
|
+
id: string;
|
|
36
|
+
/** The app or process name. */
|
|
37
|
+
name: string;
|
|
38
|
+
/** Its share of the CPU, from 0 to 1. */
|
|
39
|
+
cpu: number;
|
|
40
|
+
/** The memory it holds, in bytes. */
|
|
41
|
+
memory?: number;
|
|
42
|
+
}
|
|
43
|
+
type StatsHero2 = "cpu" | "memory";
|
|
44
|
+
interface SystemStatsProps2 {
|
|
45
|
+
/** The readings so far, oldest first; the latest is the figure, all of them the trend. Without any, it is still measuring. */
|
|
46
|
+
samples: StatsSample2[];
|
|
47
|
+
/** Which figure is the hero: the CPU load, or memory pressure when memory is what's tight. Defaults to `'cpu'`. */
|
|
48
|
+
hero?: StatsHero2;
|
|
49
|
+
/** The battery, on a laptop. */
|
|
50
|
+
battery?: StatsBattery2;
|
|
51
|
+
/** The startup disk's free space. */
|
|
52
|
+
disk?: StatsDisk2;
|
|
53
|
+
/** Seconds since the last boot. */
|
|
54
|
+
uptime?: number;
|
|
55
|
+
/** The busiest processes, in any order: the top three list beside the hero, by CPU; the top eight at the tall snap. */
|
|
56
|
+
processes?: StatsProcess2[];
|
|
57
|
+
/** Step on the size ladder. Omitted, it follows the surrounding SizeProvider. */
|
|
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;
|
|
61
|
+
/** Classes for the root, which fills its container. */
|
|
62
|
+
className?: string;
|
|
63
|
+
}
|
|
64
|
+
type Element_12xgc = JSX_1kxb["Element"];
|
|
65
|
+
/** The compact island's left wing: the CPU glyph. */
|
|
66
|
+
declare function SystemStatsLeading2(): Element_12xgc;
|
|
67
|
+
/** The compact island's right wing: the CPU load, a dash until the first reading. */
|
|
68
|
+
declare function SystemStatsTrailing2({ sample }: {
|
|
69
|
+
sample?: StatsSample2;
|
|
70
|
+
}): Element_12xgc;
|
|
71
|
+
/** The split island's bubble: the CPU load as a ring, in the warning hue from 75% and the error hue from 90%. */
|
|
72
|
+
declare function SystemStatsMinimal2({ sample }: {
|
|
73
|
+
sample?: StatsSample2;
|
|
74
|
+
}): Element_12xgc;
|
|
75
|
+
/**
|
|
76
|
+
* A notch app's system load: the busiest figure as the hero with its trend,
|
|
77
|
+
* the rest as facts, and the processes behind it.
|
|
78
|
+
*
|
|
79
|
+
* The hero is the CPU load, set large, with every reading so far as a
|
|
80
|
+
* modo-ui Sparkline beside it (it spans the width however many readings
|
|
81
|
+
* there are: the island stays open for seconds, too short to fill a fixed
|
|
82
|
+
* window). The line turns to the warning hue from 75% and the error hue
|
|
83
|
+
* from 90%, so the color comes from the load. When memory is what's tight,
|
|
84
|
+
* `hero="memory"` makes memory pressure the figure and its trend instead.
|
|
85
|
+
* Under it one word for how the machine is doing and who's busiest, then
|
|
86
|
+
* the facts: memory in use of all of it (or the CPU), the network's in and
|
|
87
|
+
* out rates, and, when given, the battery with its time left and the
|
|
88
|
+
* startup disk's free space. The uptime sits on the context line.
|
|
89
|
+
*
|
|
90
|
+
* Beside it, past a hairline, the busiest processes by CPU with the memory
|
|
91
|
+
* they hold, three at most and a count of the rest.
|
|
92
|
+
*
|
|
93
|
+
* CPU and network are rates between two readings, so before the first one
|
|
94
|
+
* lands (about a second after opening) the figures are dashes over the
|
|
95
|
+
* Sparkline's baseline.
|
|
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
|
+
*
|
|
104
|
+
* `SystemStats.Leading` and `SystemStats.Trailing` show the CPU load in the
|
|
105
|
+
* compact island's wings, `SystemStats.Minimal` as a ring in the split
|
|
106
|
+
* island's bubble.
|
|
107
|
+
*
|
|
108
|
+
* @example {@include ./examples.mdx}
|
|
109
|
+
*/
|
|
110
|
+
declare const SystemStats2: (({ samples, hero, battery, disk, uptime, processes, size, layout, className }: SystemStatsProps2) => Element_12xgc) & {
|
|
111
|
+
Leading: typeof SystemStatsLeading2;
|
|
112
|
+
Trailing: typeof SystemStatsTrailing2;
|
|
113
|
+
Minimal: typeof SystemStatsMinimal2;
|
|
114
|
+
};
|
|
115
|
+
export { StatsSample2, StatsBattery2, StatsDisk2, StatsProcess2, StatsHero2, SystemStatsProps2, SystemStatsLeading2, SystemStatsTrailing2, SystemStatsMinimal2, SystemStats2 };
|