@liberation-data/desk 0.41.0 → 0.43.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 +152 -9
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/scheme.d.ts +12 -0
- package/dist/core/scheme.d.ts.map +1 -0
- package/dist/core/scheme.js +15 -0
- package/dist/core/scheme.js.map +1 -0
- package/dist/core/types.d.ts +6 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/css/apps.css +149 -0
- package/dist/css/controls.css +21 -2
- package/dist/css/dock.css +1 -1
- package/dist/css/looks.css +50 -4
- package/dist/css/overlays.css +6 -0
- package/dist/css/tokens.css +1 -0
- package/dist/css/windows.css +173 -5
- package/dist/desk.css +401 -12
- package/dist/react/Desktop.d.ts +12 -3
- package/dist/react/Desktop.d.ts.map +1 -1
- package/dist/react/Desktop.js +29 -9
- package/dist/react/Desktop.js.map +1 -1
- package/dist/react/Dock.d.ts +6 -1
- package/dist/react/Dock.d.ts.map +1 -1
- package/dist/react/Dock.js +9 -1
- package/dist/react/Dock.js.map +1 -1
- package/dist/react/MenuBar.d.ts +8 -1
- package/dist/react/MenuBar.d.ts.map +1 -1
- package/dist/react/MenuBar.js +34 -5
- package/dist/react/MenuBar.js.map +1 -1
- package/dist/react/app.d.ts +174 -0
- package/dist/react/app.d.ts.map +1 -0
- package/dist/react/app.js +146 -0
- package/dist/react/app.js.map +1 -0
- package/dist/react/appPanels.d.ts +22 -0
- package/dist/react/appPanels.d.ts.map +1 -0
- package/dist/react/appPanels.js +114 -0
- package/dist/react/appPanels.js.map +1 -0
- package/dist/react/appearance.d.ts +55 -0
- package/dist/react/appearance.d.ts.map +1 -0
- package/dist/react/appearance.js +140 -0
- package/dist/react/appearance.js.map +1 -0
- package/dist/react/arrange.d.ts +6 -0
- package/dist/react/arrange.d.ts.map +1 -1
- package/dist/react/arrange.js +21 -0
- package/dist/react/arrange.js.map +1 -1
- package/dist/react/codeBlock.d.ts.map +1 -1
- package/dist/react/codeBlock.js +6 -60
- package/dist/react/codeBlock.js.map +1 -1
- package/dist/react/context.d.ts +9 -1
- package/dist/react/context.d.ts.map +1 -1
- package/dist/react/context.js +47 -3
- package/dist/react/context.js.map +1 -1
- package/dist/react/copy.d.ts +22 -0
- package/dist/react/copy.d.ts.map +1 -0
- package/dist/react/copy.js +68 -0
- package/dist/react/copy.js.map +1 -0
- package/dist/react/documentTitle.d.ts.map +1 -1
- package/dist/react/documentTitle.js +4 -1
- package/dist/react/documentTitle.js.map +1 -1
- package/dist/react/index.d.ts +10 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +7 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/layers.d.ts.map +1 -1
- package/dist/react/layers.js +7 -2
- package/dist/react/layers.js.map +1 -1
- package/dist/react/overlays.d.ts.map +1 -1
- package/dist/react/overlays.js +29 -12
- package/dist/react/overlays.js.map +1 -1
- package/dist/react/shell.d.ts +4 -1
- package/dist/react/shell.d.ts.map +1 -1
- package/dist/react/shell.js +2 -2
- package/dist/react/shell.js.map +1 -1
- package/dist/react/tabs.d.ts +7 -1
- package/dist/react/tabs.d.ts.map +1 -1
- package/dist/react/tabs.js +13 -8
- package/dist/react/tabs.js.map +1 -1
- package/dist/react/widgets.d.ts +33 -0
- package/dist/react/widgets.d.ts.map +1 -0
- package/dist/react/widgets.js +213 -0
- package/dist/react/widgets.js.map +1 -0
- package/llms.txt +75 -8
- package/package.json +1 -1
- package/src/core/index.ts +2 -0
- package/src/core/scheme.ts +21 -0
- package/src/core/types.ts +6 -0
- package/src/css/apps.css +149 -0
- package/src/css/controls.css +21 -2
- package/src/css/dock.css +1 -1
- package/src/css/looks.css +50 -4
- package/src/css/overlays.css +6 -0
- package/src/css/tokens.css +1 -0
- package/src/css/windows.css +173 -5
- package/src/react/Desktop.tsx +50 -12
- package/src/react/Dock.tsx +11 -1
- package/src/react/MenuBar.tsx +38 -5
- package/src/react/app.tsx +284 -0
- package/src/react/appPanels.tsx +197 -0
- package/src/react/appearance.tsx +204 -0
- package/src/react/arrange.ts +23 -0
- package/src/react/codeBlock.tsx +7 -65
- package/src/react/context.tsx +55 -3
- package/src/react/copy.ts +81 -0
- package/src/react/documentTitle.ts +4 -1
- package/src/react/index.ts +30 -1
- package/src/react/layers.ts +7 -2
- package/src/react/overlays.tsx +30 -12
- package/src/react/shell.tsx +5 -2
- package/src/react/tabs.tsx +23 -10
- package/src/react/widgets.tsx +265 -0
package/README.md
CHANGED
|
@@ -107,7 +107,8 @@ Most windows want the whole desk when filled and whatever they are dragged to wh
|
|
|
107
107
|
what `null` says. A window whose content has a natural size — an About box, a short form — says so
|
|
108
108
|
and is never stretched past it, however it is filled, arranged or dragged; filled, it sits in the
|
|
109
109
|
middle of the room it was given rather than in a corner of it. `minWidth` and `minHeight` work the
|
|
110
|
-
same way.
|
|
110
|
+
same way. `fitContent` makes such a window as tall as its content, up to `maxHeight`, while it sits in the
|
|
111
|
+
middle, so a short form is not a tall window with room to spare under it; longer content scrolls inside it.
|
|
111
112
|
|
|
112
113
|
### What a window is looking at
|
|
113
114
|
|
|
@@ -119,8 +120,8 @@ same way.
|
|
|
119
120
|
/>
|
|
120
121
|
```
|
|
121
122
|
|
|
122
|
-
`info` puts an (i)
|
|
123
|
-
keeps it in the same place, so somebody who wonders what they are looking at always knows where to ask;
|
|
123
|
+
`info` puts an (i) on the far edge of the title bar, opposite the controls — at the end on a Mac, at the
|
|
124
|
+
start on GNOME and Windows — holding what this window is. Every window that has one keeps it in the same place, so somebody who wonders what they are looking at always knows where to ask;
|
|
124
125
|
a window with nothing to explain has none. Explanation only, as with `InfoTip` — a warning belongs in the
|
|
125
126
|
window itself.
|
|
126
127
|
|
|
@@ -230,6 +231,56 @@ a menu stays reachable, so something that can no longer open can still be remove
|
|
|
230
231
|
A stack can be kept the same way: `dockStack({ …, movable: true, contextMenu })` takes drops, is carried
|
|
231
232
|
along the dock, and offers its own right-click menu.
|
|
232
233
|
|
|
234
|
+
## Widgets
|
|
235
|
+
|
|
236
|
+
Glances on the desk itself, for state that is always there and is not worth a window: what is loaded, a
|
|
237
|
+
job's progress, a connection. Each opens the window it is about, which says the same in full.
|
|
238
|
+
|
|
239
|
+
```tsx
|
|
240
|
+
const widgets: Widget[] = [
|
|
241
|
+
{
|
|
242
|
+
id: 'due',
|
|
243
|
+
label: 'Service',
|
|
244
|
+
content: <><Led color="amber" /> 2 jobs due</>,
|
|
245
|
+
onSelect: () => desk.open('service'),
|
|
246
|
+
},
|
|
247
|
+
{ id: 'distance', label: 'This fortnight', content: <b>231 km</b>, onSelect: () => desk.open('rides') },
|
|
248
|
+
]
|
|
249
|
+
|
|
250
|
+
<Desktop title={id => TITLES[id]} renderWindow={renderWindow} widgets={widgets} />
|
|
251
|
+
|
|
252
|
+
// The Window menu: "Widgets in front", a tick for each.
|
|
253
|
+
{ id: 'window', label: 'Window', items: () => [
|
|
254
|
+
menuCommand('Arrange', DeskCommands.arrange, { shortcut: 'mod+alt+a' }),
|
|
255
|
+
...(widgets.length ? [menuSeparator(), ...widgetMenuItems(widgets)] : []),
|
|
256
|
+
] }
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
They stack in a corner of the desk, `top-right` unless `widgetCorner` says `top-left`, `bottom-left` or
|
|
260
|
+
`bottom-right`, in the order given, clear of the dock wherever `<Desktop>` does. Each is as tall as its content
|
|
261
|
+
and `--desk-widget-width` (200px) wide; more than the desk is tall scroll. A desk 640px wide or less, or 400px
|
|
262
|
+
tall or less, and the one-window-at-a-time layout, show none.
|
|
263
|
+
|
|
264
|
+
**Behind the windows** is where they are, on the desk surface. `widgetMenuItems(widgets)` gives the Window
|
|
265
|
+
menu a "Widgets in front" header and a checkable item for each (`menuitemcheckbox`); a tick keeps that widget
|
|
266
|
+
in front of the windows, in a frame of the dock's glass around an opaque surface, and nearest the corner, ahead of
|
|
267
|
+
those behind; it is remembered in this browser under `desk.widgets.<id>`.
|
|
268
|
+
`isWidgetInFront(id)`, `setWidgetInFront(id, front)` and `useWidgetsInFront()` read and change the same choice.
|
|
269
|
+
It returns nothing when there are no widgets, so the section goes with them. Window → Arrange leaves the corner of
|
|
270
|
+
the widgets in front to them, taking a column or a strip along the edge, whichever leaves the windows more room,
|
|
271
|
+
and the strip stops where the widgets behind begin, so the windows cover those whole; widgets behind take nothing.
|
|
272
|
+
|
|
273
|
+
With `onSelect` a widget is a button, so its `content` holds no controls of its own; without it, it only
|
|
274
|
+
shows. `label` says what it is: it is read before the content and not drawn, so don't repeat it there; it is
|
|
275
|
+
also the widget's name in the Window menu. A widget behind the windows that a window covers is `inert`, so Tab
|
|
276
|
+
and a screen reader pass it by; one with no window over it, or kept in front, can be reached. Those that can be
|
|
277
|
+
clicked are one tab stop, with the arrow keys along them; Escape goes back to the key window. A widget taken
|
|
278
|
+
away while it has the keyboard hands it to the next one, or to the key window, and so does one a window comes
|
|
279
|
+
over.
|
|
280
|
+
|
|
281
|
+
Nothing is read out as content changes. `announce` is said, politely, when it changes: give it for what
|
|
282
|
+
somebody would want to hear, such as "Backup finished", and not for every percent of the way there.
|
|
283
|
+
|
|
233
284
|
## Inside a window: a pane
|
|
234
285
|
|
|
235
286
|
```tsx
|
|
@@ -339,7 +390,9 @@ tab stop whose arrow keys move the selection past disabled options. Its selectio
|
|
|
339
390
|
than the track on a dark ground and on a light one, which slides to the option chosen. Tabs look similar and are not the same
|
|
340
391
|
thing: a segmented control chooses a value and what it governs stays on screen, while tabs switch the view
|
|
341
392
|
beneath them, which sits in a panel the selected tab names. `actions` puts controls for the whole window,
|
|
342
|
-
such as Refresh, at the end of the strip, so a window with tabs needs no header row above them. A
|
|
393
|
+
such as Refresh, at the end of the strip, so a window with tabs needs no header row above them. A tab that
|
|
394
|
+
can't be chosen yet takes `disabled`, or a string saying why (`disabled: 'Waiting for the aerial photo'`),
|
|
395
|
+
which a screen reader hears and a pointer sees on hover. A toggle is a `switch` for settings that
|
|
343
396
|
apply at once — a checkbox is for one that waits for Save. A text field always has a label (`labelHidden`
|
|
344
397
|
keeps it for screen readers), and an `error` marks it invalid and replaces the help text. A choice group
|
|
345
398
|
is the handful of cards a setup step turns on — an icon, a label, a line of why — with native radios
|
|
@@ -751,7 +804,7 @@ it. All three overlays trap focus, give it back on close, and answer Escape topm
|
|
|
751
804
|
## Menu bar
|
|
752
805
|
|
|
753
806
|
```tsx
|
|
754
|
-
import { MenuBar, menuAction, menuCommand, menuSeparator, windowMenuItems } from '@liberation-data/desk/react'
|
|
807
|
+
import { MenuBar, menuAction, menuCommand, menuSeparator, widgetMenuItems, windowMenuItems } from '@liberation-data/desk/react'
|
|
755
808
|
|
|
756
809
|
<MenuBar
|
|
757
810
|
leading={<AppMark />}
|
|
@@ -760,6 +813,7 @@ import { MenuBar, menuAction, menuCommand, menuSeparator, windowMenuItems } from
|
|
|
760
813
|
menuCommand('Settings…', 'app.settings', { shortcut: 'mod+comma' })] },
|
|
761
814
|
{ id: 'window', label: 'Window', items: () => [ // a function: re-read each time it opens
|
|
762
815
|
menuCommand('Arrange', DeskCommands.arrange),
|
|
816
|
+
...(widgets.length ? [menuSeparator(), ...widgetMenuItems(widgets)] : []), // "Widgets in front"
|
|
763
817
|
menuSeparator(),
|
|
764
818
|
...windowMenuItems(desk.getState(), desk.focus, titleOf),
|
|
765
819
|
] },
|
|
@@ -834,6 +888,93 @@ opens the item's context menu. With `drag`, an icon can be carried to a drop tar
|
|
|
834
888
|
With `drag`, every icon can be picked up except one whose item says `draggable: false`: something no
|
|
835
889
|
target would take stays where it is.
|
|
836
890
|
|
|
891
|
+
## Settings and About
|
|
892
|
+
|
|
893
|
+
```tsx
|
|
894
|
+
const GARAGE: DeskApp = {
|
|
895
|
+
name: 'Garage',
|
|
896
|
+
icon: <GarageMark />,
|
|
897
|
+
version: '2.1.0',
|
|
898
|
+
description: 'Rides, bikes and what they need next.',
|
|
899
|
+
links: [{ label: 'Website', url: 'https://example.com' }, { label: 'Report an Issue…', url: 'https://example.com/issues' }],
|
|
900
|
+
facts: useRunningFacts, // optional: a hook returning AboutSection[], or null while reading
|
|
901
|
+
settings: { sections: [
|
|
902
|
+
{ id: 'units', title: 'Units', content: <Units /> },
|
|
903
|
+
{ id: 'reminders', title: 'Reminders', content: <Reminders /> },
|
|
904
|
+
] },
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
<DeskShell desk={desk} app={GARAGE}>…</DeskShell>
|
|
908
|
+
```
|
|
909
|
+
|
|
910
|
+
Every app has an About and many have Settings, and each used to wire up its own: a gear in the dock, a
|
|
911
|
+
menu item, ⌘, and a window of the right size. Declared once, Desk puts them where every Desk app has
|
|
912
|
+
them. The dock's system group (the entries after `dockSeparator('system')`, or a group of its own when
|
|
913
|
+
there is none) ends with the gear and then About. The app menu, the first with `emphasis`, starts with
|
|
914
|
+
"About Garage", a separator and "Settings…" with ⌘,. Each opens as a panel of one size, centred, and is
|
|
915
|
+
brought forward if it is open already. ⌘, is bound on the Settings command itself, so it works in an app with
|
|
916
|
+
no `MenuBar`; the menu item shows it and does not bind it again.
|
|
917
|
+
|
|
918
|
+
**An app with no settings shows none of it**: no gear, no menu item and no ⌘,, as a Mac app without
|
|
919
|
+
preferences leaves the item out. About is always there, built from the name, icon, version and links.
|
|
920
|
+
`legal` adds the small print at its foot.
|
|
921
|
+
|
|
922
|
+
`facts` is what is running, for a bug report: engines, versions, the machine. It is a hook, called inside
|
|
923
|
+
the About panel, so it can read state and follow it; return `null` while it is still being read, and `[]`
|
|
924
|
+
when there is nothing to report. With facts, About has **Copy**, which copies the name, the version and every
|
|
925
|
+
fact as text. A fact with `copy: false` is shown and not copied: a path with someone's name in it, an
|
|
926
|
+
account. Never put a key or a password in a fact. A fact's `note` says what someone might want to know of it,
|
|
927
|
+
and its `link` (`{ label, url }`, as the app's links are) where to read more; neither is copied. The names of
|
|
928
|
+
every section line up in one column. `note` on the declaration is a short line under the links, also not
|
|
929
|
+
copied, for what this build cannot say: that the desktop app reports what is running, and this is a browser.
|
|
930
|
+
|
|
931
|
+
A handful of settings sit on one page. Many take `layout: 'sidebar'`: a list of sections, grouped by each
|
|
932
|
+
section's `group`, beside the one chosen, in a bigger window. Sections may change while the app runs, such
|
|
933
|
+
as a group that grows as plugins are installed. A section's `id` is its route, so
|
|
934
|
+
`useOpenSettings()('plugins')` opens Settings on it, as the gear does, and the address says where Settings
|
|
935
|
+
is. `openAbout(desk)` opens About as the dock does, for a link that names it. The one-page panel and About are
|
|
936
|
+
as tall as their content, up to the panel's height.
|
|
937
|
+
`badge` puts a count on the gear, as on any dock item.
|
|
938
|
+
|
|
939
|
+
The gear goes just before About unless the app puts `dockSettings()` somewhere else among its system
|
|
940
|
+
items. The app's own items keep their order.
|
|
941
|
+
|
|
942
|
+
An app whose Settings window is its own code keeps it: `settings: { open: route => … }` and the gear, the
|
|
943
|
+
menu item and ⌘, call that instead, and Desk draws no window. `<SettingsContent />` draws the declared
|
|
944
|
+
sections inside a window of the app's, if it wants them.
|
|
945
|
+
|
|
946
|
+
### Appearance
|
|
947
|
+
|
|
948
|
+
```tsx
|
|
949
|
+
settings: { appearance: true } // light, dark or the system's
|
|
950
|
+
settings: { appearance: { scheme: true, look: true, sounds: fx, theme: <Palette /> }, sections }
|
|
951
|
+
```
|
|
952
|
+
|
|
953
|
+
Desk owns the theme and the look, so it can offer them as a ready-made first section of Settings, and a
|
|
954
|
+
small app whose only setting is how it looks gets a Settings window with nothing written. The app chooses
|
|
955
|
+
the rows: `scheme` (light, dark or follow the system), `look` (the window chrome: automatic, Mac, GNOME or
|
|
956
|
+
Windows), `sounds` (the one `SoundsToggle` for its `createFx`), and `theme`, a slot for a picker of its own.
|
|
957
|
+
An app whose named themes decide light or dark leaves `scheme` out.
|
|
958
|
+
|
|
959
|
+
Both choices are remembered in this browser, under `desk.scheme` and `desk.look` (`COLOR_SCHEME_KEY` and
|
|
960
|
+
`LOOK_KEY`, for an app moving a choice it kept under its own key). The scheme is `data-theme`
|
|
961
|
+
on the root, which the stylesheet already reads, and the chosen look stands in for the one the app passes.
|
|
962
|
+
`useColorScheme()` and `useLookChoice()` follow them, for an app that tells a native shell or themes
|
|
963
|
+
something of its own. Put `COLOR_SCHEME_SCRIPT` in the page's `<head>` so a dark choice does not open light
|
|
964
|
+
for a moment while the app loads. The keys and the script are in the core entry too, which has no React, for
|
|
965
|
+
a layout rendered on a server.
|
|
966
|
+
|
|
967
|
+
An app that **receives** its theme from a host, such as one in an `AppFrame` given a `theme`, does not
|
|
968
|
+
choose it: the scheme, the look and the theme slot are neither offered nor applied, and only sounds stay.
|
|
969
|
+
Desk finds this from the bridge once the first theme arrives; `themeFromHost` on the declaration says it
|
|
970
|
+
outright. The app that is the theme's source keeps them all. If that leaves no section, the gear and the
|
|
971
|
+
menu item go too.
|
|
972
|
+
|
|
973
|
+
The window ids are `settings` and `about`, and Desk draws and names those two (`settings` only for an app that declares settings without an `open` of its own). A Window menu's title function
|
|
974
|
+
can name them with `appWindowTitle(GARAGE, id)`; `useDocumentTitle` already does. With a `host`, About and
|
|
975
|
+
Settings… are published with the other menus, and the host owns ⌘, as it owns every `mod` shortcut, so
|
|
976
|
+
they are in the native menu once and the key works once.
|
|
977
|
+
|
|
837
978
|
## Commands and the responder chain
|
|
838
979
|
|
|
839
980
|
Some commands name no target — Copy, Close, Find. They go to whoever is responsible, the way AppKit's
|
|
@@ -969,9 +1110,10 @@ import '@liberation-data/desk/css/overlays.css' // popovers, sheets, alerts, to
|
|
|
969
1110
|
import '@liberation-data/desk/css/conversation.css'
|
|
970
1111
|
import '@liberation-data/desk/css/search.css'
|
|
971
1112
|
import '@liberation-data/desk/css/setup.css' // the wizard and tours
|
|
972
|
-
import '@liberation-data/desk/css/apps.css' // app frames and dragging between windows
|
|
1113
|
+
import '@liberation-data/desk/css/apps.css' // app frames, About and Settings, and dragging between windows
|
|
973
1114
|
import '@liberation-data/desk/css/looks.css' // GNOME and Windows chrome: last, it restyles the rest
|
|
974
|
-
``` Light and dark follow `prefers-color-scheme`, and `data-theme="light|dark"` on the root wins.
|
|
1115
|
+
``` Light and dark follow `prefers-color-scheme`, and `data-theme="light|dark"` on the root wins. [Appearance](#appearance) lets
|
|
1116
|
+
the person choose, and sets it.
|
|
975
1117
|
|
|
976
1118
|
## Looks
|
|
977
1119
|
|
|
@@ -994,7 +1136,8 @@ are drawn: that is the look. It is separate from the theme, so every look comes
|
|
|
994
1136
|
`auto` reads the device: Macs, iPhones and iPads get `mac`, Windows gets `windows`, Linux and ChromeOS get
|
|
995
1137
|
`gnome`, and anything else gets `mac`. The look is set as `data-look` on the root, so menus and popovers
|
|
996
1138
|
portalled out of the desk get it too. The desk does not remember a choice: keep it where the app keeps its
|
|
997
|
-
other preferences and pass it back in, as the garage sample's Settings does
|
|
1139
|
+
other preferences and pass it back in, as the garage sample's Settings does, or offer the `look` row of
|
|
1140
|
+
[Appearance](#appearance), which remembers it for you.
|
|
998
1141
|
|
|
999
1142
|
A look changes chrome, not brand: it never touches `--desk-accent` or `--desk-ground`. Nor the keyboard —
|
|
1000
1143
|
somebody on a Mac who picks the GNOME look still presses ⌘, and menus still say so. An app drawing chrome
|
|
@@ -1043,7 +1186,7 @@ npm install
|
|
|
1043
1186
|
npm test # vitest
|
|
1044
1187
|
npm run typecheck
|
|
1045
1188
|
npm run example # the Garage sample in examples/garage
|
|
1046
|
-
npm run size # the gzipped budget: core
|
|
1189
|
+
npm run size # the gzipped budget: core 17 KiB, react 88, css 24, fx 5
|
|
1047
1190
|
npm run check # everything CI runs
|
|
1048
1191
|
npm run check:browser # the generated-app bridge in real Chrome, against a running sample
|
|
1049
1192
|
npm run build # dist/
|
package/dist/core/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export type { Bus, DeskEvent, EventHandler, InputDescription, SubscribeOptions }
|
|
|
11
11
|
export { bindShortcuts, formatShortcut, isApplePlatform, isInstalledApp, matchesShortcut, parseShortcut } from './shortcuts.js';
|
|
12
12
|
export type { Keymap, Shortcut, ShortcutOptions } from './shortcuts.js';
|
|
13
13
|
export { deviceLook, lookFor, resolveLook } from './look.js';
|
|
14
|
+
export { COLOR_SCHEME_KEY, COLOR_SCHEME_SCRIPT, LOOK_KEY } from './scheme.js';
|
|
15
|
+
export type { ColorScheme } from './scheme.js';
|
|
14
16
|
export type { Look, LookChoice } from './look.js';
|
|
15
17
|
export { parse, serialize, syncWithLocation } from './location.js';
|
|
16
18
|
export { isTitleCase, titleCase } from './titles.js';
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,WAAW,EACX,SAAS,EACT,WAAW,EACX,WAAW,EACX,MAAM,EACN,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,OAAO,EACP,UAAU,EACV,KAAK,GACN,MAAM,WAAW,CAAA;AAClB,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,UAAU,EACV,YAAY,EACZ,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,aAAa,GACd,MAAM,eAAe,CAAA;AACtB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC5F,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACtD,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAClF,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACnF,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,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W,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACnE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC5D,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACjE,YAAY,EACV,cAAc,EACd,WAAW,EACX,SAAS,EACT,UAAU,EACV,KAAK,EACL,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,MAAM,YAAY,CAAA"}
|
package/dist/core/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export { attended, attentionOn, becomesNews, watchAttention } from './attention.
|
|
|
5
5
|
export { createBus, InputCommands, topicMatches } from './events.js';
|
|
6
6
|
export { bindShortcuts, formatShortcut, isApplePlatform, isInstalledApp, matchesShortcut, parseShortcut } from './shortcuts.js';
|
|
7
7
|
export { deviceLook, lookFor, resolveLook } from './look.js';
|
|
8
|
+
export { COLOR_SCHEME_KEY, COLOR_SCHEME_SCRIPT, LOOK_KEY } from './scheme.js';
|
|
8
9
|
export { parse, serialize, syncWithLocation } from './location.js';
|
|
9
10
|
export { isTitleCase, titleCase } from './titles.js';
|
|
10
11
|
export { fitFrame, localLayoutStore, stepFrom } from './layouts.js';
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,WAAW,EACX,SAAS,EACT,WAAW,EACX,WAAW,EACX,MAAM,EACN,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,OAAO,EACP,UAAU,EACV,KAAK,GACN,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,UAAU,EACV,YAAY,EACZ,OAAO,EACP,eAAe,E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AW,EAAE,MAAM,WAAW,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAG7E,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Light, dark, or the system's, which the stylesheet follows through `prefers-color-scheme`. */
|
|
2
|
+
export type ColorScheme = 'system' | 'light' | 'dark';
|
|
3
|
+
/** Where the chosen colour scheme is kept in localStorage: `light` or `dark`; absent for the system's. */
|
|
4
|
+
export declare const COLOR_SCHEME_KEY = "desk.scheme";
|
|
5
|
+
/** Where the chosen look is kept in localStorage: `auto`, `mac`, `gnome` or `windows`; absent while the app's own stands. */
|
|
6
|
+
export declare const LOOK_KEY = "desk.look";
|
|
7
|
+
/**
|
|
8
|
+
* For the page's `<head>`, before anything paints: the remembered scheme on the root as `data-theme`, so a dark
|
|
9
|
+
* choice does not open light for a moment while the app loads.
|
|
10
|
+
*/
|
|
11
|
+
export declare const COLOR_SCHEME_SCRIPT: string;
|
|
12
|
+
//# sourceMappingURL=scheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheme.d.ts","sourceRoot":"","sources":["../../src/core/scheme.ts"],"names":[],"mappings":"AAMA,iGAAiG;AACjG,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;AAErD,0GAA0G;AAC1G,eAAO,MAAM,gBAAgB,gBAAgB,CAAA;AAE7C,6HAA6H;AAC7H,eAAO,MAAM,QAAQ,cAAc,CAAA;AAEnC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QACiI,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The colour scheme and the look a person chooses in Settings' Appearance, as this browser keeps them. They
|
|
3
|
+
* are here, with no React, for a page's server-rendered `<head>` and for an app moving a choice it kept under
|
|
4
|
+
* a key of its own: write it to these keys once, and Appearance shows and applies it.
|
|
5
|
+
*/
|
|
6
|
+
/** Where the chosen colour scheme is kept in localStorage: `light` or `dark`; absent for the system's. */
|
|
7
|
+
export const COLOR_SCHEME_KEY = 'desk.scheme';
|
|
8
|
+
/** Where the chosen look is kept in localStorage: `auto`, `mac`, `gnome` or `windows`; absent while the app's own stands. */
|
|
9
|
+
export const LOOK_KEY = 'desk.look';
|
|
10
|
+
/**
|
|
11
|
+
* For the page's `<head>`, before anything paints: the remembered scheme on the root as `data-theme`, so a dark
|
|
12
|
+
* choice does not open light for a moment while the app loads.
|
|
13
|
+
*/
|
|
14
|
+
export const COLOR_SCHEME_SCRIPT = `try{var s=localStorage.getItem(${JSON.stringify(COLOR_SCHEME_KEY)});if(s=="light"||s=="dark")document.documentElement.setAttribute("data-theme",s)}catch(e){}`;
|
|
15
|
+
//# sourceMappingURL=scheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheme.js","sourceRoot":"","sources":["../../src/core/scheme.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,0GAA0G;AAC1G,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAA;AAE7C,6HAA6H;AAC7H,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAA;AAEnC;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAC9B,kCAAkC,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,6FAA6F,CAAA"}
|
package/dist/core/types.d.ts
CHANGED
|
@@ -71,5 +71,11 @@ export interface WindowLimits {
|
|
|
71
71
|
readonly minHeight?: number;
|
|
72
72
|
readonly maxWidth?: number;
|
|
73
73
|
readonly maxHeight?: number;
|
|
74
|
+
/**
|
|
75
|
+
* As tall as its content, up to `maxHeight`, while it sits centred: a short form is not a tall window with
|
|
76
|
+
* room to spare under it. Taller content scrolls inside it as usual. A window dragged or resized free takes
|
|
77
|
+
* the height it is given.
|
|
78
|
+
*/
|
|
79
|
+
readonly fitContent?: boolean;
|
|
74
80
|
}
|
|
75
81
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/core/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE/C,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAA;AAE7B,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,MAAM,UAAU;AACpB,oDAAoD;AAClD;IAAE,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAA;AAE/E,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;AAE3C,MAAM,WAAW,SAAS;IACxB,0HAA0H;IAC1H,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;IACvC,8E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EAAE,OAAO,CAAA;CAC9B"}
|
package/dist/css/apps.css
CHANGED
|
@@ -55,3 +55,152 @@
|
|
|
55
55
|
border: 0;
|
|
56
56
|
background: var(--desk-surface);
|
|
57
57
|
}
|
|
58
|
+
|
|
59
|
+
/* ── About and Settings, from what the app declares ── */
|
|
60
|
+
|
|
61
|
+
.desk-about-body {
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: var(--desk-space-4);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.desk-about-brand {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: var(--desk-space-1);
|
|
72
|
+
text-align: center;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.desk-about-icon {
|
|
76
|
+
display: grid;
|
|
77
|
+
place-items: center;
|
|
78
|
+
width: 96px;
|
|
79
|
+
height: 96px;
|
|
80
|
+
margin-bottom: var(--desk-space-2);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.desk-about-icon > svg,
|
|
84
|
+
.desk-about-icon > img {
|
|
85
|
+
width: 100%;
|
|
86
|
+
height: 100%;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.desk-about-name {
|
|
90
|
+
margin: 0;
|
|
91
|
+
font-size: var(--desk-text-display);
|
|
92
|
+
font-weight: 600;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.desk-about-version,
|
|
96
|
+
.desk-about-description {
|
|
97
|
+
margin: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.desk-about-links {
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-wrap: wrap;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
gap: var(--desk-space-2) var(--desk-space-4);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.desk-about-links a {
|
|
108
|
+
color: var(--desk-accent);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/*
|
|
112
|
+
* Name and value in two columns; a note sits under its value. Every section shares one grid, through
|
|
113
|
+
* subgrid, so the names are one column down the whole panel, as wide as the longest of them.
|
|
114
|
+
*/
|
|
115
|
+
.desk-about-sections {
|
|
116
|
+
display: grid;
|
|
117
|
+
grid-template-columns: max-content minmax(0, 1fr);
|
|
118
|
+
column-gap: var(--desk-space-3);
|
|
119
|
+
row-gap: var(--desk-space-4);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.desk-about-sections > section {
|
|
123
|
+
grid-column: 1 / -1;
|
|
124
|
+
display: grid;
|
|
125
|
+
grid-template-columns: subgrid;
|
|
126
|
+
/* normal: the panel's column gap, so a section's own gap does not shift its values off the column. */
|
|
127
|
+
column-gap: normal;
|
|
128
|
+
row-gap: var(--desk-space-2);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.desk-about-sections > section > * {
|
|
132
|
+
grid-column: 1 / -1;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.desk-about-facts {
|
|
136
|
+
display: grid;
|
|
137
|
+
grid-template-columns: subgrid;
|
|
138
|
+
column-gap: normal;
|
|
139
|
+
row-gap: var(--desk-space-1);
|
|
140
|
+
margin: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* A browser without subgrid: each section is its own grid, and a floor under the names keeps them close. */
|
|
144
|
+
@supports not (grid-template-columns: subgrid) {
|
|
145
|
+
.desk-about-facts {
|
|
146
|
+
grid-template-columns: max-content minmax(0, 1fr);
|
|
147
|
+
column-gap: var(--desk-space-3);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.desk-about-facts dt {
|
|
151
|
+
min-width: 9rem;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.desk-about-facts > div {
|
|
156
|
+
display: contents;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.desk-about-facts dt {
|
|
160
|
+
color: var(--desk-muted);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.desk-about-facts dd {
|
|
164
|
+
margin: 0;
|
|
165
|
+
overflow-wrap: anywhere;
|
|
166
|
+
user-select: text;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.desk-about-fact-note {
|
|
170
|
+
display: block;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.desk-about-note {
|
|
174
|
+
margin: 0;
|
|
175
|
+
text-align: center;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.desk-about-legal {
|
|
179
|
+
margin: 0;
|
|
180
|
+
text-align: center;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.desk-about-foot {
|
|
184
|
+
display: flex;
|
|
185
|
+
align-items: center;
|
|
186
|
+
gap: var(--desk-space-3);
|
|
187
|
+
padding: var(--desk-space-3) var(--desk-space-4);
|
|
188
|
+
border-top: 1px solid var(--desk-rule);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* What Copy copies, out of sight: selected in place of the panel where there is no clipboard. */
|
|
192
|
+
.desk-about-copied {
|
|
193
|
+
position: absolute;
|
|
194
|
+
width: 1px;
|
|
195
|
+
height: 1px;
|
|
196
|
+
margin: -1px;
|
|
197
|
+
overflow: hidden;
|
|
198
|
+
clip-path: inset(50%);
|
|
199
|
+
white-space: pre;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.desk-settings-page {
|
|
203
|
+
display: flex;
|
|
204
|
+
flex-direction: column;
|
|
205
|
+
gap: var(--desk-space-5);
|
|
206
|
+
}
|
package/dist/css/controls.css
CHANGED
|
@@ -816,7 +816,7 @@
|
|
|
816
816
|
transition: background .12s var(--desk-ease), color .12s var(--desk-ease);
|
|
817
817
|
}
|
|
818
818
|
|
|
819
|
-
.desk-tab:hover:not(:disabled):not([aria-selected="true"]) {
|
|
819
|
+
.desk-tab:hover:not(:disabled):not([aria-disabled="true"]):not([aria-selected="true"]) {
|
|
820
820
|
background: color-mix(in srgb, var(--desk-ink) 6%, transparent);
|
|
821
821
|
color: var(--desk-ink);
|
|
822
822
|
}
|
|
@@ -832,11 +832,30 @@
|
|
|
832
832
|
outline-offset: -2px;
|
|
833
833
|
}
|
|
834
834
|
|
|
835
|
-
.desk-tab:disabled
|
|
835
|
+
.desk-tab:disabled,
|
|
836
|
+
.desk-tab[aria-disabled="true"] {
|
|
836
837
|
opacity: .45;
|
|
837
838
|
cursor: default;
|
|
838
839
|
}
|
|
839
840
|
|
|
841
|
+
/* An unavailable tab the arrows stop on: the ring is drawn in full, the label stays dimmed. */
|
|
842
|
+
.desk-tab[aria-disabled="true"]:focus-visible {
|
|
843
|
+
opacity: 1;
|
|
844
|
+
color: color-mix(in srgb, var(--desk-muted) 45%, transparent);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
/* Why a tab is unavailable: read by a screen reader, shown to a pointer as the tab's title. */
|
|
848
|
+
.desk-tab-why {
|
|
849
|
+
position: absolute;
|
|
850
|
+
width: 1px;
|
|
851
|
+
height: 1px;
|
|
852
|
+
margin: -1px;
|
|
853
|
+
padding: 0;
|
|
854
|
+
overflow: hidden;
|
|
855
|
+
clip-path: inset(50%);
|
|
856
|
+
white-space: nowrap;
|
|
857
|
+
}
|
|
858
|
+
|
|
840
859
|
.desk-tab-badge {
|
|
841
860
|
min-width: 18px;
|
|
842
861
|
padding: 0 5px;
|
package/dist/css/dock.css
CHANGED
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
height: 100%;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
/* A dot for "a window is open", brighter when it has focus. */
|
|
224
|
+
/* A dot for "a window is open", brighter when it has focus: a 4px dot 2px off its tile. */
|
|
225
225
|
.desk-dock-item[data-running]::after {
|
|
226
226
|
content: "";
|
|
227
227
|
position: absolute;
|
package/dist/css/looks.css
CHANGED
|
@@ -50,11 +50,20 @@
|
|
|
50
50
|
font-size: var(--desk-text-small);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
/*
|
|
54
|
-
|
|
53
|
+
/*
|
|
54
|
+
* The end of the bar is the controls', so the (i) is at its start, on the far edge (it is first in the
|
|
55
|
+
* document). It takes the spare room after it, and nothing else in the bar reaches for any: an auto
|
|
56
|
+
* margin on both sides of it would centre it in the room, under the heading.
|
|
57
|
+
*/
|
|
58
|
+
[data-look="gnome"] .desk-titlebar > .desk-popover-anchor:has(> .desk-window-info) {
|
|
59
|
+
margin-left: 0;
|
|
55
60
|
margin-right: auto;
|
|
56
61
|
}
|
|
57
62
|
|
|
63
|
+
[data-look="gnome"] .desk-window-actions {
|
|
64
|
+
margin-left: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
58
67
|
/*
|
|
59
68
|
* The middle is the heading's, so the count waits at the end of the bar, before the controls, and
|
|
60
69
|
* the heading keeps clear of both. A narrow bar keeps the count and lets the track go.
|
|
@@ -62,6 +71,7 @@
|
|
|
62
71
|
[data-look="gnome"] .desk-window-progress {
|
|
63
72
|
position: static;
|
|
64
73
|
transform: none;
|
|
74
|
+
margin-left: 0;
|
|
65
75
|
}
|
|
66
76
|
|
|
67
77
|
[data-look="gnome"] .desk-titlebar[data-progress] .desk-titlebar-heading {
|
|
@@ -139,6 +149,11 @@
|
|
|
139
149
|
height: 5px;
|
|
140
150
|
}
|
|
141
151
|
|
|
152
|
+
/* The (i) is first in the document, at the start of the bar: the end is the controls'. */
|
|
153
|
+
[data-look="windows"] .desk-titlebar > .desk-popover-anchor:has(> .desk-window-info) {
|
|
154
|
+
margin-left: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
142
157
|
[data-look="windows"] .desk-title {
|
|
143
158
|
flex: 1 1 auto;
|
|
144
159
|
font-size: var(--desk-text-small);
|
|
@@ -191,7 +206,8 @@
|
|
|
191
206
|
* inside them, come out dark too — as the shell's own menus do.
|
|
192
207
|
*/
|
|
193
208
|
[data-look="gnome"] .desk-menubar,
|
|
194
|
-
[data-look="gnome"] .desk-dock
|
|
209
|
+
[data-look="gnome"] .desk-dock,
|
|
210
|
+
[data-look="gnome"] .desk-widget[data-front] {
|
|
195
211
|
--desk-ink: #ffffff;
|
|
196
212
|
--desk-muted: rgb(255 255 255 / 68%);
|
|
197
213
|
--desk-surface: #2a2a2a;
|
|
@@ -226,8 +242,13 @@
|
|
|
226
242
|
color: var(--desk-ink);
|
|
227
243
|
}
|
|
228
244
|
|
|
229
|
-
|
|
245
|
+
/* A widget kept in front is the dash's material too. */
|
|
246
|
+
[data-look="gnome"] .desk-dock,
|
|
247
|
+
[data-look="gnome"] .desk-widget[data-front] {
|
|
230
248
|
--desk-dock-glass: rgb(24 24 24 / 86%);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
[data-look="gnome"] .desk-dock {
|
|
231
252
|
border-radius: 20px;
|
|
232
253
|
}
|
|
233
254
|
|
|
@@ -236,6 +257,31 @@
|
|
|
236
257
|
border-radius: 12px;
|
|
237
258
|
}
|
|
238
259
|
|
|
260
|
+
/*
|
|
261
|
+
* The running dot by the glyph, as GNOME's dash has it: its tiles are transparent, so 3px off a tile no one sees is out
|
|
262
|
+
* by the dock's edge. The glyph is 46% of its item, centred (a stack's 72%), so its edge is 27% (14%) in; the 4px dot
|
|
263
|
+
* stands 4px off that, on whichever side the dock is.
|
|
264
|
+
*/
|
|
265
|
+
[data-look="gnome"] .desk-dock {
|
|
266
|
+
--desk-dock-dot-glyph: calc(27% - 8px);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
[data-look="gnome"] .desk-dock .desk-dock-item[data-stack] {
|
|
270
|
+
--desk-dock-dot-glyph: calc(14% - 8px);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
[data-look="gnome"] .desk-dock[data-side="bottom"] .desk-dock-item[data-running]::after {
|
|
274
|
+
bottom: var(--desk-dock-dot-glyph);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
[data-look="gnome"] .desk-dock[data-side="left"] .desk-dock-item[data-running]::after {
|
|
278
|
+
left: var(--desk-dock-dot-glyph);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
[data-look="gnome"] .desk-dock[data-side="right"] .desk-dock-item[data-running]::after {
|
|
282
|
+
right: var(--desk-dock-dot-glyph);
|
|
283
|
+
}
|
|
284
|
+
|
|
239
285
|
/* No magnification: GNOME's dash lights an item up rather than growing it. */
|
|
240
286
|
[data-look="gnome"] .desk-dock .desk-dock-item:hover:not(:disabled),
|
|
241
287
|
[data-look="windows"] .desk-dock .desk-dock-item:hover:not(:disabled) {
|
package/dist/css/overlays.css
CHANGED
|
@@ -21,6 +21,12 @@
|
|
|
21
21
|
background: var(--desk-surface);
|
|
22
22
|
box-shadow: var(--desk-shadow-floating);
|
|
23
23
|
animation: desk-menu-in .14s var(--desk-ease);
|
|
24
|
+
overscroll-behavior: contain;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Focused only so its keys scroll it (see Popover); the open dialog is its own sign of where focus is. */
|
|
28
|
+
.desk-popover:focus {
|
|
29
|
+
outline: none;
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
/* A sheet belongs to its window: the scrim covers that window and nothing else. */
|
package/dist/css/tokens.css
CHANGED
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
--desk-dock-icon: linear-gradient(160deg, #ffffff, #eceff5);
|
|
86
86
|
--desk-badge: #ef4444;
|
|
87
87
|
--desk-badge-ink: #ffffff;
|
|
88
|
+
--desk-widget-width: 200px;
|
|
88
89
|
/* Room the stage leaves at the bottom for something of the app's own. An overlay dock makes its own. */
|
|
89
90
|
--desk-inset-bottom: 0px;
|
|
90
91
|
}
|