@justanarthur/modo-ui-notch 0.2.0 → 0.3.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 +21 -5
- package/blocks/activities/agenda/index.tsx +291 -182
- package/blocks/activities/clock/examples.mdx +73 -0
- package/blocks/activities/clock/index.tsx +619 -0
- package/blocks/activities/now-playing/examples.mdx +32 -13
- package/blocks/activities/now-playing/index.tsx +319 -126
- package/blocks/activities/weather/examples.mdx +115 -0
- package/blocks/activities/weather/index.tsx +634 -0
- package/blocks/app/expanded-island/examples.mdx +8 -7
- package/blocks/app/expanded-island/index.tsx +19 -3
- package/blocks/app/settings-window/examples.mdx +6 -2
- package/blocks/app/settings-window/index.tsx +25 -7
- package/blocks/system/clipboard/examples.mdx +83 -0
- package/blocks/system/clipboard/index.tsx +563 -0
- package/blocks/system/recent-files/examples.mdx +66 -0
- package/blocks/system/recent-files/index.tsx +542 -0
- package/blocks/system/system-stats/examples.mdx +38 -9
- package/blocks/system/system-stats/index.tsx +241 -107
- 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 +431 -0
- package/dist/blocks/activities/agenda/index.d.ts +1 -1
- package/dist/blocks/activities/agenda/index.js +3 -3
- package/dist/blocks/activities/clock/index.d.ts +2 -0
- package/dist/blocks/activities/clock/index.js +25 -0
- package/dist/blocks/activities/now-playing/index.d.ts +3 -2
- package/dist/blocks/activities/now-playing/index.js +5 -3
- package/dist/blocks/activities/weather/index.d.ts +2 -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 +2 -0
- package/dist/blocks/system/clipboard/index.js +17 -0
- package/dist/blocks/system/recent-files/index.d.ts +2 -0
- package/dist/blocks/system/recent-files/index.js +19 -0
- package/dist/blocks/system/system-stats/index.d.ts +2 -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 +30 -0
- package/dist/index.d.ts +15 -15
- package/dist/index.js +102 -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-2818esrq.d.ts +140 -0
- package/dist/shared/{chunk-yngkkxz2.d.ts → chunk-2m5dz8nf.d.ts} +4 -4
- package/dist/shared/chunk-3thgcfcq.d.ts +151 -0
- package/dist/shared/chunk-416tsgbc.d.ts +175 -0
- package/dist/shared/{chunk-zvh0d3qb.js → chunk-61t2dfte.js} +1 -1
- package/dist/shared/chunk-7fvnrtz4.d.ts +105 -0
- package/dist/shared/{chunk-hpsabfsd.d.ts → chunk-81fpptwp.d.ts} +1 -1
- package/dist/shared/chunk-9c7ewvkk.js +381 -0
- package/dist/shared/{chunk-mp1nx0ez.js → chunk-9m0xbg5v.js} +14 -3
- package/dist/shared/{chunk-wwjxs75m.js → chunk-9xtcv3sy.js} +26 -12
- package/dist/shared/chunk-bvtyjcce.d.ts +123 -0
- package/dist/shared/{chunk-s33y1pcq.js → chunk-cc9nwbtf.js} +20 -10
- package/dist/shared/chunk-da177e8r.d.ts +114 -0
- package/dist/shared/{chunk-6c1jbefs.d.ts → chunk-fexwzycv.d.ts} +3 -3
- package/dist/shared/chunk-gejenfap.d.ts +25 -0
- package/dist/shared/{chunk-rr5e0g15.d.ts → chunk-j755a1a5.d.ts} +7 -1
- package/dist/shared/chunk-j77cx8dp.js +498 -0
- package/dist/shared/chunk-mt0k6v8x.js +474 -0
- package/dist/shared/{chunk-78w7qwp0.js → chunk-ndf79pv5.js} +1 -1
- package/dist/shared/{chunk-9nhpg9t8.d.ts → chunk-pfhy5e4q.d.ts} +7 -1
- package/dist/shared/chunk-qdzemt2v.js +477 -0
- package/dist/shared/{chunk-rpfwv3pz.js → chunk-r471sknr.js} +1 -1
- package/dist/shared/chunk-s2jeqqan.js +243 -0
- package/dist/shared/chunk-t0hcxh89.d.ts +124 -0
- package/dist/shared/chunk-w5h6ay93.js +72 -0
- package/dist/shared/chunk-wkg17nxs.d.ts +101 -0
- package/dist/shared/chunk-x7f3g82r.js +285 -0
- package/dist/shared/chunk-xq5hc5gv.js +333 -0
- package/dist/shared/{chunk-sbnrhy5m.js → chunk-y0188bbn.js} +2 -2
- package/dist/shared/chunk-ym0xbses.js +518 -0
- package/dist/styles.css +97 -55
- 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 +79 -0
- package/mock/clock.tsx +77 -0
- package/mock/data.ts +30 -44
- package/mock/files.tsx +70 -0
- package/mock/island-content.tsx +43 -118
- package/mock/screen.tsx +76 -0
- package/mock/settings.tsx +370 -91
- package/mock/system.ts +46 -0
- package/mock/weather.tsx +105 -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
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ export function NotchPanel({ state, onStateChange }) {
|
|
|
40
40
|
expandOnHover
|
|
41
41
|
leading={<Artwork />}
|
|
42
42
|
trailing={<Equalizer playing />}
|
|
43
|
-
flash={<IslandFlash title="
|
|
43
|
+
flash={<IslandFlash title="Focus done" caption="A short break next" value="5 min" tone="success" />}
|
|
44
44
|
expanded={<Panel />}
|
|
45
45
|
/>
|
|
46
46
|
)
|
|
@@ -52,20 +52,20 @@ export function NotchPanel({ state, onStateChange }) {
|
|
|
52
52
|
| `Island` | The black outline hanging from the top edge, its five states, the compact wings, the split bubble that melts off through modo-ui's goo, the content swap. `state` / `defaultState` / `onStateChange`; geometry from `notchWidth`, `notchHeight`, `panelWidth`, `panelHeight`. |
|
|
53
53
|
| `IslandTabs` | Icon tabs in both wings around the notch, modo-ui's liquid indicator crossing the gap; overflow scrolls behind the notch. `value` / `defaultValue` / `onValueChange`, `onHoverChange` for a title preview. |
|
|
54
54
|
| `IslandFlash` | The transient alert's layout: icon, title, caption, value, trailing glyph, action. |
|
|
55
|
+
| `Widget` | The frame every open-island widget is built in (picture, main column, aside past a hairline) and its parts: `.Header`, `.Title`, `.Subtitle`, `.Figure`, `.Meta` / `.MetaItem`, `.Action`, `.Section`, `.Row`, `.Chip`, `.Message`. |
|
|
55
56
|
| `Equalizer` | Now-playing level bars on a compositor-only Web Animations loop. |
|
|
56
|
-
| `
|
|
57
|
-
| `MediaScrubber` | Elapsed / scrubber / remaining on modo-ui's Slider; seeks once on commit. |
|
|
57
|
+
| `MediaScrubber` | Elapsed / scrubber / remaining on modo-ui's Slider; seeks once on commit; `quiet` is a thin line until hovered. |
|
|
58
58
|
| `Countdown` | Time left as `4:05` or `4m`, re-rendering only on the shown unit's edge. |
|
|
59
|
-
| `NowPlaying` | The player for the open island, with `.Leading` / `.Trailing` (compact wings), `.Minimal` (split bubble), `.Flash` (track change) and `.Artwork`. |
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `SystemStats` | CPU, memory and network tiles with sparklines; `.Leading`, `.Trailing`. |
|
|
59
|
+
| `NowPlaying` | The player for the open island (artwork that never blinks, tinted glow, scrubber, transport, source and output, shuffle / repeat / like), with `.Leading` / `.Trailing` (compact wings), `.Minimal` (split bubble), `.Flash` (track change) and `.Artwork`. |
|
|
60
|
+
| `Agenda` | The next event as the hero (countdown, Join), the rest of today and tomorrow beside it, access states; `.Leading`, `.Trailing`, `.Minimal`, `.UpNext`, `.Starting` (the countdown to the next event). |
|
|
61
|
+
| `Weather` | The temperature now as the hero, the next hours and tomorrow beside it, °C / °F, loading, offline, error and location-access states; `.Leading`, `.Trailing`, `.Minimal`, `.Alert` (rain soon, a warning); `conditionFromCode` reads a WMO code. |
|
|
62
|
+
| `Clock` | The time, the date and world clocks, and a Pomodoro cycle that takes the widget over while it runs (pause, skip, +1 min, reset); `.Leading`, `.Trailing`, `.Minimal`, `.PhaseDone` (focus done, break over); `startPomodoro`, `advancePomodoro`, `resumePomodoro`. |
|
|
63
|
+
| `SystemStats` | The CPU load (or memory pressure) as the hero with its trend, battery, disk and uptime under it, the busiest processes beside it; `.Leading`, `.Trailing`, `.Minimal`. |
|
|
64
|
+
| `ClipboardHistory` | The latest clip as the hero (text, link, image, color, file), the searchable history beside it with pins, pause and ignored apps; `.Leading`, `.Trailing`, `.Copied`. |
|
|
65
|
+
| `RecentFiles` | The newest download or screenshot as the hero, ready to open, reveal, copy or drag out, the ones before it beside it, a download under way; `.Leading`, `.Trailing`, `.Minimal`, `.Saved`. |
|
|
67
66
|
| `ExpandedIsland` | The open island's layout: tabs in the wings, the tab's title, a fixed-height scrolling view. |
|
|
68
67
|
| `SettingsWindow` | The app's settings: General, Plugins, Permissions, About and each plugin's page. |
|
|
68
|
+
| `useStableArtwork`, `useArtworkTint` | Artwork held across updates and the tint read from an image (`@justanarthur/modo-ui-notch/lib/artwork`). |
|
|
69
69
|
| `useIsland()` | The enclosing Island's state, notch and panel geometry and current outline. |
|
|
70
70
|
| `shapeFor`, `islandPath`, `stripLayout`, … | The pure geometry (`@justanarthur/modo-ui-notch/lib/geometry`). |
|
|
71
71
|
|
|
@@ -5,12 +5,28 @@ import { AGENDA_NOW, EVENTS } from '../../../mock/data'
|
|
|
5
5
|
|
|
6
6
|
# Today and tomorrow
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The next event as the hero, how soon set large, with Join for a call; the rest of today beside it, tomorrow folded to its first event, today's all-day events as chips on the date line.
|
|
9
9
|
|
|
10
10
|
<WidgetIsland tab="calendar">
|
|
11
11
|
<Agenda events={EVENTS} now={AGENDA_NOW} />
|
|
12
12
|
</WidgetIsland>
|
|
13
13
|
|
|
14
|
+
# In progress
|
|
15
|
+
|
|
16
|
+
While an event runs the hero says `Now` and how long is left.
|
|
17
|
+
|
|
18
|
+
<WidgetIsland tab="calendar">
|
|
19
|
+
<Agenda events={EVENTS} now={AGENDA_NOW + 65 * 60_000} defaultTomorrowOpen />
|
|
20
|
+
</WidgetIsland>
|
|
21
|
+
|
|
22
|
+
# Later today
|
|
23
|
+
|
|
24
|
+
More than an hour out, the hero is the start time.
|
|
25
|
+
|
|
26
|
+
<WidgetIsland tab="calendar">
|
|
27
|
+
<Agenda events={EVENTS} now={AGENDA_NOW + 5 * 60 * 60_000} />
|
|
28
|
+
</WidgetIsland>
|
|
29
|
+
|
|
14
30
|
# Nothing planned
|
|
15
31
|
|
|
16
32
|
<WidgetIsland tab="calendar">
|
|
@@ -27,13 +43,13 @@ Each calendar's color as a dot, the start time, the place, and Join for a video
|
|
|
27
43
|
|
|
28
44
|
# Access off
|
|
29
45
|
|
|
30
|
-
`access="denied"`
|
|
46
|
+
`access="denied"` says where to turn it on.
|
|
31
47
|
|
|
32
48
|
<WidgetIsland tab="calendar">
|
|
33
49
|
<Agenda events={[]} access="denied" />
|
|
34
50
|
</WidgetIsland>
|
|
35
51
|
|
|
36
|
-
#
|
|
52
|
+
# Compact
|
|
37
53
|
|
|
38
54
|
The next event a few minutes out: `Agenda.Leading` and `Agenda.Trailing` count down in the wings.
|
|
39
55
|
|
|
@@ -41,13 +57,13 @@ The next event a few minutes out: `Agenda.Leading` and `Agenda.Trailing` count d
|
|
|
41
57
|
|
|
42
58
|
# Minimal
|
|
43
59
|
|
|
44
|
-
`Agenda.Minimal
|
|
60
|
+
`Agenda.Minimal`, a ring in the event's color, empties toward the start in the split island's bubble.
|
|
45
61
|
|
|
46
62
|
<AgendaSplit />
|
|
47
63
|
|
|
48
64
|
# Up next, open
|
|
49
65
|
|
|
50
|
-
`Agenda.UpNext
|
|
66
|
+
`Agenda.UpNext`, the hero on its own in the open island.
|
|
51
67
|
|
|
52
68
|
<UpNextIsland />
|
|
53
69
|
|