@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.
- package/blocks/activities/agenda/examples.mdx +8 -0
- package/blocks/activities/agenda/index.tsx +164 -16
- package/blocks/activities/clock/examples.mdx +16 -0
- package/blocks/activities/clock/index.tsx +357 -59
- package/blocks/activities/now-playing/examples.mdx +8 -0
- package/blocks/activities/now-playing/index.tsx +140 -54
- package/blocks/activities/weather/examples.mdx +9 -1
- package/blocks/activities/weather/index.tsx +241 -12
- package/blocks/app/expanded-island/index.tsx +3 -1
- package/blocks/app/settings-window/examples.mdx +8 -0
- package/blocks/app/settings-window/index.tsx +8 -3
- package/blocks/system/clipboard/examples.mdx +8 -0
- package/blocks/system/clipboard/index.tsx +262 -52
- package/blocks/system/recent-files/examples.mdx +14 -0
- package/blocks/system/recent-files/index.tsx +110 -25
- package/blocks/system/system-stats/examples.mdx +8 -0
- package/blocks/system/system-stats/index.tsx +211 -4
- package/components/island/widget/index.tsx +34 -0
- package/dist/blocks/activities/agenda/index.d.ts +2 -1
- package/dist/blocks/activities/agenda/index.js +2 -2
- package/dist/blocks/activities/clock/index.d.ts +2 -1
- package/dist/blocks/activities/clock/index.js +2 -2
- package/dist/blocks/activities/now-playing/index.d.ts +2 -1
- package/dist/blocks/activities/now-playing/index.js +2 -2
- package/dist/blocks/activities/weather/index.d.ts +2 -1
- package/dist/blocks/activities/weather/index.js +2 -2
- package/dist/blocks/app/expanded-island/index.d.ts +1 -1
- package/dist/blocks/app/expanded-island/index.js +1 -1
- 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 +2 -1
- package/dist/blocks/system/clipboard/index.js +2 -2
- package/dist/blocks/system/recent-files/index.d.ts +2 -1
- package/dist/blocks/system/recent-files/index.js +2 -2
- package/dist/blocks/system/system-stats/index.d.ts +2 -1
- package/dist/blocks/system/system-stats/index.js +2 -2
- package/dist/components/island/widget/index.d.ts +2 -2
- package/dist/components/island/widget/index.js +3 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.js +12 -10
- package/dist/shared/{chunk-2m5dz8nf.d.ts → chunk-0ym9mcqc.d.ts} +6 -2
- package/dist/shared/{chunk-xq5hc5gv.js → chunk-2b6gpn8k.js} +177 -66
- package/dist/shared/chunk-3hcnf4yx.js +481 -0
- package/dist/shared/{chunk-416tsgbc.d.ts → chunk-42wab62s.d.ts} +23 -1
- package/dist/shared/{chunk-pfhy5e4q.d.ts → chunk-6tnq6p89.d.ts} +2 -0
- package/dist/shared/{chunk-qdzemt2v.js → chunk-93dtpjz7.js} +401 -89
- package/dist/shared/{chunk-da177e8r.d.ts → chunk-a6njb8db.d.ts} +16 -1
- package/dist/shared/{chunk-2818esrq.d.ts → chunk-ab8mdg0n.d.ts} +10 -1
- package/dist/shared/{chunk-3thgcfcq.d.ts → chunk-evqpf92s.d.ts} +18 -1
- package/dist/shared/{chunk-mt0k6v8x.js → chunk-gcyspvgr.js} +147 -39
- package/dist/shared/{chunk-t0hcxh89.d.ts → chunk-gkj0hjrn.d.ts} +12 -0
- package/dist/shared/{chunk-wkg17nxs.d.ts → chunk-n739am8j.d.ts} +13 -2
- package/dist/shared/{chunk-ym0xbses.js → chunk-nwzpekvy.js} +274 -18
- package/dist/shared/{chunk-bvtyjcce.d.ts → chunk-sbrtesdg.d.ts} +16 -1
- package/dist/shared/{chunk-7fvnrtz4.d.ts → chunk-swc7dqpw.d.ts} +12 -2
- package/dist/shared/{chunk-j77cx8dp.js → chunk-t9wqhgzt.js} +325 -58
- package/dist/shared/{chunk-9m0xbg5v.js → chunk-wayv5rhr.js} +1 -1
- package/dist/shared/{chunk-x7f3g82r.js → chunk-wf0jtzhs.js} +12 -2
- package/dist/shared/{chunk-9c7ewvkk.js → chunk-yq5svpk7.js} +162 -19
- package/dist/shared/{chunk-cc9nwbtf.js → chunk-z3tj1ydg.js} +3 -0
- package/dist/styles.css +60 -0
- package/mock/clipboard.tsx +34 -0
- package/mock/clock.tsx +3 -3
- package/mock/data.ts +48 -0
- package/mock/files.tsx +14 -1
- package/mock/island-content.tsx +47 -15
- package/mock/system.ts +3 -0
- package/mock/weather.tsx +42 -12
- package/package.json +1 -1
- 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-
|
|
8
|
+
} from "./chunk-wf0jtzhs.js";
|
|
9
9
|
import {
|
|
10
10
|
SECOND2,
|
|
11
11
|
MINUTE2,
|
|
@@ -27,6 +27,13 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
27
27
|
* as props.
|
|
28
28
|
*/
|
|
29
29
|
var ROWS = 3;
|
|
30
|
+
var WEEK = 7;
|
|
31
|
+
var addDays = (ms, days) => {
|
|
32
|
+
const date = new Date(ms);
|
|
33
|
+
date.setDate(date.getDate() + days);
|
|
34
|
+
return date.getTime();
|
|
35
|
+
};
|
|
36
|
+
var covers = (event, start, end) => event.start < end && event.end > start;
|
|
30
37
|
var time = (ms, locale) => new Date(ms).toLocaleTimeString(locale, { hour: "numeric", minute: "2-digit" });
|
|
31
38
|
function timeParts(ms, locale) {
|
|
32
39
|
const parts = new Intl.DateTimeFormat(locale, { hour: "numeric", minute: "2-digit" }).formatToParts(ms);
|
|
@@ -79,8 +86,9 @@ function When({ event, now, midnight, locale }) {
|
|
|
79
86
|
unit: "min"
|
|
80
87
|
});
|
|
81
88
|
const { value, period } = timeParts(event.start, locale);
|
|
89
|
+
const prefix = event.start >= addDays(midnight, 1) ? new Date(event.start).toLocaleDateString(locale, { weekday: "long" }) : event.start >= midnight ? "Tomorrow" : "at";
|
|
82
90
|
return /* @__PURE__ */ jsx(widget_default.Figure, {
|
|
83
|
-
prefix
|
|
91
|
+
prefix,
|
|
84
92
|
value,
|
|
85
93
|
unit: period
|
|
86
94
|
});
|
|
@@ -151,6 +159,83 @@ function Rows({ events, locale }) {
|
|
|
151
159
|
children: event.title
|
|
152
160
|
}, event.id));
|
|
153
161
|
}
|
|
162
|
+
function Entry({ event, locale, onJoin }) {
|
|
163
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
164
|
+
className: "flex min-w-0 items-center gap-2.5 py-1.5",
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ jsxs("span", {
|
|
167
|
+
className: "flex w-15 shrink-0 flex-col whitespace-nowrap text-caption tabular-nums",
|
|
168
|
+
children: [
|
|
169
|
+
/* @__PURE__ */ jsx("span", {
|
|
170
|
+
className: "text-foreground",
|
|
171
|
+
children: time(event.start, locale)
|
|
172
|
+
}),
|
|
173
|
+
/* @__PURE__ */ jsx("span", {
|
|
174
|
+
className: "text-muted-foreground",
|
|
175
|
+
children: time(event.end, locale)
|
|
176
|
+
})
|
|
177
|
+
]
|
|
178
|
+
}),
|
|
179
|
+
/* @__PURE__ */ jsx("span", {
|
|
180
|
+
"aria-hidden": true,
|
|
181
|
+
className: "w-0.75 shrink-0 self-stretch rounded-full",
|
|
182
|
+
style: { backgroundColor: event.color }
|
|
183
|
+
}),
|
|
184
|
+
/* @__PURE__ */ jsxs("span", {
|
|
185
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
186
|
+
children: [
|
|
187
|
+
/* @__PURE__ */ jsx("span", {
|
|
188
|
+
className: "truncate text-body text-foreground",
|
|
189
|
+
children: event.title
|
|
190
|
+
}),
|
|
191
|
+
/* @__PURE__ */ jsxs(widget_default.Meta, {
|
|
192
|
+
children: [
|
|
193
|
+
/* @__PURE__ */ jsx(widget_default.MetaItem, {
|
|
194
|
+
icon: Clock,
|
|
195
|
+
children: length(event.end - event.start)
|
|
196
|
+
}),
|
|
197
|
+
event.meetingUrl && /* @__PURE__ */ jsx(widget_default.MetaItem, {
|
|
198
|
+
icon: Video,
|
|
199
|
+
children: "Video call"
|
|
200
|
+
}),
|
|
201
|
+
event.location && /* @__PURE__ */ jsx(widget_default.MetaItem, {
|
|
202
|
+
icon: MapPin,
|
|
203
|
+
children: event.location
|
|
204
|
+
})
|
|
205
|
+
]
|
|
206
|
+
})
|
|
207
|
+
]
|
|
208
|
+
}),
|
|
209
|
+
event.meetingUrl && /* @__PURE__ */ jsx(Button, {
|
|
210
|
+
variant: "secondary",
|
|
211
|
+
size: "compact",
|
|
212
|
+
leadingIcon: Video,
|
|
213
|
+
onClick: () => onJoin?.(event),
|
|
214
|
+
children: "Join"
|
|
215
|
+
})
|
|
216
|
+
]
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
function Day({ label, events, allDay = [], empty, locale, onJoin }) {
|
|
220
|
+
return /* @__PURE__ */ jsxs(widget_default.Section, {
|
|
221
|
+
label,
|
|
222
|
+
trailing: allDay.map((event) => /* @__PURE__ */ jsx(widget_default.Chip, {
|
|
223
|
+
color: event.color,
|
|
224
|
+
children: event.title
|
|
225
|
+
}, event.id)),
|
|
226
|
+
children: [
|
|
227
|
+
events.map((event) => /* @__PURE__ */ jsx(Entry, {
|
|
228
|
+
event,
|
|
229
|
+
locale,
|
|
230
|
+
onJoin
|
|
231
|
+
}, event.id)),
|
|
232
|
+
!events.length && empty && /* @__PURE__ */ jsx("span", {
|
|
233
|
+
className: "flex h-7 items-center text-body text-muted-foreground",
|
|
234
|
+
children: empty
|
|
235
|
+
})
|
|
236
|
+
]
|
|
237
|
+
});
|
|
238
|
+
}
|
|
154
239
|
function More({ count }) {
|
|
155
240
|
if (count <= 0)
|
|
156
241
|
return null;
|
|
@@ -261,6 +346,7 @@ var Agenda2 = Object.assign(function Agenda({
|
|
|
261
346
|
onRequestAccess,
|
|
262
347
|
onOpenSettings,
|
|
263
348
|
onJoin,
|
|
349
|
+
layout = "fit",
|
|
264
350
|
className
|
|
265
351
|
}) {
|
|
266
352
|
const ticking = useEdgeClock2(0, nowProp === undefined, MINUTE2);
|
|
@@ -294,7 +380,8 @@ var Agenda2 = Object.assign(function Agenda({
|
|
|
294
380
|
});
|
|
295
381
|
const midnight = new Date(now).setHours(24, 0, 0, 0);
|
|
296
382
|
const next = new Date(midnight).setHours(24, 0, 0, 0);
|
|
297
|
-
const
|
|
383
|
+
const until = layout === "tall" ? addDays(midnight, WEEK - 1) : next;
|
|
384
|
+
const live = events.filter((event) => event.end > now && event.start < until).sort((a, b) => a.start - b.start);
|
|
298
385
|
const allDay = live.filter((event) => event.allDay && event.start < midnight);
|
|
299
386
|
const timed = live.filter((event) => !event.allDay);
|
|
300
387
|
const [hero] = timed;
|
|
@@ -306,9 +393,78 @@ var Agenda2 = Object.assign(function Agenda({
|
|
|
306
393
|
className
|
|
307
394
|
});
|
|
308
395
|
const today = timed.filter((event) => event !== hero && event.start < midnight);
|
|
309
|
-
const tomorrow = timed.filter((event) => event !== hero && event.start >= midnight);
|
|
396
|
+
const tomorrow = timed.filter((event) => event !== hero && event.start >= midnight && event.start < next);
|
|
310
397
|
const tomorrowShown = tomorrowOpen ? tomorrow.slice(0, ROWS) : tomorrow.slice(0, 1);
|
|
311
398
|
const date = new Date(now).toLocaleDateString(locale, { weekday: "long", month: "long", day: "numeric" });
|
|
399
|
+
const header = /* @__PURE__ */ jsx(widget_default.Header, {
|
|
400
|
+
icon: CalendarDays,
|
|
401
|
+
trailing: allDay.map((event) => /* @__PURE__ */ jsx(widget_default.Chip, {
|
|
402
|
+
color: event.color,
|
|
403
|
+
children: event.title
|
|
404
|
+
}, event.id)),
|
|
405
|
+
children: date
|
|
406
|
+
});
|
|
407
|
+
const heroBlock = /* @__PURE__ */ jsx(Hero, {
|
|
408
|
+
event: hero,
|
|
409
|
+
now,
|
|
410
|
+
midnight,
|
|
411
|
+
locale,
|
|
412
|
+
onJoin
|
|
413
|
+
});
|
|
414
|
+
if (layout === "tall") {
|
|
415
|
+
const later = Array.from({ length: WEEK - 2 }, (_, i) => {
|
|
416
|
+
const start = addDays(next, i);
|
|
417
|
+
const end = addDays(next, i + 1);
|
|
418
|
+
return {
|
|
419
|
+
start,
|
|
420
|
+
events: timed.filter((event) => event !== hero && event.start >= start && event.start < end),
|
|
421
|
+
allDay: live.filter((event) => event.allDay && covers(event, start, end))
|
|
422
|
+
};
|
|
423
|
+
}).filter((day) => day.events.length || day.allDay.length);
|
|
424
|
+
return /* @__PURE__ */ jsxs(widget_default.Sheet, {
|
|
425
|
+
className,
|
|
426
|
+
children: [
|
|
427
|
+
/* @__PURE__ */ jsxs("div", {
|
|
428
|
+
className: "flex min-w-0 flex-col gap-2",
|
|
429
|
+
children: [
|
|
430
|
+
header,
|
|
431
|
+
heroBlock
|
|
432
|
+
]
|
|
433
|
+
}),
|
|
434
|
+
/* @__PURE__ */ jsxs("div", {
|
|
435
|
+
className: "flex min-w-0 flex-col gap-3",
|
|
436
|
+
children: [
|
|
437
|
+
/* @__PURE__ */ jsx(Day, {
|
|
438
|
+
label: "Later today",
|
|
439
|
+
events: today,
|
|
440
|
+
empty: "Nothing else today",
|
|
441
|
+
locale,
|
|
442
|
+
onJoin
|
|
443
|
+
}),
|
|
444
|
+
/* @__PURE__ */ jsx(Day, {
|
|
445
|
+
label: "Tomorrow",
|
|
446
|
+
events: tomorrow,
|
|
447
|
+
allDay: live.filter((event) => event.allDay && covers(event, midnight, next)),
|
|
448
|
+
empty: "Nothing planned",
|
|
449
|
+
locale,
|
|
450
|
+
onJoin
|
|
451
|
+
}),
|
|
452
|
+
later.map((day) => /* @__PURE__ */ jsx(Day, {
|
|
453
|
+
label: new Date(day.start).toLocaleDateString(locale, {
|
|
454
|
+
weekday: "long",
|
|
455
|
+
month: "long",
|
|
456
|
+
day: "numeric"
|
|
457
|
+
}),
|
|
458
|
+
events: day.events,
|
|
459
|
+
allDay: day.allDay,
|
|
460
|
+
locale,
|
|
461
|
+
onJoin
|
|
462
|
+
}, day.start))
|
|
463
|
+
]
|
|
464
|
+
})
|
|
465
|
+
]
|
|
466
|
+
});
|
|
467
|
+
}
|
|
312
468
|
return /* @__PURE__ */ jsxs(widget_default, {
|
|
313
469
|
className,
|
|
314
470
|
aside: /* @__PURE__ */ jsxs(Fragment, {
|
|
@@ -353,21 +509,8 @@ var Agenda2 = Object.assign(function Agenda({
|
|
|
353
509
|
]
|
|
354
510
|
}),
|
|
355
511
|
children: [
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
trailing: allDay.map((event) => /* @__PURE__ */ jsx(widget_default.Chip, {
|
|
359
|
-
color: event.color,
|
|
360
|
-
children: event.title
|
|
361
|
-
}, event.id)),
|
|
362
|
-
children: date
|
|
363
|
-
}),
|
|
364
|
-
/* @__PURE__ */ jsx(Hero, {
|
|
365
|
-
event: hero,
|
|
366
|
-
now,
|
|
367
|
-
midnight,
|
|
368
|
-
locale,
|
|
369
|
-
onJoin
|
|
370
|
-
})
|
|
512
|
+
header,
|
|
513
|
+
heroBlock
|
|
371
514
|
]
|
|
372
515
|
});
|
|
373
516
|
}, {
|
|
@@ -219,6 +219,7 @@ function SettingsWindow2({
|
|
|
219
219
|
permissions = [],
|
|
220
220
|
onOpenPermission,
|
|
221
221
|
about = [],
|
|
222
|
+
flush = false,
|
|
222
223
|
className
|
|
223
224
|
}) {
|
|
224
225
|
const [page, setPage] = useControllableState(value, defaultValue, onValueChange);
|
|
@@ -241,6 +242,7 @@ function SettingsWindow2({
|
|
|
241
242
|
children: /* @__PURE__ */ jsxs(Sidebar.Content, {
|
|
242
243
|
children: [
|
|
243
244
|
/* @__PURE__ */ jsxs(Sidebar.Group, {
|
|
245
|
+
className: cn(flush && "pl-0"),
|
|
244
246
|
children: [
|
|
245
247
|
/* @__PURE__ */ jsx(Sidebar.GroupLabel, {
|
|
246
248
|
children: name
|
|
@@ -257,6 +259,7 @@ function SettingsWindow2({
|
|
|
257
259
|
]
|
|
258
260
|
}),
|
|
259
261
|
withSettings.length > 0 && /* @__PURE__ */ jsxs(Sidebar.Group, {
|
|
262
|
+
className: cn(flush && "pl-0"),
|
|
260
263
|
children: [
|
|
261
264
|
/* @__PURE__ */ jsx(Sidebar.GroupLabel, {
|
|
262
265
|
children: "Plugin settings"
|
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);}
|
|
@@ -120,8 +140,10 @@
|
|
|
120
140
|
.shrink-0{flex-shrink:0;}
|
|
121
141
|
.last\:shrink-\[100\]:last-child{flex-shrink:100;}
|
|
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
|
}
|
package/mock/clipboard.tsx
CHANGED
|
@@ -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,
|