@liberation-data/desk 0.43.0 → 0.45.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.
Files changed (197) hide show
  1. package/README.md +238 -10
  2. package/dist/core/desk.d.ts +2 -0
  3. package/dist/core/desk.d.ts.map +1 -1
  4. package/dist/core/desk.js +11 -2
  5. package/dist/core/desk.js.map +1 -1
  6. package/dist/core/hosted.d.ts +222 -0
  7. package/dist/core/hosted.d.ts.map +1 -0
  8. package/dist/core/hosted.js +166 -0
  9. package/dist/core/hosted.js.map +1 -0
  10. package/dist/core/index.d.ts +9 -1
  11. package/dist/core/index.d.ts.map +1 -1
  12. package/dist/core/index.js +5 -1
  13. package/dist/core/index.js.map +1 -1
  14. package/dist/core/location.d.ts +8 -1
  15. package/dist/core/location.d.ts.map +1 -1
  16. package/dist/core/location.js +18 -2
  17. package/dist/core/location.js.map +1 -1
  18. package/dist/core/preferences.d.ts +27 -0
  19. package/dist/core/preferences.d.ts.map +1 -0
  20. package/dist/core/preferences.js +121 -0
  21. package/dist/core/preferences.js.map +1 -0
  22. package/dist/core/scheme.d.ts +9 -3
  23. package/dist/core/scheme.d.ts.map +1 -1
  24. package/dist/core/scheme.js +13 -4
  25. package/dist/core/scheme.js.map +1 -1
  26. package/dist/core/theme.d.ts +41 -0
  27. package/dist/core/theme.d.ts.map +1 -0
  28. package/dist/core/theme.js +56 -0
  29. package/dist/core/theme.js.map +1 -0
  30. package/dist/core/themeChange.d.ts +25 -0
  31. package/dist/core/themeChange.d.ts.map +1 -0
  32. package/dist/core/themeChange.js +49 -0
  33. package/dist/core/themeChange.js.map +1 -0
  34. package/dist/core/types.d.ts +5 -0
  35. package/dist/core/types.d.ts.map +1 -1
  36. package/dist/css/apps.css +52 -1
  37. package/dist/css/shell.css +100 -0
  38. package/dist/css/tokens.css +10 -0
  39. package/dist/css/windows.css +28 -0
  40. package/dist/desk.css +90 -1
  41. package/dist/fx/fx.d.ts.map +1 -1
  42. package/dist/fx/fx.js +7 -31
  43. package/dist/fx/fx.js.map +1 -1
  44. package/dist/host/checkChrome.d.ts +20 -0
  45. package/dist/host/checkChrome.d.ts.map +1 -0
  46. package/dist/host/checkChrome.js +219 -0
  47. package/dist/host/checkChrome.js.map +1 -0
  48. package/dist/host/checkTheme.d.ts +35 -0
  49. package/dist/host/checkTheme.d.ts.map +1 -0
  50. package/dist/host/checkTheme.js +128 -0
  51. package/dist/host/checkTheme.js.map +1 -0
  52. package/dist/host/index.d.ts +7 -0
  53. package/dist/host/index.d.ts.map +1 -0
  54. package/dist/host/index.js +8 -0
  55. package/dist/host/index.js.map +1 -0
  56. package/dist/host/router.d.ts +99 -0
  57. package/dist/host/router.d.ts.map +1 -0
  58. package/dist/host/router.js +279 -0
  59. package/dist/host/router.js.map +1 -0
  60. package/dist/react/Desktop.d.ts.map +1 -1
  61. package/dist/react/Desktop.js +11 -14
  62. package/dist/react/Desktop.js.map +1 -1
  63. package/dist/react/Dock.d.ts +23 -4
  64. package/dist/react/Dock.d.ts.map +1 -1
  65. package/dist/react/Dock.js +17 -29
  66. package/dist/react/Dock.js.map +1 -1
  67. package/dist/react/MenuBar.d.ts +1 -1
  68. package/dist/react/MenuBar.d.ts.map +1 -1
  69. package/dist/react/MenuBar.js +20 -4
  70. package/dist/react/MenuBar.js.map +1 -1
  71. package/dist/react/app.d.ts +65 -12
  72. package/dist/react/app.d.ts.map +1 -1
  73. package/dist/react/app.js +79 -21
  74. package/dist/react/app.js.map +1 -1
  75. package/dist/react/appFrame.d.ts +11 -7
  76. package/dist/react/appFrame.d.ts.map +1 -1
  77. package/dist/react/appFrame.js +24 -6
  78. package/dist/react/appFrame.js.map +1 -1
  79. package/dist/react/appPanels.d.ts +4 -1
  80. package/dist/react/appPanels.d.ts.map +1 -1
  81. package/dist/react/appPanels.js +76 -28
  82. package/dist/react/appPanels.js.map +1 -1
  83. package/dist/react/appearance.d.ts +7 -1
  84. package/dist/react/appearance.d.ts.map +1 -1
  85. package/dist/react/appearance.js +32 -53
  86. package/dist/react/appearance.js.map +1 -1
  87. package/dist/react/context.d.ts +25 -1
  88. package/dist/react/context.d.ts.map +1 -1
  89. package/dist/react/context.js +73 -14
  90. package/dist/react/context.js.map +1 -1
  91. package/dist/react/dockStatus.d.ts +19 -0
  92. package/dist/react/dockStatus.d.ts.map +1 -0
  93. package/dist/react/dockStatus.js +25 -0
  94. package/dist/react/dockStatus.js.map +1 -0
  95. package/dist/react/frameMenus.d.ts +28 -0
  96. package/dist/react/frameMenus.d.ts.map +1 -0
  97. package/dist/react/frameMenus.js +85 -0
  98. package/dist/react/frameMenus.js.map +1 -0
  99. package/dist/react/hostApp.d.ts +15 -0
  100. package/dist/react/hostApp.d.ts.map +1 -0
  101. package/dist/react/hostApp.js +77 -0
  102. package/dist/react/hostApp.js.map +1 -0
  103. package/dist/react/hostDock.d.ts +25 -0
  104. package/dist/react/hostDock.d.ts.map +1 -0
  105. package/dist/react/hostDock.js +98 -0
  106. package/dist/react/hostDock.js.map +1 -0
  107. package/dist/react/hostMenu.d.ts +2 -36
  108. package/dist/react/hostMenu.d.ts.map +1 -1
  109. package/dist/react/hostMenu.js.map +1 -1
  110. package/dist/react/hosted.d.ts +28 -0
  111. package/dist/react/hosted.d.ts.map +1 -0
  112. package/dist/react/hosted.js +53 -0
  113. package/dist/react/hosted.js.map +1 -0
  114. package/dist/react/index.d.ts +10 -5
  115. package/dist/react/index.d.ts.map +1 -1
  116. package/dist/react/index.js +6 -3
  117. package/dist/react/index.js.map +1 -1
  118. package/dist/react/mediaQuery.d.ts +3 -0
  119. package/dist/react/mediaQuery.d.ts.map +1 -0
  120. package/dist/react/mediaQuery.js +11 -0
  121. package/dist/react/mediaQuery.js.map +1 -0
  122. package/dist/react/shell.d.ts +13 -1
  123. package/dist/react/shell.d.ts.map +1 -1
  124. package/dist/react/shell.js +19 -3
  125. package/dist/react/shell.js.map +1 -1
  126. package/dist/react/sidebar.d.ts +6 -1
  127. package/dist/react/sidebar.d.ts.map +1 -1
  128. package/dist/react/sidebar.js +6 -3
  129. package/dist/react/sidebar.js.map +1 -1
  130. package/dist/react/windowDescription.d.ts +7 -0
  131. package/dist/react/windowDescription.d.ts.map +1 -1
  132. package/dist/react/windowDescription.js +9 -0
  133. package/dist/react/windowDescription.js.map +1 -1
  134. package/dist/react/windowMenus.d.ts +19 -0
  135. package/dist/react/windowMenus.d.ts.map +1 -0
  136. package/dist/react/windowMenus.js +88 -0
  137. package/dist/react/windowMenus.js.map +1 -0
  138. package/dist/shell/HostShell.d.ts +53 -0
  139. package/dist/shell/HostShell.d.ts.map +1 -0
  140. package/dist/shell/HostShell.js +116 -0
  141. package/dist/shell/HostShell.js.map +1 -0
  142. package/dist/shell/index.d.ts +7 -0
  143. package/dist/shell/index.d.ts.map +1 -0
  144. package/dist/shell/index.js +9 -0
  145. package/dist/shell/index.js.map +1 -0
  146. package/dist/shell/keys.d.ts +47 -0
  147. package/dist/shell/keys.d.ts.map +1 -0
  148. package/dist/shell/keys.js +68 -0
  149. package/dist/shell/keys.js.map +1 -0
  150. package/dist/shell/motion.d.ts +72 -0
  151. package/dist/shell/motion.d.ts.map +1 -0
  152. package/dist/shell/motion.js +118 -0
  153. package/dist/shell/motion.js.map +1 -0
  154. package/llms.txt +57 -20
  155. package/package.json +10 -1
  156. package/src/core/desk.ts +11 -2
  157. package/src/core/hosted.ts +351 -0
  158. package/src/core/index.ts +28 -1
  159. package/src/core/location.ts +23 -3
  160. package/src/core/preferences.ts +132 -0
  161. package/src/core/scheme.ts +16 -5
  162. package/src/core/theme.ts +91 -0
  163. package/src/core/themeChange.ts +59 -0
  164. package/src/core/types.ts +5 -0
  165. package/src/css/apps.css +52 -1
  166. package/src/css/shell.css +99 -0
  167. package/src/css/tokens.css +10 -0
  168. package/src/css/windows.css +28 -0
  169. package/src/fx/fx.ts +7 -25
  170. package/src/host/checkChrome.ts +257 -0
  171. package/src/host/checkTheme.ts +134 -0
  172. package/src/host/index.ts +10 -0
  173. package/src/host/router.ts +374 -0
  174. package/src/react/Desktop.tsx +16 -21
  175. package/src/react/Dock.tsx +34 -28
  176. package/src/react/MenuBar.tsx +22 -4
  177. package/src/react/app.tsx +116 -22
  178. package/src/react/appFrame.tsx +39 -14
  179. package/src/react/appPanels.tsx +102 -31
  180. package/src/react/appearance.tsx +36 -45
  181. package/src/react/context.tsx +99 -13
  182. package/src/react/dockStatus.ts +42 -0
  183. package/src/react/frameMenus.ts +100 -0
  184. package/src/react/hostApp.tsx +89 -0
  185. package/src/react/hostDock.tsx +118 -0
  186. package/src/react/hostMenu.ts +3 -38
  187. package/src/react/hosted.tsx +65 -0
  188. package/src/react/index.ts +12 -4
  189. package/src/react/mediaQuery.ts +18 -0
  190. package/src/react/shell.tsx +30 -3
  191. package/src/react/sidebar.tsx +10 -3
  192. package/src/react/windowDescription.ts +12 -1
  193. package/src/react/windowMenus.ts +107 -0
  194. package/src/shell/HostShell.tsx +220 -0
  195. package/src/shell/index.ts +11 -0
  196. package/src/shell/keys.ts +101 -0
  197. package/src/shell/motion.ts +163 -0
package/README.md CHANGED
@@ -159,6 +159,11 @@ function Runs() {
159
159
  `null` or `undefined` leaves the window's own; `false` takes the note away. The window's own comes back when the
160
160
  view unmounts, so switching tabs switches the title bar with them.
161
161
 
162
+ A view one step into its window, as a page a list led to on a phone, reports the way back:
163
+ `useWindowBack({ label: 'Settings', title: 'Maps', onBack })` puts "‹ Settings" before the title, as a button
164
+ read "Back to Settings", and makes the title the view's own until it unmounts or reports `null`. It returns
165
+ false outside a window, where the view draws its own way back.
166
+
162
167
  ## Touch: one window at a time
163
168
 
164
169
  `<Desktop layout="auto">` (the default) reads the device. A touch screen that cannot hover gets
@@ -633,6 +638,9 @@ Inside the page, the bridge gives it a small `desk` object: `desk.on(topic, …)
633
638
  origin, and talks only through messages. The host grants each app its topics, drop types and windows;
634
639
  anything else it sends is dropped, and messages from anywhere but its own frame are ignored.
635
640
 
641
+ An app its window allows to (`menus`) can add menus to the bar while that window is in front: see
642
+ [Menus from the window in front](#menus-from-the-window-in-front).
643
+
636
644
  ## Search
637
645
 
638
646
  ![A search palette over the desk, showing matching windows](https://raw.githubusercontent.com/liberation-data/desk/main/docs/screenshots/search.png)
@@ -765,7 +773,8 @@ arriving.
765
773
 
766
774
  A **table** renders what it is given — no paging, no fetching — and is one tab stop: arrow keys move the
767
775
  selection, Enter or a double click opens a row, and a sortable heading says which way it is sorted. A
768
- **sidebar** is navigation, so where you are is `aria-current` and stays put. An **outline** is a
776
+ **sidebar** is navigation, so where you are is `aria-current` and stays put. Shown alone, where choosing
777
+ takes you away from it, `focusOnly` has the arrow keys only move between items, and Enter or a click choose. An **outline** is a
769
778
  hierarchy — a document's headings, a schema — given as a flat list in reading order with a `depth` on each
770
779
  row. It is a tree to the keyboard: up and down through the rows, left out to the parent, right in to the first
771
780
  child. Depth shows as weight, colour and a small indent, and stops changing at the fourth level, so a deep
@@ -849,6 +858,157 @@ const host: MenuHost = {
849
858
  <MenuBar menus={menus} status={status} host={window.inShell ? host : undefined} />
850
859
  ```
851
860
 
861
+ ### Hosted mode
862
+
863
+ A host — a native shell, or a web page that frames several apps — can run more than one Desk app side by
864
+ side and draw one menu bar and one dock above all of them, so that moving between apps changes only what
865
+ fills the desktop. Each app is hosted when the page has a `globalThis.deskHost` (a `DeskHostBridge`, which
866
+ the host provides: an Electron preload, or `postMessage` between frames), or when `DeskProvider` or
867
+ `DeskShell` is given one as `host`. Nothing else in the app changes:
868
+
869
+ - `MenuBar` and `Dock` draw nothing, and send their contents to the host as data (`DeskChrome`). The host
870
+ sends back what was chosen, which runs as a click would. Shortcuts are shared as with any host's menu
871
+ bar: the host gives those with `mod` a key, as a native menu's key equivalents work whichever app has
872
+ focus, and the app binds the rest. Give a dock item an `image` (a URL or `data:` URI) for the host to
873
+ draw, since `icon` is a React node and cannot cross. Widgets stay on the app's desktop.
874
+ - The host's frame has one Settings and one About for every app, so a hosted app draws no gear and no
875
+ About item. It sends what its `app` declares instead: its Settings sections by id, title, group and
876
+ badge (their controls stay in the app, which opens its own Settings at a section when the host asks),
877
+ and its name, version, links, note (when it is text) and facts, each fact's link and `copy: false`
878
+ kept. ⌘, is the host's too: Desk steps aside for it, as it does for any host's menu bar, so it is
879
+ bound once.
880
+ - One app, the primary, sets the look every app wears: it publishes a `DeskTheme` (`mode`, `look`,
881
+ `tokens`, `fonts`, `wallpaper`) with `usePublishTheme(theme)`, and every other app wears it through
882
+ `applyTheme`, so their Appearance offers no scheme, look or theme of its own. The primary declares
883
+ `themeFromHost: false`: it keeps its Appearance and wears no theme but its own. An app that keeps some
884
+ looks of its own passes `onTheme`; light or dark and the look apply whatever it does, since one
885
+ desktop light and the next dark would look broken side by side.
886
+ - Apps never talk to each other directly. `useHost()` gives the connection: `publish(topic, payload)`,
887
+ and `subscribe(publisher, topic, handler)` for another app's broadcasts, by its id or by `'primary'`
888
+ (`useHostBroadcast` does it while a component is mounted). The host stamps who each broadcast came
889
+ from and passes on only topics that app was granted. It keeps the last broadcast of each publisher on
890
+ each topic, so an app that starts late hears it at once. The primary's theme outlives it: an app that
891
+ starts while the primary is down still wears its last look.
892
+
893
+ A page without React connects with `connectHost(bridge)`, from the core entry.
894
+
895
+ ```tsx
896
+ <DeskShell onTheme={theme => keepMyAccent(theme)}> {/* hosted when the page has a deskHost */}
897
+ <MenuBar menus={menus} />
898
+ <Dock entries={[dockItem({ id: 'notes', label: 'Notes', icon: <NotesIcon />, image: '/notes.png' })]} />
899
+ <Desktop … />
900
+ </DeskShell>
901
+ ```
902
+
903
+ The host's half is `@liberation-data/desk/host`, which no app loads. `createBroadcastRouter` holds the
904
+ rules above, so every transport keeps them alike:
905
+
906
+ - The host registers each app (`id`, `origin`, `primary`, `publishes`) and hands the router every message
907
+ the app sends, identified by the transport, never by the message. The primary's `publishes` must
908
+ include `theme`. When the host unregisters an app, `chrome` is called with null for it, and the host
909
+ stops drawing its menus and dock.
910
+ - A theme is checked before it is passed on (`checkTheme`): tokens must be plain values (colours,
911
+ lengths, font names, gradients) with nothing that loads, such as `url(…)`, and fonts and image
912
+ wallpaper must come from the primary's own origin or be `data:` URIs.
913
+ - An app's chrome is checked too (`checkChrome`), since the host draws it in its own frame: text and
914
+ lists are bounded, links must be http(s), `mailto:` or on the app's origin, and dock images must be on
915
+ the app's origin or `data:` PNG, JPEG, WebP, AVIF or GIF (no SVG). Relative ones come back resolved
916
+ against the app. A part that fails costs only itself: a menu item, dock item, Settings section, link or
917
+ fact is dropped, a bad image or fact link is dropped from its item, and the rest is drawn. `chrome`
918
+ gets the reasons as its third argument (`dropped`), for the host to log. Chrome of the wrong shape (a
919
+ top-level field that is not a list, over 2 MiB, or a stack in a stack) is not drawn at all, so the app
920
+ keeps what it last sent. A host opens About links in the system browser or mail app, or in a new
921
+ window with `rel="noopener noreferrer"`, never in its own frame.
922
+ - Broadcasts are rate limited per publisher and topic (`limits`): a burst of 20, then 10 a second, and
923
+ for the theme 2 then 1 a second, since it changes on a person's choice. Over the limit nothing is
924
+ queued or lost: the latest payload is held, replacing any held before, and goes out when the bucket
925
+ allows, so every subscriber still ends on the last value, and so does the kept one. Order holds within a
926
+ topic; across topics only while under the limits, since a held topic's latest can go out after a later
927
+ broadcast on another. A publisher may have 64 topics going at once (`maxTopics`), so a flood across
928
+ topics is bounded too: past that, a new topic is refused (`'rate limited'`) unless an idle one makes
929
+ room. `limited(appId)` counts what an app had held and replaced or refused, for the host to see one
930
+ that floods. `topics` sets other rates by topic (`burst` and `perSecond` alone leave the theme's),
931
+ and `clock` is the time, for tests. Registering an app again drops what it held, since that was
932
+ vetted under its old grants. A rate that cannot refill (`perSecond` 0, a negative or NaN) throws.
933
+ - Payloads over 64 KiB (`maxPayload`) are refused, and `check` lets a host vet the topics it knows. A
934
+ `deliver` that throws for one app (a window already gone) does not keep the others from hearing: the
935
+ first error is thrown once the broadcast has reached them.
936
+
937
+ `createMemoryHost` is a whole host in one page, for tests.
938
+
939
+ ### The host's shell
940
+
941
+ `@liberation-data/desk/shell` draws the chrome a host shares among its apps: one dock (the current app's,
942
+ from its `DeskChrome`) and a switcher between workspaces. Only the host's own page loads it, with
943
+ `css/shell.css` after desk.css; no app does. `HostShell` draws and moves nothing: it says what the person
944
+ asked for, and the host does it and then passes the new `current`.
945
+
946
+ ```tsx
947
+ import { HostShell } from '@liberation-data/desk/shell'
948
+ import '@liberation-data/desk/css/shell.css'
949
+
950
+ <HostShell
951
+ workspaces={[{ id: 'notes', title: 'Notes', primary: true, state: 'live' }, …]} // switcher order
952
+ current="notes"
953
+ chrome={chromeByApp} // each app's DeskChrome, as the router's `chrome` hands it over
954
+ theme={primaryTheme}
955
+ onSwitch={(id, how) => …} // how: 'slide' (or 'zoom', from the overview to come)
956
+ onCommand={(appId, target, itemId) => …}
957
+ onInsets={insets => …} // bound the apps' views inside these
958
+ />
959
+ ```
960
+
961
+ - The switcher is one Tab stop, moved through with the arrow keys, Home and End; arriving on a workspace
962
+ says its title once through a polite live region.
963
+ - The switching keys step around each OS's own: Ctrl+Option+←/→ on a Mac, Super+Alt+←/→ on Linux,
964
+ Ctrl+Alt+←/→ on Windows (`switchKeys(platform)`; pass `keys` for others, or null for none). A key goes
965
+ to whichever view has focus, so the host catches it first (in Electron, `before-input-event`) and asks
966
+ `switchKeyAction(input, keys)`, which reads a page's key event and Electron's input alike and ignores
967
+ the key's release. `neighbour(workspaces, current, step)` is the one to go to, or null at either end.
968
+ - The host moves the views itself, on the shell's curve: `slidePlan(reducedMotion)` is a 350 ms slide or,
969
+ under reduced motion, a 120 ms fade; `spring(duration, from, velocity)` arrives without overshooting and
970
+ can start mid-flight; `slideOffsets(progress, direction, width)` places both views in whole pixels with
971
+ no gap. Mid-slide they reach past the desktop area, so the host clips them to it, or they cover the
972
+ dock. `animate({ durationMs, step, clock: timerClock() })` steps them from a main process, and jumps to
973
+ the end if frames stop, as they do for a hidden window.
974
+
975
+ ### Menus from the window in front
976
+
977
+ As on a Mac, the menu bar follows what is in front. A window, or an app embedded in one, can add menus of
978
+ its own, which join the bar while that window has focus and leave when it loses it. They go after the
979
+ app's own menus and before Window and Help (the menus with ids `window` and `help`), by the same path
980
+ whether Desk draws the bar or a host does:
981
+
982
+ - A window adds them with `useWindowMenus(menus)` inside its content, passing a stable array (`useMemo`).
983
+ Each menu's id is given the window's in front of it, so two windows, or a window and the app, can each
984
+ have an "Edit". Their command shortcuts are bound while the menus are shown.
985
+ - An embedded app adds them through its `AppFrame`, when the window allows it with `menus`. Inside the
986
+ page, `desk.setMenus(menus)` sends them as hosted mode's apps send theirs (`HostMenu` data, in a
987
+ `chrome` message), and `desk.onCommand(id => …)` hears which item was chosen. The frame checks them as
988
+ a host checks any app's chrome (`checkChrome`): a bad menu or item is dropped and the rest kept, and a
989
+ frame adds four menus at most. Each item becomes a command named for its frame, enabled only while the
990
+ frame's window is in front, so its shortcut works through the bar like any other (while focus is in the
991
+ page around the frame: keys pressed inside the frame stay in the frame, which handles its own), its ids never meet
992
+ the page's or another frame's, and a choice goes back to that frame alone. An embedded app's shortcut
993
+ must hold ⌘/Ctrl (`mod` or `ctrl`) or ⌥ (`alt`), or be a function key (F1–F24): a bare letter, Enter,
994
+ Escape or an arrow belongs to whatever has focus, so such an item keeps its label and loses the key, said
995
+ once on the console. A window's own menus, from the app's code, are not held to this.
996
+ - Nothing added this way takes a shortcut from the app. An item that asks for a key the app's own menus
997
+ (status menus too) or Desk (⌘, for Settings) already use keeps its label and loses the key, and the clash is said once on
998
+ the console. A host's menu bar gets the joined menus through `hostMenuModel`, with the usual shortcut
999
+ ownership.
1000
+
1001
+ ```tsx
1002
+ function RideWindow() {
1003
+ useWindowMenus(useMemo(() => [{ id: 'ride', label: 'Ride', items: [menuCommand('Next Ride', 'rides.next', { shortcut: 'mod+j' })] }], []))
1004
+ …
1005
+ }
1006
+
1007
+ <AppFrame title="Ride Card" srcDoc={RIDE_CARD} menus />
1008
+ // in the card's page:
1009
+ desk.setMenus([{ id: 'card', label: 'Card', items: [{ type: 'item', id: 'clear', label: 'Clear Card', shortcut: 'mod+k' }] }])
1010
+ desk.onCommand(id => { if (id === 'clear') clearCard() })
1011
+ ```
852
1012
 
853
1013
  ### Context menus
854
1014
 
@@ -894,9 +1054,10 @@ target would take stays where it is.
894
1054
  const GARAGE: DeskApp = {
895
1055
  name: 'Garage',
896
1056
  icon: <GarageMark />,
1057
+ wordmark: <GarageWordmark />, // optional: the name as a wide mark, beside the icon
897
1058
  version: '2.1.0',
898
1059
  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' }],
1060
+ links: [{ label: 'Website', url: 'https://example.com' }, { label: 'Mastodon', url: 'https://example.social/@garage', group: 'Social' }],
900
1061
  facts: useRunningFacts, // optional: a hook returning AboutSection[], or null while reading
901
1062
  settings: { sections: [
902
1063
  { id: 'units', title: 'Units', content: <Units /> },
@@ -917,27 +1078,45 @@ no `MenuBar`; the menu item shows it and does not bind it again.
917
1078
 
918
1079
  **An app with no settings shows none of it**: no gear, no menu item and no ⌘,, as a Mac app without
919
1080
  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.
1081
+ A brand that is a wordmark gives `wordmark`, drawn under the icon at its own width rather than squeezed into
1082
+ a square; the name stays as the heading, for screen readers. A link with a `group` (`'Social'`) is listed
1083
+ under that heading, after the links with none. `legal` adds the small print at its foot.
921
1084
 
922
1085
  `facts` is what is running, for a bug report: engines, versions, the machine. It is a hook, called inside
923
1086
  the About panel, so it can read state and follow it; return `null` while it is still being read, and `[]`
924
1087
  when there is nothing to report. With facts, About has **Copy**, which copies the name, the version and every
925
1088
  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,
1089
+ account. Never put a key or a password in a fact. A fact's `copyValue` is copied in place of the `value`
1090
+ shown: a short commit shown, the full one copied. A section still being worked out sets `pending: true`: it
1091
+ shows "Checking" under its title while the others are shown, and Copy leaves it out until it is ready. A fact's `note` says what someone might want to know of it,
927
1092
  and its `link` (`{ label, url }`, as the app's links are) where to read more; neither is copied. The names of
928
1093
  every section line up in one column. `note` on the declaration is a short line under the links, also not
929
1094
  copied, for what this build cannot say: that the desktop app reports what is running, and this is a browser.
930
1095
 
931
1096
  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
1097
+ section's `group`, beside the one chosen, in a window like any other. It opens free at 720 × 640, or as the
1098
+ person last left it, and can be resized and filled; `limits` gives it the app's own. On a narrow screen, such
1099
+ as an upright phone, the list and the section take turns: the list, then the section, titled in the title row with
1100
+ "‹ Settings" before it (read as "Back to Settings"), which returns focus to the row chosen; in the list the arrow keys move and Enter opens. A section's `note` says
1101
+ something of the section as a whole, such as that a change waits for a restart: in the sidebar layout it is
1102
+ the window's note while the section is open, and on one page it stands under the heading. Sections may change while the app runs, such
933
1103
  as a group that grows as plugins are installed. A section's `id` is its route, so
934
1104
  `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
1105
+ is. `openAbout(desk)` opens About as the dock does, for a link that names it, and `openSettings(desk, route?)`
1106
+ opens Settings, for a caller outside React such as a search result; inside, `useOpenSettings()` does the same.
1107
+ Both do nothing that the gear would not: no Settings when the app has none to show. `syncWithLocation` keeps a
1108
+ link to `settings` or `about` once the app is declared, so its `isKnown` lists only the app's own windows. The one-page panel and About are
936
1109
  as tall as their content, up to the panel's height.
937
1110
  `badge` puts a count on the gear, as on any dock item.
938
1111
 
939
1112
  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.
1113
+ items, and About goes last unless it puts `dockAbout()` somewhere. Either may go in a stack too, a System
1114
+ stack beside the app's own Shortcuts, which keeps a long dock short; what the app placed, Desk does not add
1115
+ again. The app's own items keep their order.
1116
+
1117
+ ```tsx
1118
+ dockStack({ id: 'system', label: 'System', items: [shortcuts, dockSettings(), dockAbout()] })
1119
+ ```
941
1120
 
942
1121
  An app whose Settings window is its own code keeps it: `settings: { open: route => … }` and the gear, the
943
1122
  menu item and ⌘, call that instead, and Desk draws no window. `<SettingsContent />` draws the declared
@@ -948,6 +1127,7 @@ sections inside a window of the app's, if it wants them.
948
1127
  ```tsx
949
1128
  settings: { appearance: true } // light, dark or the system's
950
1129
  settings: { appearance: { scheme: true, look: true, sounds: fx, theme: <Palette /> }, sections }
1130
+ settings: { appearance: { scheme: true, defaultScheme: 'dark' } } // dark until someone chooses
951
1131
  ```
952
1132
 
953
1133
  Desk owns the theme and the look, so it can offer them as a ready-made first section of Settings, and a
@@ -960,10 +1140,30 @@ Both choices are remembered in this browser, under `desk.scheme` and `desk.look`
960
1140
  `LOOK_KEY`, for an app moving a choice it kept under its own key). The scheme is `data-theme`
961
1141
  on the root, which the stylesheet already reads, and the chosen look stands in for the one the app passes.
962
1142
  `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
1143
+ something of its own. While nothing is chosen, `defaultScheme` applies: the system's unless the app says, as an
1144
+ app made dark does. Put `COLOR_SCHEME_SCRIPT` in the page's `<head>` so a dark choice does not open light
1145
+ for a moment while the app loads, or `colorSchemeScript('dark')` for an app whose default is dark. The keys and the script are in the core entry too, which has no React, for
965
1146
  a layout rendered on a server.
966
1147
 
1148
+ Choices are kept in this browser's localStorage, following other tabs. An app that keeps preferences with
1149
+ the person's account gives `DeskShell` a store of its own, used for every choice Desk remembers (the scheme,
1150
+ the look, the sounds' mute) under the same keys: `COLOR_SCHEME_KEY`, `LOOK_KEY` and `createFx`'s
1151
+ `storageKey`:
1152
+
1153
+ ```tsx
1154
+ const preferences: PreferenceStore = {
1155
+ get: key => account.preferences.get(key), // undefined while not loaded yet: Desk uses this browser's copy
1156
+ set: (key, value) => account.preferences.set(key, value), // null forgets it
1157
+ subscribe: listener => account.preferences.onChange(listener), // a value arrived; listener(null) for any
1158
+ }
1159
+ <DeskShell preferences={preferences}>…</DeskShell>
1160
+ ```
1161
+
1162
+ `get` is synchronous, so a remote store keeps a local copy and calls `subscribe`'s listeners when the
1163
+ server's value arrives. The head script can only read localStorage, so Desk writes each of the store's
1164
+ values through to localStorage under the same key: the store is the truth, localStorage the copy the next
1165
+ first paint reads. `setPreferenceStore(store)` in the core entry does the same without React.
1166
+
967
1167
  An app that **receives** its theme from a host, such as one in an `AppFrame` given a `theme`, does not
968
1168
  choose it: the scheme, the look and the theme slot are neither offered nor applied, and only sounds stay.
969
1169
  Desk finds this from the bridge once the first theme arrives; `themeFromHost` on the declaration says it
@@ -1115,6 +1315,34 @@ import '@liberation-data/desk/css/looks.css' // GNOME and Windows chrome: la
1115
1315
  ``` Light and dark follow `prefers-color-scheme`, and `data-theme="light|dark"` on the root wins. [Appearance](#appearance) lets
1116
1316
  the person choose, and sets it.
1117
1317
 
1318
+ A workspace switcher's overview, where each workspace is a tile floating over a soft background, has
1319
+ three tokens of its own, so the background matches whichever theme is on without each theme writing one:
1320
+
1321
+ - `--desk-overview-fog`: the background's centre. By default the ground with 18% of the accent, moved a
1322
+ little toward mid grey so it reads as haze rather than as the desktop.
1323
+ - `--desk-overview-fog-far`: its edge, for a radial gradient from one to the other with no image. By
1324
+ default the fog 8% darker in light, 10% in dark.
1325
+ - `--desk-overview-shadow`: the tiles' shadow colour, for a tinted shadow drawn once rather than a
1326
+ `box-shadow` on a full-size layer. `rgb(0 0 0 / 0.28)` in light, `0.55` in dark.
1327
+
1328
+ The defaults are worked out in CSS from `--desk-ground` and `--desk-accent`, in every look. A theme may set
1329
+ any of them itself, and its value wins. In hosted mode they travel in the published theme like any other
1330
+ token, and the host's theme check takes them as plain colours.
1331
+
1332
+ In React, the hooks are the way to follow a change: `useLook()`, `useColorScheme()`, and in hosted mode the
1333
+ theme the provider wears, each re-render what reads them. Code outside React that draws its own pixels, such
1334
+ as a canvas, listens for `desk-themechange` on `document` instead. It fires once whenever the scheme or look
1335
+ drawn changes, whatever changed it: a host's theme (through Desk's handler or the app's own), the person's
1336
+ light, dark or system choice, the system flipping while the page follows it, or a change of look. A host's
1337
+ theme with new colours under the same scheme and look fires too, through Desk's handler; an app's own
1338
+ handler that sets colours repaints itself. Its `detail` is the scheme and look now drawn; `drawnTheme()`
1339
+ reads them at any time. Desk starts listening when a desk mounts or a theme is applied; a page with neither
1340
+ calls `watchThemeChanges()` to start it.
1341
+
1342
+ ```ts
1343
+ document.addEventListener('desk-themechange', event => repaint(event.detail)) // { scheme: 'light' | 'dark', look }
1344
+ ```
1345
+
1118
1346
  ## Looks
1119
1347
 
1120
1348
  ![Four arranged windows in the GNOME look](https://raw.githubusercontent.com/liberation-data/desk/main/docs/screenshots/look-gnome.png)
@@ -1186,7 +1414,7 @@ npm install
1186
1414
  npm test # vitest
1187
1415
  npm run typecheck
1188
1416
  npm run example # the Garage sample in examples/garage
1189
- npm run size # the gzipped budget: core 17 KiB, react 88, css 24, fx 5
1417
+ npm run size # the budget, gzipped without comments: core 15 KiB, react 72.5, css 14, fx 4, host 7.5
1190
1418
  npm run check # everything CI runs
1191
1419
  npm run check:browser # the generated-app bridge in real Chrome, against a running sample
1192
1420
  npm run build # dist/
@@ -74,6 +74,8 @@ export declare function cascadeSlot(frame: Frame, stage: Size, options?: Cascade
74
74
  * a new window would open exactly on top of one already there, hiding it.
75
75
  */
76
76
  export declare function nextCascadeFrame(windows: readonly DeskWindow[], stage: Size, options?: CascadeOptions): Frame;
77
+ /** A frame of this size in the middle of the stage, made smaller where the stage is, keeping a margin. */
78
+ export declare function centredFrame(size: Size, stage: Size, margin: number): Frame;
77
79
  /** Drops duplicate ids and makes the stack agree with the windows. */
78
80
  export declare function normalise(state: DeskState): DeskState;
79
81
  export declare function createDesk(options?: DeskOptions): Desk;
@@ -1 +1 @@
1
- {"version":3,"file":"desk.d.ts","sourceRoot":"","sources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SAAS,MAAM,QAAQ,KAAG,OAA+C,CAAA;AAEvG,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,GAAE,cAAgC,GAAG,KAAK,CAUjH;AAED,kFAAkF;AAClF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,GAAE,cAAgC,GAAG,MAAM,CAMxG;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,GAAE,cAAgC,GAAG,KAAK,CAM9H;AAED,0GAA0G;AAC1G,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAM3E;AAMD,sEAAsE;AACtE,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAiBrD;AAoBD,wBAAgB,UAAU,CAAC,OAAO,GAAE,WAAgB,GAAG,IAAI,CAuN1D"}
package/dist/core/desk.js CHANGED
@@ -66,6 +66,15 @@ export function nextCascadeFrame(windows, stage, options = DEFAULT_CASCADE) {
66
66
  return cascadeFrame(slot, stage, options);
67
67
  return cascadeFrame(taken.size % options.wrap, stage, options);
68
68
  }
69
+ /** A frame of this size in the middle of the stage, made smaller where the stage is, keeping a margin. */
70
+ export function centredFrame(size, stage, margin) {
71
+ // A stage not measured yet has no size to fit to: the size as asked, at the margin.
72
+ if (stage.width <= 0 || stage.height <= 0)
73
+ return { x: margin, y: margin, ...size };
74
+ const width = Math.max(0, Math.min(size.width, stage.width - margin * 2));
75
+ const height = Math.max(0, Math.min(size.height, stage.height - margin * 2));
76
+ return { x: Math.round((stage.width - width) / 2), y: Math.round((stage.height - height) / 2), width, height };
77
+ }
69
78
  /** Is this frame wholly on a desk of this size? */
70
79
  const withinStage = (frame, stage) => frame.x >= 0 && frame.y >= 0 && frame.x + frame.width <= stage.width && frame.y + frame.height <= stage.height;
71
80
  /** Drops duplicate ids and makes the stack agree with the windows. */
@@ -198,12 +207,12 @@ export function createDesk(options = {}) {
198
207
  }
199
208
  const saved = opts.mode || opts.frame ? undefined : layouts?.load(windowType(id));
200
209
  const kept = saved?.mode === 'floating' ? fitFrame(saved.frame, stage()) : null;
201
- const mode = opts.mode ?? (opts.frame || kept ? 'floating' : 'filled');
210
+ const mode = opts.mode ?? (opts.frame || kept || (opts.size && !saved) ? 'floating' : 'filled');
202
211
  const frame = () => {
203
212
  if (opts.frame)
204
213
  return opts.frame;
205
214
  if (!kept)
206
- return nextFrame(state);
215
+ return opts.size ? centredFrame(opts.size, stage(), cascade.margin) : nextFrame(state);
207
216
  const siblings = state.stack.flatMap(other => {
208
217
  const w = find(other);
209
218
  return w?.mode === 'floating' && windowType(w.id) === windowType(id) ? [w.frame] : [];
@@ -1 +1 @@
1
- {"version":3,"file":"desk.js","sourceRoot":"","sources":["../../src/core/desk.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAkDjD,MAAM,CAAC,MAAM,KAAK,GAAc,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;AAE1D,MAAM,eAAe,GAAmB;IACtC,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,GAAG;IACd,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE;IACtB,IAAI,EAAE,CAAC;CACR,CAAA;AAED,MAAM,aAAa,GAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAA;AAExD,gIAAgI;AAChI,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAgB,EAAE,EAAY,EAAU,EAAE,CAChE,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC,MAA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