@adea-ai/ui 0.96.0 → 0.97.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 (49) hide show
  1. package/dist/components/composites/about-dialog/about-dialog.d.ts +17 -0
  2. package/dist/components/composites/about-dialog/about-dialog.d.ts.map +1 -0
  3. package/dist/components/composites/about-dialog/about-dialog.js +167 -0
  4. package/dist/components/composites/about-dialog/about-dialog.js.map +1 -0
  5. package/dist/components/composites/about-dialog/index.d.ts +3 -0
  6. package/dist/components/composites/about-dialog/index.d.ts.map +1 -0
  7. package/dist/components/composites/about-dialog/index.js +2 -0
  8. package/dist/components/composites/account-menu/account-menu.d.ts +12 -0
  9. package/dist/components/composites/account-menu/account-menu.d.ts.map +1 -1
  10. package/dist/components/composites/account-menu/account-menu.js +91 -49
  11. package/dist/components/composites/account-menu/account-menu.js.map +1 -1
  12. package/dist/components/composites/account-menu/index.d.ts +1 -1
  13. package/dist/components/composites/account-menu/index.d.ts.map +1 -1
  14. package/dist/components/composites/account-menu/index.js +2 -2
  15. package/dist/components/composites/help-center/help-center.d.ts +19 -0
  16. package/dist/components/composites/help-center/help-center.d.ts.map +1 -0
  17. package/dist/components/composites/help-center/help-center.js +135 -0
  18. package/dist/components/composites/help-center/help-center.js.map +1 -0
  19. package/dist/components/composites/help-center/index.d.ts +3 -0
  20. package/dist/components/composites/help-center/index.d.ts.map +1 -0
  21. package/dist/components/composites/help-center/index.js +2 -0
  22. package/dist/components/composites/update-dialog/update-dialog.d.ts +11 -1
  23. package/dist/components/composites/update-dialog/update-dialog.d.ts.map +1 -1
  24. package/dist/components/composites/update-dialog/update-dialog.js +209 -78
  25. package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
  26. package/dist/index.d.ts +2 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +4 -2
  29. package/dist/r/about-dialog.json +26 -0
  30. package/dist/r/help-center.json +28 -0
  31. package/dist/r/registry.json +55 -0
  32. package/dist/r/src/components/composites/about-dialog/about-dialog.tsx +161 -0
  33. package/dist/r/src/components/composites/about-dialog/index.ts +2 -0
  34. package/dist/r/src/components/composites/account-menu/account-menu.tsx +64 -12
  35. package/dist/r/src/components/composites/account-menu/index.ts +6 -1
  36. package/dist/r/src/components/composites/help-center/help-center.tsx +104 -0
  37. package/dist/r/src/components/composites/help-center/index.ts +2 -0
  38. package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +200 -27
  39. package/dist/r/update-dialog.json +1 -0
  40. package/package.json +1 -1
  41. package/registry.json +55 -0
  42. package/src/components/composites/about-dialog/about-dialog.tsx +161 -0
  43. package/src/components/composites/about-dialog/index.ts +2 -0
  44. package/src/components/composites/account-menu/account-menu.tsx +64 -12
  45. package/src/components/composites/account-menu/index.ts +6 -1
  46. package/src/components/composites/help-center/help-center.tsx +104 -0
  47. package/src/components/composites/help-center/index.ts +2 -0
  48. package/src/components/composites/update-dialog/update-dialog.tsx +200 -27
  49. package/src/index.ts +2 -0
@@ -0,0 +1,17 @@
1
+ import { type Accessor } from 'solid-js';
2
+ export type AboutDialogProps = {
3
+ appName: string;
4
+ appIcon: string;
5
+ version?: string;
6
+ platform: string;
7
+ copyright: string;
8
+ sourceUrl: string;
9
+ open: boolean;
10
+ onOpenChange: (open: boolean) => void;
11
+ copyVersionInfo?: (text: string) => Promise<void>;
12
+ openExternal?: (url: string) => Promise<void>;
13
+ restoreFocusRef?: Accessor<HTMLElement | undefined>;
14
+ };
15
+ /** Compact app identity and support details, with clipboard and native-browser adapters. */
16
+ export declare function AboutDialog(props: AboutDialogProps): import("solid-js").JSX.Element;
17
+ //# sourceMappingURL=about-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"about-dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/about-dialog/about-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,QAAQ,EACd,MAAM,UAAU,CAAA;AAOjB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACjD,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7C,eAAe,CAAC,EAAE,QAAQ,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;CACpD,CAAA;AAED,4FAA4F;AAC5F,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,kCAkIlD"}
@@ -0,0 +1,167 @@
1
+ import { Alert, AlertDescription } from "../../ui/alert/alert.js";
2
+ import { Dialog, DialogContent, DialogTitle, createDialogFocusRestoration } from "../../ui/dialog/dialog.js";
3
+ import { ActionButton } from "../action-button/action-button.js";
4
+ import { createComponent, effect, insert, setAttribute, template } from "solid-js/web";
5
+ import { ExternalLink } from "lucide-solid";
6
+ import { Show, createEffect, createMemo, createSignal, on, onCleanup } from "solid-js";
7
+ //#region src/components/composites/about-dialog/about-dialog.tsx
8
+ var _tmpl$ = /*#__PURE__*/ template(`<div class="flex flex-col items-center gap-3 px-6 py-8 text-center"><img alt class=size-16 aria-hidden=true><p class="text-sm text-primary"></p><p class="text-xs text-muted-foreground"></p><div class="flex flex-wrap items-center justify-center gap-3">`);
9
+ /** Compact app identity and support details, with clipboard and native-browser adapters. */
10
+ function AboutDialog(props) {
11
+ const versionLabel = () => props.version ? `Version ${props.version}` : "Version unavailable";
12
+ const versionInfo = createMemo(() => [
13
+ props.appName,
14
+ versionLabel(),
15
+ `Platform: ${props.platform}`
16
+ ].join("\n"));
17
+ const [copied, setCopied] = createSignal(false);
18
+ const [error, setError] = createSignal("");
19
+ const [copying, setCopying] = createSignal(false);
20
+ let disposed = false;
21
+ let epoch = 0;
22
+ let timer;
23
+ onCleanup(() => {
24
+ disposed = true;
25
+ epoch += 1;
26
+ clearTimeout(timer);
27
+ });
28
+ createEffect(on(() => props.open, () => {
29
+ epoch += 1;
30
+ clearTimeout(timer);
31
+ setCopied(false);
32
+ setError("");
33
+ setCopying(false);
34
+ }));
35
+ const focus = createDialogFocusRestoration({
36
+ open: () => props.open,
37
+ restoreFocusRef: props.restoreFocusRef
38
+ });
39
+ const copy = async () => {
40
+ const owner = epoch;
41
+ const active = () => !disposed && props.open && owner === epoch;
42
+ setError("");
43
+ setCopied(false);
44
+ setCopying(true);
45
+ try {
46
+ if (props.copyVersionInfo) await props.copyVersionInfo(versionInfo());
47
+ else await navigator.clipboard.writeText(versionInfo());
48
+ if (!active()) return;
49
+ setCopied(true);
50
+ clearTimeout(timer);
51
+ timer = setTimeout(() => {
52
+ if (active()) setCopied(false);
53
+ }, 2e3);
54
+ } catch {
55
+ if (active()) setError("Could not copy version info. Please try again.");
56
+ } finally {
57
+ if (active()) setCopying(false);
58
+ }
59
+ };
60
+ const openSource = async () => {
61
+ const owner = epoch;
62
+ setError("");
63
+ try {
64
+ await props.openExternal?.(props.sourceUrl);
65
+ } catch {
66
+ if (!disposed && props.open && owner === epoch) setError("Could not open the source repository. Please try again.");
67
+ }
68
+ };
69
+ return createComponent(Dialog, {
70
+ get open() {
71
+ return props.open;
72
+ },
73
+ get onOpenChange() {
74
+ return props.onOpenChange;
75
+ },
76
+ get children() {
77
+ return createComponent(DialogContent, {
78
+ onKeyDown: (event) => {
79
+ if (event.key === "Escape" && !event.defaultPrevented) {
80
+ event.preventDefault();
81
+ props.onOpenChange(false);
82
+ }
83
+ },
84
+ get ["aria-label"]() {
85
+ return `About ${props.appName}`;
86
+ },
87
+ "aria-labelledby": "",
88
+ "aria-describedby": void 0,
89
+ onOpenAutoFocus: (event) => {
90
+ focus.onOpenAutoFocus(event);
91
+ if (!event.defaultPrevented && event.currentTarget instanceof HTMLElement) {
92
+ event.preventDefault();
93
+ event.currentTarget.focus({ preventScroll: true });
94
+ }
95
+ },
96
+ get onCloseAutoFocus() {
97
+ return focus.onCloseAutoFocus;
98
+ },
99
+ get children() {
100
+ var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
101
+ insert(_el$, createComponent(DialogTitle, { get children() {
102
+ return props.appName;
103
+ } }), _el$3);
104
+ insert(_el$3, versionLabel);
105
+ insert(_el$4, () => props.copyright);
106
+ insert(_el$5, createComponent(ActionButton, {
107
+ type: "button",
108
+ variant: "outline",
109
+ size: "sm",
110
+ get busy() {
111
+ return copying();
112
+ },
113
+ tooltip: "Copy the app version and runtime details for a support report.",
114
+ onClick: () => void copy(),
115
+ get children() {
116
+ return copied() ? "Copied" : "Copy version info";
117
+ }
118
+ }), null);
119
+ insert(_el$5, createComponent(ActionButton, {
120
+ as: "a",
121
+ variant: "link",
122
+ size: "sm",
123
+ get href() {
124
+ return props.sourceUrl;
125
+ },
126
+ target: "_blank",
127
+ rel: "noopener noreferrer",
128
+ get tooltip() {
129
+ return `Open the ${props.appName} source repository in your browser.`;
130
+ },
131
+ onClick: (event) => {
132
+ if (props.openExternal) {
133
+ event.preventDefault();
134
+ openSource();
135
+ }
136
+ },
137
+ get children() {
138
+ return [createComponent(ExternalLink, { "aria-hidden": "true" }), "View source"];
139
+ }
140
+ }), null);
141
+ insert(_el$, createComponent(Show, {
142
+ get when() {
143
+ return error();
144
+ },
145
+ get children() {
146
+ return createComponent(Alert, {
147
+ variant: "destructive",
148
+ role: "alert",
149
+ get children() {
150
+ return createComponent(AlertDescription, { get children() {
151
+ return error();
152
+ } });
153
+ }
154
+ });
155
+ }
156
+ }), null);
157
+ effect(() => setAttribute(_el$2, "src", props.appIcon));
158
+ return _el$;
159
+ }
160
+ });
161
+ }
162
+ });
163
+ }
164
+ //#endregion
165
+ export { AboutDialog };
166
+
167
+ //# sourceMappingURL=about-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"about-dialog.js","names":["createEffect","createMemo","createSignal","on","onCleanup","Show","Accessor","ExternalLink","ActionButton","Alert","AlertDescription","Dialog","DialogContent","DialogTitle","createDialogFocusRestoration","AboutDialogProps","appName","appIcon","version","platform","copyright","sourceUrl","open","onOpenChange","copyVersionInfo","text","Promise","openExternal","url","restoreFocusRef","HTMLElement","AboutDialog","props","versionLabel","versionInfo","join","copied","setCopied","error","setError","copying","setCopying","disposed","epoch","timer","ReturnType","setTimeout","clearTimeout","focus","copy","owner","active","navigator","clipboard","writeText","openSource","_$createComponent","children","onKeyDown","event","KeyboardEvent","key","defaultPrevented","preventDefault","aria-label","undefined","onOpenAutoFocus","currentTarget","preventScroll","onCloseAutoFocus","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_el$4","_el$5","_$insert","type","variant","size","busy","tooltip","onClick","as","href","target","rel","when","role","_$effect","_$setAttribute","_$createComponent","_$setAttribute"],"sources":["../../../../src/components/composites/about-dialog/about-dialog.tsx"],"sourcesContent":["import {\n createEffect,\n createMemo,\n createSignal,\n on,\n onCleanup,\n Show,\n type Accessor,\n} from 'solid-js'\nimport { ExternalLink } from 'lucide-solid'\nimport { ActionButton } from '../action-button'\nimport { Alert, AlertDescription } from '../../ui/alert'\nimport { Dialog, DialogContent, DialogTitle } from '../../ui/dialog'\nimport { createDialogFocusRestoration } from '../../ui/dialog/dialog'\n\nexport type AboutDialogProps = {\n appName: string\n appIcon: string\n version?: string\n platform: string\n copyright: string\n sourceUrl: string\n open: boolean\n onOpenChange: (open: boolean) => void\n copyVersionInfo?: (text: string) => Promise<void>\n openExternal?: (url: string) => Promise<void>\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n}\n\n/** Compact app identity and support details, with clipboard and native-browser adapters. */\nexport function AboutDialog(props: AboutDialogProps) {\n const versionLabel = () => (props.version ? `Version ${props.version}` : 'Version unavailable')\n const versionInfo = createMemo(() =>\n [props.appName, versionLabel(), `Platform: ${props.platform}`].join('\\n')\n )\n const [copied, setCopied] = createSignal(false)\n const [error, setError] = createSignal('')\n const [copying, setCopying] = createSignal(false)\n let disposed = false\n let epoch = 0\n let timer: ReturnType<typeof setTimeout> | undefined\n onCleanup(() => {\n disposed = true\n epoch += 1\n clearTimeout(timer)\n })\n createEffect(\n on(\n () => props.open,\n () => {\n epoch += 1\n clearTimeout(timer)\n setCopied(false)\n setError('')\n setCopying(false)\n }\n )\n )\n const focus = createDialogFocusRestoration({\n open: () => props.open,\n restoreFocusRef: props.restoreFocusRef,\n })\n const copy = async () => {\n const owner = epoch\n const active = () => !disposed && props.open && owner === epoch\n setError('')\n setCopied(false)\n setCopying(true)\n try {\n if (props.copyVersionInfo) await props.copyVersionInfo(versionInfo())\n else await navigator.clipboard.writeText(versionInfo())\n if (!active()) return\n setCopied(true)\n clearTimeout(timer)\n timer = setTimeout(() => {\n if (active()) setCopied(false)\n }, 2000)\n } catch {\n if (active()) setError('Could not copy version info. Please try again.')\n } finally {\n if (active()) setCopying(false)\n }\n }\n const openSource = async () => {\n const owner = epoch\n setError('')\n try {\n await props.openExternal?.(props.sourceUrl)\n } catch {\n if (!disposed && props.open && owner === epoch)\n setError('Could not open the source repository. Please try again.')\n }\n }\n return (\n <Dialog open={props.open} onOpenChange={props.onOpenChange}>\n <DialogContent\n onKeyDown={(event: KeyboardEvent) => {\n // Tooltip help on the identity actions cannot trap Escape in this popup.\n if (event.key === 'Escape' && !event.defaultPrevented) {\n event.preventDefault()\n props.onOpenChange(false)\n }\n }}\n aria-label={`About ${props.appName}`}\n aria-labelledby=\"\"\n aria-describedby={undefined}\n onOpenAutoFocus={(event) => {\n focus.onOpenAutoFocus(event)\n // Let the identity be read before focus opens explanatory action help.\n if (!event.defaultPrevented && event.currentTarget instanceof HTMLElement) {\n event.preventDefault()\n event.currentTarget.focus({ preventScroll: true })\n }\n }}\n onCloseAutoFocus={focus.onCloseAutoFocus}\n >\n <div class=\"flex flex-col items-center gap-3 px-6 py-8 text-center\">\n <img src={props.appIcon} alt=\"\" class=\"size-16\" aria-hidden=\"true\" />\n <DialogTitle>{props.appName}</DialogTitle>\n <p class=\"text-sm text-primary\">{versionLabel()}</p>\n <p class=\"text-xs text-muted-foreground\">{props.copyright}</p>\n <div class=\"flex flex-wrap items-center justify-center gap-3\">\n <ActionButton\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n busy={copying()}\n tooltip=\"Copy the app version and runtime details for a support report.\"\n onClick={() => void copy()}\n >\n {copied() ? 'Copied' : 'Copy version info'}\n </ActionButton>\n <ActionButton\n as=\"a\"\n variant=\"link\"\n size=\"sm\"\n href={props.sourceUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n tooltip={`Open the ${props.appName} source repository in your browser.`}\n onClick={(event) => {\n if (props.openExternal) {\n event.preventDefault()\n void openSource()\n }\n }}\n >\n <ExternalLink aria-hidden=\"true\" />\n View source\n </ActionButton>\n </div>\n <Show when={error()}>\n <Alert variant=\"destructive\" role=\"alert\">\n <AlertDescription>{error()}</AlertDescription>\n </Alert>\n </Show>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n"],"mappings":";;;;;;;;;AA8BA,SAAgB+B,YAAYC,OAAyB;CACnD,MAAMC,qBAAsBD,MAAMd,UAAU,WAAWc,MAAMd,YAAY;CACzE,MAAMgB,cAAcjC,iBAClB;EAAC+B,MAAMhB;EAASiB,aAAa;EAAG,aAAaD,MAAMb;CAAU,CAAC,CAACgB,KAAK,IAAI,CAC1E;CACA,MAAM,CAACC,QAAQC,aAAanC,aAAa,KAAK;CAC9C,MAAM,CAACoC,OAAOC,YAAYrC,aAAa,EAAE;CACzC,MAAM,CAACsC,SAASC,cAAcvC,aAAa,KAAK;CAChD,IAAIwC,WAAW;CACf,IAAIC,QAAQ;CACZ,I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hB,QAAO;MAAqC;MACvEoE,UAAUzB,UAAU;OAClB,IAAI3B,MAAML,cAAc;QACtBgC,MAAMI,eAAe;QACrB,WAAgB;OAClB;MACF;MAAC,IAAAN,WAAA;OAAA,OAAA,CAAAD,gBAEAjD,cAAY,EAAA,eAAA,OAAA,CAAA,GAAA,aAAA;MAAA;KAAA,CAAA,GAAA,IAAA;KAAAuE,OAAAR,MAAAd,gBAIhBnD,MAAI;MAAA,IAACoF,OAAI;OAAA,OAAEnD,MAAM;MAAC;MAAA,IAAAmB,WAAA;OAAA,OAAAD,gBAChB/C,OAAK;QAACuE,SAAO;QAAeU,MAAI;QAAA,IAAAjC,WAAA;SAAA,OAAAD,gBAC9B9C,kBAAgB,EAAA,IAAA+C,WAAA;UAAA,OAAEnB,MAAM;SAAC,EAAA,CAAA;QAAA;OAAA,CAAA;MAAA;KAAA,CAAA,GAAA,IAAA;KAAAqD,aAAAC,aAAApB,OAAA,OApCpBxC,MAAMf,OAAO,CAAA;KAAA,OAAAqD;IAAA;GAAA,CAAA;EAAA;CAAA,CAAA;AA2CjC"}
@@ -0,0 +1,3 @@
1
+ /** Shared app identity and version support dialog. */
2
+ export { AboutDialog, type AboutDialogProps } from './about-dialog';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/about-dialog/index.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { AboutDialog } from "./about-dialog.js";
2
+ export { AboutDialog };
@@ -40,6 +40,8 @@ export type AccountMenuProps = {
40
40
  platform?: 'desktop' | 'web';
41
41
  /** Whether a session exists. Decides the sign-in/sign-out row. */
42
42
  authenticated: boolean;
43
+ /** Local-only applications can omit the session actions altogether. */
44
+ showSession?: boolean;
43
45
  /** Disable the session row while a sign-in or sign-out is in flight. */
44
46
  busy?: boolean;
45
47
  /** The name shown on the trigger's accessible label. */
@@ -50,4 +52,14 @@ export type AccountMenuProps = {
50
52
  onIntent?: () => void;
51
53
  };
52
54
  export declare function AccountMenu(props: AccountMenuProps): JSX.Element;
55
+ /** The common support menu, with one app-specific entry before the shared items. */
56
+ export declare function createAppMenuItems(options: {
57
+ primaryItem?: AccountMenuItem;
58
+ settingsShortcut?: string;
59
+ onAbout?: AccountMenuItem['onSelectAfterClose'];
60
+ onHelp?: AccountMenuItem['onSelectAfterClose'];
61
+ onFeedback?: AccountMenuItem['onSelectAfterClose'];
62
+ onUpdates?: AccountMenuItem['onSelectAfterClose'];
63
+ onSettings?: AccountMenuItem['onSelectAfterClose'];
64
+ }): AccountMenuItem[];
53
65
  //# sourceMappingURL=account-menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"account-menu.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/account-menu/account-menu.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAkB,GAAG,EAAE,MAAM,UAAU,CAAA;AAGnD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAWjE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IAClB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,SAAS,GAAG,KAAK,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,mFAAmF;IACnF,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,GAAG,SAAS,KAAK,IAAI,CAAA;CACtE,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2EAA2E;IAC3E,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC1B,uCAAuC;IACvC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAA;IACjC,sEAAsE;IACtE,QAAQ,CAAC,EAAE,SAAS,GAAG,KAAK,CAAA;IAC5B,kEAAkE;IAClE,aAAa,EAAE,OAAO,CAAA;IACtB,wEAAwE;IACxE,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAWD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,eA2GlD"}
1
+ {"version":3,"file":"account-menu.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/account-menu/account-menu.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAkB,GAAG,EAAE,MAAM,UAAU,CAAA;AAGnD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAWjE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IAClB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,SAAS,GAAG,KAAK,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,mFAAmF;IACnF,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,GAAG,SAAS,KAAK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y",
26
27
  "label",
27
28
  "onSignIn",
@@ -92,60 +93,63 @@ function AccountMenu(props) {
92
93
  });
93
94
  },
94
95
  get children() {
95
- return [
96
- createComponent(DropdownMenuGroup, { get children() {
97
- return createComponent(For, {
98
- get each() {
99
- return visible();
96
+ return [createComponent(DropdownMenuGroup, { get children() {
97
+ return createComponent(For, {
98
+ get each() {
99
+ return visible();
100
+ },
101
+ children: (item) => createComponent(DropdownMenuItem, {
102
+ get disabled() {
103
+ return item.disabled;
104
+ },
105
+ onSelect: () => {
106
+ pendingAfterClose = item.onSelectAfterClose ? { callback: item.onSelectAfterClose } : void 0;
107
+ item.onSelect?.();
108
+ },
109
+ get shortcut() {
110
+ return item.shortcut;
100
111
  },
101
- children: (item) => createComponent(DropdownMenuItem, {
112
+ get children() {
113
+ return [memo(() => item.icon ?? renderFallbackIcon(item.id)), (() => {
114
+ var _el$2 = _tmpl$();
115
+ insert(_el$2, () => item.label);
116
+ return _el$2;
117
+ })()];
118
+ }
119
+ })
120
+ });
121
+ } }), createComponent(Show, {
122
+ get when() {
123
+ return local.showSession !== false;
124
+ },
125
+ get children() {
126
+ return [createComponent(DropdownMenuSeparator, {}), createComponent(DropdownMenuGroup, { get children() {
127
+ return createComponent(DropdownMenuItem, {
102
128
  get disabled() {
103
- return item.disabled;
104
- },
105
- onSelect: () => {
106
- pendingAfterClose = item.onSelectAfterClose ? { callback: item.onSelectAfterClose } : void 0;
107
- item.onSelect?.();
108
- },
109
- get shortcut() {
110
- return item.shortcut;
129
+ return local.busy;
111
130
  },
131
+ onSelect: () => local.authenticated ? local.onSignOut?.() : local.onSignIn?.(),
112
132
  get children() {
113
- return [memo(() => item.icon ?? renderFallbackIcon(item.id)), (() => {
114
- var _el$2 = _tmpl$();
115
- insert(_el$2, () => item.label);
116
- return _el$2;
133
+ return [createComponent(Show, {
134
+ get when() {
135
+ return local.authenticated;
136
+ },
137
+ get fallback() {
138
+ return createComponent(LogIn, { "aria-hidden": "true" });
139
+ },
140
+ get children() {
141
+ return createComponent(LogOut, { "aria-hidden": "true" });
142
+ }
143
+ }), (() => {
144
+ var _el$ = _tmpl$();
145
+ insert(_el$, () => local.authenticated ? "Sign out" : "Sign in");
146
+ return _el$;
117
147
  })()];
118
148
  }
119
- })
120
- });
121
- } }),
122
- createComponent(DropdownMenuSeparator, {}),
123
- createComponent(DropdownMenuGroup, { get children() {
124
- return createComponent(DropdownMenuItem, {
125
- get disabled() {
126
- return local.busy;
127
- },
128
- onSelect: () => local.authenticated ? local.onSignOut?.() : local.onSignIn?.(),
129
- get children() {
130
- return [createComponent(Show, {
131
- get when() {
132
- return local.authenticated;
133
- },
134
- get fallback() {
135
- return createComponent(LogIn, { "aria-hidden": "true" });
136
- },
137
- get children() {
138
- return createComponent(LogOut, { "aria-hidden": "true" });
139
- }
140
- }), (() => {
141
- var _el$ = _tmpl$();
142
- insert(_el$, () => local.authenticated ? "Sign out" : "Sign in");
143
- return _el$;
144
- })()];
145
- }
146
- });
147
- } })
148
- ];
149
+ });
150
+ } })];
151
+ }
152
+ })];
149
153
  }
150
154
  })
151
155
  ];
@@ -154,6 +158,44 @@ function AccountMenu(props) {
154
158
  }
155
159
  });
156
160
  }
161
+ /** The common support menu, with one app-specific entry before the shared items. */
162
+ function createAppMenuItems(options) {
163
+ return [
164
+ ...options.primaryItem ? [options.primaryItem] : [],
165
+ {
166
+ id: "about",
167
+ label: "About",
168
+ disabled: !options.onAbout,
169
+ onSelectAfterClose: options.onAbout
170
+ },
171
+ {
172
+ id: "help",
173
+ label: "Help Center",
174
+ disabled: !options.onHelp,
175
+ onSelectAfterClose: options.onHelp
176
+ },
177
+ {
178
+ id: "feedback",
179
+ label: "Send Feedback",
180
+ disabled: !options.onFeedback,
181
+ onSelectAfterClose: options.onFeedback
182
+ },
183
+ {
184
+ id: "updates",
185
+ label: "Updates",
186
+ platform: "desktop",
187
+ disabled: !options.onUpdates,
188
+ onSelectAfterClose: options.onUpdates
189
+ },
190
+ {
191
+ id: "settings",
192
+ label: "Settings",
193
+ shortcut: options.settingsShortcut,
194
+ disabled: !options.onSettings,
195
+ onSelectAfterClose: options.onSettings
196
+ }
197
+ ];
198
+ }
157
199
  function AccountMenuButton(props) {
158
200
  return createComponent(DropdownMenuTrigger, mergeProps({ as: Button }, props));
159
201
  }
@@ -166,6 +208,6 @@ function renderFallbackIcon(id) {
166
208
  return Icon ? createComponent(Icon, { "aria-hidden": "true" }) : null;
167
209
  }
168
210
  //#endregion
169
- export { AccountMenu };
211
+ export { AccountMenu, createAppMenuItems };
170
212
 
171
213
  //# sourceMappingURL=account-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"account-menu.js","names":["CircleHelp","Info","LogIn","LogOut","Megaphone","RefreshCw","Settings2","Smartphone","UserRound","ComponentProps","JSX","For","Show","createSignal","onCleanup","splitProps","cn","Button","ButtonProps","DropdownMenu","DropdownMenuContent","DropdownMenuGroup","DropdownMenuItem","DropdownMenuSeparator","DropdownMenuTrigger","Tooltip","TooltipContent","TooltipTrigger","AccountMenuItem","id","label","icon","Element","shortcut","disabled","platform","onSelect","onSelectAfterClose","trigger","HTMLButtonElement","AccountMenuProps","class","size","items","authenticated","busy","onSignIn","onSignOut","onIntent","FALLBACK_ICONS","Record","mobile","settings","about","help","feedback","updates","AccountMenu","props","local","rest","pendingAfterClose","callback","NonNullable","scheduledAfterClose","menuOpen","setMenuOpen","tooltipOpen","setTooltipOpen","undefined","visible","filter","item","_$createComponent","open","onOpenChange","children","modal","_$mergeProps","as","AccountMenuButton","ref","element","variant","aria-label","onFocus","onPointerEnter","placement","onCloseAutoFocus","event","selection","preventDefault","queueMicrotask","each","_$memo","renderFallbackIcon","_el$2","_tmpl$","_$insert","when","fallback","_el$","Icon","_$createComponent","_$mergeProps","_$memo"],"sources":["../../../../src/components/composites/account-menu/account-menu.tsx"],"sourcesContent":["import {\n CircleHelp,\n Info,\n LogIn,\n LogOut,\n Megaphone,\n RefreshCw,\n Settings2,\n Smartphone,\n UserRound,\n} from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { For, Show, createSignal, onCleanup, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Button, type ButtonProps } from '../../ui/button/button'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '../../ui/dropdown-menu/dropdown-menu'\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../../ui/tooltip/tooltip'\n\n/**\n * AccountMenu.\n *\n * The trailing control in a rail or a top bar: the account, the way into settings,\n * and the way out. Every desktop application has one and they are all the same menu,\n * which is why it belongs here rather than being redrawn per app.\n *\n * ## The items are the caller's\n *\n * The menu takes a list rather than hard-coding one. An application adds and removes\n * entries — a mobile hand-off that only makes sense on desktop, a feedback link that\n * only exists once there is somewhere to send it — and a component that decided the\n * list could not be used by two products.\n *\n * `disabled` on an item is deliberately visible rather than hidden: a greyed \"Help\n * Center\" says the destination is coming, while an absent one says it does not exist.\n */\nexport type AccountMenuItem = {\n id: string\n label: string\n icon?: JSX.Element\n /** A chord drawn at the trailing edge, e.g. `⌘,`. */\n shortcut?: string\n disabled?: boolean\n /** Render only on this platform. Omit to always render. */\n platform?: 'desktop' | 'web'\n onSelect?: () => void\n /** Run after the menu's close-focus cycle, with its trigger as a stable opener. */\n onSelectAfterClose?: (trigger: HTMLButtonElement | undefined) => void\n}\n\nexport type AccountMenuProps = {\n class?: string\n /** The trigger size. Icon-only menus default to the standard icon size. */\n size?: ButtonProps['size']\n /** The entries above the separator. */\n items: readonly AccountMenuItem[]\n /** Which platform this is rendered on, for items that declare one. */\n platform?: 'desktop' | 'web'\n /** Whether a session exists. Decides the sign-in/sign-out row. */\n authenticated: boolean\n /** Disable the session row while a sign-in or sign-out is in flight. */\n busy?: boolean\n /** The name shown on the trigger's accessible label. */\n label?: string\n onSignIn?: () => void\n onSignOut?: () => void\n /** Fires on hover or focus of the trigger — a chance to prefetch. */\n onIntent?: () => void\n}\n\nconst FALLBACK_ICONS: Record<string, typeof Settings2> = {\n mobile: Smartphone,\n settings: Settings2,\n about: Info,\n help: CircleHelp,\n feedback: Megaphone,\n updates: RefreshCw,\n}\n\nexport function AccountMenu(props: AccountMenuProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'size',\n 'items',\n 'platform',\n 'authenticated',\n 'busy',\n 'label',\n 'onSignIn',\n 'onSignOut',\n 'onIntent',\n ])\n\n let trigger: HTMLButtonElement | undefined\n let pendingAfterClose:\n | { callback: NonNullable<AccountMenuItem['onSelectAfterClose']> }\n | undefined\n let scheduledAfterClose:\n | { callback: NonNullable<AccountMenuItem['onSelectAfterClose']> }\n | undefined\n const [menuOpen, setMenuOpen] = createSignal(false)\n const [tooltipOpen, setTooltipOpen] = createSignal(false)\n\n onCleanup(() => {\n pendingAfterClose = undefined\n scheduledAfterClose = undefined\n })\n\n const visible = () =>\n local.items.filter((item) => !item.platform || item.platform === (local.platform ?? 'desktop'))\n\n return (\n <Tooltip open={tooltipOpen()} onOpenChange={(open) => setTooltipOpen(open && !menuOpen())}>\n <DropdownMenu\n modal={false}\n onOpenChange={(open) => {\n setMenuOpen(open)\n if (open) setTooltipOpen(false)\n }}\n >\n <TooltipTrigger\n as={AccountMenuButton}\n ref={(element: HTMLButtonElement) => (trigger = element)}\n variant=\"ghost\"\n size={local.size ?? 'icon-md'}\n class={cn('text-muted-foreground', local.class)}\n aria-label={local.label ?? 'Account and settings'}\n onFocus={() => local.onIntent?.()}\n onPointerEnter={() => local.onIntent?.()}\n {...rest}\n >\n <UserRound aria-hidden=\"true\" />\n </TooltipTrigger>\n <TooltipContent placement=\"top\">{local.label ?? 'Account and settings'}</TooltipContent>\n <DropdownMenuContent\n placement=\"top-start\"\n class=\"min-w-56 max-h-(--kb-popper-available-height) overflow-x-hidden overflow-y-auto\"\n onCloseAutoFocus={(event) => {\n const selection = pendingAfterClose\n pendingAfterClose = undefined\n if (!selection) return\n\n event.preventDefault()\n scheduledAfterClose = selection\n queueMicrotask(() => {\n if (scheduledAfterClose !== selection) return\n scheduledAfterClose = undefined\n selection.callback(trigger)\n })\n }}\n >\n <DropdownMenuGroup>\n <For each={visible()}>\n {(item) => (\n <DropdownMenuItem\n disabled={item.disabled}\n onSelect={() => {\n pendingAfterClose = item.onSelectAfterClose\n ? { callback: item.onSelectAfterClose }\n : undefined\n item.onSelect?.()\n }}\n shortcut={item.shortcut}\n >\n {item.icon ?? renderFallbackIcon(item.id)}\n <span>{item.label}</span>\n </DropdownMenuItem>\n )}\n </For>\n </DropdownMenuGroup>\n <DropdownMenuSeparator />\n <DropdownMenuGroup>\n <DropdownMenuItem\n disabled={local.busy}\n onSelect={() => (local.authenticated ? local.onSignOut?.() : local.onSignIn?.())}\n >\n <Show when={local.authenticated} fallback={<LogIn aria-hidden=\"true\" />}>\n <LogOut aria-hidden=\"true\" />\n </Show>\n <span>{local.authenticated ? 'Sign out' : 'Sign in'}</span>\n </DropdownMenuItem>\n </DropdownMenuGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n </Tooltip>\n )\n}\n\nfunction AccountMenuButton(props: ComponentProps<typeof Button>) {\n return <DropdownMenuTrigger as={Button} {...props} />\n}\n\n/**\n * A known item id gets its conventional glyph, so a caller that only wants the\n * standard menu does not have to import six icons to get it.\n */\nfunction renderFallbackIcon(id: string): JSX.Element {\n const Icon = FALLBACK_ICONS[id]\n return Icon ? <Icon aria-hidden=\"true\" /> : null\n}\n"],"mappings":";;;;;;;;;AA4EA,IAAMiD,iBAAmD;CACvDE,QAAQ5C;CACR6C,UAAU9C;CACV+C,OAAOpD;CACPqD,MAAMtD;CACNuD,UAAUnD;CACVoD,SAASnD;AACX;AAEA,SAAgBoD,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQ7C,WAAW2C,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAU,CACX;CAED,IAAIpB;CACJ,IAAIuB;CAGJ,IAAIG;CAGJ,MAAM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AAA,OAAA3B,gBAAGvE,OAAK,EAAA,eAAA,OAAA,CAAA;aAAA;aAAA,IAAA0E,WAAA;cAAA,OAAAH,gBAC9CtE,QAAM,EAAA,eAAA,OAAA,CAAA;aAAA;YAAA,CAAA,UAAA;aAAA,IAAAkG,OAAAJ,OAAA;aAAAC,OAAAG,YAEF1C,MAAMf,gBAAgB,aAAa,SAAS;aAAA,OAAAyD;YAAA,EAAA,CAAA,CAAA;WAAA;UAAA,CAAA;SAAA,EAAA,CAAA;QAAA;OAAA;MAAA,CAAA;KAAA;IAAA;GAAA,CAAA;EAAA;CAAA,CAAA;AAOjE;AAEA,SAASrB,kBAAkBtB,OAAsC;CAC/D,OAAAe,gBAAQjD,qBAAmBsD,WAAA,EAACC,IAAI9D,OAAM,GAAMyC,KAAK,CAAA;AACnD;;;;;AAMA,SAASqC,mBAAmBlE,IAAyB;CACnD,MAAMyE,OAAOrD,eAAepB;CAC5B,OAAOyE,OAAI7B,gBAAI6B,MAAI,EAAA,eAAA,OAAA,CAAA,IAAyB;AAC9C"}
1
+ {"version":3,"file":"account-menu.js","names":["CircleHelp","Info","LogIn","LogOut","Megaphone","RefreshCw","Settings2","Smartphone","UserRound","ComponentProps","JSX","For","Show","createSignal","onCleanup","splitProps","cn","Button","ButtonProps","DropdownMenu","DropdownMenuContent","DropdownMenuGroup","DropdownMenuItem","DropdownMenuSeparator","DropdownMenuTrigger","Tooltip","TooltipContent","TooltipTrigger","AccountMenuItem","id","label","icon","Element","shortcut","disabled","platform","onSelect","onSelectAfterClose","trigger","HTMLButtonElement","AccountMenuProps","class","size","items","authenticated","showSession","busy","onSignIn","onSignOut","onIntent","FALLBACK_ICONS","Record","mobile","settings","about","help","feedback","updates","AccountMenu","props","local","rest","pendingAfterClose","callback","NonNullable","scheduledAfterClose","menuOpen","setMenuOpen","tooltipOpen","setTooltipOpen","undefined","visible","filter","item","_$createComponent","open","onOpenChange","children","modal","_$mergeProps","as","AccountMenuButton","ref","element","variant","aria-label","onFocus","onPointerEnter","placement","onCloseAutoFocus","event","selection","preventDefault","queueMicrotask","each","_$memo","renderFallbackIcon","_el$2","_tmpl$","_$insert","when","fallback","_el$","createAppMenuItems","options","primaryItem","settingsShortcut","onAbout","onHelp","onFeedback","onUpdates","onSettings","Icon","_$createComponent","_$mergeProps","_$memo"],"sources":["../../../../src/components/composites/account-menu/account-menu.tsx"],"sourcesContent":["import {\n CircleHelp,\n Info,\n LogIn,\n LogOut,\n Megaphone,\n RefreshCw,\n Settings2,\n Smartphone,\n UserRound,\n} from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { For, Show, createSignal, onCleanup, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Button, type ButtonProps } from '../../ui/button/button'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '../../ui/dropdown-menu/dropdown-menu'\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../../ui/tooltip/tooltip'\n\n/**\n * AccountMenu.\n *\n * The trailing control in a rail or a top bar: the account, the way into settings,\n * and the way out. Every desktop application has one and they are all the same menu,\n * which is why it belongs here rather than being redrawn per app.\n *\n * ## The items are the caller's\n *\n * The menu takes a list rather than hard-coding one. An application adds and removes\n * entries — a mobile hand-off that only makes sense on desktop, a feedback link that\n * only exists once there is somewhere to send it — and a component that decided the\n * list could not be used by two products.\n *\n * `disabled` on an item is deliberately visible rather than hidden: a greyed \"Help\n * Center\" says the destination is coming, while an absent one says it does not exist.\n */\nexport type AccountMenuItem = {\n id: string\n label: string\n icon?: JSX.Element\n /** A chord drawn at the trailing edge, e.g. `⌘,`. */\n shortcut?: string\n disabled?: boolean\n /** Render only on this platform. Omit to always render. */\n platform?: 'desktop' | 'web'\n onSelect?: () => void\n /** Run after the menu's close-focus cycle, with its trigger as a stable opener. */\n onSelectAfterClose?: (trigger: HTMLButtonElement | undefined) => void\n}\n\nexport type AccountMenuProps = {\n class?: string\n /** The trigger size. Icon-only menus default to the standard icon size. */\n size?: ButtonProps['size']\n /** The entries above the separator. */\n items: readonly AccountMenuItem[]\n /** Which platform this is rendered on, for items that declare one. */\n platform?: 'desktop' | 'web'\n /** Whether a session exists. Decides the sign-in/sign-out row. */\n authenticated: boolean\n /** Local-only applications can omit the session actions altogether. */\n showSession?: boolean\n /** Disable the session row while a sign-in or sign-out is in flight. */\n busy?: boolean\n /** The name shown on the trigger's accessible label. */\n label?: string\n onSignIn?: () => void\n onSignOut?: () => void\n /** Fires on hover or focus of the trigger — a chance to prefetch. */\n onIntent?: () => void\n}\n\nconst FALLBACK_ICONS: Record<string, typeof Settings2> = {\n mobile: Smartphone,\n settings: Settings2,\n about: Info,\n help: CircleHelp,\n feedback: Megaphone,\n updates: RefreshCw,\n}\n\nexport function AccountMenu(props: AccountMenuProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'size',\n 'items',\n 'platform',\n 'authenticated',\n 'showSession',\n 'busy',\n 'label',\n 'onSignIn',\n 'onSignOut',\n 'onIntent',\n ])\n\n let trigger: HTMLButtonElement | undefined\n let pendingAfterClose:\n | { callback: NonNullable<AccountMenuItem['onSelectAfterClose']> }\n | undefined\n let scheduledAfterClose:\n | { callback: NonNullable<AccountMenuItem['onSelectAfterClose']> }\n | undefined\n const [menuOpen, setMenuOpen] = createSignal(false)\n const [tooltipOpen, setTooltipOpen] = createSignal(false)\n\n onCleanup(() => {\n pendingAfterClose = undefined\n scheduledAfterClose = undefined\n })\n\n const visible = () =>\n local.items.filter((item) => !item.platform || item.platform === (local.platform ?? 'desktop'))\n\n return (\n <Tooltip open={tooltipOpen()} onOpenChange={(open) => setTooltipOpen(open && !menuOpen())}>\n <DropdownMenu\n modal={false}\n onOpenChange={(open) => {\n setMenuOpen(open)\n if (open) setTooltipOpen(false)\n }}\n >\n <TooltipTrigger\n as={AccountMenuButton}\n ref={(element: HTMLButtonElement) => (trigger = element)}\n variant=\"ghost\"\n size={local.size ?? 'icon-md'}\n class={cn('text-muted-foreground', local.class)}\n aria-label={local.label ?? 'Account and settings'}\n onFocus={() => local.onIntent?.()}\n onPointerEnter={() => local.onIntent?.()}\n {...rest}\n >\n <UserRound aria-hidden=\"true\" />\n </TooltipTrigger>\n <TooltipContent placement=\"top\">{local.label ?? 'Account and settings'}</TooltipContent>\n <DropdownMenuContent\n placement=\"top-start\"\n class=\"min-w-56 max-h-(--kb-popper-available-height) overflow-x-hidden overflow-y-auto\"\n onCloseAutoFocus={(event) => {\n const selection = pendingAfterClose\n pendingAfterClose = undefined\n if (!selection) return\n\n event.preventDefault()\n scheduledAfterClose = selection\n queueMicrotask(() => {\n if (scheduledAfterClose !== selection) return\n scheduledAfterClose = undefined\n selection.callback(trigger)\n })\n }}\n >\n <DropdownMenuGroup>\n <For each={visible()}>\n {(item) => (\n <DropdownMenuItem\n disabled={item.disabled}\n onSelect={() => {\n pendingAfterClose = item.onSelectAfterClose\n ? { callback: item.onSelectAfterClose }\n : undefined\n item.onSelect?.()\n }}\n shortcut={item.shortcut}\n >\n {item.icon ?? renderFallbackIcon(item.id)}\n <span>{item.label}</span>\n </DropdownMenuItem>\n )}\n </For>\n </DropdownMenuGroup>\n <Show when={local.showSession !== false}>\n <DropdownMenuSeparator />\n <DropdownMenuGroup>\n <DropdownMenuItem\n disabled={local.busy}\n onSelect={() => (local.authenticated ? local.onSignOut?.() : local.onSignIn?.())}\n >\n <Show when={local.authenticated} fallback={<LogIn aria-hidden=\"true\" />}>\n <LogOut aria-hidden=\"true\" />\n </Show>\n <span>{local.authenticated ? 'Sign out' : 'Sign in'}</span>\n </DropdownMenuItem>\n </DropdownMenuGroup>\n </Show>\n </DropdownMenuContent>\n </DropdownMenu>\n </Tooltip>\n )\n}\n\n/** The common support menu, with one app-specific entry before the shared items. */\nexport function createAppMenuItems(options: {\n primaryItem?: AccountMenuItem\n settingsShortcut?: string\n onAbout?: AccountMenuItem['onSelectAfterClose']\n onHelp?: AccountMenuItem['onSelectAfterClose']\n onFeedback?: AccountMenuItem['onSelectAfterClose']\n onUpdates?: AccountMenuItem['onSelectAfterClose']\n onSettings?: AccountMenuItem['onSelectAfterClose']\n}): AccountMenuItem[] {\n return [\n ...(options.primaryItem ? [options.primaryItem] : []),\n {\n id: 'about',\n label: 'About',\n disabled: !options.onAbout,\n onSelectAfterClose: options.onAbout,\n },\n {\n id: 'help',\n label: 'Help Center',\n disabled: !options.onHelp,\n onSelectAfterClose: options.onHelp,\n },\n {\n id: 'feedback',\n label: 'Send Feedback',\n disabled: !options.onFeedback,\n onSelectAfterClose: options.onFeedback,\n },\n {\n id: 'updates',\n label: 'Updates',\n platform: 'desktop',\n disabled: !options.onUpdates,\n onSelectAfterClose: options.onUpdates,\n },\n {\n id: 'settings',\n label: 'Settings',\n shortcut: options.settingsShortcut,\n disabled: !options.onSettings,\n onSelectAfterClose: options.onSettings,\n },\n ]\n}\n\nfunction AccountMenuButton(props: ComponentProps<typeof Button>) {\n return <DropdownMenuTrigger as={Button} {...props} />\n}\n\n/**\n * A known item id gets its conventional glyph, so a caller that only wants the\n * standard menu does not have to import six icons to get it.\n */\nfunction renderFallbackIcon(id: string): JSX.Element {\n const Icon = FALLBACK_ICONS[id]\n return Icon ? <Icon aria-hidden=\"true\" /> : null\n}\n"],"mappings":";;;;;;;;;AA8EA,IAAMkD,iBAAmD;CACvDE,QAAQ7C;CACR8C,UAAU/C;CACVgD,OAAOrD;CACPsD,MAAMvD;CACNwD,UAAUpD;CACVqD,SAASpD;AACX;AAEA,SAAgBqD,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQ9C,WAAW4C,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAU,CACX;CAED,IAAIrB;CACJ,IAAIwB;CAGJ,IAAIG;CAGJ,MAAM,CAACC,UAAUC,eAAetD,aAAa,KAAK;CAClD,MAAM,CAACuD,aAAaC,kBAAkBxD,aAAa,KAAK;CAExDC,gBAAgB;EACdgD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BAAIsC,MAAI,EAAA,eAAA,OAAA,CAAA,IAAyB;AAC9C"}
@@ -1,2 +1,2 @@
1
- export { AccountMenu, type AccountMenuItem, type AccountMenuProps } from './account-menu';
1
+ export { AccountMenu, createAppMenuItems, type AccountMenuItem, type AccountMenuProps, } from './account-menu';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/account-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/account-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAA"}
@@ -1,2 +1,2 @@
1
- import { AccountMenu } from "./account-menu.js";
2
- export { AccountMenu };
1
+ import { AccountMenu, createAppMenuItems } from "./account-menu.js";
2
+ export { AccountMenu, createAppMenuItems };
@@ -0,0 +1,19 @@
1
+ export type HelpShortcut = {
2
+ label: string;
3
+ keys: readonly string[];
4
+ };
5
+ export type HelpLink = {
6
+ label: string;
7
+ description?: string;
8
+ url: string;
9
+ };
10
+ export type HelpCenterProps = {
11
+ appName: string;
12
+ shortcuts: readonly HelpShortcut[];
13
+ links: readonly HelpLink[];
14
+ openExternal?: (url: string) => Promise<void>;
15
+ class?: string;
16
+ };
17
+ /** A shared help page: real keyboard shortcuts and the application's project resources. */
18
+ export declare function HelpCenter(props: HelpCenterProps): import("solid-js").JSX.Element;
19
+ //# sourceMappingURL=help-center.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-center.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/help-center/help-center.tsx"],"names":[],"mappings":"AAQA,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAA;AACrE,MAAM,MAAM,QAAQ,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAC3E,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,SAAS,YAAY,EAAE,CAAA;IAClC,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,2FAA2F;AAC3F,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,kCAoFhD"}