nexus-shell 0.2.14 → 0.2.16

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.
@@ -36,7 +36,7 @@ export interface MenuBarProps {
36
36
  className?: string;
37
37
  }
38
38
  /**
39
- * The application menu bar: a row of hover-activated dropdowns with optional
39
+ * The application menu bar: a row of menu buttons with dropdowns and optional
40
40
  * one-level submenus, plus slots for branding, a centre widget and right-hand
41
41
  * actions.
42
42
  *
@@ -44,6 +44,21 @@ export interface MenuBarProps {
44
44
  * out through `onSelect`. It reads no registry. For the variant wired to the
45
45
  * {@link menuRegistry} and {@link commandRegistry}, see `ConnectedMenuBar`.
46
46
  *
47
+ * # Open and closed are state, not hover
48
+ *
49
+ * The menus used to be CSS hover: shown while the pointer was over them. So a
50
+ * menu stayed open after an item was chosen (the pointer was still there),
51
+ * Escape could not close it, and a keyboard could not open one at all. Now a
52
+ * menu opens on a click or a key and closes when an item is chosen, on
53
+ * Escape, on Tab, or on a click elsewhere. While one is open, pointing at
54
+ * another switches to it, as desktop menu bars do.
55
+ *
56
+ * Keys, following the WAI-ARIA menu button pattern: Enter, Space or ↓ on a
57
+ * menu name opens it at its first item, ↑ at its last; ↑ ↓ Home End move
58
+ * through items; ← → move to the neighbouring menu; → or Enter on an item with
59
+ * a submenu opens it and ← closes it; Escape closes and returns focus to the
60
+ * menu's name.
61
+ *
47
62
  * @example
48
63
  * ```tsx
49
64
  * <MenuBar
@@ -41,5 +41,16 @@ export declare const dialogueMapperMenus: {
41
41
  commandId: string;
42
42
  }[];
43
43
  };
44
+ /**
45
+ * A model from JSON, with empty borders hidden.
46
+ *
47
+ * The default layout has a left border for tabs to be docked into, and with
48
+ * nothing docked it still drew a 30px blank strip down the edge of every app.
49
+ * Auto-hide removes it while it is empty; a tab dragged to the edge docks as
50
+ * before. Applied to stored layouts too, since those carry the border and
51
+ * not the setting — an app that wants the strip says so with
52
+ * `borderEnableAutoHide: false`.
53
+ */
54
+ export declare const layoutFromJson: (json: IJsonModel) => Model;
44
55
  export declare const useLayoutStore: import('zustand').UseBoundStore<import('zustand').StoreApi<LayoutState>>;
45
56
  export {};