@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.
Files changed (148) hide show
  1. package/README.md +11 -11
  2. package/blocks/activities/agenda/examples.mdx +29 -5
  3. package/blocks/activities/agenda/index.tsx +438 -181
  4. package/blocks/activities/clock/examples.mdx +89 -0
  5. package/blocks/activities/clock/index.tsx +917 -0
  6. package/blocks/activities/now-playing/examples.mdx +40 -13
  7. package/blocks/activities/now-playing/index.tsx +399 -120
  8. package/blocks/activities/weather/examples.mdx +123 -0
  9. package/blocks/activities/weather/index.tsx +863 -0
  10. package/blocks/app/expanded-island/examples.mdx +8 -7
  11. package/blocks/app/expanded-island/index.tsx +22 -4
  12. package/blocks/app/settings-window/examples.mdx +14 -2
  13. package/blocks/app/settings-window/index.tsx +33 -10
  14. package/blocks/system/clipboard/examples.mdx +91 -0
  15. package/blocks/system/clipboard/index.tsx +773 -0
  16. package/blocks/system/recent-files/examples.mdx +80 -0
  17. package/blocks/system/recent-files/index.tsx +627 -0
  18. package/blocks/system/system-stats/examples.mdx +46 -9
  19. package/blocks/system/system-stats/index.tsx +445 -104
  20. package/components/indicators/media-scrubber/examples.mdx +8 -0
  21. package/components/indicators/media-scrubber/index.tsx +37 -13
  22. package/components/island/island/examples.mdx +4 -4
  23. package/components/island/island/index.tsx +2 -2
  24. package/components/island/island-flash/examples.mdx +15 -18
  25. package/components/island/island-flash/index.tsx +4 -4
  26. package/components/island/island-tabs/examples.mdx +5 -5
  27. package/components/island/widget/examples.mdx +76 -0
  28. package/components/island/widget/index.tsx +465 -0
  29. package/dist/blocks/activities/agenda/index.d.ts +2 -1
  30. package/dist/blocks/activities/agenda/index.js +3 -3
  31. package/dist/blocks/activities/clock/index.d.ts +3 -0
  32. package/dist/blocks/activities/clock/index.js +25 -0
  33. package/dist/blocks/activities/now-playing/index.d.ts +4 -2
  34. package/dist/blocks/activities/now-playing/index.js +5 -3
  35. package/dist/blocks/activities/weather/index.d.ts +3 -0
  36. package/dist/blocks/activities/weather/index.js +21 -0
  37. package/dist/blocks/app/expanded-island/index.d.ts +1 -1
  38. package/dist/blocks/app/expanded-island/index.js +4 -3
  39. package/dist/blocks/app/settings-window/index.d.ts +1 -1
  40. package/dist/blocks/app/settings-window/index.js +1 -1
  41. package/dist/blocks/system/clipboard/index.d.ts +3 -0
  42. package/dist/blocks/system/clipboard/index.js +17 -0
  43. package/dist/blocks/system/recent-files/index.d.ts +3 -0
  44. package/dist/blocks/system/recent-files/index.js +19 -0
  45. package/dist/blocks/system/system-stats/index.d.ts +3 -2
  46. package/dist/blocks/system/system-stats/index.js +4 -1
  47. package/dist/components/indicators/media-scrubber/index.d.ts +1 -1
  48. package/dist/components/indicators/media-scrubber/index.js +1 -1
  49. package/dist/components/island/island/index.d.ts +1 -1
  50. package/dist/components/island/island/index.js +2 -2
  51. package/dist/components/island/island-flash/index.d.ts +1 -1
  52. package/dist/components/island/island-flash/index.js +1 -1
  53. package/dist/components/island/island-tabs/index.js +2 -2
  54. package/dist/components/island/widget/index.d.ts +2 -0
  55. package/dist/components/island/widget/index.js +32 -0
  56. package/dist/index.d.ts +15 -15
  57. package/dist/index.js +104 -58
  58. package/dist/lib/artwork.d.ts +2 -0
  59. package/dist/lib/artwork.js +8 -0
  60. package/dist/lib/geometry.js +1 -1
  61. package/dist/shared/{chunk-yngkkxz2.d.ts → chunk-0ym9mcqc.d.ts} +10 -6
  62. package/dist/shared/chunk-2b6gpn8k.js +444 -0
  63. package/dist/shared/chunk-3hcnf4yx.js +481 -0
  64. package/dist/shared/chunk-42wab62s.d.ts +197 -0
  65. package/dist/shared/{chunk-zvh0d3qb.js → chunk-61t2dfte.js} +1 -1
  66. package/dist/shared/{chunk-9nhpg9t8.d.ts → chunk-6tnq6p89.d.ts} +9 -1
  67. package/dist/shared/{chunk-hpsabfsd.d.ts → chunk-81fpptwp.d.ts} +1 -1
  68. package/dist/shared/chunk-93dtpjz7.js +789 -0
  69. package/dist/shared/{chunk-wwjxs75m.js → chunk-9xtcv3sy.js} +26 -12
  70. package/dist/shared/chunk-a6njb8db.d.ts +129 -0
  71. package/dist/shared/chunk-ab8mdg0n.d.ts +149 -0
  72. package/dist/shared/chunk-evqpf92s.d.ts +168 -0
  73. package/dist/shared/{chunk-6c1jbefs.d.ts → chunk-fexwzycv.d.ts} +3 -3
  74. package/dist/shared/chunk-gcyspvgr.js +582 -0
  75. package/dist/shared/chunk-gejenfap.d.ts +25 -0
  76. package/dist/shared/chunk-gkj0hjrn.d.ts +136 -0
  77. package/dist/shared/{chunk-rr5e0g15.d.ts → chunk-j755a1a5.d.ts} +7 -1
  78. package/dist/shared/chunk-n739am8j.d.ts +112 -0
  79. package/dist/shared/{chunk-78w7qwp0.js → chunk-ndf79pv5.js} +1 -1
  80. package/dist/shared/chunk-nwzpekvy.js +774 -0
  81. package/dist/shared/{chunk-rpfwv3pz.js → chunk-r471sknr.js} +1 -1
  82. package/dist/shared/chunk-sbrtesdg.d.ts +138 -0
  83. package/dist/shared/chunk-swc7dqpw.d.ts +115 -0
  84. package/dist/shared/chunk-t9wqhgzt.js +765 -0
  85. package/dist/shared/chunk-w5h6ay93.js +72 -0
  86. package/dist/shared/{chunk-mp1nx0ez.js → chunk-wayv5rhr.js} +15 -4
  87. package/dist/shared/chunk-wf0jtzhs.js +295 -0
  88. package/dist/shared/{chunk-sbnrhy5m.js → chunk-y0188bbn.js} +2 -2
  89. package/dist/shared/chunk-yq5svpk7.js +524 -0
  90. package/dist/shared/{chunk-s33y1pcq.js → chunk-z3tj1ydg.js} +23 -10
  91. package/dist/styles.css +151 -49
  92. package/index.ts +7 -6
  93. package/lib/artwork.ts +112 -0
  94. package/lib/geometry.ts +1 -1
  95. package/mock/activities.tsx +9 -32
  96. package/mock/artwork.tsx +13 -1
  97. package/mock/clipboard.tsx +113 -0
  98. package/mock/clock.tsx +77 -0
  99. package/mock/data.ts +78 -44
  100. package/mock/files.tsx +83 -0
  101. package/mock/island-content.tsx +79 -122
  102. package/mock/screen.tsx +76 -0
  103. package/mock/settings.tsx +370 -91
  104. package/mock/system.ts +49 -0
  105. package/mock/weather.tsx +135 -0
  106. package/package.json +7 -2
  107. package/blocks/activities/shelf/examples.mdx +0 -33
  108. package/blocks/activities/shelf/index.tsx +0 -289
  109. package/blocks/activities/timer/examples.mdx +0 -52
  110. package/blocks/activities/timer/index.tsx +0 -292
  111. package/blocks/system/controls/examples.mdx +0 -34
  112. package/blocks/system/controls/index.tsx +0 -167
  113. package/blocks/system/devices/examples.mdx +0 -25
  114. package/blocks/system/devices/index.tsx +0 -172
  115. package/blocks/system/power-alert/examples.mdx +0 -32
  116. package/blocks/system/power-alert/index.tsx +0 -89
  117. package/components/indicators/battery-glyph/examples.mdx +0 -22
  118. package/components/indicators/battery-glyph/index.tsx +0 -91
  119. package/dist/blocks/activities/shelf/index.d.ts +0 -2
  120. package/dist/blocks/activities/shelf/index.js +0 -14
  121. package/dist/blocks/activities/timer/index.d.ts +0 -2
  122. package/dist/blocks/activities/timer/index.js +0 -19
  123. package/dist/blocks/system/controls/index.d.ts +0 -2
  124. package/dist/blocks/system/controls/index.js +0 -10
  125. package/dist/blocks/system/devices/index.d.ts +0 -2
  126. package/dist/blocks/system/devices/index.js +0 -12
  127. package/dist/blocks/system/power-alert/index.d.ts +0 -2
  128. package/dist/blocks/system/power-alert/index.js +0 -9
  129. package/dist/components/indicators/battery-glyph/index.d.ts +0 -2
  130. package/dist/components/indicators/battery-glyph/index.js +0 -9
  131. package/dist/shared/chunk-2qpcsv5h.d.ts +0 -45
  132. package/dist/shared/chunk-45gytfr1.d.ts +0 -84
  133. package/dist/shared/chunk-50ffk4r7.d.ts +0 -69
  134. package/dist/shared/chunk-5w0yck07.d.ts +0 -32
  135. package/dist/shared/chunk-7hr53mby.js +0 -116
  136. package/dist/shared/chunk-b8jb1w72.js +0 -145
  137. package/dist/shared/chunk-cpewy6yg.js +0 -178
  138. package/dist/shared/chunk-e3e4s4ds.d.ts +0 -77
  139. package/dist/shared/chunk-enm6td0p.js +0 -280
  140. package/dist/shared/chunk-fvedaas2.d.ts +0 -33
  141. package/dist/shared/chunk-gex38j8x.d.ts +0 -82
  142. package/dist/shared/chunk-hwtxpzg0.js +0 -69
  143. package/dist/shared/chunk-phb53x1f.js +0 -252
  144. package/dist/shared/chunk-r8esmjfs.d.ts +0 -42
  145. package/dist/shared/chunk-rcp1g9ca.js +0 -70
  146. package/dist/shared/chunk-rx9sphz2.js +0 -266
  147. package/dist/shared/chunk-xdeek16r.d.ts +0 -58
  148. package/dist/shared/chunk-xkzjk1tq.js +0 -206
@@ -0,0 +1,113 @@
1
+ /*
2
+ * Mock: an afternoon of copying for the clipboard widget, one clip of each
3
+ * kind, read at a pinned moment so the times hold. Nothing here ships in the
4
+ * barrel.
5
+ */
6
+
7
+ import type { ClipboardClip } from '../blocks/system/clipboard'
8
+ import { MockArtwork } from './artwork'
9
+
10
+ const MINUTE = 60_000
11
+
12
+ /** The moment the history is read at. */
13
+ export const CLIP_NOW = new Date(2026, 10, 17, 15, 42).getTime()
14
+
15
+ const ago = (minutes: number) => CLIP_NOW - minutes * MINUTE
16
+
17
+ export const CLIPS: ClipboardClip[] = [
18
+ {
19
+ id: 'quote',
20
+ kind: 'text',
21
+ content:
22
+ 'The island grows out of the notch and melts back into it; nothing on screen should feel like it came from nowhere.',
23
+ app: 'Notes',
24
+ copiedAt: ago(2),
25
+ },
26
+ {
27
+ id: 'docs',
28
+ kind: 'link',
29
+ content: 'https://justanarthur.github.io/modo/notch/docs/blocks/agenda',
30
+ detail: 'Agenda · modo ui notch',
31
+ preview: <MockArtwork variant="night" />,
32
+ app: 'Safari',
33
+ copiedAt: ago(9),
34
+ },
35
+ {
36
+ id: 'shot',
37
+ kind: 'image',
38
+ content: 'Screenshot 2026-11-17 at 15.21',
39
+ detail: '1440 × 900 · PNG',
40
+ preview: <MockArtwork variant="dusk" />,
41
+ app: 'Screenshot',
42
+ copiedAt: ago(21),
43
+ },
44
+ {
45
+ id: 'brand',
46
+ kind: 'color',
47
+ // A theme token as copied from code; the swatch paints it, so it follows the scheme and no literal color sits in the docs.
48
+ content: '--badge-blue',
49
+ color: 'var(--badge-blue)',
50
+ detail: 'modo-ui badge blue',
51
+ app: 'Zed',
52
+ copiedAt: ago(48),
53
+ },
54
+ {
55
+ id: 'brief',
56
+ kind: 'file',
57
+ content: 'Island brief.pdf',
58
+ detail: '2.4 MB',
59
+ app: 'Finder',
60
+ copiedAt: ago(95),
61
+ },
62
+ {
63
+ id: 'cmd',
64
+ kind: 'text',
65
+ content: 'bun run build && bun run check',
66
+ app: 'Terminal',
67
+ copiedAt: ago(130),
68
+ },
69
+ {
70
+ id: 'address',
71
+ kind: 'text',
72
+ content: 'Main St 12, 2nd floor',
73
+ app: 'Messages',
74
+ copiedAt: ago(26 * 60),
75
+ },
76
+ {
77
+ id: 'issue',
78
+ kind: 'link',
79
+ content: 'https://github.com/justAnArthur/modo/issues/58',
80
+ detail: 'The island should keep its tab when it closes · Issue #58',
81
+ preview: <MockArtwork variant="aurora" />,
82
+ app: 'Safari',
83
+ copiedAt: ago(27 * 60),
84
+ },
85
+ {
86
+ id: 'accent',
87
+ kind: 'color',
88
+ content: '--badge-amber',
89
+ color: 'var(--badge-amber)',
90
+ detail: 'modo-ui badge amber',
91
+ app: 'Figma',
92
+ copiedAt: ago(29 * 60),
93
+ },
94
+ {
95
+ id: 'reply',
96
+ kind: 'text',
97
+ content: 'Sounds good. I will send the build over tonight and we can go through it tomorrow morning.',
98
+ app: 'Mail',
99
+ copiedAt: ago(31 * 60),
100
+ },
101
+ {
102
+ id: 'mock',
103
+ kind: 'image',
104
+ content: 'Island mock, tall.png',
105
+ detail: '2048 × 1280 · PNG',
106
+ preview: <MockArtwork variant="night" />,
107
+ app: 'Figma',
108
+ copiedAt: ago(2 * 24 * 60),
109
+ },
110
+ ]
111
+
112
+ /** Kept on top: the build command and the color. */
113
+ export const PINNED = ['cmd', 'brand']
package/mock/clock.tsx ADDED
@@ -0,0 +1,77 @@
1
+ /*!
2
+ * Mock: world clocks and Pomodoro runs for the clock's docs, and the island
3
+ * scenes around them. Runs are made once, on mount, so they keep counting
4
+ * down across renders. Nothing here ships in the barrel.
5
+ */
6
+
7
+ 'use client'
8
+
9
+ import { useState } from 'react'
10
+ import Clock, { type ClockProps, type ClockZone, type PomodoroRun } from '../blocks/activities/clock'
11
+ import NowPlaying from '../blocks/activities/now-playing'
12
+ import { PLAYING } from './artwork'
13
+ import { FlashIsland, WingsIsland } from './screen'
14
+
15
+ const MINUTE = 60_000
16
+
17
+ /** The moment the clock shows: today, 16:42. */
18
+ export const CLOCK_NOW = new Date().setHours(16, 42, 0, 0)
19
+
20
+ export const ZONES: ClockZone[] = [
21
+ { city: 'New York', timeZone: 'America/New_York' },
22
+ { city: 'San Francisco', timeZone: 'America/Los_Angeles' },
23
+ { city: 'Tokyo', timeZone: 'Asia/Tokyo' },
24
+ ]
25
+
26
+ /** A run of `phase` with `left` of its length to go, running unless `paused`. */
27
+ export function pomodoroRun(
28
+ phase: PomodoroRun['phase'] = 'focus',
29
+ { round = 2, minutes = 25, left = 0.62, paused = false } = {},
30
+ ): PomodoroRun {
31
+ const total = minutes * MINUTE
32
+ return paused
33
+ ? { phase, round, total, remaining: left * total }
34
+ : { phase, round, total, endsAt: Date.now() + left * total }
35
+ }
36
+
37
+ /** A run made once, when the component mounts. */
38
+ export function useRun(...args: Parameters<typeof pomodoroRun>) {
39
+ return useState(() => pomodoroRun(...args))[0]
40
+ }
41
+
42
+ /** The clock in focus, round 2 of 4, 62% to go. */
43
+ export function FocusClock(props: Pick<ClockProps, 'layout' | 'completedToday'>) {
44
+ return <Clock zones={ZONES} defaultValue={useRun()} {...props} />
45
+ }
46
+
47
+ /** A short break, paused with half of it left. */
48
+ export function PausedBreak() {
49
+ return <Clock zones={ZONES} defaultValue={useRun('short-break', { minutes: 5, left: 0.5, paused: true })} />
50
+ }
51
+
52
+ /** The Pomodoro in the compact island's wings. */
53
+ export function ClockWings() {
54
+ const run = useRun()
55
+ return <WingsIsland leading={<Clock.Leading run={run} />} trailing={<Clock.Trailing run={run} />} />
56
+ }
57
+
58
+ /** Music in the wings, the Pomodoro's ring on the bubble. */
59
+ export function ClockSplit() {
60
+ const run = useRun('short-break', { minutes: 5, left: 0.7 })
61
+ return (
62
+ <WingsIsland
63
+ leading={<NowPlaying.Leading track={PLAYING} />}
64
+ trailing={<NowPlaying.Trailing track={PLAYING} />}
65
+ minimal={<Clock.Minimal run={run} />}
66
+ />
67
+ )
68
+ }
69
+
70
+ /** The flash at the end of a phase. */
71
+ export function PhaseDoneFlash({ ended }: { ended: Pick<PomodoroRun, 'phase' | 'round'> }) {
72
+ return (
73
+ <FlashIsland activity={`${ended.phase}-${ended.round}`}>
74
+ <Clock.PhaseDone ended={ended} onStart={() => {}} />
75
+ </FlashIsland>
76
+ )
77
+ }
package/mock/data.ts CHANGED
@@ -3,11 +3,8 @@
3
3
  * and examples read it; nothing here ships in the barrel.
4
4
  */
5
5
 
6
- import { Activity, CalendarDays, Files, Headphones, Music, SlidersHorizontal, Timer } from 'lucide-react'
6
+ import { Activity, CalendarDays, ClipboardList, Clock3, CloudSun, FolderDown, Music } from 'lucide-react'
7
7
  import type { AgendaEvent } from '../blocks/activities/agenda'
8
- import type { ShelfFile } from '../blocks/activities/shelf'
9
- import type { DeviceInfo } from '../blocks/system/devices'
10
- import type { StatsSample } from '../blocks/system/system-stats'
11
8
  import type { IslandTab } from '../components/island/island-tabs'
12
9
 
13
10
  export interface Track {
@@ -15,6 +12,8 @@ export interface Track {
15
12
  artist: string
16
13
  album: string
17
14
  source: string
15
+ output: string
16
+ outputKind: 'built-in' | 'headphones' | 'speaker' | 'airplay'
18
17
  /** Seconds. */
19
18
  duration: number
20
19
  /** Seconds. */
@@ -26,20 +25,36 @@ export const TRACK: Track = {
26
25
  artist: 'M83',
27
26
  album: "Hurry Up, We're Dreaming",
28
27
  source: 'Music',
28
+ output: 'AirPods Pro',
29
+ outputKind: 'headphones',
29
30
  duration: 243,
30
31
  position: 71,
31
32
  }
32
33
 
33
34
  export const TRACKS: Track[] = [
34
35
  TRACK,
35
- { title: 'Teardrop', artist: 'Massive Attack', album: 'Mezzanine', source: 'Spotify', duration: 330, position: 12 },
36
- { title: 'Nightcall', artist: 'Kavinsky', album: 'OutRun', source: 'Safari', duration: 258, position: 190 },
36
+ {
37
+ title: 'Teardrop',
38
+ artist: 'Massive Attack',
39
+ album: 'Mezzanine',
40
+ source: 'Spotify',
41
+ output: 'Living room',
42
+ outputKind: 'airplay',
43
+ duration: 330,
44
+ position: 12,
45
+ },
46
+ {
47
+ title: 'Nightcall',
48
+ artist: 'Kavinsky',
49
+ album: 'OutRun',
50
+ source: 'Safari',
51
+ output: 'MacBook Pro Speakers',
52
+ outputKind: 'built-in',
53
+ duration: 258,
54
+ position: 190,
55
+ },
37
56
  ]
38
57
 
39
- export const POWER = { level: 82, charging: true, untilFull: 38, remaining: 252 }
40
-
41
- export const TIMER = { label: 'Focus', minutes: 25 }
42
-
43
58
  const MINUTE = 60_000
44
59
  const at = (day: number, hours: number, minutes: number) => {
45
60
  const date = new Date()
@@ -94,6 +109,54 @@ export const EVENTS: AgendaEvent[] = [
94
109
  location: 'Main St 12',
95
110
  color: 'var(--badge-rose)',
96
111
  },
112
+ {
113
+ id: 'sync',
114
+ title: 'Product sync',
115
+ start: at(1, 11, 0),
116
+ end: at(1, 12, 0),
117
+ meetingUrl: 'https://meet.example.com/sync',
118
+ color: 'var(--badge-blue)',
119
+ },
120
+ {
121
+ id: 'gym',
122
+ title: 'Climbing',
123
+ start: at(1, 18, 30),
124
+ end: at(1, 20, 0),
125
+ location: 'Boulder Bar',
126
+ color: 'var(--badge-green)',
127
+ },
128
+ {
129
+ id: 'retro',
130
+ title: 'Sprint retro',
131
+ start: at(2, 15, 0),
132
+ end: at(2, 16, 0),
133
+ meetingUrl: 'https://meet.example.com/retro',
134
+ color: 'var(--badge-violet)',
135
+ },
136
+ {
137
+ id: 'conference',
138
+ title: 'Design conference',
139
+ start: at(3, 0, 0),
140
+ end: at(5, 0, 0),
141
+ allDay: true,
142
+ color: 'var(--badge-orange)',
143
+ },
144
+ {
145
+ id: 'talk',
146
+ title: 'Talk: islands on the web',
147
+ start: at(3, 13, 30),
148
+ end: at(3, 14, 15),
149
+ location: 'Hall B',
150
+ color: 'var(--badge-orange)',
151
+ },
152
+ {
153
+ id: 'dinner',
154
+ title: 'Dinner with Marek',
155
+ start: at(4, 19, 0),
156
+ end: at(4, 21, 0),
157
+ location: 'Bistro Dunaj',
158
+ color: 'var(--badge-rose)',
159
+ },
97
160
  ]
98
161
 
99
162
  /** An event a few minutes out, for the "Up next" activity: it counts down for real. */
@@ -110,44 +173,15 @@ export function soonEvent(minutes = 4): AgendaEvent {
110
173
  }
111
174
  }
112
175
 
113
- export const DEVICES: DeviceInfo[] = [
114
- { id: 'airpods', name: 'AirPods Pro', kind: 'headphones', connected: true, battery: 74 },
115
- { id: 'keyboard', name: 'Magic Keyboard', kind: 'keyboard', connected: true, battery: 18 },
116
- { id: 'mouse', name: 'Magic Mouse', kind: 'mouse', connected: false },
117
- { id: 'controller', name: 'DualSense', kind: 'gamepad', connected: true, battery: 56, charging: true },
118
- { id: 'speaker', name: 'Living room', kind: 'speaker', connected: false },
119
- ]
120
-
121
- export const FILES: ShelfFile[] = [
122
- { id: 'brief', name: 'Island brief.pdf' },
123
- { id: 'cover', name: 'Cover.png' },
124
- { id: 'notes', name: 'Notes.md' },
125
- { id: 'demo', name: 'Demo.mov' },
126
- { id: 'archive', name: 'Assets.zip' },
127
- { id: 'theme', name: 'theme.ts' },
128
- ]
129
-
130
- const wave = (i: number, base: number, swing: number) =>
131
- base + swing * Math.sin(i / 2.4) + swing * 0.4 * Math.sin(i * 1.7)
132
-
133
- /** Thirty seconds of samples, oldest first. */
134
- export const SAMPLES: StatsSample[] = Array.from({ length: 30 }, (_, i) => ({
135
- cpu: Math.min(1, Math.max(0.02, wave(i, 0.32, 0.14))),
136
- memoryUsed: wave(i, 11.2e9, 0.25e9),
137
- memoryTotal: 16e9,
138
- netIn: Math.max(0, wave(i, 2.4e6, 1.6e6)),
139
- netOut: Math.max(0, wave(i + 5, 0.4e6, 0.3e6)),
140
- }))
141
-
142
176
  /** The open island's tabs: one per widget. */
143
177
  export const TABS: IslandTab[] = [
144
178
  { value: 'now-playing', label: 'Now Playing', icon: Music },
145
- { value: 'timer', label: 'Timer', icon: Timer },
146
179
  { value: 'calendar', label: 'Calendar', icon: CalendarDays },
147
- { value: 'shelf', label: 'Shelf', icon: Files },
148
- { value: 'controls', label: 'Controls', icon: SlidersHorizontal },
149
- { value: 'devices', label: 'Devices', icon: Headphones },
150
- { value: 'stats', label: 'System', icon: Activity },
180
+ { value: 'weather', label: 'Weather', icon: CloudSun },
181
+ { value: 'clock', label: 'Clock', icon: Clock3 },
182
+ { value: 'system', label: 'System', icon: Activity },
183
+ { value: 'clipboard', label: 'Clipboard', icon: ClipboardList },
184
+ { value: 'files', label: 'Recent files', icon: FolderDown },
151
185
  ]
152
186
 
153
187
  export const MENUS = ['Finder', 'File', 'Edit', 'View', 'Go', 'Window', 'Help']
package/mock/files.tsx ADDED
@@ -0,0 +1,83 @@
1
+ /*
2
+ * Mock: a Downloads folder and a Screenshots folder for the recent-files
3
+ * widget, read at a pinned moment so the times hold, and a download under
4
+ * way. Nothing here ships in the barrel.
5
+ */
6
+
7
+ import type { RecentDownload, RecentFile } from '../blocks/system/recent-files'
8
+ import { MockArtwork } from './artwork'
9
+
10
+ const MINUTE = 60_000
11
+
12
+ /** The moment the folders are read at. */
13
+ export const FILES_NOW = new Date(2026, 10, 17, 15, 42).getTime()
14
+
15
+ const ago = (minutes: number) => FILES_NOW - minutes * MINUTE
16
+
17
+ export const DOWNLOADS: RecentFile[] = [
18
+ {
19
+ id: 'report',
20
+ name: 'Quarterly report.pdf',
21
+ size: 2.4e6,
22
+ addedAt: ago(0),
23
+ source: 'downloads',
24
+ from: 'drive.google.com',
25
+ },
26
+ { id: 'kit', name: 'modo-ui-notch-0.2.0.tgz', size: 84e3, addedAt: ago(12), source: 'downloads', from: 'npmjs.com' },
27
+ { id: 'demo', name: 'Demo.mov', size: 182e6, addedAt: ago(48), source: 'downloads', from: 'wetransfer.com' },
28
+ {
29
+ id: 'cover',
30
+ name: 'Cover.png',
31
+ size: 1.1e6,
32
+ addedAt: ago(130),
33
+ source: 'downloads',
34
+ thumbnail: <MockArtwork variant="dusk" />,
35
+ },
36
+ { id: 'assets', name: 'Assets.zip', size: 36e6, addedAt: ago(26 * 60), source: 'downloads' },
37
+ { id: 'inter', name: 'Inter-4.1.zip', size: 18e6, addedAt: ago(3 * 24 * 60), source: 'downloads' },
38
+ {
39
+ id: 'poster',
40
+ name: 'Poster draft.jpg',
41
+ size: 3.2e6,
42
+ addedAt: ago(4 * 24 * 60),
43
+ source: 'downloads',
44
+ thumbnail: <MockArtwork variant="aurora" />,
45
+ from: 'dribbble.com',
46
+ },
47
+ { id: 'invoice', name: 'Invoice 2026-11.pdf', size: 210e3, addedAt: ago(5 * 24 * 60), source: 'downloads' },
48
+ { id: 'track', name: 'Interview take 2.m4a', size: 14e6, addedAt: ago(6 * 24 * 60), source: 'downloads' },
49
+ { id: 'xcode', name: 'Xcode_17.xip', size: 3.4e9, addedAt: ago(8 * 24 * 60), source: 'downloads' },
50
+ { id: 'config', name: 'island.config.json', size: 2e3, addedAt: ago(9 * 24 * 60), source: 'downloads' },
51
+ ]
52
+
53
+ const pad = (n: number) => String(n).padStart(2, '0')
54
+
55
+ /** The name macOS gives a screenshot: `Screenshot 2026-11-17 at 15.39.00.png`. */
56
+ function shotName(ms: number) {
57
+ const d = new Date(ms)
58
+ return `Screenshot ${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} at ${d.getHours()}.${pad(d.getMinutes())}.${pad(d.getSeconds())}.png`
59
+ }
60
+
61
+ const VARIANTS = ['aurora', 'dusk', 'night'] as const
62
+
63
+ export const SCREENSHOTS: RecentFile[] = [3, 15, 22, 64, 140, 300, 1500, 1620, 2900, 4400, 7300].map((minutes, i) => ({
64
+ id: `shot-${i}`,
65
+ name: shotName(ago(minutes)),
66
+ size: (1.2 + i * 0.35) * 1e6,
67
+ addedAt: ago(minutes),
68
+ source: 'screenshots',
69
+ thumbnail: <MockArtwork variant={VARIANTS[i % VARIANTS.length]} />,
70
+ }))
71
+
72
+ /** Both folders. */
73
+ export const RECENT_FILES: RecentFile[] = [...DOWNLOADS, ...SCREENSHOTS]
74
+
75
+ /** A download under way: 40% in, 6.2 MB/s. */
76
+ export const DOWNLOAD: RecentDownload = {
77
+ id: 'wallpapers',
78
+ name: 'Wallpapers 4K.zip',
79
+ received: 48e6,
80
+ total: 120e6,
81
+ rate: 6.2e6,
82
+ from: 'unsplash.com',
83
+ }