@hanzo/ui 8.0.6 → 8.0.8

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 (200) hide show
  1. package/dist/ThemeToggleNext-7727UR5W.js +4 -0
  2. package/dist/ThemeToggleNext-7727UR5W.js.map +1 -0
  3. package/dist/ThemeToggleNext-ICB5KL5J.cjs +19 -0
  4. package/dist/ThemeToggleNext-ICB5KL5J.cjs.map +1 -0
  5. package/dist/billing.cjs +15 -0
  6. package/dist/billing.cjs.map +1 -0
  7. package/{types → dist}/billing.d.ts +0 -1
  8. package/dist/billing.js +4 -0
  9. package/dist/billing.js.map +1 -0
  10. package/dist/canvas.cjs +15 -0
  11. package/dist/canvas.cjs.map +1 -0
  12. package/dist/canvas.d.ts +1 -0
  13. package/dist/canvas.js +4 -0
  14. package/dist/canvas.js.map +1 -0
  15. package/{types → dist}/cd/layout.d.ts +0 -1
  16. package/{types → dist}/cd/status.d.ts +0 -1
  17. package/{types → dist}/cd/time.d.ts +0 -1
  18. package/{types → dist}/cd/types.d.ts +0 -1
  19. package/dist/chunk-42CU5GSF.js +98 -0
  20. package/dist/chunk-42CU5GSF.js.map +1 -0
  21. package/dist/chunk-GDGVXU7W.js +1999 -0
  22. package/dist/chunk-GDGVXU7W.js.map +1 -0
  23. package/dist/chunk-HSPMQQVJ.cjs +2066 -0
  24. package/dist/chunk-HSPMQQVJ.cjs.map +1 -0
  25. package/dist/chunk-YBXVUV7P.cjs +103 -0
  26. package/dist/chunk-YBXVUV7P.cjs.map +1 -0
  27. package/dist/dashboard.cjs +15 -0
  28. package/dist/dashboard.cjs.map +1 -0
  29. package/dist/dashboard.d.ts +1 -0
  30. package/dist/dashboard.js +4 -0
  31. package/dist/dashboard.js.map +1 -0
  32. package/dist/data.cjs +15 -0
  33. package/dist/data.cjs.map +1 -0
  34. package/dist/data.d.ts +1 -0
  35. package/dist/data.js +4 -0
  36. package/dist/data.js.map +1 -0
  37. package/dist/gitops.cjs +15 -0
  38. package/dist/gitops.cjs.map +1 -0
  39. package/dist/gitops.d.ts +1 -0
  40. package/dist/gitops.js +4 -0
  41. package/dist/gitops.js.map +1 -0
  42. package/dist/index.cjs +291 -0
  43. package/dist/index.cjs.map +1 -0
  44. package/{types → dist}/index.d.ts +0 -1
  45. package/dist/index.js +6 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/network.cjs +15 -0
  48. package/dist/network.cjs.map +1 -0
  49. package/{types → dist}/network.d.ts +0 -1
  50. package/dist/network.js +4 -0
  51. package/dist/network.js.map +1 -0
  52. package/dist/primitives/bases/data/index.cjs +15 -0
  53. package/dist/primitives/bases/data/index.cjs.map +1 -0
  54. package/dist/primitives/bases/data/index.d.ts +1 -0
  55. package/dist/primitives/bases/data/index.js +4 -0
  56. package/dist/primitives/bases/data/index.js.map +1 -0
  57. package/{types → dist}/product/AppHeader.d.ts +0 -1
  58. package/{types → dist}/product/BrandMark.d.ts +0 -1
  59. package/{types → dist}/product/Charts.d.ts +0 -1
  60. package/{types → dist}/product/ComboBox.d.ts +0 -1
  61. package/{types → dist}/product/DataTable.d.ts +0 -1
  62. package/{types → dist}/product/Donut.d.ts +0 -1
  63. package/{types → dist}/product/EmptyState.d.ts +0 -1
  64. package/{types → dist}/product/FadeIn.d.ts +0 -1
  65. package/{types → dist}/product/Field.d.ts +0 -1
  66. package/{types → dist}/product/HanzoMark.d.ts +0 -1
  67. package/{types → dist}/product/Metric.d.ts +0 -1
  68. package/{types → dist}/product/OrgSwitcher.d.ts +0 -1
  69. package/{types → dist}/product/PageHeader.d.ts +0 -1
  70. package/{types → dist}/product/PrimaryButton.d.ts +0 -1
  71. package/{types → dist}/product/ProductIcon.d.ts +0 -1
  72. package/{types → dist}/product/ProviderLogo.d.ts +0 -1
  73. package/{types → dist}/product/Reorder.d.ts +0 -1
  74. package/{types → dist}/product/SelectMenu.d.ts +7 -6
  75. package/{types → dist}/product/SlideOver.d.ts +0 -1
  76. package/{types → dist}/product/StatusTag.d.ts +0 -1
  77. package/dist/product/ThemeToggle.d.ts +21 -0
  78. package/dist/product/ThemeToggleNext.d.ts +4 -0
  79. package/{types → dist}/product/Toast.d.ts +0 -1
  80. package/{types → dist}/product/color.d.ts +0 -1
  81. package/{types → dist}/product/combobox/filter.d.ts +0 -1
  82. package/dist/product/index.cjs +278 -0
  83. package/dist/product/index.cjs.map +1 -0
  84. package/{types → dist}/product/index.d.ts +2 -1
  85. package/dist/product/index.js +5 -0
  86. package/dist/product/index.js.map +1 -0
  87. package/dist/product/menu/ContextMenu.d.ts +21 -0
  88. package/dist/product/menu/DropdownMenu.d.ts +29 -0
  89. package/dist/product/menu/FloatingMenu.d.ts +36 -0
  90. package/dist/product/menu/index.d.ts +5 -0
  91. package/dist/product/menu/items.d.ts +68 -0
  92. package/dist/product/menu/portal-theme.d.ts +28 -0
  93. package/dist/product/menu/roving.d.ts +8 -0
  94. package/{types → dist}/product/scope.d.ts +0 -1
  95. package/{types → dist}/product/surfaces.data.d.ts +0 -1
  96. package/dist/usage.cjs +15 -0
  97. package/dist/usage.cjs.map +1 -0
  98. package/dist/usage.d.ts +1 -0
  99. package/dist/usage.js +4 -0
  100. package/dist/usage.js.map +1 -0
  101. package/dist/wallet.cjs +15 -0
  102. package/dist/wallet.cjs.map +1 -0
  103. package/{types → dist}/wallet.d.ts +0 -1
  104. package/dist/wallet.js +4 -0
  105. package/dist/wallet.js.map +1 -0
  106. package/package.json +58 -32
  107. package/src/billing.ts +0 -9
  108. package/src/canvas.ts +0 -11
  109. package/src/cd/layout.ts +0 -184
  110. package/src/cd/status.ts +0 -158
  111. package/src/cd/time.ts +0 -52
  112. package/src/cd/types.ts +0 -318
  113. package/src/dashboard.ts +0 -8
  114. package/src/data.ts +0 -12
  115. package/src/gitops.ts +0 -5
  116. package/src/gui-env.d.ts +0 -27
  117. package/src/index.ts +0 -22
  118. package/src/network.ts +0 -11
  119. package/src/primitives/bases/data/index.ts +0 -13
  120. package/src/product/AppHeader.tsx +0 -183
  121. package/src/product/BrandMark.tsx +0 -27
  122. package/src/product/Charts.tsx +0 -471
  123. package/src/product/ComboBox.tsx +0 -147
  124. package/src/product/DataTable.tsx +0 -99
  125. package/src/product/Donut.tsx +0 -83
  126. package/src/product/EmptyState.tsx +0 -129
  127. package/src/product/FadeIn.tsx +0 -38
  128. package/src/product/Field.tsx +0 -160
  129. package/src/product/HanzoMark.tsx +0 -31
  130. package/src/product/Metric.tsx +0 -253
  131. package/src/product/OrgSwitcher.tsx +0 -332
  132. package/src/product/PageHeader.tsx +0 -31
  133. package/src/product/PrimaryButton.tsx +0 -17
  134. package/src/product/ProductIcon.tsx +0 -61
  135. package/src/product/ProviderLogo.tsx +0 -137
  136. package/src/product/Reorder.test.ts +0 -41
  137. package/src/product/Reorder.tsx +0 -110
  138. package/src/product/SelectMenu.tsx +0 -94
  139. package/src/product/SlideOver.tsx +0 -197
  140. package/src/product/StatusTag.tsx +0 -49
  141. package/src/product/ThemeToggle.tsx +0 -25
  142. package/src/product/Toast.tsx +0 -166
  143. package/src/product/color.ts +0 -17
  144. package/src/product/combobox/filter.test.ts +0 -51
  145. package/src/product/combobox/filter.ts +0 -39
  146. package/src/product/index.ts +0 -70
  147. package/src/product/scope.test.ts +0 -92
  148. package/src/product/scope.ts +0 -123
  149. package/src/product/surfaces.data.ts +0 -42
  150. package/src/usage.ts +0 -8
  151. package/src/wallet.ts +0 -11
  152. package/types/billing.d.ts.map +0 -1
  153. package/types/canvas.d.ts +0 -2
  154. package/types/canvas.d.ts.map +0 -1
  155. package/types/cd/layout.d.ts.map +0 -1
  156. package/types/cd/status.d.ts.map +0 -1
  157. package/types/cd/time.d.ts.map +0 -1
  158. package/types/cd/types.d.ts.map +0 -1
  159. package/types/dashboard.d.ts +0 -2
  160. package/types/dashboard.d.ts.map +0 -1
  161. package/types/data.d.ts +0 -2
  162. package/types/data.d.ts.map +0 -1
  163. package/types/gitops.d.ts +0 -2
  164. package/types/gitops.d.ts.map +0 -1
  165. package/types/index.d.ts.map +0 -1
  166. package/types/network.d.ts.map +0 -1
  167. package/types/primitives/bases/data/index.d.ts +0 -2
  168. package/types/primitives/bases/data/index.d.ts.map +0 -1
  169. package/types/product/AppHeader.d.ts.map +0 -1
  170. package/types/product/BrandMark.d.ts.map +0 -1
  171. package/types/product/Charts.d.ts.map +0 -1
  172. package/types/product/ComboBox.d.ts.map +0 -1
  173. package/types/product/DataTable.d.ts.map +0 -1
  174. package/types/product/Donut.d.ts.map +0 -1
  175. package/types/product/EmptyState.d.ts.map +0 -1
  176. package/types/product/FadeIn.d.ts.map +0 -1
  177. package/types/product/Field.d.ts.map +0 -1
  178. package/types/product/HanzoMark.d.ts.map +0 -1
  179. package/types/product/Metric.d.ts.map +0 -1
  180. package/types/product/OrgSwitcher.d.ts.map +0 -1
  181. package/types/product/PageHeader.d.ts.map +0 -1
  182. package/types/product/PrimaryButton.d.ts.map +0 -1
  183. package/types/product/ProductIcon.d.ts.map +0 -1
  184. package/types/product/ProviderLogo.d.ts.map +0 -1
  185. package/types/product/Reorder.d.ts.map +0 -1
  186. package/types/product/SelectMenu.d.ts.map +0 -1
  187. package/types/product/SlideOver.d.ts.map +0 -1
  188. package/types/product/StatusTag.d.ts.map +0 -1
  189. package/types/product/ThemeToggle.d.ts +0 -2
  190. package/types/product/ThemeToggle.d.ts.map +0 -1
  191. package/types/product/Toast.d.ts.map +0 -1
  192. package/types/product/color.d.ts.map +0 -1
  193. package/types/product/combobox/filter.d.ts.map +0 -1
  194. package/types/product/index.d.ts.map +0 -1
  195. package/types/product/scope.d.ts.map +0 -1
  196. package/types/product/surfaces.data.d.ts.map +0 -1
  197. package/types/usage.d.ts +0 -2
  198. package/types/usage.d.ts.map +0 -1
  199. package/types/wallet.d.ts.map +0 -1
  200. /package/{src → dist}/styles/hanzo-motion.css +0 -0
@@ -10,4 +10,3 @@ export declare function HanzoMark({ size, color }: {
10
10
  size?: number;
11
11
  color?: string;
12
12
  }): import("react/jsx-runtime").JSX.Element;
13
- //# sourceMappingURL=HanzoMark.d.ts.map
@@ -100,4 +100,3 @@ export declare function Panel({ title, right, children, minW, grow, }: {
100
100
  minW?: number;
101
101
  grow?: boolean;
102
102
  }): import("react/jsx-runtime").JSX.Element;
103
- //# sourceMappingURL=Metric.d.ts.map
@@ -16,4 +16,3 @@ export type OrgSwitcherProps = {
16
16
  picker?: boolean;
17
17
  };
18
18
  export declare function OrgSwitcher({ scope, orgs, pageSize, create, picker }: OrgSwitcherProps): import("react/jsx-runtime").JSX.Element;
19
- //# sourceMappingURL=OrgSwitcher.d.ts.map
@@ -5,4 +5,3 @@ export declare function PageHeader({ title, subtitle, actions, }: {
5
5
  subtitle?: string;
6
6
  actions?: ReactNode;
7
7
  }): import("react/jsx-runtime").JSX.Element;
8
- //# sourceMappingURL=PageHeader.d.ts.map
@@ -10,4 +10,3 @@
10
10
  import type { ComponentProps } from 'react';
11
11
  import { Button } from '@hanzo/gui';
12
12
  export declare function PrimaryButton(props: ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
13
- //# sourceMappingURL=PrimaryButton.d.ts.map
@@ -5,4 +5,3 @@ export declare function ProductIcon({ icon: Icon, color, size, }: {
5
5
  color?: string;
6
6
  size?: number;
7
7
  }): import("react/jsx-runtime").JSX.Element;
8
- //# sourceMappingURL=ProductIcon.d.ts.map
@@ -10,4 +10,3 @@ export declare function GenericLogo({ size }: {
10
10
  size?: number;
11
11
  }): import("react/jsx-runtime").JSX.Element;
12
12
  export { Boxes as CustomModelMark };
13
- //# sourceMappingURL=ProviderLogo.d.ts.map
@@ -33,4 +33,3 @@ export declare function Reorder<T>({ items, keyOf, rowHeight, onReorder, renderI
33
33
  onReorder: (from: number, to: number) => void;
34
34
  renderItem: (item: T, handle: DragHandle, dragging: boolean) => ReactNode;
35
35
  }): import("react/jsx-runtime").JSX.Element;
36
- //# sourceMappingURL=Reorder.d.ts.map
@@ -1,9 +1,11 @@
1
1
  /**
2
- * SelectMenu — a compact, reusable dropdown select on @hanzo/gui Popover (the
3
- * console's proven dropdown idiom, same as OrgSwitcher/ScopeSwitcher). Renders a
4
- * labelled trigger ("All types", or the chosen option) and a popover list with a
5
- * check on the active option. Prop-driven + self-contained so it lifts into
6
- * `@hanzo/ui`. `value === null` is the "all"/unfiltered state.
2
+ * SelectMenu — a compact, reusable dropdown select. Renders a labelled trigger ("All
3
+ * types", or the chosen option) and a menu list with a check on the active option.
4
+ * Prop-driven + self-contained. `value === null` is the "all"/unfiltered state.
5
+ *
6
+ * A thin DropdownMenu (the ONE menu mechanism) so it is pixel-identical to every other
7
+ * menu and rides the same portal-theme-safe Portal path — no gui Popover, no Sheet
8
+ * re-root, works on gui-native hosts.
7
9
  */
8
10
  import type { ReactElement } from 'react';
9
11
  export type SelectOption<T extends string> = {
@@ -20,4 +22,3 @@ export declare function SelectMenu<T extends string>({ options, value, onChange,
20
22
  icon?: ReactElement;
21
23
  minWidth?: number;
22
24
  }): import("react/jsx-runtime").JSX.Element;
23
- //# sourceMappingURL=SelectMenu.d.ts.map
@@ -45,4 +45,3 @@ export type SlideOverProps = {
45
45
  };
46
46
  export declare function SlideOver({ open, onClose, side, size, title, icon: Icon, iconColor, headerRight, ariaLabel, zIndex, children, }: SlideOverProps): import("react/jsx-runtime").JSX.Element;
47
47
  export { LG as SLIDEOVER_LG };
48
- //# sourceMappingURL=SlideOver.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export declare function StatusTag({ status }: {
2
2
  status?: string;
3
3
  }): import("react/jsx-runtime").JSX.Element;
4
- //# sourceMappingURL=StatusTag.d.ts.map
@@ -0,0 +1,21 @@
1
+ export type ThemeMode = 'light' | 'dark';
2
+ export type ThemeToggleProps = {
3
+ /** Controlled theme. Pair with `onToggle`/`onThemeChange` to fully control it. */
4
+ theme?: ThemeMode;
5
+ /** Seed for uncontrolled mode (default: read from the DOM `.dark` class, else 'dark'). */
6
+ defaultTheme?: ThemeMode;
7
+ /** Called with the next theme on toggle (alias of `onThemeChange`). */
8
+ onToggle?: (next: ThemeMode) => void;
9
+ /** Called with the next theme on toggle. */
10
+ onThemeChange?: (next: ThemeMode) => void;
11
+ /** @hanzo/gui Button size token (default "$2"). */
12
+ size?: string;
13
+ /** aria-label override. */
14
+ label?: string;
15
+ };
16
+ /**
17
+ * The framework-agnostic toggle button. Controlled when `theme` is provided; otherwise
18
+ * self-managed via the DOM `.dark` class. No framework dependency — safe on any host.
19
+ */
20
+ export declare function AgnosticThemeToggle({ theme, defaultTheme, onToggle, onThemeChange, size, label, }: ThemeToggleProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function ThemeToggle(props: ThemeToggleProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { type ThemeToggleProps } from './ThemeToggle';
2
+ declare function ThemeToggleNext({ size, label }: Pick<ThemeToggleProps, 'size' | 'label'>): import("react/jsx-runtime").JSX.Element;
3
+ export default ThemeToggleNext;
4
+ export { ThemeToggleNext };
@@ -30,4 +30,3 @@ export declare function ToastProvider({ children }: {
30
30
  }): import("react/jsx-runtime").JSX.Element;
31
31
  export declare function useToast(): ToastApi;
32
32
  export {};
33
- //# sourceMappingURL=Toast.d.ts.map
@@ -15,4 +15,3 @@ export type IconLike = ComponentType<{
15
15
  size?: number;
16
16
  color?: IconColor;
17
17
  }>;
18
- //# sourceMappingURL=color.d.ts.map
@@ -25,4 +25,3 @@ export type ComboOption = {
25
25
  export declare function filterOptions(options: ComboOption[], query: string): ComboOption[];
26
26
  /** True iff `value` exactly matches an option's `value` (case-sensitive). */
27
27
  export declare function isKnownOption(options: ComboOption[], value: string): boolean;
28
- //# sourceMappingURL=filter.d.ts.map
@@ -0,0 +1,278 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ var chunkHSPMQQVJ_cjs = require('../chunk-HSPMQQVJ.cjs');
5
+ var chunkYBXVUV7P_cjs = require('../chunk-YBXVUV7P.cjs');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "AppHeader", {
10
+ enumerable: true,
11
+ get: function () { return chunkHSPMQQVJ_cjs.AppHeader; }
12
+ });
13
+ Object.defineProperty(exports, "BarChart", {
14
+ enumerable: true,
15
+ get: function () { return chunkHSPMQQVJ_cjs.BarChart; }
16
+ });
17
+ Object.defineProperty(exports, "BarRows", {
18
+ enumerable: true,
19
+ get: function () { return chunkHSPMQQVJ_cjs.BarRows; }
20
+ });
21
+ Object.defineProperty(exports, "BrandMark", {
22
+ enumerable: true,
23
+ get: function () { return chunkHSPMQQVJ_cjs.BrandMark; }
24
+ });
25
+ Object.defineProperty(exports, "CHART_OTHER", {
26
+ enumerable: true,
27
+ get: function () { return chunkHSPMQQVJ_cjs.CHART_OTHER; }
28
+ });
29
+ Object.defineProperty(exports, "CHART_PALETTE", {
30
+ enumerable: true,
31
+ get: function () { return chunkHSPMQQVJ_cjs.CHART_PALETTE; }
32
+ });
33
+ Object.defineProperty(exports, "ComboBox", {
34
+ enumerable: true,
35
+ get: function () { return chunkHSPMQQVJ_cjs.ComboBox; }
36
+ });
37
+ Object.defineProperty(exports, "ContextMenu", {
38
+ enumerable: true,
39
+ get: function () { return chunkHSPMQQVJ_cjs.ContextMenu; }
40
+ });
41
+ Object.defineProperty(exports, "CustomModelMark", {
42
+ enumerable: true,
43
+ get: function () { return chunkHSPMQQVJ_cjs.Boxes; }
44
+ });
45
+ Object.defineProperty(exports, "DataTable", {
46
+ enumerable: true,
47
+ get: function () { return chunkHSPMQQVJ_cjs.DataTable; }
48
+ });
49
+ Object.defineProperty(exports, "Donut", {
50
+ enumerable: true,
51
+ get: function () { return chunkHSPMQQVJ_cjs.Donut; }
52
+ });
53
+ Object.defineProperty(exports, "DonutRing", {
54
+ enumerable: true,
55
+ get: function () { return chunkHSPMQQVJ_cjs.Donut2; }
56
+ });
57
+ Object.defineProperty(exports, "DropdownMenu", {
58
+ enumerable: true,
59
+ get: function () { return chunkHSPMQQVJ_cjs.DropdownMenu; }
60
+ });
61
+ Object.defineProperty(exports, "EmptyState", {
62
+ enumerable: true,
63
+ get: function () { return chunkHSPMQQVJ_cjs.EmptyState; }
64
+ });
65
+ Object.defineProperty(exports, "FadeIn", {
66
+ enumerable: true,
67
+ get: function () { return chunkHSPMQQVJ_cjs.FadeIn; }
68
+ });
69
+ Object.defineProperty(exports, "FieldRow", {
70
+ enumerable: true,
71
+ get: function () { return chunkHSPMQQVJ_cjs.FieldRow; }
72
+ });
73
+ Object.defineProperty(exports, "FieldSelect", {
74
+ enumerable: true,
75
+ get: function () { return chunkHSPMQQVJ_cjs.FieldSelect; }
76
+ });
77
+ Object.defineProperty(exports, "FieldSlider", {
78
+ enumerable: true,
79
+ get: function () { return chunkHSPMQQVJ_cjs.FieldSlider; }
80
+ });
81
+ Object.defineProperty(exports, "FieldSwitch", {
82
+ enumerable: true,
83
+ get: function () { return chunkHSPMQQVJ_cjs.FieldSwitch; }
84
+ });
85
+ Object.defineProperty(exports, "FieldText", {
86
+ enumerable: true,
87
+ get: function () { return chunkHSPMQQVJ_cjs.FieldText; }
88
+ });
89
+ Object.defineProperty(exports, "FieldTextArea", {
90
+ enumerable: true,
91
+ get: function () { return chunkHSPMQQVJ_cjs.FieldTextArea; }
92
+ });
93
+ Object.defineProperty(exports, "FloatingMenu", {
94
+ enumerable: true,
95
+ get: function () { return chunkHSPMQQVJ_cjs.FloatingMenu; }
96
+ });
97
+ Object.defineProperty(exports, "GenericLogo", {
98
+ enumerable: true,
99
+ get: function () { return chunkHSPMQQVJ_cjs.GenericLogo; }
100
+ });
101
+ Object.defineProperty(exports, "HanzoMark", {
102
+ enumerable: true,
103
+ get: function () { return chunkHSPMQQVJ_cjs.HanzoMark; }
104
+ });
105
+ Object.defineProperty(exports, "HintButton", {
106
+ enumerable: true,
107
+ get: function () { return chunkHSPMQQVJ_cjs.HintButton; }
108
+ });
109
+ Object.defineProperty(exports, "LegendDot", {
110
+ enumerable: true,
111
+ get: function () { return chunkHSPMQQVJ_cjs.LegendDot; }
112
+ });
113
+ Object.defineProperty(exports, "LineChart", {
114
+ enumerable: true,
115
+ get: function () { return chunkHSPMQQVJ_cjs.LineChart; }
116
+ });
117
+ Object.defineProperty(exports, "MenuItemView", {
118
+ enumerable: true,
119
+ get: function () { return chunkHSPMQQVJ_cjs.MenuItemView; }
120
+ });
121
+ Object.defineProperty(exports, "MenuLabelView", {
122
+ enumerable: true,
123
+ get: function () { return chunkHSPMQQVJ_cjs.MenuLabelView; }
124
+ });
125
+ Object.defineProperty(exports, "MenuPanel", {
126
+ enumerable: true,
127
+ get: function () { return chunkHSPMQQVJ_cjs.MenuPanel; }
128
+ });
129
+ Object.defineProperty(exports, "MenuSeparatorView", {
130
+ enumerable: true,
131
+ get: function () { return chunkHSPMQQVJ_cjs.MenuSeparatorView; }
132
+ });
133
+ Object.defineProperty(exports, "MetricCard", {
134
+ enumerable: true,
135
+ get: function () { return chunkHSPMQQVJ_cjs.MetricCard; }
136
+ });
137
+ Object.defineProperty(exports, "MetricSparkline", {
138
+ enumerable: true,
139
+ get: function () { return chunkHSPMQQVJ_cjs.Sparkline2; }
140
+ });
141
+ Object.defineProperty(exports, "MiniBars", {
142
+ enumerable: true,
143
+ get: function () { return chunkHSPMQQVJ_cjs.MiniBars; }
144
+ });
145
+ Object.defineProperty(exports, "OrgSwitcher", {
146
+ enumerable: true,
147
+ get: function () { return chunkHSPMQQVJ_cjs.OrgSwitcher; }
148
+ });
149
+ Object.defineProperty(exports, "PageHeader", {
150
+ enumerable: true,
151
+ get: function () { return chunkHSPMQQVJ_cjs.PageHeader; }
152
+ });
153
+ Object.defineProperty(exports, "Panel", {
154
+ enumerable: true,
155
+ get: function () { return chunkHSPMQQVJ_cjs.Panel; }
156
+ });
157
+ Object.defineProperty(exports, "PortalTheme", {
158
+ enumerable: true,
159
+ get: function () { return chunkHSPMQQVJ_cjs.PortalTheme; }
160
+ });
161
+ Object.defineProperty(exports, "PrimaryButton", {
162
+ enumerable: true,
163
+ get: function () { return chunkHSPMQQVJ_cjs.PrimaryButton; }
164
+ });
165
+ Object.defineProperty(exports, "ProductIcon", {
166
+ enumerable: true,
167
+ get: function () { return chunkHSPMQQVJ_cjs.ProductIcon; }
168
+ });
169
+ Object.defineProperty(exports, "ProviderLogo", {
170
+ enumerable: true,
171
+ get: function () { return chunkHSPMQQVJ_cjs.ProviderLogo; }
172
+ });
173
+ Object.defineProperty(exports, "Reorder", {
174
+ enumerable: true,
175
+ get: function () { return chunkHSPMQQVJ_cjs.Reorder; }
176
+ });
177
+ Object.defineProperty(exports, "SERIES", {
178
+ enumerable: true,
179
+ get: function () { return chunkHSPMQQVJ_cjs.SERIES; }
180
+ });
181
+ Object.defineProperty(exports, "SLIDEOVER_LG", {
182
+ enumerable: true,
183
+ get: function () { return chunkHSPMQQVJ_cjs.LG; }
184
+ });
185
+ Object.defineProperty(exports, "SURFACES", {
186
+ enumerable: true,
187
+ get: function () { return chunkHSPMQQVJ_cjs.SURFACES; }
188
+ });
189
+ Object.defineProperty(exports, "SelectMenu", {
190
+ enumerable: true,
191
+ get: function () { return chunkHSPMQQVJ_cjs.SelectMenu; }
192
+ });
193
+ Object.defineProperty(exports, "SlideOver", {
194
+ enumerable: true,
195
+ get: function () { return chunkHSPMQQVJ_cjs.SlideOver; }
196
+ });
197
+ Object.defineProperty(exports, "Sparkline", {
198
+ enumerable: true,
199
+ get: function () { return chunkHSPMQQVJ_cjs.Sparkline; }
200
+ });
201
+ Object.defineProperty(exports, "StatusTag", {
202
+ enumerable: true,
203
+ get: function () { return chunkHSPMQQVJ_cjs.StatusTag; }
204
+ });
205
+ Object.defineProperty(exports, "ToastProvider", {
206
+ enumerable: true,
207
+ get: function () { return chunkHSPMQQVJ_cjs.ToastProvider; }
208
+ });
209
+ Object.defineProperty(exports, "UtilBar", {
210
+ enumerable: true,
211
+ get: function () { return chunkHSPMQQVJ_cjs.UtilBar; }
212
+ });
213
+ Object.defineProperty(exports, "asColor", {
214
+ enumerable: true,
215
+ get: function () { return chunkHSPMQQVJ_cjs.asColor; }
216
+ });
217
+ Object.defineProperty(exports, "colorForIndex", {
218
+ enumerable: true,
219
+ get: function () { return chunkHSPMQQVJ_cjs.colorForIndex; }
220
+ });
221
+ Object.defineProperty(exports, "filterOptions", {
222
+ enumerable: true,
223
+ get: function () { return chunkHSPMQQVJ_cjs.filterOptions; }
224
+ });
225
+ Object.defineProperty(exports, "filterOrgs", {
226
+ enumerable: true,
227
+ get: function () { return chunkHSPMQQVJ_cjs.filterOrgs; }
228
+ });
229
+ Object.defineProperty(exports, "isKnownOption", {
230
+ enumerable: true,
231
+ get: function () { return chunkHSPMQQVJ_cjs.isKnownOption; }
232
+ });
233
+ Object.defineProperty(exports, "orgScope", {
234
+ enumerable: true,
235
+ get: function () { return chunkHSPMQQVJ_cjs.orgScope; }
236
+ });
237
+ Object.defineProperty(exports, "otherSurfaces", {
238
+ enumerable: true,
239
+ get: function () { return chunkHSPMQQVJ_cjs.otherSurfaces; }
240
+ });
241
+ Object.defineProperty(exports, "providerInitials", {
242
+ enumerable: true,
243
+ get: function () { return chunkHSPMQQVJ_cjs.providerInitials; }
244
+ });
245
+ Object.defineProperty(exports, "renderMenuItems", {
246
+ enumerable: true,
247
+ get: function () { return chunkHSPMQQVJ_cjs.renderMenuItems; }
248
+ });
249
+ Object.defineProperty(exports, "rowShift", {
250
+ enumerable: true,
251
+ get: function () { return chunkHSPMQQVJ_cjs.rowShift; }
252
+ });
253
+ Object.defineProperty(exports, "targetIndex", {
254
+ enumerable: true,
255
+ get: function () { return chunkHSPMQQVJ_cjs.targetIndex; }
256
+ });
257
+ Object.defineProperty(exports, "useToast", {
258
+ enumerable: true,
259
+ get: function () { return chunkHSPMQQVJ_cjs.useToast; }
260
+ });
261
+ Object.defineProperty(exports, "utilColor", {
262
+ enumerable: true,
263
+ get: function () { return chunkHSPMQQVJ_cjs.utilColor; }
264
+ });
265
+ Object.defineProperty(exports, "AgnosticThemeToggle", {
266
+ enumerable: true,
267
+ get: function () { return chunkYBXVUV7P_cjs.AgnosticThemeToggle; }
268
+ });
269
+ Object.defineProperty(exports, "ThemeToggle", {
270
+ enumerable: true,
271
+ get: function () { return chunkYBXVUV7P_cjs.ThemeToggle; }
272
+ });
273
+ Object.defineProperty(exports, "ThemeToggleNext", {
274
+ enumerable: true,
275
+ get: function () { return chunkYBXVUV7P_cjs.ThemeToggleNext; }
276
+ });
277
+ //# sourceMappingURL=index.cjs.map
278
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -8,6 +8,7 @@ export * from './AppHeader';
8
8
  export * from './BrandMark';
9
9
  export * from './OrgSwitcher';
10
10
  export * from './scope';
11
+ export * from './menu';
11
12
  export * from './DataTable';
12
13
  export * from './EmptyState';
13
14
  export * from './FadeIn';
@@ -22,6 +23,6 @@ export * from './SelectMenu';
22
23
  export * from './SlideOver';
23
24
  export * from './StatusTag';
24
25
  export * from './ThemeToggle';
26
+ export { ThemeToggleNext } from './ThemeToggleNext';
25
27
  export * from './Toast';
26
28
  export * from './color';
27
- //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ 'use client';
2
+ export { AppHeader, BarChart, BarRows, BrandMark, CHART_OTHER, CHART_PALETTE, ComboBox, ContextMenu, Boxes as CustomModelMark, DataTable, Donut, Donut2 as DonutRing, DropdownMenu, EmptyState, FadeIn, FieldRow, FieldSelect, FieldSlider, FieldSwitch, FieldText, FieldTextArea, FloatingMenu, GenericLogo, HanzoMark, HintButton, LegendDot, LineChart, MenuItemView, MenuLabelView, MenuPanel, MenuSeparatorView, MetricCard, Sparkline2 as MetricSparkline, MiniBars, OrgSwitcher, PageHeader, Panel, PortalTheme, PrimaryButton, ProductIcon, ProviderLogo, Reorder, SERIES, LG as SLIDEOVER_LG, SURFACES, SelectMenu, SlideOver, Sparkline, StatusTag, ToastProvider, UtilBar, asColor, colorForIndex, filterOptions, filterOrgs, isKnownOption, orgScope, otherSurfaces, providerInitials, renderMenuItems, rowShift, targetIndex, useToast, utilColor } from '../chunk-GDGVXU7W.js';
3
+ export { AgnosticThemeToggle, ThemeToggle, ThemeToggleNext } from '../chunk-42CU5GSF.js';
4
+ //# sourceMappingURL=index.js.map
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * ContextMenu — a right-click menu that renders the SAME shared item spec as DropdownMenu,
3
+ * so every menu in the fleet is identical. Built on FloatingMenu (gui Portal), anchored to
4
+ * the cursor point. Web/desktop right-click (`onContextMenu`); on native — which has no
5
+ * right-click — the wrapped child renders untouched.
6
+ *
7
+ * <ContextMenu items={[{ key:'copy', label:'Copy', icon:<Copy size={16}/>, onSelect:copy }]}>
8
+ * <YStack>right-click me</YStack>
9
+ * </ContextMenu>
10
+ */
11
+ import type { ReactElement } from 'react';
12
+ import { type MenuItemSpec } from './items';
13
+ export type ContextMenuProps = {
14
+ /** The right-clickable target. Its `onContextMenu` is composed, not replaced. */
15
+ children: ReactElement;
16
+ items: MenuItemSpec[];
17
+ disabled?: boolean;
18
+ minWidth?: number;
19
+ maxHeight?: number;
20
+ };
21
+ export declare function ContextMenu({ children, items, disabled, minWidth, maxHeight }: ContextMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * DropdownMenu — a portal-theme-safe click menu. Declarative `items` rendered through the
3
+ * ONE shared menu-item spec, so it is pixel-identical to ContextMenu/SelectMenu/ComboBox.
4
+ * Built on FloatingMenu (gui Portal), NOT the gui Popover — so it mounts without the
5
+ * Sheet re-root that loses theme context on gui-native hosts (react-native-web-lite).
6
+ *
7
+ * <DropdownMenu
8
+ * trigger={<Button>Actions</Button>}
9
+ * items={[
10
+ * { key: 'rename', label: 'Rename', icon: <Pencil size={16} />, onSelect: rename },
11
+ * { type: 'separator' },
12
+ * { key: 'del', label: 'Delete', destructive: true, onSelect: del },
13
+ * ]}
14
+ * />
15
+ */
16
+ import type { ReactElement } from 'react';
17
+ import { type MenuItemSpec } from './items';
18
+ export type DropdownMenuProps = {
19
+ /** The clickable element. Wrapped so any element opens the menu on press. */
20
+ trigger: ReactElement;
21
+ items: MenuItemSpec[];
22
+ /** Controlled open state. Omit for uncontrolled. */
23
+ open?: boolean;
24
+ defaultOpen?: boolean;
25
+ onOpenChange?: (open: boolean) => void;
26
+ minWidth?: number;
27
+ maxHeight?: number;
28
+ };
29
+ export declare function DropdownMenu({ trigger, items, open, defaultOpen, onOpenChange, minWidth, maxHeight, }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * FloatingMenu — the ONE floating-panel mechanism for every menu. Renders the shared
3
+ * MenuPanel through the @hanzo/gui Portal, positioned at an anchor (a trigger rect or a
4
+ * cursor point), theme-forwarded via PortalTheme, edge-flipped, dismiss-wired and
5
+ * keyboard-navigable.
6
+ *
7
+ * Why Portal, not gui Popover: gui's Popover pulls in a SheetController that re-roots the
8
+ * trigger subtree and reads the theme from React context — on gui-native hosts
9
+ * (react-native-web-lite, theme in context, no CSS-class fallback) that throws
10
+ * "Missing theme" AT MOUNT. The raw Portal does not re-root, so DropdownMenu, ContextMenu,
11
+ * SelectMenu and ComboBox all ride this ONE working path.
12
+ */
13
+ import type { ReactNode } from 'react';
14
+ export type RectLike = {
15
+ left: number;
16
+ top: number;
17
+ right: number;
18
+ bottom: number;
19
+ width: number;
20
+ height: number;
21
+ };
22
+ export declare function FloatingMenu({ open, onClose, anchorRect, anchorEl, gap, minWidth, maxHeight, autoFocus, children, }: {
23
+ open: boolean;
24
+ onClose: () => void;
25
+ /** Anchor in viewport coords — a trigger's rect, or a zero-size rect at a cursor point. */
26
+ anchorRect: () => RectLike | null | undefined;
27
+ /** Element excluded from outside-dismiss (the trigger / input row). */
28
+ anchorEl?: () => HTMLElement | null | undefined;
29
+ /** Space between the anchor's bottom and the panel (0 for a cursor menu). */
30
+ gap?: number;
31
+ minWidth?: number;
32
+ maxHeight?: number;
33
+ /** Focus the panel on open (for roving keys). ComboBox keeps focus in its input. */
34
+ autoFocus?: boolean;
35
+ children: ReactNode;
36
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ export { DropdownMenu, type DropdownMenuProps } from './DropdownMenu';
2
+ export { ContextMenu, type ContextMenuProps } from './ContextMenu';
3
+ export { FloatingMenu, type RectLike } from './FloatingMenu';
4
+ export { MenuPanel, MenuItemView, MenuSeparatorView, MenuLabelView, renderMenuItems, type MenuItemSpec, } from './items';
5
+ export { PortalTheme } from './portal-theme';
@@ -0,0 +1,68 @@
1
+ /**
2
+ * The ONE menu-item spec — every menu across the fleet renders through these
3
+ * presentational primitives, so DropdownMenu, ContextMenu, SelectMenu and ComboBox
4
+ * are pixel-identical. Geometry is literal px on a strict 8-grid (never random);
5
+ * colour is theme-adaptive tokens ($color2/$color11/$color12/$borderColor) so light
6
+ * and dark both work, with the single purple accent supplied by the brand CSS vars.
7
+ *
8
+ * Style props use the @hanzo/gui config shorthands (bg/items/justify/px/py/p/mx/my/
9
+ * minW/maxH/rounded/select/shrink) — the config omits the longhand aliases.
10
+ *
11
+ * Panel — bg $color2 (#111 dark), hairline border, radius 12, inner pad 4, subtle
12
+ * border+ambient elevation.
13
+ * Item — height 30 (28–32 band), px 8, gap 8, radius 7; icon in a fixed 16px slot
14
+ * on the left; label 13px $color12; right affordance (shortcut / check /
15
+ * chevron) right-aligned. States: hover/active/focus → accent-soft, focus
16
+ * visible; selected → check + purple; disabled → muted, no hover.
17
+ * Separator — 1px hairline, 4px vertical margin.
18
+ * Label — 11px uppercase muted section header, px 8.
19
+ */
20
+ import type { ReactNode, KeyboardEvent } from 'react';
21
+ export declare const PANEL_RADIUS = 12;
22
+ export declare const PANEL_PAD = 4;
23
+ export type MenuItemSpec = {
24
+ type?: 'item';
25
+ /** Stable key. */
26
+ key: string;
27
+ label: string;
28
+ /** Leading Lucide icon (16px, unfilled) in the fixed left slot. */
29
+ icon?: ReactNode;
30
+ /** Second muted line under the label (e.g. an id or hint). */
31
+ description?: string;
32
+ /** Right-aligned shortcut / hint text (e.g. "⌘K"). */
33
+ shortcut?: string;
34
+ /** Renders a right check + purple tint. */
35
+ selected?: boolean;
36
+ disabled?: boolean;
37
+ /** Danger styling (red label/icon). */
38
+ destructive?: boolean;
39
+ /** Renders a right chevron (submenu / drill-in affordance). */
40
+ hasSubmenu?: boolean;
41
+ onSelect: () => void;
42
+ /** Keep the menu open after selecting (default: close). */
43
+ closeOnSelect?: boolean;
44
+ } | {
45
+ type: 'separator';
46
+ key?: string;
47
+ } | {
48
+ type: 'label';
49
+ key?: string;
50
+ label: string;
51
+ };
52
+ export declare function MenuPanel({ children, minWidth, maxHeight, onKeyDown, panelRef, ...rest }: {
53
+ children: ReactNode;
54
+ minWidth?: number;
55
+ maxHeight?: number;
56
+ onKeyDown?: (e: KeyboardEvent) => void;
57
+ /** Web DOM node of the panel (for measuring / edge-flip). */
58
+ panelRef?: (node: HTMLElement | null) => void;
59
+ [key: string]: unknown;
60
+ }): import("react/jsx-runtime").JSX.Element;
61
+ export declare function MenuItemView({ icon, label, description, shortcut, selected, disabled, destructive, hasSubmenu, onSelect, }: Omit<Extract<MenuItemSpec, {
62
+ type?: 'item';
63
+ }>, 'key' | 'type' | 'closeOnSelect'>): import("react/jsx-runtime").JSX.Element;
64
+ export declare function MenuSeparatorView(): import("react/jsx-runtime").JSX.Element;
65
+ export declare function MenuLabelView({ children }: {
66
+ children: ReactNode;
67
+ }): import("react/jsx-runtime").JSX.Element;
68
+ export declare function renderMenuItems(items: MenuItemSpec[], close?: () => void): ReactNode;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * PortalTheme — the ONE fix for "themed content escapes its theme through a portal".
3
+ *
4
+ * @hanzo/gui's `Popover.Content` and `Portal` render their children in a SEPARATE
5
+ * React subtree (a Gorhom-style portal host mounted at the app root), NOT via
6
+ * `ReactDOM.createPortal`. React context therefore does NOT flow from the trigger's
7
+ * location to the host. Under a nested `<Theme name="dark">` the portaled content
8
+ * lands OUTSIDE that theme context and Tamagui throws "Missing theme" (or renders
9
+ * unthemed).
10
+ *
11
+ * The fix is two-part and must stay two-part:
12
+ * 1. At the TRIGGER site (theme context still available) capture the resolved
13
+ * theme name with `useThemeName()`.
14
+ * 2. INSIDE the portaled content re-apply it: `<PortalTheme name={captured}>`.
15
+ *
16
+ * Every portal-backed menu in this package (DropdownMenu, ContextMenu, SelectMenu,
17
+ * ComboBox) uses this so a menu renders identically whether it is opened under the
18
+ * root theme or under any nested `<Theme>`, light or dark.
19
+ */
20
+ import type { ReactNode } from 'react';
21
+ import { useThemeName } from '@hanzo/gui';
22
+ /** Capture the current resolved theme name at the trigger site. Re-exported so the
23
+ * capture + re-apply pair reads from one module. */
24
+ export { useThemeName };
25
+ export declare function PortalTheme({ name, children }: {
26
+ name: string;
27
+ children: ReactNode;
28
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Roving keyboard focus for a menu panel — ArrowUp/Down move focus between enabled
3
+ * `[role="menuitem"]` children, Home/End jump to ends, Escape closes. Web/desktop
4
+ * only (guards on `document`); native menus have no pointer-keyboard nav. Shared by
5
+ * DropdownMenu and ContextMenu so navigation is identical.
6
+ */
7
+ import type { KeyboardEvent } from 'react';
8
+ export declare function menuKeyDown(e: KeyboardEvent, onClose?: () => void): void;
@@ -53,4 +53,3 @@ export type OrgScope = {
53
53
  export declare function orgScope(config: OrgScopeConfig): OrgScope;
54
54
  /** Case-insensitive filter over org name + display name (the switcher search). */
55
55
  export declare function filterOrgs<T extends Org>(orgs: T[], query: string): T[];
56
- //# sourceMappingURL=scope.d.ts.map
@@ -14,4 +14,3 @@ export type Surface = {
14
14
  export declare const SURFACES: Surface[];
15
15
  /** Every surface except `current` — a launcher never links to itself. */
16
16
  export declare function otherSurfaces(current?: SurfaceId): Surface[];
17
- //# sourceMappingURL=surfaces.data.d.ts.map