@hanzo/ui 8.0.54 → 8.0.56

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 (66) hide show
  1. package/README.md +5 -1
  2. package/dist/chat/Code.cjs +2 -36
  3. package/dist/chat/Code.d.ts +0 -13
  4. package/dist/chat/Code.d.ts.map +1 -1
  5. package/dist/chat/Code.js +2 -35
  6. package/dist/chat/Code.js.map +1 -1
  7. package/dist/chat/index.cjs +7 -2
  8. package/dist/chat/index.d.ts +7 -1
  9. package/dist/chat/index.d.ts.map +1 -1
  10. package/dist/chat/index.js +7 -1
  11. package/dist/chat/index.js.map +1 -1
  12. package/dist/gui-config.cjs +37 -12
  13. package/dist/gui-config.d.ts +1 -582
  14. package/dist/gui-config.d.ts.map +1 -1
  15. package/dist/gui-config.js +37 -12
  16. package/dist/gui-config.js.map +1 -1
  17. package/dist/product/AppHeader.cjs +8 -6
  18. package/dist/product/AppHeader.d.ts.map +1 -1
  19. package/dist/product/AppHeader.js +11 -9
  20. package/dist/product/AppHeader.js.map +1 -1
  21. package/dist/product/CopyButton.cjs +54 -0
  22. package/dist/product/CopyButton.d.ts +12 -0
  23. package/dist/product/CopyButton.d.ts.map +1 -0
  24. package/dist/product/CopyButton.js +52 -0
  25. package/dist/product/CopyButton.js.map +1 -0
  26. package/dist/product/Field.cjs +2 -1
  27. package/dist/product/Field.d.ts.map +1 -1
  28. package/dist/product/Field.js +2 -1
  29. package/dist/product/Field.js.map +1 -1
  30. package/dist/product/Fieldset.cjs +13 -0
  31. package/dist/product/Fieldset.d.ts +35 -0
  32. package/dist/product/Fieldset.d.ts.map +1 -0
  33. package/dist/product/Fieldset.js +11 -0
  34. package/dist/product/Fieldset.js.map +1 -0
  35. package/dist/product/OrgMark.cjs +39 -3
  36. package/dist/product/OrgMark.d.ts +9 -0
  37. package/dist/product/OrgMark.d.ts.map +1 -1
  38. package/dist/product/OrgMark.js +38 -3
  39. package/dist/product/OrgMark.js.map +1 -1
  40. package/dist/product/OrgSwitcher.cjs +3 -3
  41. package/dist/product/OrgSwitcher.d.ts +29 -1
  42. package/dist/product/OrgSwitcher.d.ts.map +1 -1
  43. package/dist/product/OrgSwitcher.js +3 -3
  44. package/dist/product/OrgSwitcher.js.map +1 -1
  45. package/dist/product/Pagination.cjs +72 -0
  46. package/dist/product/Pagination.d.ts +21 -0
  47. package/dist/product/Pagination.d.ts.map +1 -0
  48. package/dist/product/Pagination.js +68 -0
  49. package/dist/product/Pagination.js.map +1 -0
  50. package/dist/product/SecretInput.cjs +59 -0
  51. package/dist/product/SecretInput.d.ts +24 -0
  52. package/dist/product/SecretInput.d.ts.map +1 -0
  53. package/dist/product/SecretInput.js +55 -0
  54. package/dist/product/SecretInput.js.map +1 -0
  55. package/dist/product/UserMenu.cjs +63 -0
  56. package/dist/product/UserMenu.d.ts +56 -0
  57. package/dist/product/UserMenu.d.ts.map +1 -0
  58. package/dist/product/UserMenu.js +60 -0
  59. package/dist/product/UserMenu.js.map +1 -0
  60. package/dist/product/index.cjs +21 -2
  61. package/dist/product/index.d.ts +5 -0
  62. package/dist/product/index.d.ts.map +1 -1
  63. package/dist/product/index.js +21 -2
  64. package/dist/product/index.js.map +1 -1
  65. package/dist/styles.css +247 -247
  66. package/package.json +1 -1
@@ -0,0 +1,56 @@
1
+ /**
2
+ * UserMenu — the account control: who I am, and the things I do to my account.
3
+ *
4
+ * It was written inside `AppHeader` and could not be reached from anywhere else,
5
+ * so every surface that wanted an account menu without adopting the whole header
6
+ * wrote one: hanzo.app twice, chat, console, billing. Five implementations of one
7
+ * menu, disagreeing on the trigger, the row order and the sign-out copy. This is
8
+ * that menu, extracted whole — `AppHeader` now renders it instead of owning it,
9
+ * so the header and a standalone account control cannot drift apart.
10
+ *
11
+ * Host-agnostic: identity is a value, every row is an injected handler, and a row
12
+ * renders only when its handler is provided — an honest menu, never a dead item.
13
+ * The surface keeps its own `useUser`/router in a thin wrapper; that wrapper is
14
+ * the seam the charter asks for, not a duplicate.
15
+ *
16
+ * The trigger is sized as the PEER of `OrgSwitcher` — same height, same mark,
17
+ * same type — so "which workspace" and "who I am" read as two halves of one
18
+ * identity rather than a caption over a control.
19
+ */
20
+ import { type ReactNode } from 'react';
21
+ /** One row. `id` names it in analytics; the label is what the person reads. */
22
+ export type UserMenuItem = {
23
+ id: string;
24
+ label: string;
25
+ icon?: ReactNode;
26
+ onPress: () => void;
27
+ /** Draws the row in the destructive tone (sign out, delete account). */
28
+ danger?: boolean;
29
+ };
30
+ export type UserMenuProps = {
31
+ /** The signed-in person's display name. Falls back to the email's local part. */
32
+ name?: string;
33
+ email?: string;
34
+ /** Avatar URL. Absent → the monogram of the name, like an org's mark. */
35
+ avatar?: string;
36
+ /** Grouped rows — each group is separated by a rule, empty groups are dropped. */
37
+ groups?: UserMenuItem[][];
38
+ /** Theme row content — default `<ThemeToggle/>`; `null` hides the row (a
39
+ * single-theme surface has nothing to toggle and should not pretend to). */
40
+ theme?: ReactNode;
41
+ /** Sign out. Omit on a surface that cannot sign out. */
42
+ onSignOut?: () => void;
43
+ /** Sign-out copy — "Sign out" everywhere unless a surface has a reason. */
44
+ signOutLabel?: string;
45
+ /** Replace the whole menu body, keeping the trigger. */
46
+ children?: ReactNode;
47
+ /** Show the name beside the avatar in the trigger. Default true. */
48
+ label?: boolean;
49
+ /** Trigger height. Default 44 — the peer of `OrgSwitcher`. */
50
+ height?: number;
51
+ };
52
+ /** The name to show: the given one, else the email's local part, else nothing
53
+ * fabricated — "User" is not a name and reads as a bug to the person it names. */
54
+ export declare function displayName(name?: string, email?: string): string;
55
+ export declare function UserMenu({ name, email, avatar, groups, theme, onSignOut, signOutLabel, children, label, height, }: UserMenuProps): import("react/jsx-runtime").JSX.Element;
56
+ //# sourceMappingURL=UserMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserMenu.d.ts","sourceRoot":"","sources":["../../src/product/UserMenu.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;G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**
4
+ * UserMenu — the account control: who I am, and the things I do to my account.
5
+ *
6
+ * It was written inside `AppHeader` and could not be reached from anywhere else,
7
+ * so every surface that wanted an account menu without adopting the whole header
8
+ * wrote one: hanzo.app twice, chat, console, billing. Five implementations of one
9
+ * menu, disagreeing on the trigger, the row order and the sign-out copy. This is
10
+ * that menu, extracted whole — `AppHeader` now renders it instead of owning it,
11
+ * so the header and a standalone account control cannot drift apart.
12
+ *
13
+ * Host-agnostic: identity is a value, every row is an injected handler, and a row
14
+ * renders only when its handler is provided — an honest menu, never a dead item.
15
+ * The surface keeps its own `useUser`/router in a thin wrapper; that wrapper is
16
+ * the seam the charter asks for, not a duplicate.
17
+ *
18
+ * The trigger is sized as the PEER of `OrgSwitcher` — same height, same mark,
19
+ * same type — so "which workspace" and "who I am" read as two halves of one
20
+ * identity rather than a caption over a control.
21
+ */
22
+ import { useState } from 'react';
23
+ import { Popover, Separator, Text, XStack, YStack } from '@hanzo/gui';
24
+ import { LogOut, UserRound } from '@hanzogui/lucide-icons-2';
25
+ import { useEmit } from './instrument.js';
26
+ import { OrgMark } from './OrgMark.js';
27
+ import { ThemeToggle } from './ThemeToggle.js';
28
+ function Row({ item, onDone }) {
29
+ const track = useEmit();
30
+ return (_jsxs(XStack, { onPress: () => {
31
+ track({ component: 'UserMenu', action: 'select', id: item.id });
32
+ onDone();
33
+ item.onPress();
34
+ }, cursor: "pointer", items: "center", gap: "$2.5", px: "$2", py: "$2", rounded: "$3", hoverStyle: { bg: '$color5' }, children: [item.icon, _jsx(Text, { fontSize: "$2", color: item.danger ? '$red10' : '$color12', children: item.label })] }));
35
+ }
36
+ /** The name to show: the given one, else the email's local part, else nothing
37
+ * fabricated — "User" is not a name and reads as a bug to the person it names. */
38
+ export function displayName(name, email) {
39
+ if (name?.trim())
40
+ return name.trim();
41
+ const local = email?.split('@')[0];
42
+ return local?.trim() || '';
43
+ }
44
+ export function UserMenu({ name, email, avatar, groups = [], theme, onSignOut, signOutLabel = 'Sign out', children, label = true, height = 44, }) {
45
+ const [open, setOpen] = useState(false);
46
+ const track = useEmit();
47
+ const shown = displayName(name, email);
48
+ const filled = groups.filter((g) => g.length > 0);
49
+ const close = () => setOpen(false);
50
+ return (_jsxs(Popover, { open: open, onOpenChange: (next) => {
51
+ track({ component: 'UserMenu', action: next ? 'open' : 'close' });
52
+ setOpen(next);
53
+ }, placement: "bottom-end", children: [_jsx(Popover.Trigger, { asChild: true, children: _jsxs(XStack, { cursor: "pointer", items: "center", gap: "$2.5", height: height, px: "$2", rounded: "$3", minW: 0, hoverStyle: { bg: '$color4' }, role: "button", tabIndex: 0, "aria-label": shown ? `${shown} · account` : 'Account', children: [avatar || shown ? (_jsx(OrgMark, { org: { name: shown || 'Account', logo: avatar }, size: 30 })) : (_jsx(UserRound, { size: 18 })), label && shown ? (_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$color12", numberOfLines: 1, maxW: 160, children: shown })) : null] }) }), _jsx(Popover.Content, { bordered: true, elevate: true, p: "$2", width: 240, bg: "$color2", borderColor: "$borderColor", children: children ?? (_jsxs(YStack, { gap: "$1", children: [shown || email ? (_jsxs(YStack, { gap: "$0.5", px: "$2", py: "$1.5", children: [shown ? (_jsx(Text, { fontSize: "$2", fontWeight: "700", color: "$color12", numberOfLines: 1, children: shown })) : null, email && email !== shown ? (_jsx(Text, { fontSize: "$1", color: "$color10", numberOfLines: 1, children: email })) : null] })) : null, filled.map((group, i) => (_jsxs(YStack, { gap: "$1", children: [(i > 0 || shown || email) ? _jsx(Separator, { borderColor: "$borderColor", my: "$1" }) : null, group.map((item) => (_jsx(Row, { item: item, onDone: close }, item.id)))] }, i))), theme !== null ? (_jsxs(_Fragment, { children: [_jsx(Separator, { borderColor: "$borderColor", my: "$1" }), _jsxs(XStack, { items: "center", gap: "$2.5", px: "$2", py: "$1", rounded: "$3", children: [_jsx(Text, { flex: 1, fontSize: "$2", color: "$color12", children: "Theme" }), theme ?? _jsx(ThemeToggle, {})] })] })) : null, onSignOut ? (_jsxs(_Fragment, { children: [_jsx(Separator, { borderColor: "$borderColor", my: "$1" }), _jsx(Row, { item: {
54
+ id: 'sign-out',
55
+ label: signOutLabel,
56
+ icon: _jsx(LogOut, { size: 15 }),
57
+ onPress: onSignOut,
58
+ }, onDone: close })] })) : null] })) })] }));
59
+ }
60
+ //# sourceMappingURL=UserMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserMenu.js","sourceRoot":"","sources":["../../src/product/UserMenu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACrE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAmC3C,SAAS,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAA8C;IACvE,MAAM,KAAK,GAAG,OAAO,EAAE,CAAA;IACvB,OAAO,CACL,MAAC,MAAM,IACL,OAAO,EAAE,GAAG,EAAE;YACZ,KAAK,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;YAC/D,MAAM,EAAE,CAAA;YACR,IAAI,CAAC,OAAO,EAAE,CAAA;QAChB,CAAC,EACD,MAAM,EAAC,SAAS,EAChB,KAAK,EAAC,QAAQ,EACd,GAAG,EAAC,MAAM,EACV,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,OAAO,EAAC,IAAI,EACZ,UAAU,EAAE,EAA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G,EAAC,MAAM,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,aAC5D,KAAC,IAAI,IAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAC,IAAI,EAAC,KAAK,EAAC,UAAU,sBAEtC,EACN,KAAK,IAAI,KAAC,WAAW,KAAG,IAClB,IACR,CACJ,CAAC,CAAC,CAAC,IAAI,EAEP,SAAS,CAAC,CAAC,CAAC,CACX,8BACE,KAAC,SAAS,IAAC,WAAW,EAAC,cAAc,EAAC,EAAE,EAAC,IAAI,GAAG,EAChD,KAAC,GAAG,IACF,IAAI,EAAE;wCACJ,EAAE,EAAE,UAAU;wCACd,KAAK,EAAE,YAAY;wCACnB,IAAI,EAAE,KAAC,MAAM,IAAC,IAAI,EAAE,EAAE,GAAI;wCAC1B,OAAO,EAAE,SAAS;qCACnB,EACD,MAAM,EAAE,KAAK,GACb,IACD,CACJ,CAAC,CAAC,CAAC,IAAI,IACD,CACV,GACe,IACV,CACX,CAAA;AACH,CAAC"}
@@ -51,14 +51,19 @@ Object.defineProperty(exports, "DonutRing", { enumerable: true, get: function ()
51
51
  var ComboBox_1 = require("./ComboBox.cjs");
52
52
  Object.defineProperty(exports, "ComboBox", { enumerable: true, get: function () { return ComboBox_1.ComboBox; } });
53
53
  __exportStar(require("./combobox/filter.cjs"), exports);
54
- // The shared shell — brand mark, org scope + switcher, app header (the
55
- // console's org-scope contract + switcher hoisted here; hanzoai/ui#36).
54
+ // The shared shell — brand mark, org scope + switcher, account menu, app header
55
+ // (the console's org-scope contract + switcher hoisted here; hanzoai/ui#36).
56
56
  // `surfaces.data` is the ONE canonical cross-surface list every launcher consumes.
57
+ //
58
+ // `UserMenu` is the account half of the chrome trio (org · apps · account). It
59
+ // was written inside `AppHeader` and unreachable from anywhere else, so five
60
+ // surfaces wrote their own; `AppHeader` now renders this one.
57
61
  __exportStar(require("./surfaces.data.cjs"), exports);
58
62
  __exportStar(require("./AppHeader.cjs"), exports);
59
63
  __exportStar(require("./BrandMark.cjs"), exports);
60
64
  __exportStar(require("./OrgMark.cjs"), exports);
61
65
  __exportStar(require("./OrgSwitcher.cjs"), exports);
66
+ __exportStar(require("./UserMenu.cjs"), exports);
62
67
  __exportStar(require("./scope.cjs"), exports);
63
68
  // Menu — the ONE menu system: portal-theme-safe DropdownMenu (click) + ContextMenu
64
69
  // (right-click), both rendering the SAME item spec (MenuPanel/MenuItemView) so every
@@ -83,6 +88,20 @@ __exportStar(require("./Filters.cjs"), exports);
83
88
  // `<InstrumentSurface value="billing">` to name the area, and `emit` for the
84
89
  // one-off moments no shared component can observe.
85
90
  __exportStar(require("./instrument.cjs"), exports);
91
+ // Settings — `Fieldset` is the titled group the `Field*` rows sit in. It is not
92
+ // `Panel` (a dashboard metric tile): a settings group runs full width, carries a
93
+ // legend and has a destructive register. Every settings page drew its own.
94
+ __exportStar(require("./Fieldset.cjs"), exports);
95
+ // `CopyButton` and `SecretInput` — copying a value, and revealing one. CopyButton
96
+ // lived in `chat/Code.tsx`, reachable only as `@hanzo/ui/chat`, so ~30 hand-rolled
97
+ // copies grew across six surfaces; `Code` now imports it from here. SecretInput
98
+ // composes it, because copying a key while it is still masked is the whole reason
99
+ // the field exists.
100
+ __exportStar(require("./CopyButton.cjs"), exports);
101
+ __exportStar(require("./SecretInput.cjs"), exports);
102
+ // `Pagination` — the fixed-width page run (`pages` is the pure rule, testable
103
+ // without a browser).
104
+ __exportStar(require("./Pagination.cjs"), exports);
86
105
  // The rest — every exported name below is unique across the layer.
87
106
  __exportStar(require("./AnimatedLogo.cjs"), exports);
88
107
  __exportStar(require("./brand.cjs"), exports);
@@ -8,6 +8,7 @@ export * from './AppHeader.js';
8
8
  export * from './BrandMark.js';
9
9
  export * from './OrgMark.js';
10
10
  export * from './OrgSwitcher.js';
11
+ export * from './UserMenu.js';
11
12
  export * from './scope.js';
12
13
  export * from './menu/index.js';
13
14
  export * from './SiteNav.js';
@@ -18,6 +19,10 @@ export * from './CommerceResource.js';
18
19
  export * from './ConfirmDelete.js';
19
20
  export * from './Filters.js';
20
21
  export * from './instrument.js';
22
+ export * from './Fieldset.js';
23
+ export * from './CopyButton.js';
24
+ export * from './SecretInput.js';
25
+ export * from './Pagination.js';
21
26
  export * from './AnimatedLogo.js';
22
27
  export * from './brand.js';
23
28
  export * from './DataTable.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/product/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAA;AAKxB,OAAO,EACL,MAAM,EACN,aAAa,EACb,SAAS,EACT,SAAS,IAAI,eAAe,EAC5B,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,KAAK,GACN,MAAM,UAAU,CAAA;AAGjB,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAK/D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,cAAc,mBAAmB,CAAA;AAKjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AAKvB,cAAc,QAAQ,CAAA;AAKtB,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAK5B,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AAOzB,cAAc,cAAc,CAAA;AAG5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;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AW,CAAA;AAOzB,cAAc,cAAc,CAAA;AAK5B,cAAc,YAAY,CAAA;AAO1B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAI7B,cAAc,cAAc,CAAA;AAG5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AASvB,cAAc,UAAU,CAAA;AAKxB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAA"}
@@ -22,14 +22,19 @@ export { Donut as DonutRing } from './Donut.js';
22
22
  // option type + matchers from there.
23
23
  export { ComboBox } from './ComboBox.js';
24
24
  export * from './combobox/filter.js';
25
- // The shared shell — brand mark, org scope + switcher, app header (the
26
- // console's org-scope contract + switcher hoisted here; hanzoai/ui#36).
25
+ // The shared shell — brand mark, org scope + switcher, account menu, app header
26
+ // (the console's org-scope contract + switcher hoisted here; hanzoai/ui#36).
27
27
  // `surfaces.data` is the ONE canonical cross-surface list every launcher consumes.
28
+ //
29
+ // `UserMenu` is the account half of the chrome trio (org · apps · account). It
30
+ // was written inside `AppHeader` and unreachable from anywhere else, so five
31
+ // surfaces wrote their own; `AppHeader` now renders this one.
28
32
  export * from './surfaces.data.js';
29
33
  export * from './AppHeader.js';
30
34
  export * from './BrandMark.js';
31
35
  export * from './OrgMark.js';
32
36
  export * from './OrgSwitcher.js';
37
+ export * from './UserMenu.js';
33
38
  export * from './scope.js';
34
39
  // Menu — the ONE menu system: portal-theme-safe DropdownMenu (click) + ContextMenu
35
40
  // (right-click), both rendering the SAME item spec (MenuPanel/MenuItemView) so every
@@ -54,6 +59,20 @@ export * from './Filters.js';
54
59
  // `<InstrumentSurface value="billing">` to name the area, and `emit` for the
55
60
  // one-off moments no shared component can observe.
56
61
  export * from './instrument.js';
62
+ // Settings — `Fieldset` is the titled group the `Field*` rows sit in. It is not
63
+ // `Panel` (a dashboard metric tile): a settings group runs full width, carries a
64
+ // legend and has a destructive register. Every settings page drew its own.
65
+ export * from './Fieldset.js';
66
+ // `CopyButton` and `SecretInput` — copying a value, and revealing one. CopyButton
67
+ // lived in `chat/Code.tsx`, reachable only as `@hanzo/ui/chat`, so ~30 hand-rolled
68
+ // copies grew across six surfaces; `Code` now imports it from here. SecretInput
69
+ // composes it, because copying a key while it is still masked is the whole reason
70
+ // the field exists.
71
+ export * from './CopyButton.js';
72
+ export * from './SecretInput.js';
73
+ // `Pagination` — the fixed-width page run (`pages` is the pure rule, testable
74
+ // without a browser).
75
+ export * from './Pagination.js';
57
76
  // The rest — every exported name below is unique across the layer.
58
77
  export * from './AnimatedLogo.js';
59
78
  export * from './brand.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/product/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,iFAAiF;AACjF,gFAAgF;AAChF,wEAAwE;AACxE,EAAE;AACF,kFAAkF;AAClF,6EAA6E;AAE7E,kFAAkF;AAClF,gEAAgE;AAChE,cAAc,UAAU,CAAA;AAExB,2EAA2E;AAC3E,+EAA+E;AAC/E,4CAA4C;AAC5C,OAAO,EACL,MAAM,EACN,aAAa,EACb,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