@bigpixelrocket/uiok 0.2.3 → 0.4.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 (215) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/dist/charts/Sparkline.d.ts +20 -0
  3. package/dist/charts/Sparkline.js +12 -0
  4. package/dist/charts/Sparkline.logic.d.ts +9 -0
  5. package/dist/charts/Sparkline.logic.js +27 -0
  6. package/dist/charts/charts.css +17 -0
  7. package/dist/charts/index.d.ts +2 -0
  8. package/dist/charts/index.js +2 -0
  9. package/dist/dialog/ConfirmDialog.d.ts +17 -1
  10. package/dist/dialog/ConfirmDialog.js +4 -3
  11. package/dist/dialog/ModalDialog.d.ts +8 -0
  12. package/dist/dialog/ModalDialog.js +4 -2
  13. package/dist/dialog/ProgressDialog.d.ts +40 -0
  14. package/dist/dialog/ProgressDialog.js +40 -0
  15. package/dist/dialog/TypedNameDialog.d.ts +44 -0
  16. package/dist/dialog/TypedNameDialog.js +17 -0
  17. package/dist/dialog/index.d.ts +5 -2
  18. package/dist/dialog/index.js +4 -1
  19. package/dist/field/Check.d.ts +9 -2
  20. package/dist/field/Check.js +5 -4
  21. package/dist/field/Controls.d.ts +198 -0
  22. package/dist/field/Controls.js +94 -0
  23. package/dist/field/FieldLayout.d.ts +126 -0
  24. package/dist/field/FieldLayout.js +89 -0
  25. package/dist/field/Switch.d.ts +26 -0
  26. package/dist/field/Switch.js +20 -0
  27. package/dist/field/index.d.ts +10 -6
  28. package/dist/field/index.js +10 -6
  29. package/dist/frame/AppRoot.d.ts +44 -0
  30. package/dist/frame/AppRoot.js +26 -0
  31. package/dist/frame/Dock.d.ts +88 -0
  32. package/dist/frame/Dock.js +129 -0
  33. package/dist/frame/FilterChips.d.ts +28 -0
  34. package/dist/frame/FilterChips.js +14 -0
  35. package/dist/frame/PageParts.d.ts +69 -0
  36. package/dist/frame/PageParts.js +60 -0
  37. package/dist/frame/PaneSplit.d.ts +74 -0
  38. package/dist/frame/PaneSplit.js +197 -0
  39. package/dist/frame/SidebarResizer.d.ts +35 -0
  40. package/dist/frame/SidebarResizer.js +43 -0
  41. package/dist/frame/StatusNotice.d.ts +20 -0
  42. package/dist/frame/StatusNotice.js +13 -0
  43. package/dist/frame/Tree.d.ts +147 -0
  44. package/dist/frame/Tree.js +164 -0
  45. package/dist/frame/TreeToggle.d.ts +18 -0
  46. package/dist/frame/TreeToggle.js +17 -0
  47. package/dist/frame/WindowFrame.d.ts +57 -0
  48. package/dist/frame/WindowFrame.js +19 -0
  49. package/dist/frame/frame.css +801 -0
  50. package/dist/frame/index.d.ts +22 -0
  51. package/dist/frame/index.js +22 -0
  52. package/dist/frame/sharedRef.d.ts +8 -0
  53. package/dist/frame/sharedRef.js +26 -0
  54. package/dist/index.d.ts +3 -0
  55. package/dist/index.js +3 -0
  56. package/dist/labels/UiokLabels.d.ts +6 -0
  57. package/dist/labels/UiokLabels.js +5 -1
  58. package/dist/labels/dialog.d.ts +12 -0
  59. package/dist/labels/dialog.js +7 -1
  60. package/dist/labels/index.d.ts +2 -0
  61. package/dist/labels/index.js +2 -0
  62. package/dist/labels/settings.d.ts +46 -0
  63. package/dist/labels/settings.js +29 -0
  64. package/dist/labels/viewer.d.ts +193 -0
  65. package/dist/labels/viewer.js +124 -0
  66. package/dist/listing/EmptyState.d.ts +40 -0
  67. package/dist/listing/EmptyState.js +14 -0
  68. package/dist/listing/PaneMessage.d.ts +28 -0
  69. package/dist/listing/PaneMessage.js +12 -0
  70. package/dist/listing/index.d.ts +5 -1
  71. package/dist/listing/index.js +5 -1
  72. package/dist/listing/listing.css +66 -2
  73. package/dist/log/LogWell.d.ts +34 -0
  74. package/dist/log/LogWell.js +39 -0
  75. package/dist/log/LogWell.logic.d.ts +16 -0
  76. package/dist/log/LogWell.logic.js +26 -0
  77. package/dist/log/index.d.ts +8 -0
  78. package/dist/log/index.js +8 -0
  79. package/dist/log/log.css +57 -0
  80. package/dist/pane/Pane.d.ts +49 -0
  81. package/dist/pane/Pane.js +17 -0
  82. package/dist/pane/PaneKeys.d.ts +10 -3
  83. package/dist/pane/PaneKeys.js +26 -7
  84. package/dist/pane/index.d.ts +4 -2
  85. package/dist/pane/index.js +4 -2
  86. package/dist/pane/usePaneKeys.js +9 -11
  87. package/dist/shell/AboutWindow.d.ts +21 -0
  88. package/dist/shell/AboutWindow.js +10 -0
  89. package/dist/shell/LanguageChoice.d.ts +27 -0
  90. package/dist/shell/LanguageChoice.js +17 -0
  91. package/dist/shell/LoadFailure.d.ts +22 -0
  92. package/dist/shell/LoadFailure.js +15 -0
  93. package/dist/shell/Lockup.d.ts +52 -0
  94. package/dist/shell/Lockup.js +30 -0
  95. package/dist/shell/SettingsDialog.d.ts +97 -0
  96. package/dist/shell/SettingsDialog.js +219 -0
  97. package/dist/shell/SettingsDialog.logic.d.ts +33 -0
  98. package/dist/shell/SettingsDialog.logic.js +42 -0
  99. package/dist/shell/SettingsFiles.d.ts +55 -0
  100. package/dist/shell/SettingsFiles.js +30 -0
  101. package/dist/shell/SettingsPageKeys.d.ts +42 -0
  102. package/dist/shell/SettingsPageKeys.js +70 -0
  103. package/dist/shell/SettingsSubsection.d.ts +34 -0
  104. package/dist/shell/SettingsSubsection.js +30 -0
  105. package/dist/shell/SignIn.d.ts +61 -0
  106. package/dist/shell/SignIn.js +36 -0
  107. package/dist/shell/ThemePicker.d.ts +74 -0
  108. package/dist/shell/ThemePicker.js +96 -0
  109. package/dist/shell/ThemePicker.logic.d.ts +13 -0
  110. package/dist/shell/ThemePicker.logic.js +26 -0
  111. package/dist/shell/TitleBar.d.ts +44 -0
  112. package/dist/shell/TitleBar.js +23 -0
  113. package/dist/shell/UpdatePill.d.ts +26 -0
  114. package/dist/shell/UpdatePill.js +17 -0
  115. package/dist/shell/Updates.d.ts +99 -0
  116. package/dist/shell/Updates.js +72 -0
  117. package/dist/shell/index.d.ts +27 -0
  118. package/dist/shell/index.js +27 -0
  119. package/dist/shell/shell.css +243 -4
  120. package/dist/styles.css +5 -0
  121. package/dist/surface/Card.d.ts +18 -0
  122. package/dist/surface/Card.js +10 -0
  123. package/dist/surface/Notice.d.ts +45 -0
  124. package/dist/surface/Notice.js +27 -0
  125. package/dist/surface/index.d.ts +5 -3
  126. package/dist/surface/index.js +5 -3
  127. package/dist/themes/catalog.js +4 -0
  128. package/dist/themes/themes.generated.css +245 -0
  129. package/dist/themes/tokens.d.ts +17 -5
  130. package/dist/themes/tokens.js +67 -1
  131. package/dist/tokens.css +11 -0
  132. package/dist/viewer/AudioView.d.ts +13 -0
  133. package/dist/viewer/AudioView.js +25 -0
  134. package/dist/viewer/HexJump.logic.d.ts +16 -0
  135. package/dist/viewer/HexJump.logic.js +27 -0
  136. package/dist/viewer/HexRows.logic.d.ts +55 -0
  137. package/dist/viewer/HexRows.logic.js +84 -0
  138. package/dist/viewer/HexSelection.logic.d.ts +57 -0
  139. package/dist/viewer/HexSelection.logic.js +68 -0
  140. package/dist/viewer/HexView.d.ts +10 -0
  141. package/dist/viewer/HexView.js +291 -0
  142. package/dist/viewer/HexViewport.logic.d.ts +61 -0
  143. package/dist/viewer/HexViewport.logic.js +79 -0
  144. package/dist/viewer/ImageView.d.ts +19 -0
  145. package/dist/viewer/ImageView.js +230 -0
  146. package/dist/viewer/ImageZoom.logic.d.ts +65 -0
  147. package/dist/viewer/ImageZoom.logic.js +119 -0
  148. package/dist/viewer/LatestRead.logic.d.ts +27 -0
  149. package/dist/viewer/LatestRead.logic.js +55 -0
  150. package/dist/viewer/MediaControls.d.ts +25 -0
  151. package/dist/viewer/MediaControls.js +183 -0
  152. package/dist/viewer/MediaPlayer.logic.d.ts +53 -0
  153. package/dist/viewer/MediaPlayer.logic.js +68 -0
  154. package/dist/viewer/PdfView.d.ts +23 -0
  155. package/dist/viewer/PdfView.js +25 -0
  156. package/dist/viewer/QuietFocus.d.ts +19 -0
  157. package/dist/viewer/QuietFocus.js +27 -0
  158. package/dist/viewer/ScaledScroll.logic.d.ts +30 -0
  159. package/dist/viewer/ScaledScroll.logic.js +28 -0
  160. package/dist/viewer/ScaledScrollbar.d.ts +19 -0
  161. package/dist/viewer/ScaledScrollbar.js +71 -0
  162. package/dist/viewer/SyntaxHighlighter.d.ts +29 -0
  163. package/dist/viewer/SyntaxHighlighter.js +144 -0
  164. package/dist/viewer/SyntaxLanguage.logic.d.ts +110 -0
  165. package/dist/viewer/SyntaxLanguage.logic.js +283 -0
  166. package/dist/viewer/SyntaxService.d.ts +75 -0
  167. package/dist/viewer/SyntaxService.js +49 -0
  168. package/dist/viewer/SyntaxSession.logic.d.ts +78 -0
  169. package/dist/viewer/SyntaxSession.logic.js +221 -0
  170. package/dist/viewer/SyntaxWorker.d.ts +6 -0
  171. package/dist/viewer/SyntaxWorker.js +8 -0
  172. package/dist/viewer/TextEncoding.logic.d.ts +35 -0
  173. package/dist/viewer/TextEncoding.logic.js +58 -0
  174. package/dist/viewer/TextRows.logic.d.ts +86 -0
  175. package/dist/viewer/TextRows.logic.js +241 -0
  176. package/dist/viewer/TextSelection.logic.d.ts +97 -0
  177. package/dist/viewer/TextSelection.logic.js +139 -0
  178. package/dist/viewer/TextView.d.ts +13 -0
  179. package/dist/viewer/TextView.js +448 -0
  180. package/dist/viewer/TextViewport.logic.d.ts +70 -0
  181. package/dist/viewer/TextViewport.logic.js +116 -0
  182. package/dist/viewer/VideoView.d.ts +18 -0
  183. package/dist/viewer/VideoView.js +53 -0
  184. package/dist/viewer/ViewerClipboard.d.ts +30 -0
  185. package/dist/viewer/ViewerClipboard.js +70 -0
  186. package/dist/viewer/ViewerFrame.logic.d.ts +61 -0
  187. package/dist/viewer/ViewerFrame.logic.js +130 -0
  188. package/dist/viewer/ViewerKeys.d.ts +16 -0
  189. package/dist/viewer/ViewerKeys.js +14 -0
  190. package/dist/viewer/ViewerScope.d.ts +12 -0
  191. package/dist/viewer/ViewerScope.js +22 -0
  192. package/dist/viewer/ViewerViews.d.ts +28 -0
  193. package/dist/viewer/ViewerViews.js +22 -0
  194. package/dist/viewer/ViewerWindow.d.ts +53 -0
  195. package/dist/viewer/ViewerWindow.js +219 -0
  196. package/dist/viewer/index.d.ts +12 -0
  197. package/dist/viewer/index.js +12 -0
  198. package/dist/viewer/types.d.ts +151 -0
  199. package/dist/viewer/types.js +26 -0
  200. package/dist/viewer/useElementHeight.d.ts +6 -0
  201. package/dist/viewer/useElementHeight.js +22 -0
  202. package/dist/viewer/useElementSize.d.ts +7 -0
  203. package/dist/viewer/useElementSize.js +24 -0
  204. package/dist/viewer/useEscapeToClear.d.ts +8 -0
  205. package/dist/viewer/useEscapeToClear.js +26 -0
  206. package/dist/viewer/useHexDocument.d.ts +41 -0
  207. package/dist/viewer/useHexDocument.js +144 -0
  208. package/dist/viewer/useMediaElement.d.ts +10 -0
  209. package/dist/viewer/useMediaElement.js +24 -0
  210. package/dist/viewer/useSyntaxHighlight.d.ts +24 -0
  211. package/dist/viewer/useSyntaxHighlight.js +133 -0
  212. package/dist/viewer/useTextDocument.d.ts +66 -0
  213. package/dist/viewer/useTextDocument.js +245 -0
  214. package/dist/viewer/viewer.css +645 -0
  215. package/package.json +7 -1
@@ -0,0 +1,44 @@
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ /** Props for {@link ChannelMarker}. */
3
+ export interface ChannelMarkerProps {
4
+ /** The channel's name ("Latest", "Local"). */
5
+ readonly label: string;
6
+ /** The build number or the branch, the part that gives way to an ellipsis. */
7
+ readonly detail?: string | null;
8
+ /** The whole build line, the marker's tooltip and accessible description. */
9
+ readonly title?: string;
10
+ /**
11
+ * The spoken words for a build with changes not yet committed, which the
12
+ * marker shows as a dot after the detail; none for a clean build.
13
+ */
14
+ readonly modified?: string | null;
15
+ }
16
+ /**
17
+ * The release channel after a lockup in the title bar, on a build that is
18
+ * not the release: a dot in the channel's colour (`--channel`, which an
19
+ * ancestor's `data-channel` sets), the channel's name, and its build number
20
+ * or branch, small and quiet, so a screenshot always says which build it
21
+ * shows without the bar shouting it. It takes pointer events inside the
22
+ * bar's drag region, so its tooltip shows.
23
+ */
24
+ export declare function ChannelMarker({ label, detail, title, modified }: ChannelMarkerProps): ReactElement;
25
+ /** Props for {@link TitleBar}. */
26
+ export interface TitleBarProps {
27
+ /** The lockup and, on a build that is not the release, its `ChannelMarker`. */
28
+ readonly children: ReactNode;
29
+ /**
30
+ * Whether the window's own buttons sit at the bar's leading end, as
31
+ * macOS draws its traffic lights over a hidden title bar: the brand then
32
+ * starts clear of them (`--traffic-light-inset`). Elsewhere the bar's
33
+ * own padding stands there.
34
+ */
35
+ readonly trafficLights?: boolean;
36
+ }
37
+ /**
38
+ * The window's title bar where the native one is hidden: the brand at its
39
+ * leading end on the window's ground, painting nothing, so tabs beside it
40
+ * stand on the same ground. The whole bar is a drag region (it moves the
41
+ * window and a double click zooms it) except the channel marker; a narrow
42
+ * bar cuts the marker's detail first, never the lockup.
43
+ */
44
+ export declare function TitleBar({ children, trafficLights }: TitleBarProps): ReactElement;
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { describedTooltip } from '../tooltip/Tooltip.logic.js';
3
+ /**
4
+ * The release channel after a lockup in the title bar, on a build that is
5
+ * not the release: a dot in the channel's colour (`--channel`, which an
6
+ * ancestor's `data-channel` sets), the channel's name, and its build number
7
+ * or branch, small and quiet, so a screenshot always says which build it
8
+ * shows without the bar shouting it. It takes pointer events inside the
9
+ * bar's drag region, so its tooltip shows.
10
+ */
11
+ export function ChannelMarker({ label, detail = null, title, modified = null }) {
12
+ return (_jsxs("span", { className: "shell-channel", ...describedTooltip(title), children: [_jsx("span", { "aria-hidden": true, className: "shell-channel-dot" }), _jsx("span", { className: "shell-channel-name", children: label }), detail ? _jsx("span", { className: "shell-channel-detail", children: detail }) : null, modified ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": true, className: "shell-channel-modified", children: "\u25CF" }), _jsx("span", { className: "visually-hidden", children: modified })] })) : null] }));
13
+ }
14
+ /**
15
+ * The window's title bar where the native one is hidden: the brand at its
16
+ * leading end on the window's ground, painting nothing, so tabs beside it
17
+ * stand on the same ground. The whole bar is a drag region (it moves the
18
+ * window and a double click zooms it) except the channel marker; a narrow
19
+ * bar cuts the marker's detail first, never the lockup.
20
+ */
21
+ export function TitleBar({ children, trafficLights = false }) {
22
+ return (_jsx("header", { className: "shell-topbar", "data-traffic-lights": trafficLights ? '' : undefined, children: _jsx("div", { className: "shell-brand", children: children }) }));
23
+ }
@@ -0,0 +1,26 @@
1
+ import type { ReactElement } from 'react';
2
+ /**
3
+ * Where an offered build stands, as the pill shows it: `offered` (found,
4
+ * not yet downloaded, or downloading), `ready` (downloaded and verified,
5
+ * installs on restart), or `download-failed`.
6
+ */
7
+ export type UpdatePillState = 'offered' | 'ready' | 'download-failed';
8
+ /** Props for {@link UpdatePill}. */
9
+ export interface UpdatePillProps {
10
+ readonly state: UpdatePillState;
11
+ /** The pill's words ("Update", "Restart"). */
12
+ readonly label: string;
13
+ /** What the pill offers in full ("Update ready · 2.5.0"), its tooltip and accessible description. */
14
+ readonly description?: string;
15
+ /** Opens the place that carries the notes, the download, and the restart (Settings › Updates). */
16
+ readonly onOpen: () => void;
17
+ }
18
+ /**
19
+ * The title bar's update control, shown only while a build is offered: a
20
+ * tonal Update with a download arrow, a solid Restart once the build is
21
+ * ready, and a neutral pill with a warning outline and glyph after a failed
22
+ * download. It never shows progress; its click opens the place that does.
23
+ * The host shows it only while there is an offer and hands the focus back
24
+ * to it when what it opened closes.
25
+ */
26
+ export declare function UpdatePill({ state, label, description, onOpen }: UpdatePillProps): ReactElement;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ArrowDownToLine, RotateCw, TriangleAlert } from 'lucide-react';
3
+ import { Button } from '../button/Button.js';
4
+ import { ICON_MD } from '../icon/sizes.js';
5
+ import { describedTooltip } from '../tooltip/Tooltip.logic.js';
6
+ /**
7
+ * The title bar's update control, shown only while a build is offered: a
8
+ * tonal Update with a download arrow, a solid Restart once the build is
9
+ * ready, and a neutral pill with a warning outline and glyph after a failed
10
+ * download. It never shows progress; its click opens the place that does.
11
+ * The host shows it only while there is an offer and hands the focus back
12
+ * to it when what it opened closes.
13
+ */
14
+ export function UpdatePill({ state, label, description, onOpen }) {
15
+ const Icon = state === 'ready' ? RotateCw : state === 'download-failed' ? TriangleAlert : ArrowDownToLine;
16
+ return (_jsxs(Button, { "aria-haspopup": "dialog", className: "shell-update-pill", "data-state": state, onClick: onOpen, variant: state === 'ready' ? 'primary' : state === 'download-failed' ? 'neutral' : 'tonal', ...describedTooltip(description), children: [_jsx(Icon, { "aria-hidden": true, size: ICON_MD }), label] }));
17
+ }
@@ -0,0 +1,99 @@
1
+ import { type LucideIcon } from 'lucide-react';
2
+ import type { ReactElement, ReactNode } from 'react';
3
+ import { type RunHeaderProps } from '../run/RunHeader.js';
4
+ /** A heading's lines in a build's notes. */
5
+ export interface UpdateNotesGroup {
6
+ /** The heading: the area of the app the lines are about. */
7
+ readonly title: string;
8
+ readonly lines: readonly string[];
9
+ }
10
+ /** Props for {@link UpdateNotes}. */
11
+ export interface UpdateNotesProps {
12
+ /** The section's heading ("What's new"), also the list's accessible name. */
13
+ readonly heading: string;
14
+ /** The words shown when the build lists no change. */
15
+ readonly empty: string;
16
+ /** The notes, one line per change, listed as one list where `groups` is null. */
17
+ readonly lines: readonly string[];
18
+ /** The lines under a heading per area; null lists `lines` as one list. */
19
+ readonly groups?: readonly UpdateNotesGroup[] | null;
20
+ }
21
+ /**
22
+ * What's new in an offered build, at the foot of the update card: the
23
+ * notes under a heading per area, or as one list, in a box that scrolls on
24
+ * its own once the card reaches the bottom of the column, and that the
25
+ * arrow keys scroll when focused. A squeezed box keeps its first three
26
+ * rows, a heading counting as one.
27
+ */
28
+ export declare function UpdateNotes({ heading, empty, lines, groups }: UpdateNotesProps): ReactElement;
29
+ /** The update card's tone, which colours its glyph (and an `error`'s title). */
30
+ export type UpdateCardTone = 'idle' | 'busy' | 'ready' | 'ok' | 'warning' | 'error';
31
+ /** The update card's one next step. */
32
+ export interface UpdateCardVerb {
33
+ readonly label: string;
34
+ /** The primary fill (Download, Restart), else neutral (Check Now, Stop). */
35
+ readonly primary?: boolean;
36
+ readonly disabled?: boolean;
37
+ readonly onRun: () => void;
38
+ }
39
+ /** Props for {@link UpdateCard}. */
40
+ export interface UpdateCardProps {
41
+ readonly tone: UpdateCardTone;
42
+ /** The state's glyph; `checking` draws the turning ring. */
43
+ readonly glyph: LucideIcon | 'checking';
44
+ /** What the card is about: the installed build, or the offered one (a `strong` in it is set strong). */
45
+ readonly title: ReactNode;
46
+ /** A quieter line under the title (the installed version under an offer). */
47
+ readonly sub?: ReactNode;
48
+ /** When, after `sub`; a clock moves it, so it is never announced. */
49
+ readonly when?: ReactNode;
50
+ readonly verb?: UpdateCardVerb | null;
51
+ /** A download, or a check that failed, under the head: a `RunHeader`. */
52
+ readonly run?: RunHeaderProps | null;
53
+ /** A quiet line under the head ("Installs the next time the app opens"). */
54
+ readonly note?: string | null;
55
+ /** A failure of the card's own verb, as a danger notice. */
56
+ readonly failure?: string | null;
57
+ /** What's new in the offered build, at the card's foot. */
58
+ readonly notes?: UpdateNotesProps | null;
59
+ }
60
+ /**
61
+ * The Updates page's status card: the state's glyph, where the updater
62
+ * stands with a quieter line under it, and its one next step; then a
63
+ * download or a failed check in the shared progress header under a quieter
64
+ * head, a note, a failure, and the offered build's notes, the card growing
65
+ * with them only to the bottom of the column. A verb that disables itself
66
+ * or goes while it holds the focus hands the focus to the dialog around the
67
+ * card, so Escape and Tab still reach it.
68
+ */
69
+ export declare function UpdateCard({ tone, glyph, title, sub, when, verb, run, note, failure, notes }: UpdateCardProps): ReactElement;
70
+ /** One choice of how often the updater checks. */
71
+ export interface UpdateChecksChoice<Value extends string> {
72
+ readonly value: Value;
73
+ readonly label: string;
74
+ }
75
+ /** Props for {@link UpdateChecks}. */
76
+ export interface UpdateChecksProps<Value extends string> {
77
+ /** The select's label ("Check for updates"). */
78
+ readonly label: string;
79
+ readonly value: Value;
80
+ readonly choices: readonly UpdateChecksChoice<Value>[];
81
+ /** The note under both, which follows the choice. */
82
+ readonly note: string;
83
+ readonly onChange: (value: Value) => void;
84
+ }
85
+ /** How often the updater checks on its own: a label, a select at the end, and a note under both, on a card. */
86
+ export declare function UpdateChecks<Value extends string>({ label, value, choices, note, onChange }: UpdateChecksProps<Value>): ReactElement;
87
+ /** Props for {@link UpdatesPage}. */
88
+ export interface UpdatesPageProps {
89
+ /** The cadence (`UpdateChecks`); none where the build cannot update. */
90
+ readonly checks?: ReactNode;
91
+ /** The status card (`UpdateCard`); none before the first status is known, which leaves the page busy. */
92
+ readonly card?: ReactNode;
93
+ }
94
+ /**
95
+ * The Updates page's body (a `SettingsPage` with `fills`): the check
96
+ * cadence over the status card. Until the host knows the updater's status
97
+ * the page is empty and busy, so it never shows a status it would take back.
98
+ */
99
+ export declare function UpdatesPage({ checks, card }: UpdatesPageProps): ReactElement;
@@ -0,0 +1,72 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { CircleAlert } from 'lucide-react';
3
+ import { useId, useLayoutEffect, useRef } from 'react';
4
+ import { Button } from '../button/Button.js';
5
+ import { Spinner } from '../icon/Spinner.js';
6
+ import { ICON_LG, ICON_MD } from '../icon/sizes.js';
7
+ import { RunHeader } from '../run/RunHeader.js';
8
+ /** The notes a squeezed card still shows before the column scrolls instead. */
9
+ const NOTES_FLOOR_ROWS = 3;
10
+ /**
11
+ * What's new in an offered build, at the foot of the update card: the
12
+ * notes under a heading per area, or as one list, in a box that scrolls on
13
+ * its own once the card reaches the bottom of the column, and that the
14
+ * arrow keys scroll when focused. A squeezed box keeps its first three
15
+ * rows, a heading counting as one.
16
+ */
17
+ export function UpdateNotes({ heading, empty, lines, groups = null }) {
18
+ const ids = useId();
19
+ const rows = groups === null ? lines.length : groups.reduce((sum, group) => sum + group.lines.length + 1, 0);
20
+ const box = {
21
+ 'aria-label': heading,
22
+ style: { '--update-note-rows': Math.min(rows, NOTES_FLOOR_ROWS) },
23
+ tabIndex: 0
24
+ };
25
+ return (_jsxs("section", { "aria-labelledby": `${ids}-heading`, className: "update-notes", children: [_jsx("h4", { className: "overline", id: `${ids}-heading`, children: heading }), rows === 0 ? (_jsx("p", { className: "field-note", children: empty })) : groups === null ? (_jsx("div", { className: "update-notes-frame", children: _jsx("ul", { ...box, className: "update-notes-list scroll-fade", children: lines.map((line, index) => (_jsx("li", { children: line }, index))) }) })) : (_jsx("div", { className: "update-notes-frame", children: _jsx("div", { ...box, className: "update-notes-list scroll-fade update-notes-groups", role: "group", children: groups.map((group, groupIndex) => (_jsxs("div", { className: "update-notes-group", children: [_jsx("h5", { className: "update-notes-area", id: `${ids}-area-${groupIndex}`, children: group.title }), _jsx("ul", { "aria-labelledby": `${ids}-area-${groupIndex}`, children: group.lines.map((line, index) => (_jsx("li", { children: line }, index))) })] }, group.title))) }) }))] }));
26
+ }
27
+ /**
28
+ * The Updates page's status card: the state's glyph, where the updater
29
+ * stands with a quieter line under it, and its one next step; then a
30
+ * download or a failed check in the shared progress header under a quieter
31
+ * head, a note, a failure, and the offered build's notes, the card growing
32
+ * with them only to the bottom of the column. A verb that disables itself
33
+ * or goes while it holds the focus hands the focus to the dialog around the
34
+ * card, so Escape and Tab still reach it.
35
+ */
36
+ export function UpdateCard({ tone, glyph, title, sub = null, when = null, verb = null, run = null, note = null, failure = null, notes = null }) {
37
+ const card = useRef(null);
38
+ const Glyph = glyph === 'checking' ? null : glyph;
39
+ const verbLabel = verb?.label;
40
+ const verbDisabled = verb?.disabled === true;
41
+ const showsNotes = notes !== null;
42
+ useLayoutEffect(() => {
43
+ const element = card.current;
44
+ const focused = element?.ownerDocument.activeElement;
45
+ if (element &&
46
+ (focused === element.ownerDocument.body ||
47
+ (focused instanceof HTMLButtonElement && focused.disabled && element.contains(focused)))) {
48
+ element.closest('[role="dialog"]')?.focus({ preventScroll: true });
49
+ }
50
+ }, [verbLabel, verbDisabled, showsNotes]);
51
+ return (_jsxs("div", { className: ['update-card card', run ? 'with-run' : null, notes ? 'with-notes' : null]
52
+ .filter(Boolean)
53
+ .join(' '), "data-tone": tone, ref: card, children: [_jsxs("div", { className: "update-card-head", children: [Glyph === null ? (_jsx(Spinner, { className: "update-card-glyph", size: ICON_LG })) : (_jsx(Glyph, { "aria-hidden": true, className: "update-card-glyph", size: ICON_LG })), _jsxs("div", { className: "update-card-said", role: "status", children: [_jsx("span", { className: "update-card-title", children: title }), sub !== null || when !== null ? (_jsxs("span", { className: "update-card-sub", children: [sub, sub !== null && when !== null ? ' · ' : null, when !== null ? _jsx("span", { "aria-live": "off", children: when }) : null] })) : null] }), verb ? (_jsx(Button, { disabled: verb.disabled, onClick: verb.onRun, size: "small", variant: verb.primary ? 'primary' : 'neutral', children: verb.label })) : null] }), run ? _jsx(RunHeader, { ...run }) : null, note ? _jsx("p", { className: "update-card-note", children: note }) : null, failure ? (_jsxs("div", { className: "notice notice-danger", role: "alert", children: [_jsx(CircleAlert, { "aria-hidden": true, size: ICON_MD }), _jsx("p", { className: "notice-text", children: failure })] })) : null, notes ? _jsx(UpdateNotes, { ...notes }) : null] }));
54
+ }
55
+ /** How often the updater checks on its own: a label, a select at the end, and a note under both, on a card. */
56
+ export function UpdateChecks({ label, value, choices, note, onChange }) {
57
+ const id = useId();
58
+ const choose = (event) => {
59
+ const choice = choices.find((candidate) => candidate.value === event.target.value);
60
+ if (choice !== undefined)
61
+ onChange(choice.value);
62
+ };
63
+ return (_jsxs("div", { className: "update-checks card", children: [_jsx("label", { className: "update-checks-label", htmlFor: id, children: label }), _jsx("select", { className: "field field-sm", id: id, onChange: choose, value: value, children: choices.map((choice) => (_jsx("option", { value: choice.value, children: choice.label }, choice.value))) }), _jsx("p", { className: "field-note", children: note })] }));
64
+ }
65
+ /**
66
+ * The Updates page's body (a `SettingsPage` with `fills`): the check
67
+ * cadence over the status card. Until the host knows the updater's status
68
+ * the page is empty and busy, so it never shows a status it would take back.
69
+ */
70
+ export function UpdatesPage({ checks = null, card = null }) {
71
+ return (_jsx("div", { "aria-busy": card === null ? true : undefined, className: "updates-page", children: card === null ? null : (_jsxs(_Fragment, { children: [checks, card] })) }));
72
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The shell: what an app's window draws around its own pages, which every
3
+ * app of the family draws the same way. The title bar (`TitleBar` with the
4
+ * `Lockup`, the `BrandMark`, and the `ChannelMarker`), the `UpdatePill`, the
5
+ * `AboutWindow`, the `SettingsDialog` with its subsections and page keys,
6
+ * its shared pages (`AppearanceSettings` over `ThemeChoices`,
7
+ * `LanguageChoice`, `UpdatesPage` with `UpdateChecks` and `UpdateCard`,
8
+ * `SettingsFiles`), and the sign-in prompts (`SignInDialog`,
9
+ * `HostKeyDialog`), and the `LoadFailure` a window shows in place of
10
+ * content that failed to load. Their look is `shell.css` in
11
+ * `@bigpixelrocket/uiok/styles.css`.
12
+ */
13
+ export { AboutWindow, type AboutWindowProps } from './AboutWindow.js';
14
+ export { LanguageChoice, type LanguageChoiceProps, type LanguageOption } from './LanguageChoice.js';
15
+ export { LoadFailure, type LoadFailureProps } from './LoadFailure.js';
16
+ export { BrandMark, Lockup, type BrandMarkLook, type BrandMarkProps, type BrandMarkShape, type LockupProps, type LockupSize } from './Lockup.js';
17
+ export { SettingsDialog, SettingsSaveFailure, type SettingsDialogProps, type SettingsGroup, type SettingsPage, type SettingsPageRequest, type SettingsSaveFailureProps, type SettingsSubsectionEntry } from './SettingsDialog.js';
18
+ export { spiedSubsection, SUBSECTION_SCROLL_INSET_PX, SUBSECTION_SPY_SLACK_PX, subsectionScrollTop, type SettingsScrollView, type SubsectionAnchor } from './SettingsDialog.logic.js';
19
+ export { SettingsFiles, type SettingsFileEntry, type SettingsFileProblem, type SettingsFileRequest, type SettingsFilesProps } from './SettingsFiles.js';
20
+ export { SettingsPageKeysContext, settingsLegend, useSettingsPageKeys, type SettingsPageKeys } from './SettingsPageKeys.js';
21
+ export { SETTINGS_PAGE_HEAD_ATTRIBUTE, SETTINGS_REVEAL_ATTRIBUTE, SETTINGS_SUBSECTION_ATTRIBUTE, SettingsSubsection, type SettingsSubsectionProps } from './SettingsSubsection.js';
22
+ export { HostKeyDialog, SignInDialog, type HostKeyDialogProps, type SignInDialogProps, type SignInFact } from './SignIn.js';
23
+ export { AppearanceSettings, ThemeChoices, ThemePreview, themesOf, useSystemDark, type AppearanceSettingsProps, type ThemeChoice, type ThemeChoicesProps } from './ThemePicker.js';
24
+ export { appearanceInUse, steppedIndex } from './ThemePicker.logic.js';
25
+ export { ChannelMarker, TitleBar, type ChannelMarkerProps, type TitleBarProps } from './TitleBar.js';
26
+ export { UpdatePill, type UpdatePillProps, type UpdatePillState } from './UpdatePill.js';
27
+ export { UpdateCard, UpdateChecks, UpdateNotes, UpdatesPage, type UpdateCardProps, type UpdateCardTone, type UpdateCardVerb, type UpdateChecksChoice, type UpdateChecksProps, type UpdateNotesGroup, type UpdateNotesProps, type UpdatesPageProps } from './Updates.js';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The shell: what an app's window draws around its own pages, which every
3
+ * app of the family draws the same way. The title bar (`TitleBar` with the
4
+ * `Lockup`, the `BrandMark`, and the `ChannelMarker`), the `UpdatePill`, the
5
+ * `AboutWindow`, the `SettingsDialog` with its subsections and page keys,
6
+ * its shared pages (`AppearanceSettings` over `ThemeChoices`,
7
+ * `LanguageChoice`, `UpdatesPage` with `UpdateChecks` and `UpdateCard`,
8
+ * `SettingsFiles`), and the sign-in prompts (`SignInDialog`,
9
+ * `HostKeyDialog`), and the `LoadFailure` a window shows in place of
10
+ * content that failed to load. Their look is `shell.css` in
11
+ * `@bigpixelrocket/uiok/styles.css`.
12
+ */
13
+ export { AboutWindow } from './AboutWindow.js';
14
+ export { LanguageChoice } from './LanguageChoice.js';
15
+ export { LoadFailure } from './LoadFailure.js';
16
+ export { BrandMark, Lockup } from './Lockup.js';
17
+ export { SettingsDialog, SettingsSaveFailure } from './SettingsDialog.js';
18
+ export { spiedSubsection, SUBSECTION_SCROLL_INSET_PX, SUBSECTION_SPY_SLACK_PX, subsectionScrollTop } from './SettingsDialog.logic.js';
19
+ export { SettingsFiles } from './SettingsFiles.js';
20
+ export { SettingsPageKeysContext, settingsLegend, useSettingsPageKeys } from './SettingsPageKeys.js';
21
+ export { SETTINGS_PAGE_HEAD_ATTRIBUTE, SETTINGS_REVEAL_ATTRIBUTE, SETTINGS_SUBSECTION_ATTRIBUTE, SettingsSubsection } from './SettingsSubsection.js';
22
+ export { HostKeyDialog, SignInDialog } from './SignIn.js';
23
+ export { AppearanceSettings, ThemeChoices, ThemePreview, themesOf, useSystemDark } from './ThemePicker.js';
24
+ export { appearanceInUse, steppedIndex } from './ThemePicker.logic.js';
25
+ export { ChannelMarker, TitleBar } from './TitleBar.js';
26
+ export { UpdatePill } from './UpdatePill.js';
27
+ export { UpdateCard, UpdateChecks, UpdateNotes, UpdatesPage } from './Updates.js';
@@ -4,10 +4,11 @@
4
4
  a file's problems, the update cards and their notes), the update pill's
5
5
  failed state, the release channel tag, the About window's layout, the
6
6
  sign-in prompts, and the line a part of the window shows when it fails
7
- to load. None is a component: the app writes the markup with these
8
- classes (docs/components/shell.md). The header, the brand
9
- wordmark, the app's icon, window drag regions, and the startup screens
10
- stay the app's. */
7
+ to load, and the title bar (the lockup and the brand mark, the channel
8
+ marker, the update pill's place). The components of
9
+ @bigpixelrocket/uiok/shell draw them (docs/components/shell.md); a host
10
+ may write the same markup with these classes. The app's icon, its
11
+ brand mark's glyph, and its startup screens stay the app's. */
11
12
 
12
13
  /* ---- Settings dialog ---- */
13
14
 
@@ -910,6 +911,19 @@
910
911
 
911
912
  /* ---- Channel tag ---- */
912
913
 
914
+ /* The release channel an element wears (data-channel on the app's root or
915
+ the About window): its hue and its tag's words, from the theme's
916
+ channel tokens. A release build wears none. */
917
+ [data-channel='latest'] {
918
+ --channel: var(--channel-latest);
919
+ --channel-text: var(--channel-latest-text);
920
+ }
921
+
922
+ [data-channel='local'] {
923
+ --channel: var(--channel-local);
924
+ --channel-text: var(--channel-local-text);
925
+ }
926
+
913
927
  /* The release channel beside a lockup (an About window, a splash) on a
914
928
  build that is not the release: small caps on a pill of the channel's
915
929
  colour, so a screenshot always says which build it shows. An app that
@@ -1071,3 +1085,228 @@
1071
1085
  -webkit-user-select: text;
1072
1086
  user-select: text;
1073
1087
  }
1088
+
1089
+ /* ---- Title bar ---- */
1090
+
1091
+ /* A window's title bar where the native one is hidden (TitleBar): the
1092
+ lockup and, on a build that is not the release, its channel marker,
1093
+ standing on the window ground. It paints nothing, so tabs beside it
1094
+ stand on the same ground. The whole bar is a drag region except the
1095
+ marker, so it moves the window and a double click zooms it like a native
1096
+ title bar. A bar cut narrow cuts at its end. */
1097
+ .shell-topbar {
1098
+ display: flex;
1099
+ align-items: center;
1100
+ height: 100%;
1101
+ min-width: 0;
1102
+ padding: 0 var(--space-4) 0 var(--space-6);
1103
+ box-sizing: border-box;
1104
+ overflow: hidden;
1105
+ -webkit-app-region: drag;
1106
+ }
1107
+
1108
+ .shell-brand {
1109
+ display: flex;
1110
+ align-items: center;
1111
+ gap: var(--space-4);
1112
+ min-width: 0;
1113
+ white-space: nowrap;
1114
+ }
1115
+
1116
+ /* On macOS the brand clears the traffic lights by 4px; elsewhere the
1117
+ bar's own padding stands there. */
1118
+ .shell-topbar[data-traffic-lights] .shell-brand {
1119
+ margin-left: calc(var(--traffic-light-inset) - var(--space-6));
1120
+ }
1121
+
1122
+ /* Only the channel marker shrinks; the lockup keeps its size. */
1123
+ .shell-brand > * {
1124
+ flex: none;
1125
+ }
1126
+
1127
+ .shell-lockup {
1128
+ --lockup-size: 15px;
1129
+ }
1130
+
1131
+ /* The channel marker (ChannelMarker): a dot in the channel's colour, the
1132
+ channel's name, and its build number or branch, small and quiet. It opts
1133
+ out of the drag region: a draggable region takes no pointer events, so
1134
+ its tooltip would never show. */
1135
+ .shell-brand > .shell-channel {
1136
+ display: inline-flex;
1137
+ flex: 0 1 auto;
1138
+ align-items: center;
1139
+ gap: var(--space-2);
1140
+ min-width: 0;
1141
+ margin-left: var(--space-1);
1142
+ font-size: var(--font-size-caption);
1143
+ line-height: 1;
1144
+ transform: translateY(1px);
1145
+ -webkit-app-region: no-drag;
1146
+ }
1147
+
1148
+ /* Where a channel's colour sits near 2:1 on the bar, the dot wears the
1149
+ group marks' hairline ring (--group-dot-ring). */
1150
+ .shell-channel-dot {
1151
+ flex: none;
1152
+ width: var(--dot);
1153
+ height: var(--dot);
1154
+ border-radius: var(--radius-pill);
1155
+ background: var(--channel, var(--accent));
1156
+ box-shadow: var(--group-dot-ring);
1157
+ }
1158
+
1159
+ .shell-channel-name {
1160
+ flex: none;
1161
+ color: var(--channel-name);
1162
+ font-weight: var(--font-weight-medium);
1163
+ }
1164
+
1165
+ /* The build number or the branch gives way, up to 224px. */
1166
+ .shell-channel-detail {
1167
+ flex: 0 1 auto;
1168
+ min-width: 0;
1169
+ max-width: 224px;
1170
+ overflow: hidden;
1171
+ color: var(--channel-detail);
1172
+ font-variant-numeric: tabular-nums;
1173
+ font-weight: var(--font-weight-regular);
1174
+ text-overflow: ellipsis;
1175
+ }
1176
+
1177
+ .shell-channel-modified {
1178
+ flex: none;
1179
+ color: var(--channel-detail);
1180
+ font-size: var(--font-size-caption);
1181
+ }
1182
+
1183
+ /* The band's trailing end, after the main pane's tabs: the update pill,
1184
+ out of the drag region so it takes clicks. */
1185
+ .shell-trailing {
1186
+ display: flex;
1187
+ align-items: center;
1188
+ gap: var(--space-5);
1189
+ -webkit-app-region: no-drag;
1190
+ }
1191
+
1192
+ /* ---- Lockup and brand mark ---- */
1193
+
1194
+ /* A product's lockup (Lockup): the mark beside the wordmark, its last part
1195
+ heavier. The host sizes it with --lockup-size; the mark scales with it. */
1196
+ :where(.lockup) {
1197
+ --lockup-size: 40px;
1198
+ }
1199
+
1200
+ .lockup {
1201
+ display: inline-flex;
1202
+ align-items: center;
1203
+ gap: 0.4em;
1204
+ margin: 0;
1205
+ font-size: var(--lockup-size);
1206
+ font-weight: var(--font-weight-light);
1207
+ letter-spacing: -0.02em;
1208
+ line-height: 1;
1209
+ white-space: nowrap;
1210
+ }
1211
+
1212
+ .lockup-wordmark b {
1213
+ font-weight: var(--font-weight-heavy);
1214
+ }
1215
+
1216
+ /* The mark (BrandMark) stands a little taller than the wordmark's capitals,
1217
+ so the badge's overhang does not make the plate look smaller than the
1218
+ text. The plate wears the accent and the badge the success hue; under a
1219
+ dark appearance both deepen toward the constant plate tone, so the white
1220
+ glyph and check keep their contrast on a light accent. A glyph's cuts and
1221
+ the badge's ring are drawn in the plate's and the bar's own colours. */
1222
+ .brand-mark {
1223
+ --brand-mark-plate: var(--accent);
1224
+ --brand-mark-badge: var(--success);
1225
+
1226
+ flex: none;
1227
+ width: 1.4em;
1228
+ height: 1.4em;
1229
+ }
1230
+
1231
+ @media (prefers-color-scheme: dark) {
1232
+ .brand-mark {
1233
+ --brand-mark-plate: var(--brand-plate-dark);
1234
+ --brand-mark-badge: var(--brand-badge-dark);
1235
+ }
1236
+ }
1237
+
1238
+ .brand-mark-plate {
1239
+ fill: var(--brand-mark-plate);
1240
+ }
1241
+
1242
+ .brand-mark-glyph {
1243
+ fill: var(--brand-white);
1244
+ }
1245
+
1246
+ .brand-mark-cut {
1247
+ fill: none;
1248
+ stroke: var(--brand-mark-plate);
1249
+ stroke-width: 0.9;
1250
+ }
1251
+
1252
+ .brand-mark-line {
1253
+ fill: none;
1254
+ stroke: var(--brand-white);
1255
+ stroke-linecap: round;
1256
+ stroke-linejoin: round;
1257
+ stroke-width: 1.6;
1258
+ }
1259
+
1260
+ .brand-mark-badge {
1261
+ fill: var(--brand-mark-badge);
1262
+ stroke: var(--surface-header);
1263
+ stroke-width: 1.5;
1264
+ }
1265
+
1266
+ .brand-mark-check {
1267
+ fill: none;
1268
+ stroke: var(--brand-white);
1269
+ stroke-linecap: round;
1270
+ stroke-linejoin: round;
1271
+ stroke-width: 1.4;
1272
+ }
1273
+
1274
+ /* ---- About window: the drag regions and the icon ---- */
1275
+
1276
+ /* The panel drags the window under a hidden title bar; only the version
1277
+ line takes the pointer, so it can be selected. */
1278
+ .about-window {
1279
+ -webkit-app-region: drag;
1280
+ }
1281
+
1282
+ .about-version {
1283
+ -webkit-app-region: no-drag;
1284
+ }
1285
+
1286
+ /* The round patch on a transparent canvas, its drop shadow baked in. */
1287
+ .about-icon {
1288
+ width: 128px;
1289
+ height: 128px;
1290
+ margin-bottom: var(--space-4);
1291
+ }
1292
+
1293
+ .about-lockup-text {
1294
+ --lockup-size: 21px;
1295
+ }
1296
+
1297
+ /* ---- Settings: field widths ---- */
1298
+
1299
+ /* Restore default value: dim beside a setting off its default. */
1300
+ .settings-restore {
1301
+ color: var(--text-dim);
1302
+ }
1303
+
1304
+ /* A count is a few digits wide; a count whose empty field reads as a word
1305
+ ("No limit") fits every locale's word. */
1306
+ .settings-count.field {
1307
+ width: 9ch;
1308
+ }
1309
+
1310
+ .settings-count-or-word.field {
1311
+ width: 20ch;
1312
+ }
package/dist/styles.css CHANGED
@@ -37,6 +37,11 @@
37
37
  /* The shell's shared surfaces: Settings dialog, theme picker, update card,
38
38
  channel tag, sign-in prompts, load failure (docs/components/shell.md). */
39
39
  @import './shell/shell.css';
40
+ @import './frame/frame.css';
41
+ @import './log/log.css';
42
+ /* The file viewer (@bigpixelrocket/uiok/viewer): its header, text, hex,
43
+ image, and media views. */
44
+ @import './viewer/viewer.css';
40
45
 
41
46
  /* ---- What the browser would otherwise draw in its own colours ---- */
42
47
 
@@ -0,0 +1,18 @@
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ /** Props for {@link Card}. */
3
+ export interface CardProps {
4
+ /** One subject's lines: a heading, facts, a field grid, actions. */
5
+ readonly children: ReactNode;
6
+ /**
7
+ * The card's accessible name, which makes it a `region` landmark; leave
8
+ * it out for a card that is one part of a page among many alike.
9
+ */
10
+ readonly label?: string;
11
+ }
12
+ /**
13
+ * A lifted panel that groups one subject's lines (an account, an update, a
14
+ * connection's summary), framed like every framed surface, at the surface
15
+ * inset at both ends whatever margins its first and last children bring.
16
+ * Draws `.card`.
17
+ */
18
+ export declare function Card({ children, label }: CardProps): ReactElement;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * A lifted panel that groups one subject's lines (an account, an update, a
4
+ * connection's summary), framed like every framed surface, at the surface
5
+ * inset at both ends whatever margins its first and last children bring.
6
+ * Draws `.card`.
7
+ */
8
+ export function Card({ children, label }) {
9
+ return label === undefined ? (_jsx("div", { className: "card", children: children })) : (_jsx("section", { "aria-label": label, className: "card", children: children }));
10
+ }