@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
package/dist/styles.css CHANGED
@@ -35,6 +35,9 @@
35
35
  @property --un-numeric-spacing{syntax:"*";inherits:false;}
36
36
  @property --un-ordinal{syntax:"*";inherits:false;}
37
37
  @property --un-slashed-zero{syntax:"*";inherits:false;}
38
+ @property --un-divide-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
39
+ @property --un-border-style{syntax:"*";inherits:false;initial-value:solid;}
40
+ @property --un-divide-x-reverse{syntax:"*";inherits:false;initial-value:0;}
38
41
  }
39
42
  /* layer: default */
40
43
  @layer default{
@@ -50,10 +53,12 @@
50
53
  .font-mono{font-family:var(--font-mono);}
51
54
  .tab{-moz-tab-size:4;-o-tab-size:4;tab-size:4;}
52
55
  .-m-1{margin:calc(var(--spacing) * -1);}
56
+ .-m-1\.5{margin:calc(var(--spacing) * -1.5);}
53
57
  .m-0{margin:calc(var(--spacing) * 0);}
54
58
  .-mx-2{margin-inline:calc(var(--spacing) * -2);}
55
59
  .-my-1{margin-block:calc(var(--spacing) * -1);}
56
60
  .mx-auto{margin-inline:auto;}
61
+ .my-1{margin-block:calc(var(--spacing) * 1);}
57
62
  .-ml-2{margin-left:calc(var(--spacing) * -2);}
58
63
  .-mr-1{margin-right:calc(var(--spacing) * -1);}
59
64
  .-mr-2{margin-right:calc(var(--spacing) * -2);}
@@ -66,13 +71,22 @@
66
71
  .mt-1\.5{margin-top:calc(var(--spacing) * 1.5);}
67
72
  .mt-2{margin-top:calc(var(--spacing) * 2);}
68
73
  .p-1{padding:calc(var(--spacing) * 1);}
74
+ .p-1\.5{padding:calc(var(--spacing) * 1.5);}
69
75
  .p-8{padding:calc(var(--spacing) * 8);}
76
+ .\[\&\>\*\]\:px-6>*,
77
+ .px-6{padding-inline:calc(var(--spacing) * 6);}
70
78
  .px{padding-inline:calc(var(--spacing) * 4);}
79
+ .px-0\.5{padding-inline:calc(var(--spacing) * 0.5);}
71
80
  .px-2{padding-inline:calc(var(--spacing) * 2);}
72
81
  .px-5{padding-inline:calc(var(--spacing) * 5);}
73
82
  .py-1{padding-block:calc(var(--spacing) * 1);}
83
+ .py-1\.5{padding-block:calc(var(--spacing) * 1.5);}
84
+ .\[\&\>\*\:first-child\]\:pl-0>*:first-child,
85
+ .pl-0{padding-left:calc(var(--spacing) * 0);}
86
+ .\[\&\>\*\:last-child\]\:pr-0>*:last-child{padding-right:calc(var(--spacing) * 0);}
74
87
  .pb{padding-bottom:calc(var(--spacing) * 4);}
75
88
  .pb-1{padding-bottom:calc(var(--spacing) * 1);}
89
+ .pb-2{padding-bottom:calc(var(--spacing) * 2);}
76
90
  .pb-3{padding-bottom:calc(var(--spacing) * 3);}
77
91
  .pl-17\.5{padding-left:calc(var(--spacing) * 17.5);}
78
92
  .pl-4{padding-left:calc(var(--spacing) * 4);}
@@ -81,6 +95,11 @@
81
95
  .pr{padding-right:calc(var(--spacing) * 4);}
82
96
  .pr-1{padding-right:calc(var(--spacing) * 1);}
83
97
  .pr-3{padding-right:calc(var(--spacing) * 3);}
98
+ .pt-1{padding-top:calc(var(--spacing) * 1);}
99
+ .pt-1\.5{padding-top:calc(var(--spacing) * 1.5);}
100
+ .first\:pl-0:first-child{padding-left:calc(var(--spacing) * 0);}
101
+ .last\:pr-0:last-child{padding-right:calc(var(--spacing) * 0);}
102
+ .text-left{text-align:left;}
84
103
  .text-right{text-align:right;}
85
104
  .outline{outline-style:var(--un-outline-style);outline-width:1px;}
86
105
  .outline-none{--un-outline-style:none;outline-style:none;}
@@ -89,6 +108,7 @@
89
108
  .border-border{border-color:color-mix(in srgb, var(--border) var(--un-border-opacity), transparent);}
90
109
  .rounded-\[inherit\]{border-radius:inherit;}
91
110
  .rounded-2xl{border-radius:var(--radius-2xl);}
111
+ .rounded-3xl{border-radius:var(--radius-3xl);}
92
112
  .rounded-full{border-radius:calc(infinity * 1px);}
93
113
  .rounded-lg{border-radius:var(--radius-lg);}
94
114
  .rounded-md{border-radius:var(--radius-md);}
@@ -118,10 +138,12 @@
118
138
  .\[\&\>\*\]\:flex-1>*,
119
139
  .flex-1{flex:1 1 0%;}
120
140
  .shrink-0{flex-shrink:0;}
121
- .last\:shrink-\[100\]:last-child{flex-shrink:100;}
141
+ .last\:shrink:last-child{flex-shrink:1;}
122
142
  .grow{flex-grow:1;}
143
+ .basis-0{flex-basis:calc(var(--spacing) * 0);}
123
144
  .\[\&\>div\]\:flex-col>div,
124
145
  .flex-col{flex-direction:column;}
146
+ .flex-wrap{flex-wrap:wrap;}
125
147
  .gap-0{gap:calc(var(--spacing) * 0);}
126
148
  .gap-0\.5{gap:calc(var(--spacing) * 0.5);}
127
149
  .gap-1{gap:calc(var(--spacing) * 1);}
@@ -131,12 +153,19 @@
131
153
  .gap-3{gap:calc(var(--spacing) * 3);}
132
154
  .gap-4{gap:calc(var(--spacing) * 4);}
133
155
  .gap-5{gap:calc(var(--spacing) * 5);}
156
+ .gap-6{gap:calc(var(--spacing) * 6);}
134
157
  .gap-8{gap:calc(var(--spacing) * 8);}
158
+ .gap-x-8{column-gap:calc(var(--spacing) * 8);}
135
159
  .grid{display:grid;}
160
+ .auto-cols-fr{grid-auto-columns:minmax(0,1fr);}
161
+ .grid-flow-col{grid-auto-flow:column;}
136
162
  .grid-cols-\[1fr_auto_1fr\]{grid-template-columns:1fr auto 1fr;}
163
+ .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr));}
137
164
  .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr));}
165
+ .grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr));}
138
166
  .size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5);}
139
167
  .size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12);}
168
+ .size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2);}
140
169
  .size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5);}
141
170
  .size-20{width:calc(var(--spacing) * 20);height:calc(var(--spacing) * 20);}
142
171
  .size-24{width:calc(var(--spacing) * 24);height:calc(var(--spacing) * 24);}
@@ -144,17 +173,26 @@
144
173
  .size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5);}
145
174
  .size-36{width:calc(var(--spacing) * 36);height:calc(var(--spacing) * 36);}
146
175
  .size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4);}
176
+ .size-44{width:calc(var(--spacing) * 44);height:calc(var(--spacing) * 44);}
177
+ .size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5);}
147
178
  .size-5\.5{width:calc(var(--spacing) * 5.5);height:calc(var(--spacing) * 5.5);}
179
+ .size-52{width:calc(var(--spacing) * 52);height:calc(var(--spacing) * 52);}
148
180
  .size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6);}
149
181
  .size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8);}
150
182
  .size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9);}
151
183
  .size-full{width:100%;height:100%;}
184
+ .\[\&\>div\]\:\!min-w-0>div{min-width:calc(var(--spacing) * 0) !important;}
152
185
  .\[\&\>div\]\:min-h-full>div{min-height:100%;}
153
186
  .h-1{height:calc(var(--spacing) * 1);}
187
+ .h-1\.5{height:calc(var(--spacing) * 1.5);}
188
+ .h-12{height:calc(var(--spacing) * 12);}
154
189
  .h-14{height:calc(var(--spacing) * 14);}
155
190
  .h-24{height:calc(var(--spacing) * 24);}
191
+ .h-28{height:calc(var(--spacing) * 28);}
156
192
  .h-3{height:calc(var(--spacing) * 3);}
157
193
  .h-3\.5{height:calc(var(--spacing) * 3.5);}
194
+ .h-32{height:calc(var(--spacing) * 32);}
195
+ .h-36{height:calc(var(--spacing) * 36);}
158
196
  .h-4{height:calc(var(--spacing) * 4);}
159
197
  .h-5{height:calc(var(--spacing) * 5);}
160
198
  .h-6{height:calc(var(--spacing) * 6);}
@@ -169,23 +207,32 @@
169
207
  .max-w-24{max-width:calc(var(--spacing) * 24);}
170
208
  .min-h-0{min-height:calc(var(--spacing) * 0);}
171
209
  .min-w-0{min-width:calc(var(--spacing) * 0);}
210
+ .min-w-12{min-width:calc(var(--spacing) * 12);}
172
211
  .min-w-full{min-width:100%;}
212
+ .w-\[38\%\]{width:38%;}
173
213
  .w-\[42\%\]{width:42%;}
214
+ .w-\[46\%\]{width:46%;}
174
215
  .w-0\.75{width:calc(var(--spacing) * 0.75);}
175
216
  .w-10{width:calc(var(--spacing) * 10);}
217
+ .w-12{width:calc(var(--spacing) * 12);}
176
218
  .w-15{width:calc(var(--spacing) * 15);}
177
219
  .w-20{width:calc(var(--spacing) * 20);}
220
+ .w-24{width:calc(var(--spacing) * 24);}
178
221
  .w-28{width:calc(var(--spacing) * 28);}
179
222
  .w-36{width:calc(var(--spacing) * 36);}
180
223
  .w-40{width:calc(var(--spacing) * 40);}
224
+ .w-42{width:calc(var(--spacing) * 42);}
225
+ .w-48{width:calc(var(--spacing) * 48);}
181
226
  .w-56{width:calc(var(--spacing) * 56);}
182
227
  .w-6{width:calc(var(--spacing) * 6);}
183
228
  .w-7{width:calc(var(--spacing) * 7);}
184
229
  .w-7\.5{width:calc(var(--spacing) * 7.5);}
230
+ .w-8{width:calc(var(--spacing) * 8);}
185
231
  .w-9{width:calc(var(--spacing) * 9);}
186
232
  .w-full{width:100%;}
187
233
  .w-max{width:max-content;}
188
234
  .aspect-\[16\/10\]{aspect-ratio:16/10;}
235
+ .aspect-\[4\/3\]{aspect-ratio:4/3;}
189
236
  .block{display:block;}
190
237
  .hidden{display:none;}
191
238
  .collapse{visibility:collapse;}
@@ -194,7 +241,10 @@
194
241
  .pointer-events-auto{pointer-events:auto;}
195
242
  .pointer-events-none{pointer-events:none;}
196
243
  .whitespace-nowrap{white-space:nowrap;}
244
+ .whitespace-pre-wrap{white-space:pre-wrap;}
197
245
  .break-words{overflow-wrap:break-word;}
246
+ .break-all{word-break:break-all;}
247
+ .text-balance{text-wrap:balance;}
198
248
  .text-pretty{text-wrap:pretty;}
199
249
  .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
200
250
  .ring,
@@ -217,6 +267,7 @@
217
267
  .items-center{align-items:center;}
218
268
  .items-baseline{align-items:baseline;}
219
269
  .items-stretch{align-items:stretch;}
270
+ .self-stretch{align-self:stretch;}
220
271
  .inset-0{inset:calc(var(--spacing) * 0);}
221
272
  .-inset-x-8{inset-inline:calc(var(--spacing) * -8);}
222
273
  .-inset-y-4{inset-block:calc(var(--spacing) * -4);}
@@ -232,6 +283,7 @@
232
283
  .justify-between{justify-content:space-between;}
233
284
  .absolute{position:absolute;}
234
285
  .relative{position:relative;}
286
+ .sticky{position:sticky;}
235
287
  .-z-1{z-index:-1;}
236
288
  .z-10{z-index:10;}
237
289
  .overflow-hidden{overflow:hidden;}
@@ -246,6 +298,7 @@
246
298
  .blur{--un-blur:blur(8px);filter:var(--un-blur,) var(--un-brightness,) var(--un-contrast,) var(--un-grayscale,) var(--un-hue-rotate,) var(--un-invert,) var(--un-saturate,) var(--un-sepia,) var(--un-drop-shadow,);}
247
299
  .filter{filter:var(--un-blur,) var(--un-brightness,) var(--un-contrast,) var(--un-grayscale,) var(--un-hue-rotate,) var(--un-invert,) var(--un-saturate,) var(--un-sepia,) var(--un-drop-shadow,);}
248
300
  .line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;}
301
+ .line-clamp-8{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:8;}
249
302
  .tabular-nums{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal,) var(--un-slashed-zero,) var(--un-numeric-figure,) var(--un-numeric-spacing,) var(--un-numeric-fraction,);}
250
303
  .text-display{font-size:var(--text-display);line-height:var(--leading-display);}
251
304
  .text-display-compact{font-size:var(--text-display-compact);line-height:var(--leading-display);}
@@ -257,8 +310,15 @@
257
310
  .text-caption{font-size:var(--text-caption);line-height:var(--leading-caption);}
258
311
  .text-caption-compact{font-size:var(--text-caption-compact);line-height:var(--leading-caption);}
259
312
  .text-micro{font-size:var(--text-micro);line-height:var(--leading-micro);}
313
+ .weight-normal{font-variation-settings:var(--weight-normal);}
260
314
  .weight-medium{font-variation-settings:var(--weight-medium);}
261
315
  .weight-semibold{font-variation-settings:var(--weight-semibold);}
262
316
  .weight-bold{font-variation-settings:var(--weight-bold);}
263
317
  .duration-fast{--un-duration:var(--duration-fast);transition-duration:var(--duration-fast);}
318
+ .divide-border{
319
+ :where(&>:not(:last-child)){border-color:color-mix(in srgb, var(--border) var(--un-divide-opacity), transparent);}
320
+ }
321
+ .divide-x{
322
+ :where(&>:not(:last-child)){--un-divide-x-reverse:0;border-left-width:calc(1px * var(--un-divide-x-reverse));border-left-style:var(--un-border-style);border-right-width:calc(1px * calc(1 - var(--un-divide-x-reverse)));border-right-style:var(--un-border-style);}
323
+ }
264
324
  }
@@ -73,6 +73,40 @@ export const CLIPS: ClipboardClip[] = [
73
73
  app: 'Messages',
74
74
  copiedAt: ago(26 * 60),
75
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
+ },
76
110
  ]
77
111
 
78
112
  /** Kept on top: the build command and the color. */
package/mock/clock.tsx CHANGED
@@ -7,7 +7,7 @@
7
7
  'use client'
8
8
 
9
9
  import { useState } from 'react'
10
- import Clock, { type ClockZone, type PomodoroRun } from '../blocks/activities/clock'
10
+ import Clock, { type ClockProps, type ClockZone, type PomodoroRun } from '../blocks/activities/clock'
11
11
  import NowPlaying from '../blocks/activities/now-playing'
12
12
  import { PLAYING } from './artwork'
13
13
  import { FlashIsland, WingsIsland } from './screen'
@@ -40,8 +40,8 @@ export function useRun(...args: Parameters<typeof pomodoroRun>) {
40
40
  }
41
41
 
42
42
  /** The clock in focus, round 2 of 4, 62% to go. */
43
- export function FocusClock() {
44
- return <Clock zones={ZONES} defaultValue={useRun()} />
43
+ export function FocusClock(props: Pick<ClockProps, 'layout' | 'completedToday'>) {
44
+ return <Clock zones={ZONES} defaultValue={useRun()} {...props} />
45
45
  }
46
46
 
47
47
  /** A short break, paused with half of it left. */
package/mock/data.ts CHANGED
@@ -109,6 +109,54 @@ export const EVENTS: AgendaEvent[] = [
109
109
  location: 'Main St 12',
110
110
  color: 'var(--badge-rose)',
111
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
+ },
112
160
  ]
113
161
 
114
162
  /** An event a few minutes out, for the "Up next" activity: it counts down for real. */
package/mock/files.tsx CHANGED
@@ -35,6 +35,19 @@ export const DOWNLOADS: RecentFile[] = [
35
35
  },
36
36
  { id: 'assets', name: 'Assets.zip', size: 36e6, addedAt: ago(26 * 60), source: 'downloads' },
37
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' },
38
51
  ]
39
52
 
40
53
  const pad = (n: number) => String(n).padStart(2, '0')
@@ -47,7 +60,7 @@ function shotName(ms: number) {
47
60
 
48
61
  const VARIANTS = ['aurora', 'dusk', 'night'] as const
49
62
 
50
- export const SCREENSHOTS: RecentFile[] = [3, 15, 22, 64, 140, 300, 1500].map((minutes, i) => ({
63
+ export const SCREENSHOTS: RecentFile[] = [3, 15, 22, 64, 140, 300, 1500, 1620, 2900, 4400, 7300].map((minutes, i) => ({
51
64
  id: `shot-${i}`,
52
65
  name: shotName(ago(minutes)),
53
66
  size: (1.2 + i * 0.35) * 1e6,
@@ -19,6 +19,7 @@ import ClipboardHistory from '../blocks/system/clipboard'
19
19
  import RecentFiles from '../blocks/system/recent-files'
20
20
  import SystemStats from '../blocks/system/system-stats'
21
21
  import Island from '../components/island/island'
22
+ import type { WidgetLayout } from '../components/island/widget'
22
23
  import { ISLAND_STATES, type IslandState } from '../lib/geometry'
23
24
  import { PLAYING } from './artwork'
24
25
  import { CLIP_NOW, CLIPS, PINNED } from './clipboard'
@@ -50,28 +51,48 @@ export function DownloadedFlash() {
50
51
  const noop = () => {}
51
52
 
52
53
  /** Every widget of the open island, by tab value. */
53
- export function widgetFor(tab: string): ReactNode {
54
+ export function widgetFor(tab: string, layout: WidgetLayout = 'fit'): ReactNode {
54
55
  if (tab === 'now-playing')
55
- return <NowPlaying track={PLAYING} defaultShuffle={false} defaultRepeat="all" defaultLiked />
56
- if (tab === 'calendar') return <Agenda events={EVENTS} now={AGENDA_NOW} />
57
- if (tab === 'weather') return <Weather {...FORECAST} onRefresh={noop} />
58
- if (tab === 'clock') return <Clock zones={ZONES} />
56
+ return <NowPlaying track={PLAYING} defaultShuffle={false} defaultRepeat="all" defaultLiked layout={layout} />
57
+ if (tab === 'calendar') return <Agenda events={EVENTS} now={AGENDA_NOW} layout={layout} />
58
+ if (tab === 'weather') return <Weather {...FORECAST} onRefresh={noop} layout={layout} />
59
+ if (tab === 'clock') return <Clock zones={ZONES} completedToday={3} layout={layout} />
59
60
  if (tab === 'system')
60
- return <SystemStats samples={READINGS} battery={BATTERY} disk={DISK} uptime={UPTIME} processes={PROCESSES} />
61
+ return (
62
+ <SystemStats
63
+ samples={READINGS}
64
+ battery={BATTERY}
65
+ disk={DISK}
66
+ uptime={UPTIME}
67
+ processes={PROCESSES}
68
+ layout={layout}
69
+ />
70
+ )
61
71
  if (tab === 'clipboard')
62
- return <ClipboardHistory clips={CLIPS} defaultPinned={PINNED} now={CLIP_NOW} onDelete={noop} />
72
+ return <ClipboardHistory clips={CLIPS} defaultPinned={PINNED} now={CLIP_NOW} onDelete={noop} layout={layout} />
63
73
  if (tab === 'files')
64
74
  return (
65
- <RecentFiles files={RECENT_FILES} now={FILES_NOW} onReveal={noop} onCopy={noop} onDelete={noop} onClear={noop} />
75
+ <RecentFiles
76
+ files={RECENT_FILES}
77
+ now={FILES_NOW}
78
+ onReveal={noop}
79
+ onCopy={noop}
80
+ onDelete={noop}
81
+ onClear={noop}
82
+ layout={layout}
83
+ />
66
84
  )
67
85
  return null
68
86
  }
69
87
 
70
88
  const WIDGET_TABS: ExpandedIslandTab[] = TABS.map(tab => ({ ...tab, content: widgetFor(tab.value) }))
89
+ const TALL_TABS: ExpandedIslandTab[] = TABS.map(tab => ({ ...tab, content: widgetFor(tab.value, 'tall') }))
71
90
 
72
- /** The open island's tabs, a view per widget, with `views` in place of the mock ones. */
73
- export function panelTabs(views: Record<string, ReactNode> = {}): ExpandedIslandTab[] {
74
- return WIDGET_TABS.map(tab => (tab.value in views ? { ...tab, content: views[tab.value] } : tab))
91
+ /** The open island's tabs, a view per widget at `layout`, with `views` in place of the mock ones. */
92
+ export function panelTabs(views: Record<string, ReactNode> = {}, layout: WidgetLayout = 'fit'): ExpandedIslandTab[] {
93
+ return (layout === 'tall' ? TALL_TABS : WIDGET_TABS).map(tab =>
94
+ tab.value in views ? { ...tab, content: views[tab.value] } : tab,
95
+ )
75
96
  }
76
97
 
77
98
  /** The open island: a tab per widget in the wings, settings at the far right. */
@@ -127,14 +148,25 @@ export function IslandPlayground({ defaultState = 'compact' }: { defaultState?:
127
148
  )
128
149
  }
129
150
 
130
- /** The open island on a strip of screen, on `tab`, its view replaced by `children` when given. */
131
- export function WidgetIsland({ tab, children, height = 260 }: { tab: string; children?: ReactNode; height?: number }) {
132
- const tabs = panelTabs(children ? { [tab]: children } : {})
151
+ /** The open island on a strip of screen, on `tab`, its view replaced by `children` when given; `tall` pulls it down to the 560 px sheet. */
152
+ export function WidgetIsland({
153
+ tab,
154
+ children,
155
+ height,
156
+ tall = false,
157
+ }: {
158
+ tab: string
159
+ children?: ReactNode
160
+ height?: number
161
+ tall?: boolean
162
+ }) {
163
+ const tabs = panelTabs(children ? { [tab]: children } : {}, tall ? 'tall' : 'fit')
133
164
  return (
134
- <ScreenEdge height={height}>
165
+ <ScreenEdge height={height ?? (tall ? 580 : 260)}>
135
166
  <Island
136
167
  defaultState="expanded"
137
168
  collapsedState="idle"
169
+ panelHeight={tall ? 560 : undefined}
138
170
  expanded={<ExpandedIsland tabs={tabs} defaultValue={tab} onSettings={() => {}} />}
139
171
  />
140
172
  </ScreenEdge>
package/mock/system.ts CHANGED
@@ -43,4 +43,7 @@ export const PROCESSES: StatsProcess[] = [
43
43
  { id: '1043', name: 'WindowServer', cpu: 0.052, memory: 0.6e9 },
44
44
  { id: '97', name: 'Figma', cpu: 0.031, memory: 1.1e9 },
45
45
  { id: '1520', name: 'Music', cpu: 0.012, memory: 0.3e9 },
46
+ { id: '644', name: 'Slack', cpu: 0.019, memory: 0.8e9 },
47
+ { id: '388', name: 'mds_stores', cpu: 0.024, memory: 0.2e9 },
48
+ { id: '0', name: 'kernel_task', cpu: 0.041, memory: 2.1e9 },
46
49
  ]
package/mock/weather.tsx CHANGED
@@ -31,8 +31,9 @@ export const CURRENT: WeatherNow = {
31
31
  uv: 4,
32
32
  }
33
33
 
34
- // Temperature, condition and chance of rain from 14:00 on: a dry afternoon that turns wet by evening.
35
- const AFTERNOON: [number, WeatherHour['condition'], number][] = [
34
+ // Temperature, condition and chance of rain for a day from 14:00 on: a dry afternoon that turns wet by
35
+ // evening, clears overnight and comes up bright.
36
+ const DAY_AHEAD: [number, WeatherHour['condition'], number][] = [
36
37
  [18.4, 'partly-cloudy', 5],
37
38
  [19.1, 'partly-cloudy', 10],
38
39
  [18.6, 'cloudy', 20],
@@ -41,15 +42,28 @@ const AFTERNOON: [number, WeatherHour['condition'], number][] = [
41
42
  [14.9, 'rain', 80],
42
43
  [14.1, 'drizzle', 40],
43
44
  [13.5, 'cloudy', 20],
45
+ [13.0, 'cloudy', 15],
46
+ [12.6, 'partly-cloudy', 10],
47
+ [12.1, 'partly-cloudy', 5],
48
+ [11.7, 'clear', 0],
49
+ [11.4, 'clear', 0],
50
+ [11.0, 'clear', 0],
51
+ [10.6, 'clear', 0],
52
+ [10.3, 'clear', 0],
53
+ [10.1, 'partly-cloudy', 0],
54
+ [10.4, 'partly-cloudy', 5],
55
+ [11.6, 'partly-cloudy', 5],
56
+ [13.0, 'clear', 0],
57
+ [14.3, 'clear', 0],
58
+ [15.2, 'partly-cloudy', 5],
59
+ [15.9, 'partly-cloudy', 10],
60
+ [16.1, 'cloudy', 20],
44
61
  ]
45
62
 
46
- export const HOURS: WeatherHour[] = AFTERNOON.map(([temperature, condition, precipitation], i) => ({
47
- time: today(14) + i * HOUR,
48
- temperature,
49
- condition,
50
- isDay: 14 + i < 17,
51
- precipitation,
52
- }))
63
+ export const HOURS: WeatherHour[] = DAY_AHEAD.map(([temperature, condition, precipitation], i) => {
64
+ const hour = (14 + i) % 24
65
+ return { time: today(14) + i * HOUR, temperature, condition, isDay: hour >= 7 && hour < 17, precipitation }
66
+ })
53
67
 
54
68
  /** A clear night: the same strip, read at 22:00. */
55
69
  export const NIGHT: { current: WeatherNow; hours: WeatherHour[] } = {
@@ -63,11 +77,27 @@ export const NIGHT: { current: WeatherNow; hours: WeatherHour[] } = {
63
77
  })),
64
78
  }
65
79
 
66
- export const DAYS: WeatherDay[] = [
67
- { date: today(0), condition: 'rain', high: 19.6, low: 11.2, precipitation: 80 },
68
- { date: today(24), condition: 'drizzle', high: 16.1, low: 9.4, precipitation: 40 },
80
+ // The week ahead, today first.
81
+ const WEEK: [WeatherDay['condition'], number, number, number][] = [
82
+ ['rain', 19.6, 11.2, 80],
83
+ ['drizzle', 16.1, 9.4, 40],
84
+ ['partly-cloudy', 17.3, 8.1, 10],
85
+ ['clear', 19.8, 7.6, 0],
86
+ ['cloudy', 15.4, 9.9, 25],
87
+ ['heavy-rain', 12.2, 8.4, 90],
88
+ ['partly-cloudy', 14.6, 6.3, 15],
69
89
  ]
70
90
 
91
+ export const DAYS: WeatherDay[] = WEEK.map(([condition, high, low, precipitation], i) => ({
92
+ date: today(i * 24),
93
+ condition,
94
+ high,
95
+ low,
96
+ precipitation,
97
+ sunrise: today(i * 24 + 6, 58 + i),
98
+ sunset: today(i * 24 + 16, 12 - i),
99
+ }))
100
+
71
101
  /** The forecast for `Weather`'s props. */
72
102
  export const FORECAST = { location: WEATHER_LOCATION, current: CURRENT, hours: HOURS, days: DAYS, now: WEATHER_NOW }
73
103
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justanarthur/modo-ui-notch",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.4.1",
5
5
  "description": "A macOS notch app kit on modo-ui: the island that grows out of the notch (idle, compact, split, expanded, flash), its tabs across the wings and the pieces its activities show. Documented with modo.",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -111,7 +111,7 @@
111
111
  },
112
112
  "devDependencies": {
113
113
  "@justanarthur/modo": "1.1.0",
114
- "@justanarthur/modo-ui": "2.2.0",
114
+ "@justanarthur/modo-ui": "2.3.0",
115
115
  "@types/react": "^18.3.0",
116
116
  "@types/react-dom": "^18.3.0",
117
117
  "bunup": "^0.16.0",