@liberation-data/desk 0.42.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 +95 -5
- 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/overlays.css +6 -0
- package/dist/css/windows.css +21 -0
- package/dist/desk.css +176 -0
- package/dist/react/Desktop.d.ts.map +1 -1
- package/dist/react/Desktop.js +13 -2
- 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 +1 -1
- package/dist/react/MenuBar.d.ts.map +1 -1
- package/dist/react/MenuBar.js +19 -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/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 +7 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +5 -0
- 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/llms.txt +46 -5
- 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/overlays.css +6 -0
- package/src/css/windows.css +21 -0
- package/src/react/Desktop.tsx +21 -3
- package/src/react/Dock.tsx +11 -1
- package/src/react/MenuBar.tsx +20 -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/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 +27 -0
- package/src/react/layers.ts +7 -2
- package/src/react/overlays.tsx +30 -12
- package/src/react/shell.tsx +5 -2
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
|
|
|
@@ -887,6 +888,93 @@ opens the item's context menu. With `drag`, an icon can be carried to a drop tar
|
|
|
887
888
|
With `drag`, every icon can be picked up except one whose item says `draggable: false`: something no
|
|
888
889
|
target would take stays where it is.
|
|
889
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
|
+
|
|
890
978
|
## Commands and the responder chain
|
|
891
979
|
|
|
892
980
|
Some commands name no target — Copy, Close, Find. They go to whoever is responsible, the way AppKit's
|
|
@@ -1022,9 +1110,10 @@ import '@liberation-data/desk/css/overlays.css' // popovers, sheets, alerts, to
|
|
|
1022
1110
|
import '@liberation-data/desk/css/conversation.css'
|
|
1023
1111
|
import '@liberation-data/desk/css/search.css'
|
|
1024
1112
|
import '@liberation-data/desk/css/setup.css' // the wizard and tours
|
|
1025
|
-
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
|
|
1026
1114
|
import '@liberation-data/desk/css/looks.css' // GNOME and Windows chrome: last, it restyles the rest
|
|
1027
|
-
``` 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.
|
|
1028
1117
|
|
|
1029
1118
|
## Looks
|
|
1030
1119
|
|
|
@@ -1047,7 +1136,8 @@ are drawn: that is the look. It is separate from the theme, so every look comes
|
|
|
1047
1136
|
`auto` reads the device: Macs, iPhones and iPads get `mac`, Windows gets `windows`, Linux and ChromeOS get
|
|
1048
1137
|
`gnome`, and anything else gets `mac`. The look is set as `data-look` on the root, so menus and popovers
|
|
1049
1138
|
portalled out of the desk get it too. The desk does not remember a choice: keep it where the app keeps its
|
|
1050
|
-
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.
|
|
1051
1141
|
|
|
1052
1142
|
A look changes chrome, not brand: it never touches `--desk-accent` or `--desk-ground`. Nor the keyboard —
|
|
1053
1143
|
somebody on a Mac who picks the GNOME look still presses ⌘, and menus still say so. An app drawing chrome
|
|
@@ -1096,7 +1186,7 @@ npm install
|
|
|
1096
1186
|
npm test # vitest
|
|
1097
1187
|
npm run typecheck
|
|
1098
1188
|
npm run example # the Garage sample in examples/garage
|
|
1099
|
-
npm run size # the gzipped budget: core
|
|
1189
|
+
npm run size # the gzipped budget: core 17 KiB, react 88, css 24, fx 5
|
|
1100
1190
|
npm run check # everything CI runs
|
|
1101
1191
|
npm run check:browser # the generated-app bridge in real Chrome, against a running sample
|
|
1102
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,OA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AAM,aAAa,CAAA;AACnG,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC/H,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACvE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC7E,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACjD,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;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,EACf,gBAAgB,EAChB,aAAa,GACd,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEtD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEnF,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAEpE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE/H,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;
|
|
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,EACf,gBAAgB,EAChB,aAAa,GACd,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEtD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEnF,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAEpE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE/H,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,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,M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EAA+E;IAC/E,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAA;CAC/B;AAED,MAAM,WAAW,WAAW;IAC1B,0FAA0F;IAC1F,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAA;IACtB,mGAAmG;IACnG,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,uGAAuG;AACvG,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,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/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/windows.css
CHANGED
|
@@ -747,6 +747,27 @@ button.desk-widget:hover {
|
|
|
747
747
|
overflow: hidden;
|
|
748
748
|
}
|
|
749
749
|
|
|
750
|
+
/*
|
|
751
|
+
* A centred window that fits its content (`fitContent`) is as tall as what is in it, up to its max-height.
|
|
752
|
+
* Its height comes from its content rather than the content from its height, so a pane in it is not 100% of
|
|
753
|
+
* anything: it takes its own height and gives way, with the middle scrolling, once the window is at its cap.
|
|
754
|
+
*/
|
|
755
|
+
.desk-window[data-fit] {
|
|
756
|
+
height: fit-content;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
.desk-window[data-fit] > .desk-body {
|
|
760
|
+
flex: 0 1 auto;
|
|
761
|
+
display: flex;
|
|
762
|
+
flex-direction: column;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.desk-window[data-fit] > .desk-body > * {
|
|
766
|
+
flex: 0 1 auto;
|
|
767
|
+
height: auto;
|
|
768
|
+
min-height: 0;
|
|
769
|
+
}
|
|
770
|
+
|
|
750
771
|
.desk-toolbar {
|
|
751
772
|
display: flex;
|
|
752
773
|
align-items: center;
|
package/dist/desk.css
CHANGED
|
@@ -901,6 +901,27 @@ button.desk-widget:hover {
|
|
|
901
901
|
overflow: hidden;
|
|
902
902
|
}
|
|
903
903
|
|
|
904
|
+
/*
|
|
905
|
+
* A centred window that fits its content (`fitContent`) is as tall as what is in it, up to its max-height.
|
|
906
|
+
* Its height comes from its content rather than the content from its height, so a pane in it is not 100% of
|
|
907
|
+
* anything: it takes its own height and gives way, with the middle scrolling, once the window is at its cap.
|
|
908
|
+
*/
|
|
909
|
+
.desk-window[data-fit] {
|
|
910
|
+
height: fit-content;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.desk-window[data-fit] > .desk-body {
|
|
914
|
+
flex: 0 1 auto;
|
|
915
|
+
display: flex;
|
|
916
|
+
flex-direction: column;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
.desk-window[data-fit] > .desk-body > * {
|
|
920
|
+
flex: 0 1 auto;
|
|
921
|
+
height: auto;
|
|
922
|
+
min-height: 0;
|
|
923
|
+
}
|
|
924
|
+
|
|
904
925
|
.desk-toolbar {
|
|
905
926
|
display: flex;
|
|
906
927
|
align-items: center;
|
|
@@ -3223,6 +3244,12 @@ button.desk-widget:hover {
|
|
|
3223
3244
|
background: var(--desk-surface);
|
|
3224
3245
|
box-shadow: var(--desk-shadow-floating);
|
|
3225
3246
|
animation: desk-menu-in .14s var(--desk-ease);
|
|
3247
|
+
overscroll-behavior: contain;
|
|
3248
|
+
}
|
|
3249
|
+
|
|
3250
|
+
/* Focused only so its keys scroll it (see Popover); the open dialog is its own sign of where focus is. */
|
|
3251
|
+
.desk-popover:focus {
|
|
3252
|
+
outline: none;
|
|
3226
3253
|
}
|
|
3227
3254
|
|
|
3228
3255
|
/* A sheet belongs to its window: the scrim covers that window and nothing else. */
|
|
@@ -4205,6 +4232,155 @@ button.desk-widget:hover {
|
|
|
4205
4232
|
background: var(--desk-surface);
|
|
4206
4233
|
}
|
|
4207
4234
|
|
|
4235
|
+
/* ── About and Settings, from what the app declares ── */
|
|
4236
|
+
|
|
4237
|
+
.desk-about-body {
|
|
4238
|
+
display: flex;
|
|
4239
|
+
flex-direction: column;
|
|
4240
|
+
gap: var(--desk-space-4);
|
|
4241
|
+
}
|
|
4242
|
+
|
|
4243
|
+
.desk-about-brand {
|
|
4244
|
+
display: flex;
|
|
4245
|
+
flex-direction: column;
|
|
4246
|
+
align-items: center;
|
|
4247
|
+
gap: var(--desk-space-1);
|
|
4248
|
+
text-align: center;
|
|
4249
|
+
}
|
|
4250
|
+
|
|
4251
|
+
.desk-about-icon {
|
|
4252
|
+
display: grid;
|
|
4253
|
+
place-items: center;
|
|
4254
|
+
width: 96px;
|
|
4255
|
+
height: 96px;
|
|
4256
|
+
margin-bottom: var(--desk-space-2);
|
|
4257
|
+
}
|
|
4258
|
+
|
|
4259
|
+
.desk-about-icon > svg,
|
|
4260
|
+
.desk-about-icon > img {
|
|
4261
|
+
width: 100%;
|
|
4262
|
+
height: 100%;
|
|
4263
|
+
}
|
|
4264
|
+
|
|
4265
|
+
.desk-about-name {
|
|
4266
|
+
margin: 0;
|
|
4267
|
+
font-size: var(--desk-text-display);
|
|
4268
|
+
font-weight: 600;
|
|
4269
|
+
}
|
|
4270
|
+
|
|
4271
|
+
.desk-about-version,
|
|
4272
|
+
.desk-about-description {
|
|
4273
|
+
margin: 0;
|
|
4274
|
+
}
|
|
4275
|
+
|
|
4276
|
+
.desk-about-links {
|
|
4277
|
+
display: flex;
|
|
4278
|
+
flex-wrap: wrap;
|
|
4279
|
+
justify-content: center;
|
|
4280
|
+
gap: var(--desk-space-2) var(--desk-space-4);
|
|
4281
|
+
}
|
|
4282
|
+
|
|
4283
|
+
.desk-about-links a {
|
|
4284
|
+
color: var(--desk-accent);
|
|
4285
|
+
}
|
|
4286
|
+
|
|
4287
|
+
/*
|
|
4288
|
+
* Name and value in two columns; a note sits under its value. Every section shares one grid, through
|
|
4289
|
+
* subgrid, so the names are one column down the whole panel, as wide as the longest of them.
|
|
4290
|
+
*/
|
|
4291
|
+
.desk-about-sections {
|
|
4292
|
+
display: grid;
|
|
4293
|
+
grid-template-columns: max-content minmax(0, 1fr);
|
|
4294
|
+
column-gap: var(--desk-space-3);
|
|
4295
|
+
row-gap: var(--desk-space-4);
|
|
4296
|
+
}
|
|
4297
|
+
|
|
4298
|
+
.desk-about-sections > section {
|
|
4299
|
+
grid-column: 1 / -1;
|
|
4300
|
+
display: grid;
|
|
4301
|
+
grid-template-columns: subgrid;
|
|
4302
|
+
/* normal: the panel's column gap, so a section's own gap does not shift its values off the column. */
|
|
4303
|
+
column-gap: normal;
|
|
4304
|
+
row-gap: var(--desk-space-2);
|
|
4305
|
+
}
|
|
4306
|
+
|
|
4307
|
+
.desk-about-sections > section > * {
|
|
4308
|
+
grid-column: 1 / -1;
|
|
4309
|
+
}
|
|
4310
|
+
|
|
4311
|
+
.desk-about-facts {
|
|
4312
|
+
display: grid;
|
|
4313
|
+
grid-template-columns: subgrid;
|
|
4314
|
+
column-gap: normal;
|
|
4315
|
+
row-gap: var(--desk-space-1);
|
|
4316
|
+
margin: 0;
|
|
4317
|
+
}
|
|
4318
|
+
|
|
4319
|
+
/* A browser without subgrid: each section is its own grid, and a floor under the names keeps them close. */
|
|
4320
|
+
@supports not (grid-template-columns: subgrid) {
|
|
4321
|
+
.desk-about-facts {
|
|
4322
|
+
grid-template-columns: max-content minmax(0, 1fr);
|
|
4323
|
+
column-gap: var(--desk-space-3);
|
|
4324
|
+
}
|
|
4325
|
+
|
|
4326
|
+
.desk-about-facts dt {
|
|
4327
|
+
min-width: 9rem;
|
|
4328
|
+
}
|
|
4329
|
+
}
|
|
4330
|
+
|
|
4331
|
+
.desk-about-facts > div {
|
|
4332
|
+
display: contents;
|
|
4333
|
+
}
|
|
4334
|
+
|
|
4335
|
+
.desk-about-facts dt {
|
|
4336
|
+
color: var(--desk-muted);
|
|
4337
|
+
}
|
|
4338
|
+
|
|
4339
|
+
.desk-about-facts dd {
|
|
4340
|
+
margin: 0;
|
|
4341
|
+
overflow-wrap: anywhere;
|
|
4342
|
+
user-select: text;
|
|
4343
|
+
}
|
|
4344
|
+
|
|
4345
|
+
.desk-about-fact-note {
|
|
4346
|
+
display: block;
|
|
4347
|
+
}
|
|
4348
|
+
|
|
4349
|
+
.desk-about-note {
|
|
4350
|
+
margin: 0;
|
|
4351
|
+
text-align: center;
|
|
4352
|
+
}
|
|
4353
|
+
|
|
4354
|
+
.desk-about-legal {
|
|
4355
|
+
margin: 0;
|
|
4356
|
+
text-align: center;
|
|
4357
|
+
}
|
|
4358
|
+
|
|
4359
|
+
.desk-about-foot {
|
|
4360
|
+
display: flex;
|
|
4361
|
+
align-items: center;
|
|
4362
|
+
gap: var(--desk-space-3);
|
|
4363
|
+
padding: var(--desk-space-3) var(--desk-space-4);
|
|
4364
|
+
border-top: 1px solid var(--desk-rule);
|
|
4365
|
+
}
|
|
4366
|
+
|
|
4367
|
+
/* What Copy copies, out of sight: selected in place of the panel where there is no clipboard. */
|
|
4368
|
+
.desk-about-copied {
|
|
4369
|
+
position: absolute;
|
|
4370
|
+
width: 1px;
|
|
4371
|
+
height: 1px;
|
|
4372
|
+
margin: -1px;
|
|
4373
|
+
overflow: hidden;
|
|
4374
|
+
clip-path: inset(50%);
|
|
4375
|
+
white-space: pre;
|
|
4376
|
+
}
|
|
4377
|
+
|
|
4378
|
+
.desk-settings-page {
|
|
4379
|
+
display: flex;
|
|
4380
|
+
flex-direction: column;
|
|
4381
|
+
gap: var(--desk-space-5);
|
|
4382
|
+
}
|
|
4383
|
+
|
|
4208
4384
|
/* @liberation-data/desk — looks.css */
|
|
4209
4385
|
/*
|
|
4210
4386
|
* Looks: the platform chrome, on `data-look` at the root. The rest of desk.css is the Mac look, so
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Desktop.d.ts","sourceRoot":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