@sovereignfs/ui 0.106.0 → 0.107.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/dist/index.d.ts CHANGED
@@ -506,7 +506,7 @@ interface BadgeProps {
506
506
  */
507
507
  declare function Badge({ variant, size, status, uppercase, children, }: BadgeProps): react.JSX.Element;
508
508
 
509
- type IconName = 'house' | 'settings' | 'log-out' | 'smartphone' | 'chevron-right' | 'chevron-left' | 'chevron-down' | 'chevron-up' | 'circle-chevron-left' | 'menu' | 'x' | 'check' | 'plus' | 'trash-2' | 'pencil' | 'rotate-ccw' | 'search' | 'copy' | 'user' | 'users' | 'user-round-plus' | 'shield' | 'lock' | 'eye' | 'eye-off' | 'hat-glasses' | 'mail' | 'message-square' | 'archive' | 'archive-restore' | 'clock' | 'bell' | 'inbox' | 'activity' | 'package' | 'database' | 'layers' | 'grid-2x2' | 'layout-dashboard' | 'layout-grid' | 'square-kanban' | 'info' | 'alert-triangle' | 'circle-check' | 'circle-x' | 'calendar' | 'sliders-horizontal' | 'ellipsis-vertical' | 'rectangle-ellipsis' | 'file' | 'folder' | 'upload' | 'download' | 'external-link' | 'arrow-left-right' | 'send' | 'list' | 'list-ordered' | 'link' | 'code' | 'rotate-cw' | 'refresh-cw' | 'history' | 'minus' | 'table' | 'sheet' | 'folders' | 'folder-closed' | 'file-text' | 'folder-open' | 'share-2' | 'luggage' | 'map-pin' | 'route' | 'bold' | 'italic' | 'paint-bucket' | 'banana' | 'apple' | 'carrot' | 'egg' | 'beef' | 'fish' | 'coffee' | 'wine' | 'beer' | 'cookie' | 'pizza' | 'candy' | 'salad' | 'milk' | 'drumstick' | 'croissant' | 'cup-soda' | 'spray-can' | 'snowflake' | 'shopping-basket' | 'panel-left' | 'pin' | 'credit-card' | 'ban' | 'shield-off' | 'user-x' | 'panel-left-close' | 'panel-left-open' | 'list-todo' | 'user-plus' | 'calendar-days' | 'folder-kanban' | 'folder-lock' | 'folder-plus' | 'folder-input' | 'file-image' | 'square-text' | 'file-code-corner' | 'archive-x' | 'settings-2' | 'arrow-right-left' | 'save' | 'hard-drive' | 'notebook-pen' | 'fingerprint-pattern';
509
+ type IconName = 'house' | 'settings' | 'log-out' | 'smartphone' | 'chevron-right' | 'chevron-left' | 'chevron-down' | 'chevron-up' | 'circle-chevron-left' | 'menu' | 'x' | 'check' | 'plus' | 'trash-2' | 'pencil' | 'rotate-ccw' | 'search' | 'copy' | 'user' | 'users' | 'user-round-plus' | 'shield' | 'lock' | 'eye' | 'eye-off' | 'hat-glasses' | 'mail' | 'message-square' | 'archive' | 'archive-restore' | 'clock' | 'bell' | 'inbox' | 'activity' | 'package' | 'database' | 'layers' | 'grid-2x2' | 'layout-dashboard' | 'layout-grid' | 'square-kanban' | 'info' | 'alert-triangle' | 'circle-check' | 'circle-x' | 'calendar' | 'sliders-horizontal' | 'ellipsis-vertical' | 'rectangle-ellipsis' | 'file' | 'folder' | 'upload' | 'download' | 'external-link' | 'arrow-left-right' | 'send' | 'list' | 'list-ordered' | 'link' | 'code' | 'rotate-cw' | 'refresh-cw' | 'history' | 'minus' | 'table' | 'sheet' | 'folders' | 'folder-closed' | 'file-text' | 'folder-open' | 'share-2' | 'luggage' | 'map-pin' | 'route' | 'bold' | 'italic' | 'paint-bucket' | 'banana' | 'apple' | 'carrot' | 'egg' | 'beef' | 'fish' | 'coffee' | 'wine' | 'beer' | 'cookie' | 'pizza' | 'candy' | 'salad' | 'milk' | 'drumstick' | 'croissant' | 'cup-soda' | 'spray-can' | 'snowflake' | 'shopping-basket' | 'panel-left' | 'pin' | 'credit-card' | 'ban' | 'shield-off' | 'user-x' | 'panel-left-close' | 'panel-left-open' | 'list-todo' | 'user-plus' | 'calendar-days' | 'folder-kanban' | 'folder-lock' | 'folder-plus' | 'folder-input' | 'file-image' | 'square-text' | 'file-code-corner' | 'archive-x' | 'settings-2' | 'arrow-right-left' | 'save' | 'hard-drive' | 'notebook-pen' | 'fingerprint-pattern' | 'square-pen' | 'shopping-cart' | 'store' | 'hammer' | 'wrench' | 'plug' | 'laptop' | 'headphones' | 'shirt' | 'gift' | 'sprout' | 'flower-2' | 'briefcase' | 'paperclip' | 'pill' | 'baby' | 'dog' | 'sofa' | 'wallet-cards' | 'scan-barcode';
510
510
 
511
511
  /** Decorative icon — visually meaningful but described by surrounding text. */
512
512
  type DecorativeProps = {
@@ -860,6 +860,9 @@ interface DialogProps {
860
860
  * — restyle the title text (e.g. a smaller font size to match a
861
861
  * consumer's own compact header elsewhere). */
862
862
  titleClassName?: string;
863
+ /** The body fills the panel edge to edge, with no padding and no scrolling of its own: for content that lays out and
864
+ * scrolls its own regions (`SettingsDialog`'s navigation and section). Off by default. */
865
+ flush?: boolean;
863
866
  children: ReactNode;
864
867
  }
865
868
  /**
@@ -893,7 +896,7 @@ interface DialogProps {
893
896
  * are present render as non-scrolling flex siblings around `.content`, which
894
897
  * stays the only scrollable region in every shape.
895
898
  */
896
- declare function Dialog({ open, onClose, size, 'aria-label': ariaLabel, title, header, footer, rowClassName, titleClassName, children, }: DialogProps): react.ReactPortal | null;
899
+ declare function Dialog({ open, onClose, size, 'aria-label': ariaLabel, title, header, footer, rowClassName, titleClassName, flush, children, }: DialogProps): react.ReactPortal | null;
897
900
 
898
901
  interface DrawerProps {
899
902
  /** Whether the drawer is shown. When false, nothing renders. */
@@ -1294,6 +1297,20 @@ interface AppsLauncherProps {
1294
1297
  'aria-label'?: string;
1295
1298
  align?: 'left' | 'right';
1296
1299
  }
1300
+ /** One of the apps a person can open, as the Core API's `listMyApps` answers it (the SDK's `apps.list()`). */
1301
+ interface LauncherAppTile {
1302
+ id: string;
1303
+ name: string;
1304
+ icon: string | null;
1305
+ launchUrl: string;
1306
+ }
1307
+ /**
1308
+ * The launcher's items for the apps a person can open: each app's icon, or its name's first letter when it has none, opening its
1309
+ * launch address. The app the launcher is in, when named, is left out, since a person is already in it.
1310
+ */
1311
+ declare function appsLauncherItems(apps: readonly LauncherAppTile[], options?: {
1312
+ current?: string;
1313
+ }): AppsLauncherItem[];
1297
1314
  /**
1298
1315
  * AppsLauncher — the desktop "Apps" switcher: a 28px grid-icon trigger that
1299
1316
  * opens a `Popover` with a 3-column tile grid. The desktop counterpart to
@@ -1600,6 +1617,10 @@ interface HeaderProps extends HTMLAttributes<HTMLElement> {
1600
1617
  instanceLogoUrl?: string;
1601
1618
  /** Where the brand badge links — typically the Launcher plugin's route. */
1602
1619
  homeHref: string;
1620
+ /** An app's own wordmark, drawn in place of the brand badge: already built by the app, its own link included (to its
1621
+ * home). Omit for the badge, which is core's. `instanceName` still names the header's home for assistive technology
1622
+ * only when the badge is drawn. */
1623
+ brand?: ReactNode;
1603
1624
  /** The active plugin, rendered next to the brand badge. Omit for a page
1604
1625
  * with no single active plugin (e.g. the Launcher itself). */
1605
1626
  plugin?: HeaderPlugin;
@@ -1634,7 +1655,7 @@ interface HeaderProps extends HTMLAttributes<HTMLElement> {
1634
1655
  * implementation. Every slot on the right is optional, so an app that runs
1635
1656
  * on its own (with no launcher, say) uses this header too.
1636
1657
  */
1637
- declare function Header({ instanceName, instanceLogoUrl, homeHref, plugin, leading, launcher, notifications, avatarMenu, className, ...rest }: HeaderProps): react.JSX.Element;
1658
+ declare function Header({ instanceName, instanceLogoUrl, homeHref, brand, plugin, leading, launcher, notifications, avatarMenu, className, ...rest }: HeaderProps): react.JSX.Element;
1638
1659
 
1639
1660
  interface MobileHeaderProps extends HTMLAttributes<HTMLDivElement> {
1640
1661
  /** The brand/logo element — already a complete, clickable link home (e.g. an
@@ -1690,9 +1711,12 @@ interface FooterIcon {
1690
1711
  active?: boolean;
1691
1712
  }
1692
1713
  interface MobileFooterProps extends HTMLAttributes<HTMLElement> {
1693
- /** Opens the app drawer/launcher. Always rendered as the centered slot;
1694
- * not overridable. */
1714
+ /** Opens what the centered button opens: the apps by default, or what `launcherLabel` names (an app's own drawer).
1715
+ * Always rendered as the centered slot. */
1695
1716
  onOpenApps: () => void;
1717
+ /** The centered button's name, read by assistive technology: "Apps" when not given. An app whose middle button opens
1718
+ * something of its own (its lists, say) names it here, with `launcherIcon` to match. */
1719
+ launcherLabel?: string;
1696
1720
  /** Custom launcher icon (e.g. a plugin-supplied image). Defaults to a
1697
1721
  * generic grid icon. */
1698
1722
  launcherIcon?: ReactNode;
@@ -1725,7 +1749,7 @@ interface MobileFooterProps extends HTMLAttributes<HTMLElement> {
1725
1749
  * pattern, correctly clear `Sheet`/`Drawer`/`Dialog` instead of being
1726
1750
  * overlapped by them).
1727
1751
  */
1728
- declare function MobileFooter({ onOpenApps, launcherIcon, launcherOpen, leftIcons, rightIcons, className, ...rest }: MobileFooterProps): react.JSX.Element;
1752
+ declare function MobileFooter({ onOpenApps, launcherIcon, launcherLabel, launcherOpen, leftIcons, rightIcons, className, ...rest }: MobileFooterProps): react.JSX.Element;
1729
1753
 
1730
1754
  interface MobileAppsDrawerItem {
1731
1755
  /** Stable identity for this tile — used as the React key. */
@@ -1942,6 +1966,267 @@ interface PushControlProps {
1942
1966
  */
1943
1967
  declare function PushControl({ appName, state, working, error, onTurnOn, onTurnOff, children, className, }: PushControlProps): react.JSX.Element | null;
1944
1968
 
1969
+ /**
1970
+ * Linear barcodes as bars: EAN-13, EAN-8, UPC-A, Code 128 and Code 39, each to a row of modules (`true` is a bar), with no
1971
+ * dependency. Pure, so that each kind is tested against known codes with no browser. The quiet zone is the drawer's.
1972
+ */
1973
+ type BarcodeFormat = 'ean13' | 'ean8' | 'upca' | 'code128' | 'code39';
1974
+ interface EncodedBarcode {
1975
+ /** The bars and spaces, one module each. */
1976
+ modules: boolean[];
1977
+ /** What is written under the bars: the value with its check digit, where the kind has one. */
1978
+ text: string;
1979
+ /** The quiet zone each side, in modules, as the kind's specification asks at least. */
1980
+ quiet: number;
1981
+ }
1982
+ /** The GS1 check digit of the digits before it: weights 3 and 1 from the right. */
1983
+ declare function gs1CheckDigit(digits: string): number;
1984
+ /** The bars of a value in a kind, or null when the value cannot be that kind (a wrong check digit, a character it has not). */
1985
+ declare function encodeBarcode(format: BarcodeFormat, value: string): EncodedBarcode | null;
1986
+
1987
+ interface BarcodeProps {
1988
+ format: BarcodeFormat;
1989
+ /** The value. EAN-13, EAN-8 and UPC-A take it with or without its check digit; a wrong one is refused. */
1990
+ value: string;
1991
+ /** What the picture is, for a screen reader: a barcode is read by a scanner, not a person. */
1992
+ label: string;
1993
+ /** Whether the value is written under the bars, as a cashier reads it when the scanner cannot. On by default. */
1994
+ showText?: boolean;
1995
+ /** Said in place of the bars when the value cannot be drawn in its kind. English by default. */
1996
+ invalidText?: string;
1997
+ }
1998
+ /**
1999
+ * Barcode — a linear barcode (EAN-13, EAN-8, UPC-A, Code 128, Code 39) drawn as an inline SVG, as `QrCode` draws a QR code: no
2000
+ * dependency, nothing requested, nothing injected as markup. Black on white in every theme, with its quiet zone, scaled to its
2001
+ * width. A value its kind cannot hold draws no bars and says so.
2002
+ */
2003
+ declare function Barcode({ format, value, label, showText, invalidText, }: BarcodeProps): react.JSX.Element;
2004
+
2005
+ interface AppSidebarItem {
2006
+ id: string;
2007
+ label: string;
2008
+ /** Where it goes. Without one, the row is a button calling `onClick`. */
2009
+ href?: string;
2010
+ onClick?: () => void;
2011
+ /** The row's icon. On a rail an item with none shows its label's first letter. */
2012
+ icon?: IconName;
2013
+ /** The icon's colour (an app's or a person's `#rrggbb`), drawn on the ordinary surface: never a background or the text's. */
2014
+ iconColor?: string;
2015
+ /** A count after the label, such as what is still open. */
2016
+ count?: ReactNode;
2017
+ /** A second line under the label, such as whose it is. */
2018
+ description?: string;
2019
+ /** Whether this is the page shown, decided by the app. */
2020
+ active?: boolean;
2021
+ }
2022
+ interface AppSidebarAction {
2023
+ /** The row's words, such as "New list". */
2024
+ label: string;
2025
+ href?: string;
2026
+ onClick?: () => void;
2027
+ }
2028
+ interface AppSidebarBlock {
2029
+ id: string;
2030
+ /** A heading over the block; none for a block of the app's places. */
2031
+ heading?: string;
2032
+ items: AppSidebarItem[];
2033
+ /** A trailing _+ New …_ row. */
2034
+ action?: AppSidebarAction;
2035
+ }
2036
+ /** Props for a consumer's own link element (Next's `<Link>`). */
2037
+ interface AppSidebarLinkProps {
2038
+ href: string;
2039
+ className: string;
2040
+ 'aria-current': 'page' | undefined;
2041
+ 'aria-label': string | undefined;
2042
+ /** The label as the pointer's tooltip, on a rail. */
2043
+ title: string | undefined;
2044
+ onClick: (() => void) | undefined;
2045
+ children: ReactNode;
2046
+ }
2047
+ interface AppSidebarProps {
2048
+ blocks: AppSidebarBlock[];
2049
+ /** `full` or `rail` (from `useAppSidebar`); `hidden` draws nothing. */
2050
+ state: 'full' | 'rail' | 'hidden';
2051
+ /** The sidebar's own button, from full to a rail and back. Omit for no button. */
2052
+ onToggleRail?: () => void;
2053
+ /** The navigation's accessible name, usually the app's. */
2054
+ 'aria-label': string;
2055
+ /** The rail button's words: `[widen, narrow]`. English by default. */
2056
+ railLabels?: readonly [string, string];
2057
+ /** Anything under the blocks, before the rail button. */
2058
+ footer?: ReactNode;
2059
+ /** Told when a row or an action is followed: a drawer closes on it. */
2060
+ onNavigate?: () => void;
2061
+ renderLink?: (item: AppSidebarItem | AppSidebarAction, linkProps: AppSidebarLinkProps) => ReactNode;
2062
+ /** `side` (default): a column at the left of the page. `drawer`: the same blocks filling a phone's drawer, with room to touch. */
2063
+ placement?: 'side' | 'drawer';
2064
+ className?: string;
2065
+ }
2066
+ /**
2067
+ * AppSidebar — the sidebar every app's frame has, drawn once. Full, a rail of icons (each named by its label, which the pointer
2068
+ * shows as the browser's own tooltip: a drawn one would be cut off by the sidebar's scrolling) or hidden,
2069
+ * as `useAppSidebar` keeps it per app and per kind of page. Its content is blocks, each with an optional heading, rows with an
2070
+ * icon in a colour and a count, and an optional trailing _+ New …_ row.
2071
+ *
2072
+ * Framework-agnostic: links come from `renderLink`, and what is current is the app's to say. It knows nothing of an app's data
2073
+ * or words: every label is given.
2074
+ */
2075
+ declare function AppSidebar({ blocks, state, onToggleRail, 'aria-label': ariaLabel, railLabels, footer, onNavigate, renderLink, placement, className, }: AppSidebarProps): react.JSX.Element | null;
2076
+
2077
+ /**
2078
+ * How an app's sidebar is shown: **full**, a **rail** of icons, or **hidden**. It is a choice about a screen, not a person's data,
2079
+ * so it is kept on the device, per app and **per kind of page**: the app names its kinds (`'home'` and `'page'`, say), and a
2080
+ * person's choice changes that kind's default on this device and nothing else. Every kind opens full unless the app says
2081
+ * otherwise.
2082
+ *
2083
+ * Pure: what was stored goes in and a state comes out, so the rules are tested with no browser. Taken from Shopper's
2084
+ * `src/ui/sidebar.ts`, its first consumer, with the kinds of page left to the app.
2085
+ */
2086
+ type SidebarState = 'full' | 'rail' | 'hidden';
2087
+ /** What is kept for a kind of page: how it is shown, and how it was shown last when not hidden, so that showing it again is what it was. */
2088
+ interface SidebarMemory {
2089
+ state: SidebarState;
2090
+ shown: Exclude<SidebarState, 'hidden'>;
2091
+ }
2092
+ type SidebarStored = Readonly<Record<string, SidebarMemory>>;
2093
+ /** The key an app's choices are kept under on the device. */
2094
+ declare const sidebarStorageKey: (appId: string) => string;
2095
+ /** What was stored, read defensively: anything that is not what was written is ignored, and the default stands. */
2096
+ declare function parseSidebarStored(raw: string | null | undefined): SidebarStored;
2097
+ declare const sidebarStateFor: (kind: string, stored: SidebarStored, fallback?: SidebarState) => SidebarState;
2098
+ /** The header's button: hides the sidebar, or shows it again as it was. */
2099
+ declare function toggleSidebarHidden(kind: string, stored: SidebarStored, fallback?: SidebarState): SidebarStored;
2100
+ /** The sidebar's own button: full becomes a rail and a rail becomes full. A hidden sidebar has no such button. */
2101
+ declare function toggleSidebarRail(kind: string, stored: SidebarStored, fallback?: SidebarState): SidebarStored;
2102
+
2103
+ /** The phone's footer: `MobileFooter`'s icons and middle button. Without `onOpenApps`, the middle button opens the navigation drawer. */
2104
+ type AppFrameFooter = Omit<MobileFooterProps, 'onOpenApps' | 'launcherOpen'> & {
2105
+ onOpenApps?: () => void;
2106
+ launcherOpen?: boolean;
2107
+ };
2108
+ interface AppFrameLabels {
2109
+ /** The header's sidebar button, when it hides the sidebar. */
2110
+ hideSidebar: string;
2111
+ /** The header's sidebar button, when it shows the sidebar again. */
2112
+ showSidebar: string;
2113
+ /** The phone header's button that opens the navigation drawer. */
2114
+ openNavigation: string;
2115
+ }
2116
+ interface AppFrameProps {
2117
+ /** The app's id: its sidebar's choices are kept on the device under it. */
2118
+ appId: string;
2119
+ /** The app's name: the navigation's accessible name and the header's home for assistive technology. */
2120
+ name: string;
2121
+ /** The app's wordmark, already a link home. Drawn in the header on every screen. */
2122
+ brand: ReactNode;
2123
+ /** The kind of page shown (`'home'`, `'page'`, as the app names them): the sidebar is remembered per kind. */
2124
+ pageKind: string;
2125
+ /** How the sidebar is shown on a kind of page until a person chooses. `full` by default. */
2126
+ defaultSidebar?: SidebarState;
2127
+ /** The sidebar's blocks, which the phone's drawer shows too. */
2128
+ blocks: AppSidebarBlock[];
2129
+ renderLink?: AppSidebarProps['renderLink'];
2130
+ /** Under the sidebar's blocks. */
2131
+ sidebarFooter?: ReactNode;
2132
+ /** The suite's launcher, the bell and the avatar menu: each drawn only when given, in that order. On a phone there is no launcher. */
2133
+ launcher?: ReactNode;
2134
+ notifications?: ReactNode;
2135
+ avatarMenu?: ReactNode;
2136
+ /** The phone's footer. Omit for none. */
2137
+ footer?: AppFrameFooter;
2138
+ /** The right column (an item, a card): beside the content on a wide screen, over it on a phone. */
2139
+ detail?: ReactNode;
2140
+ /** The frame's own words; English by default. */
2141
+ labels?: Partial<AppFrameLabels>;
2142
+ /** Where the header's home is when no `brand` link is followed (core's badge falls back to it). `/` by default. */
2143
+ homeHref?: string;
2144
+ children: ReactNode;
2145
+ }
2146
+ /**
2147
+ * AppFrame — the frame of every app's signed-in page: on a wide screen `Header`, `AppSidebar`, the content and an optional right
2148
+ * column; on a phone `MobileHeader`, the content, `MobileFooter` and a `Drawer` with the sidebar's blocks. Only what is drawn
2149
+ * differs by the screen: the routes, the blocks and what each row opens are the same, and nothing here changes an address.
2150
+ *
2151
+ * It is the shell root (`#sv-app-shell`) that overlays portal into, and it publishes the header's and the footer's heights
2152
+ * (`--sv-shell-header-height`, `--sv-shell-footer-height`) so that dialogs, drawers, toasts and a floating button clear them, as
2153
+ * Tusk's and Shopper's own frames did.
2154
+ */
2155
+ declare function AppFrame({ appId, name, brand, pageKind, defaultSidebar, blocks, renderLink, sidebarFooter, launcher, notifications, avatarMenu, footer, detail, labels, homeHref, children, }: AppFrameProps): react.JSX.Element;
2156
+
2157
+ interface AppSidebarControl {
2158
+ /** How the sidebar is shown here. Always `hidden` on a phone, whose navigation is a drawer. */
2159
+ state: SidebarState;
2160
+ /** Whether there is a sidebar to show at this width (not on a phone). */
2161
+ available: boolean;
2162
+ /** The header's button: hides it, or shows it again as it was. */
2163
+ toggleHidden(): void;
2164
+ /** The sidebar's own button: full to a rail and back. */
2165
+ toggleRail(): void;
2166
+ }
2167
+ /**
2168
+ * How an app's sidebar is shown on a kind of page, on this device. The server and the first paint show the default, so that the
2169
+ * two agree; what the person chose before is read in an effect straight after, and a change in another tab is followed.
2170
+ */
2171
+ declare function useAppSidebar(appId: string, pageKind: string, fallback?: SidebarState): AppSidebarControl;
2172
+
2173
+ interface SettingsSection {
2174
+ id: string;
2175
+ label: string;
2176
+ icon: IconName;
2177
+ /** The section's content, shown with no heading of its own: the navigation names it. */
2178
+ content: ReactNode;
2179
+ /** The section's own address, when the app gives each one (rendered as a link with `renderLink`, or a plain `<a>`). */
2180
+ href?: string;
2181
+ }
2182
+ interface SettingsGroup {
2183
+ id: string;
2184
+ sections: SettingsSection[];
2185
+ }
2186
+ /** Props for a consumer's own link element (Next's `<Link>`), as `NavList`'s `renderLink` receives them. */
2187
+ interface SettingsLinkProps {
2188
+ href: string;
2189
+ className: string;
2190
+ 'aria-current': 'page' | undefined;
2191
+ onClick: () => void;
2192
+ children: ReactNode;
2193
+ }
2194
+ interface SettingsDialogProps {
2195
+ open: boolean;
2196
+ onClose: () => void;
2197
+ /** The dialog's title, shown across its width. "Settings" when not given. */
2198
+ title?: string;
2199
+ /** Sections in groups; a divider is drawn between groups. */
2200
+ groups: SettingsGroup[];
2201
+ /**
2202
+ * The section shown. `null` shows the sections alone on a phone (the first step there) and the first section on a wider
2203
+ * screen, so that the same value is right for both and nothing about the route depends on the viewport.
2204
+ */
2205
+ active: string | null;
2206
+ /** Called with a section's id when it is chosen, and with `null` by a phone's back arrow. */
2207
+ onSelect: (id: string | null) => void;
2208
+ /** A search box over the sections, filtering them by label. Off by default. */
2209
+ search?: boolean;
2210
+ /** The search box's label and placeholder. "Search settings" when not given. */
2211
+ searchLabel?: string;
2212
+ /** The back arrow's accessible name on a phone. "Back" when not given. */
2213
+ backLabel?: string;
2214
+ /** Size on a wide screen: `lg` fills the screen with a margin, `fixed` is capped. Always the whole screen on a phone. */
2215
+ size?: 'lg' | 'fixed';
2216
+ renderLink?: (section: SettingsSection, linkProps: SettingsLinkProps) => ReactNode;
2217
+ }
2218
+ /**
2219
+ * SettingsDialog — settings as one dialog with a side navigation, the same in core and every app.
2220
+ *
2221
+ * A title row and close across the width; on the left, sections in groups with a divider between groups, each with an
2222
+ * icon, and an optional search; on the right, the active section's content, scrolling inside a frame that never changes
2223
+ * size. On a phone it is the whole screen: the sections, then one section with a back arrow.
2224
+ *
2225
+ * Controlled: the app decides which section is shown (`active`, `onSelect`), so that it can give every section an
2226
+ * address. Framework-agnostic: links come from `renderLink`.
2227
+ */
2228
+ declare function SettingsDialog({ open, onClose, title, groups, active, onSelect, search, searchLabel, backLabel, size, renderLink, }: SettingsDialogProps): react.JSX.Element;
2229
+
1945
2230
  interface DeviceOnlyGateProps {
1946
2231
  children: ReactNode;
1947
2232
  /** Defaults to a generic "this app" phrasing — pass the plugin's own name. */
@@ -4222,5 +4507,5 @@ interface QrCodeProps {
4222
4507
  */
4223
4508
  declare function QrCode({ modules, label }: QrCodeProps): react.JSX.Element;
4224
4509
 
4225
- export { Accordion, Alert, AppTile, AppsLauncher, AspectRatio, AuthButton, AuthCard, AuthCodeInput, AuthDivider, AuthError, AuthField, AuthFooter, AuthForm, AuthLink, AuthLinkButton, AuthNotice, AuthShell, Avatar, AvatarStack, Badge, BalanceChip, BrandBadge, Breadcrumb, Button, ButtonGroup, ButtonLink, Calendar, Card, CardTile, CardTileGrid, ChangePasswordForm, CheckableListRow, Checkbox, CodeTextarea, Collapsible, ColorPicker, Combobox, Command, ConfirmDialog, ConsentPrompt, ContextMenu, CopyButton, CurrencyInput, DataTable, DatePicker, DateRangePicker, DeviceOnlyGate, DeviceStorageKeyGate, Dialog, DragHandleRow, Drawer, EmptyState, ExportPanel, FileDropzone, FloatingActionButton, ForgotPasswordForm, FormField, GripIcon, Header, HeaderFooterLayout, HoverCard, IOS_INSTALL_STEPS, Icon, IconPicker, Input, InstallHint, InstallPrompt, Item, Kbd, Label, LegalLinks, LinkSovereignPanel, LockedState, MOBILE_BREAKPOINT_PX, Markdown, Marker, MemberMultiSelect, Menu, MenuEntries, Menubar, Message, MessageScroller, MobileAppsDrawer, MobileFooter, MobileHeader, NavList, NavTabs, NavigationMenu, NewCardTile, NotificationsPanel, OfflineGate, OverlayHeader, PageContainer, PageHeader, PageLayout, Pagination, PhotoGallery, PhotoGrid, PhotoViewer, Popover, ProfilePanel, Progress, PushControl, QrCode, QuantityStepper, RadioGroup, RangeCalendar, RecoveryKit, ResetPasswordForm, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResponsiveSurface, RootLayout, SWIPE_STACK_TRANSITION_MS, ScrollArea, SegmentedControl, Select, SessionsPanel, Sheet, SignInForm, SignUpForm, Slider, Spinner, SplitMethodSelector, SplitPane, StatusBadge, StepStrip, SuggestionInput, SwipableMobileCarousel, SwipableMobileCarouselDots, SwipableMobileCarouselSlide, SwipableMobileCarouselSlideBody, SwipableMobileCarouselSlideFooter, SwipableMobileCarouselSlideHeader, SwipeStack, SwipeStackCard, SystemBanner, THEME_PRESETS, THEME_PRESET_NAMES, Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow, Tabs, TagInput, Textarea, ThreeColumnLayout, ToastProvider, Toggle, Tooltip, TwoFactorForm, TwoFactorPanel, Typography, UpdateNotice, UserMenu, isInstalledDisplay, recoveryKitFileName, recoveryKitFileText, shouldHandleDndEvent, useCarouselRouteSync, useCommitOnEnterOrBlur, useDoubleTapHandler, useInstallPrompt, useIsMobile, useIsOffline, useLongPress, useOfflineTileState, useOverlaySecondRow, useReorderSensors, useResponsiveLayout, useSingleOrDoubleTap, useSnapCarousel, useSwipeReveal, useSwipeStack, useToast };
4226
- export type { AccordionItem, AccordionProps, ActionResult, AlertProps, AlertVariant, AppTileProps, AppsLauncherItem, AppsLauncherProps, AspectRatioProps, AuthCardProps, AuthCodeInputProps, AuthFieldControl, AuthFieldProps, AuthFooterProps, AuthLinkRenderer, AvatarProps, AvatarStackPerson, AvatarStackProps, BadgeProps, BadgeStatus, BadgeVariant, BalanceChipProps, BannerVariant, BrandBadgeProps, BreadcrumbItem, BreadcrumbProps, ButtonGroupProps, ButtonLinkProps, ButtonProps, ButtonSize, ButtonVariant, CalendarProps, CardProps, CardTileGridProps, CardTileProps, ChangePasswordFormProps, CheckableListRowProps, CheckboxProps, CodeTextareaProps, CollapsibleProps, ColorPickerProps, ColorPickerSwatch, ComboboxOption, ComboboxProps, CommandItem, CommandProps, CommitOnEnterOrBlurHandlers, ConfirmDialogProps, ConsentPromptProps, ContextMenuProps, CopyButtonProps, CurrencyInputProps, DataTableColumn, DataTableProps, DatePickerProps, DateRange, DateRangePickerProps, DeviceOnlyGateProps, DeviceStorageKeyGateProps, DeviceStorageKeyGateStatus, DialogProps, DialogSize, DragHandleRowProps, DrawerProps, EmptyStateProps, ExportPanelProps, ExportPanelStatus, ExportStartResult, FileDropzoneProps, FloatingActionButtonProps, FooterIcon, ForgotPasswordFormProps, FormFieldProps, FormFieldRenderProps, GripIconProps, HeaderFooterLayoutProps, HeaderPlugin, HeaderProps, HoverCardProps, IconName, IconPickerProps, IconProps, InputProps, InstallHintProps, InstallKind, InstallPromptProps, ItemProps, KbdProps, LabelProps, LegalLinksProps, LinkOutcome, LinkSovereignPanelProps, LockedReason, LockedStateProps, LongPressHandlers, MarkdownProps, MarkerProps, MemberMultiSelectOption, MemberMultiSelectProps, MenuEntry, MenuItem, MenuLabel, MenuProps, MenuSeparator, MenubarMenu, MenubarProps, MessageProps, MessageScrollerProps, MessageSender, MobileAppsDrawerItem, MobileAppsDrawerProps, MobileFooterProps, MobileHeaderProps, NavListGroup, NavListItem, NavListLinkProps, NavListProps, NavTabItem, NavTabLinkProps, NavTabsProps, NavigationMenuItem, NavigationMenuProps, NewCardTileProps, NotificationsPanelItem, NotificationsPanelProps, OfflineGateProps, OfflineTileState, OverlayHeaderProps, PageContainerProps, PageHeaderProps, PageLayoutPadding, PageLayoutProps, PaginationProps, PanelAction, Photo, PhotoGalleryProps, PhotoGridProps, PhotoViewerProps, PopoverProps, ProfilePanelProps, ProgressProps, PushControlProps, PushControlState, QrCodeProps, QuantityStepperProps, RadioGroupItem, RadioGroupProps, RangeCalendarProps, RecoveryKitProps, ResetPasswordFormProps, ResizableDirection, ResizableHandleProps, ResizablePanelGroupProps, ResizablePanelProps, ResponsiveSurfaceProps, RootLayoutProps, RootLayoutVariant, ScrollAreaProps, SegmentedControlProps, SegmentedOption, SelectProps, SessionRow, SessionsPanelProps, SheetProps, SignInFormProps, SignUpFormProps, SignUpValues, SliderProps, SortDirection, SpinnerProps, SplitMethod, SplitMethodSelectorProps, SplitPaneProps, StatusBadgeProps, StatusBadgeStatus, StepStripItem, StepStripProps, SuggestionInputProps, SuggestionOption, SwipableMobileCarouselDotsProps, SwipableMobileCarouselIndicatorProps, SwipableMobileCarouselProps, SwipableMobileCarouselSlideBodyProps, SwipableMobileCarouselSlideFooterProps, SwipableMobileCarouselSlideHeaderProps, SwipableMobileCarouselSlideProps, SwipeDirection, SwipeDirectionMeta, SwipeStackCardProps, SwipeStackProps, SystemBannerProps, TabItem, TableProps, TabsProps, TagInputProps, TextareaProps, ThemePresetName, ThemePresetTokens, ThreeColumnLayoutProps, ToastContextValue, ToastItem, ToggleProps, TooltipProps, TwoFactorAction, TwoFactorFormProps, TwoFactorPanelProps, TwoFactorStart, TypographyProps, TypographyVariant, UpdateNoticeProps, UseCarouselRouteSyncOptions, UseCarouselRouteSyncResult, UseInstallPrompt, UseLongPressOptions, UseReorderSensorsOptions, UseResponsiveLayoutOptions, UseResponsiveLayoutResult, UseSnapCarouselOptions, UseSnapCarouselResult, UseSwipeRevealHandlers, UseSwipeRevealOptions, UseSwipeRevealResult, UseSwipeStackHandlers, UseSwipeStackOptions, UseSwipeStackResult, UserMenuItem, UserMenuProps };
4510
+ export { Accordion, Alert, AppFrame, AppSidebar, AppTile, AppsLauncher, AspectRatio, AuthButton, AuthCard, AuthCodeInput, AuthDivider, AuthError, AuthField, AuthFooter, AuthForm, AuthLink, AuthLinkButton, AuthNotice, AuthShell, Avatar, AvatarStack, Badge, BalanceChip, Barcode, BrandBadge, Breadcrumb, Button, ButtonGroup, ButtonLink, Calendar, Card, CardTile, CardTileGrid, ChangePasswordForm, CheckableListRow, Checkbox, CodeTextarea, Collapsible, ColorPicker, Combobox, Command, ConfirmDialog, ConsentPrompt, ContextMenu, CopyButton, CurrencyInput, DataTable, DatePicker, DateRangePicker, DeviceOnlyGate, DeviceStorageKeyGate, Dialog, DragHandleRow, Drawer, EmptyState, ExportPanel, FileDropzone, FloatingActionButton, ForgotPasswordForm, FormField, GripIcon, Header, HeaderFooterLayout, HoverCard, IOS_INSTALL_STEPS, Icon, IconPicker, Input, InstallHint, InstallPrompt, Item, Kbd, Label, LegalLinks, LinkSovereignPanel, LockedState, MOBILE_BREAKPOINT_PX, Markdown, Marker, MemberMultiSelect, Menu, MenuEntries, Menubar, Message, MessageScroller, MobileAppsDrawer, MobileFooter, MobileHeader, NavList, NavTabs, NavigationMenu, NewCardTile, NotificationsPanel, OfflineGate, OverlayHeader, PageContainer, PageHeader, PageLayout, Pagination, PhotoGallery, PhotoGrid, PhotoViewer, Popover, ProfilePanel, Progress, PushControl, QrCode, QuantityStepper, RadioGroup, RangeCalendar, RecoveryKit, ResetPasswordForm, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResponsiveSurface, RootLayout, SWIPE_STACK_TRANSITION_MS, ScrollArea, SegmentedControl, Select, SessionsPanel, SettingsDialog, Sheet, SignInForm, SignUpForm, Slider, Spinner, SplitMethodSelector, SplitPane, StatusBadge, StepStrip, SuggestionInput, SwipableMobileCarousel, SwipableMobileCarouselDots, SwipableMobileCarouselSlide, SwipableMobileCarouselSlideBody, SwipableMobileCarouselSlideFooter, SwipableMobileCarouselSlideHeader, SwipeStack, SwipeStackCard, SystemBanner, THEME_PRESETS, THEME_PRESET_NAMES, Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow, Tabs, TagInput, Textarea, ThreeColumnLayout, ToastProvider, Toggle, Tooltip, TwoFactorForm, TwoFactorPanel, Typography, UpdateNotice, UserMenu, appsLauncherItems, encodeBarcode, gs1CheckDigit, isInstalledDisplay, parseSidebarStored, recoveryKitFileName, recoveryKitFileText, shouldHandleDndEvent, sidebarStateFor, sidebarStorageKey, toggleSidebarHidden, toggleSidebarRail, useAppSidebar, useCarouselRouteSync, useCommitOnEnterOrBlur, useDoubleTapHandler, useInstallPrompt, useIsMobile, useIsOffline, useLongPress, useOfflineTileState, useOverlaySecondRow, useReorderSensors, useResponsiveLayout, useSingleOrDoubleTap, useSnapCarousel, useSwipeReveal, useSwipeStack, useToast };
4511
+ export type { AccordionItem, AccordionProps, ActionResult, AlertProps, AlertVariant, AppFrameFooter, AppFrameLabels, AppFrameProps, AppSidebarAction, AppSidebarBlock, AppSidebarControl, AppSidebarItem, AppSidebarLinkProps, AppSidebarProps, AppTileProps, AppsLauncherItem, AppsLauncherProps, AspectRatioProps, AuthCardProps, AuthCodeInputProps, AuthFieldControl, AuthFieldProps, AuthFooterProps, AuthLinkRenderer, AvatarProps, AvatarStackPerson, AvatarStackProps, BadgeProps, BadgeStatus, BadgeVariant, BalanceChipProps, BannerVariant, BarcodeFormat, BarcodeProps, BrandBadgeProps, BreadcrumbItem, BreadcrumbProps, ButtonGroupProps, ButtonLinkProps, ButtonProps, ButtonSize, ButtonVariant, CalendarProps, CardProps, CardTileGridProps, CardTileProps, ChangePasswordFormProps, CheckableListRowProps, CheckboxProps, CodeTextareaProps, CollapsibleProps, ColorPickerProps, ColorPickerSwatch, ComboboxOption, ComboboxProps, CommandItem, CommandProps, CommitOnEnterOrBlurHandlers, ConfirmDialogProps, ConsentPromptProps, ContextMenuProps, CopyButtonProps, CurrencyInputProps, DataTableColumn, DataTableProps, DatePickerProps, DateRange, DateRangePickerProps, DeviceOnlyGateProps, DeviceStorageKeyGateProps, DeviceStorageKeyGateStatus, DialogProps, DialogSize, DragHandleRowProps, DrawerProps, EmptyStateProps, EncodedBarcode, ExportPanelProps, ExportPanelStatus, ExportStartResult, FileDropzoneProps, FloatingActionButtonProps, FooterIcon, ForgotPasswordFormProps, FormFieldProps, FormFieldRenderProps, GripIconProps, HeaderFooterLayoutProps, HeaderPlugin, HeaderProps, HoverCardProps, IconName, IconPickerProps, IconProps, InputProps, InstallHintProps, InstallKind, InstallPromptProps, ItemProps, KbdProps, LabelProps, LauncherAppTile, LegalLinksProps, LinkOutcome, LinkSovereignPanelProps, LockedReason, LockedStateProps, LongPressHandlers, MarkdownProps, MarkerProps, MemberMultiSelectOption, MemberMultiSelectProps, MenuEntry, MenuItem, MenuLabel, MenuProps, MenuSeparator, MenubarMenu, MenubarProps, MessageProps, MessageScrollerProps, MessageSender, MobileAppsDrawerItem, MobileAppsDrawerProps, MobileFooterProps, MobileHeaderProps, NavListGroup, NavListItem, NavListLinkProps, NavListProps, NavTabItem, NavTabLinkProps, NavTabsProps, NavigationMenuItem, NavigationMenuProps, NewCardTileProps, NotificationsPanelItem, NotificationsPanelProps, OfflineGateProps, OfflineTileState, OverlayHeaderProps, PageContainerProps, PageHeaderProps, PageLayoutPadding, PageLayoutProps, PaginationProps, PanelAction, Photo, PhotoGalleryProps, PhotoGridProps, PhotoViewerProps, PopoverProps, ProfilePanelProps, ProgressProps, PushControlProps, PushControlState, QrCodeProps, QuantityStepperProps, RadioGroupItem, RadioGroupProps, RangeCalendarProps, RecoveryKitProps, ResetPasswordFormProps, ResizableDirection, ResizableHandleProps, ResizablePanelGroupProps, ResizablePanelProps, ResponsiveSurfaceProps, RootLayoutProps, RootLayoutVariant, ScrollAreaProps, SegmentedControlProps, SegmentedOption, SelectProps, SessionRow, SessionsPanelProps, SettingsDialogProps, SettingsGroup, SettingsLinkProps, SettingsSection, SheetProps, SidebarMemory, SidebarState, SidebarStored, SignInFormProps, SignUpFormProps, SignUpValues, SliderProps, SortDirection, SpinnerProps, SplitMethod, SplitMethodSelectorProps, SplitPaneProps, StatusBadgeProps, StatusBadgeStatus, StepStripItem, StepStripProps, SuggestionInputProps, SuggestionOption, SwipableMobileCarouselDotsProps, SwipableMobileCarouselIndicatorProps, SwipableMobileCarouselProps, SwipableMobileCarouselSlideBodyProps, SwipableMobileCarouselSlideFooterProps, SwipableMobileCarouselSlideHeaderProps, SwipableMobileCarouselSlideProps, SwipeDirection, SwipeDirectionMeta, SwipeStackCardProps, SwipeStackProps, SystemBannerProps, TabItem, TableProps, TabsProps, TagInputProps, TextareaProps, ThemePresetName, ThemePresetTokens, ThreeColumnLayoutProps, ToastContextValue, ToastItem, ToggleProps, TooltipProps, TwoFactorAction, TwoFactorFormProps, TwoFactorPanelProps, TwoFactorStart, TypographyProps, TypographyVariant, UpdateNoticeProps, UseCarouselRouteSyncOptions, UseCarouselRouteSyncResult, UseInstallPrompt, UseLongPressOptions, UseReorderSensorsOptions, UseResponsiveLayoutOptions, UseResponsiveLayoutResult, UseSnapCarouselOptions, UseSnapCarouselResult, UseSwipeRevealHandlers, UseSwipeRevealOptions, UseSwipeRevealResult, UseSwipeStackHandlers, UseSwipeStackOptions, UseSwipeStackResult, UserMenuItem, UserMenuProps };