@hanzo/ui 8.27.19 → 8.27.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backends/gui/item.cjs +2 -3
- package/dist/backends/gui/item.d.ts.map +1 -1
- package/dist/backends/gui/item.js +1 -2
- package/dist/backends/gui/item.js.map +1 -1
- package/dist/backends/gui/press.cjs +29 -0
- package/dist/backends/gui/press.d.ts +28 -0
- package/dist/backends/gui/press.d.ts.map +1 -0
- package/dist/backends/gui/press.js +26 -0
- package/dist/backends/gui/press.js.map +1 -0
- package/dist/backends/gui/toggle-group.cjs +2 -3
- package/dist/backends/gui/toggle-group.d.ts.map +1 -1
- package/dist/backends/gui/toggle-group.js +1 -2
- package/dist/backends/gui/toggle-group.js.map +1 -1
- package/dist/backends/gui/toggle.cjs +3 -4
- package/dist/backends/gui/toggle.d.ts.map +1 -1
- package/dist/backends/gui/toggle.js +1 -2
- package/dist/backends/gui/toggle.js.map +1 -1
- package/dist/catalog/Shelf.cjs +76 -0
- package/dist/catalog/Shelf.d.ts +55 -0
- package/dist/catalog/Shelf.d.ts.map +1 -0
- package/dist/catalog/Shelf.js +74 -0
- package/dist/catalog/Shelf.js.map +1 -0
- package/dist/catalog/Tile.cjs +72 -0
- package/dist/catalog/Tile.d.ts +56 -0
- package/dist/catalog/Tile.d.ts.map +1 -0
- package/dist/catalog/Tile.js +67 -0
- package/dist/catalog/Tile.js.map +1 -0
- package/dist/catalog/index.cjs +23 -0
- package/dist/catalog/index.d.ts +16 -0
- package/dist/catalog/index.d.ts.map +1 -0
- package/dist/catalog/index.js +16 -0
- package/dist/catalog/index.js.map +1 -0
- package/dist/chat/Home.cjs +30 -0
- package/dist/chat/Home.d.ts +35 -0
- package/dist/chat/Home.d.ts.map +1 -0
- package/dist/chat/Home.js +28 -0
- package/dist/chat/Home.js.map +1 -0
- package/dist/chat/SessionRail.cjs +165 -37
- package/dist/chat/SessionRail.d.ts +92 -14
- package/dist/chat/SessionRail.d.ts.map +1 -1
- package/dist/chat/SessionRail.js +165 -39
- package/dist/chat/SessionRail.js.map +1 -1
- package/dist/chat/index.cjs +6 -1
- package/dist/chat/index.d.ts +2 -1
- package/dist/chat/index.d.ts.map +1 -1
- package/dist/chat/index.js +2 -1
- package/dist/chat/index.js.map +1 -1
- package/dist/gallery.cjs +78 -2
- package/dist/gallery.d.ts +13 -0
- package/dist/gallery.d.ts.map +1 -1
- package/dist/gallery.html +47 -3
- package/dist/gallery.js +78 -3
- package/dist/gallery.js.map +1 -1
- package/dist/models/ModelSelector.cjs +19 -4
- package/dist/models/ModelSelector.d.ts +10 -1
- package/dist/models/ModelSelector.d.ts.map +1 -1
- package/dist/models/ModelSelector.js +20 -5
- package/dist/models/ModelSelector.js.map +1 -1
- package/dist/models/catalog.cjs +19 -0
- package/dist/models/catalog.d.ts +13 -0
- package/dist/models/catalog.d.ts.map +1 -1
- package/dist/models/catalog.js +18 -0
- package/dist/models/catalog.js.map +1 -1
- package/dist/models/index.cjs +2 -1
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/product/ChipSelect.cjs +2 -3
- package/dist/product/ChipSelect.d.ts.map +1 -1
- package/dist/product/ChipSelect.js +1 -2
- package/dist/product/ChipSelect.js.map +1 -1
- package/dist/product/MenuRow.cjs +2 -1
- package/dist/product/MenuRow.d.ts +11 -7
- package/dist/product/MenuRow.d.ts.map +1 -1
- package/dist/product/MenuRow.js +3 -2
- package/dist/product/MenuRow.js.map +1 -1
- package/dist/product/OrgSwitcher.cjs +16 -5
- package/dist/product/OrgSwitcher.d.ts.map +1 -1
- package/dist/product/OrgSwitcher.js +16 -5
- package/dist/product/OrgSwitcher.js.map +1 -1
- package/dist/product/UserMenu.cjs +19 -27
- package/dist/product/UserMenu.d.ts +2 -21
- package/dist/product/UserMenu.d.ts.map +1 -1
- package/dist/product/UserMenu.js +23 -31
- package/dist/product/UserMenu.js.map +1 -1
- package/dist/product/account.cjs +37 -0
- package/dist/product/account.d.ts +55 -0
- package/dist/product/account.d.ts.map +1 -0
- package/dist/product/account.js +35 -0
- package/dist/product/account.js.map +1 -0
- package/dist/product/menu/roving.cjs +4 -1
- package/dist/product/menu/roving.d.ts +8 -3
- package/dist/product/menu/roving.d.ts.map +1 -1
- package/dist/product/menu/roving.js +4 -1
- package/dist/product/menu/roving.js.map +1 -1
- package/dist/settings/Section.cjs +71 -0
- package/dist/settings/Section.d.ts +78 -0
- package/dist/settings/Section.d.ts.map +1 -0
- package/dist/settings/Section.js +62 -0
- package/dist/settings/Section.js.map +1 -0
- package/dist/settings/Settings.cjs +54 -0
- package/dist/settings/Settings.d.ts +50 -0
- package/dist/settings/Settings.d.ts.map +1 -0
- package/dist/settings/Settings.js +52 -0
- package/dist/settings/Settings.js.map +1 -0
- package/dist/settings/index.cjs +26 -0
- package/dist/settings/index.d.ts +15 -0
- package/dist/settings/index.d.ts.map +1 -0
- package/dist/settings/index.js +15 -0
- package/dist/settings/index.js.map +1 -0
- package/dist/styles.css +44 -0
- package/package.json +19 -1
package/dist/gallery.cjs
CHANGED
|
@@ -2,8 +2,31 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Gallery = void 0;
|
|
5
|
+
exports.Phone = Phone;
|
|
5
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
7
|
const gui_1 = require("@hanzo/gui");
|
|
8
|
+
/**
|
|
9
|
+
* The gallery — every component @hanzo/ui exports, rendered once, in every
|
|
10
|
+
* variant that carries its own styling.
|
|
11
|
+
*
|
|
12
|
+
* It exists because three different jobs need the same answer to "what does this
|
|
13
|
+
* package have to style", and three copies of that list would drift:
|
|
14
|
+
*
|
|
15
|
+
* 1. `scripts/gen-css.mjs` renders this in Node and harvests the atomic CSS
|
|
16
|
+
* that render produces. A component missing here ships with classes and no
|
|
17
|
+
* rules — the exact defect this package now guarantees against.
|
|
18
|
+
* 2. `src/gallery.test.tsx` mounts it, so a component that throws on first
|
|
19
|
+
* paint fails the build.
|
|
20
|
+
* 3. The consumer test installs the tarball and renders this in a browser,
|
|
21
|
+
* then asserts computed styles against it.
|
|
22
|
+
*
|
|
23
|
+
* So the list is the specification, and the generator, the unit test and the
|
|
24
|
+
* consumer test all read it. Add a component to the barrel, add it here.
|
|
25
|
+
*
|
|
26
|
+
* Variants are enumerated rather than sampled: gui compiles each distinct style
|
|
27
|
+
* VALUE to its own class, so an unrendered variant is an unwritten rule.
|
|
28
|
+
*/
|
|
29
|
+
const react_1 = require("react");
|
|
7
30
|
const box_1 = require("./box.cjs");
|
|
8
31
|
const Workbench_1 = require("./product/Workbench.cjs");
|
|
9
32
|
const Skeleton_1 = require("./product/Skeleton.cjs");
|
|
@@ -15,10 +38,18 @@ const DialogTemplate_1 = require("./product/DialogTemplate.cjs");
|
|
|
15
38
|
const ChipSelect_1 = require("./product/ChipSelect.cjs");
|
|
16
39
|
const RepoSelect_1 = require("./product/RepoSelect.cjs");
|
|
17
40
|
const BranchSelect_1 = require("./product/BranchSelect.cjs");
|
|
41
|
+
const models_1 = require("./models/index.cjs");
|
|
18
42
|
const chat_1 = require("./chat/index.cjs");
|
|
19
43
|
const gui_2 = require("./backends/gui/index.cjs");
|
|
20
44
|
// Off the barrel — web-only, so it is imported the way a consumer imports it.
|
|
21
45
|
const grid_1 = require("./grid.cjs");
|
|
46
|
+
const lucide_icons_2_1 = require("@hanzogui/lucide-icons-2");
|
|
47
|
+
// The settings page and its section parts. Aliased where a part shares a word
|
|
48
|
+
// with a primitive above (`Card`, `Field`), exactly as a consumer importing both
|
|
49
|
+
// would have to.
|
|
50
|
+
const settings_1 = require("./settings/index.cjs");
|
|
51
|
+
// A catalogue page — web-only, like the grid its cards lay out on.
|
|
52
|
+
const catalog_1 = require("./catalog/index.cjs");
|
|
22
53
|
const agents_1 = require("./agents/index.cjs");
|
|
23
54
|
/** A real <img> with real intrinsic pixels, inline so nothing hits the network.
|
|
24
55
|
* 120x40 on purpose: the wrong ratio for every box it goes in, so a frame that
|
|
@@ -49,6 +80,17 @@ const SESSIONS = [
|
|
|
49
80
|
{ id: 's4', title: 'Enterprise/OSS feature audit', status: 'error' },
|
|
50
81
|
{ id: 's5', title: 'Idle one', status: 'idle' },
|
|
51
82
|
];
|
|
83
|
+
/** A settings page's sections, in two groups, so both group labels render. */
|
|
84
|
+
const ENTRIES = [
|
|
85
|
+
{ id: 'general', label: 'General', group: 'Settings' },
|
|
86
|
+
{ id: 'account', label: 'Account', group: 'Settings' },
|
|
87
|
+
{ id: 'keys', label: 'API keys', group: 'Code' },
|
|
88
|
+
];
|
|
89
|
+
/** A shelf's kinds, one with an icon and one without, so the tab draws both. */
|
|
90
|
+
const KINDS = [
|
|
91
|
+
{ id: 'skills', label: 'Skills', icon: lucide_icons_2_1.BookOpen },
|
|
92
|
+
{ id: 'connectors', label: 'Connectors', icon: lucide_icons_2_1.Plug },
|
|
93
|
+
];
|
|
52
94
|
/** A loader that never needs to answer — the chips render closed. */
|
|
53
95
|
const NONE = async () => ({ repos: [], branches: [], items: [] });
|
|
54
96
|
/** Two: one with a host and one without, so the card's second line and its
|
|
@@ -93,7 +135,11 @@ const Gallery = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex'
|
|
|
93
135
|
const el = document.querySelector('[data-palette-selected]');
|
|
94
136
|
if (el)
|
|
95
137
|
el.setAttribute('data-palette-selected', v);
|
|
96
|
-
}, children: [(0, jsx_runtime_1.jsx)(gui_2.CommandInput, {}), (0, jsx_runtime_1.jsxs)(gui_2.CommandList, { children: [(0, jsx_runtime_1.jsx)(gui_2.CommandEmpty, { children: "No results" }), (0, jsx_runtime_1.jsxs)(gui_2.CommandGroup, { heading: "Palette", children: [(0, jsx_runtime_1.jsx)(gui_2.CommandItem, { value: "alpha", children: "alpha" }), (0, jsx_runtime_1.jsx)(gui_2.CommandItem, { value: "beta", children: "beta" }), (0, jsx_runtime_1.jsx)(gui_2.CommandItem, { value: "gamma", children: "gamma" })] })] })] }), (0, jsx_runtime_1.jsx)("span", { "data-palette-selected": "" })] }), (0, jsx_runtime_1.
|
|
138
|
+
}, children: [(0, jsx_runtime_1.jsx)(gui_2.CommandInput, {}), (0, jsx_runtime_1.jsxs)(gui_2.CommandList, { children: [(0, jsx_runtime_1.jsx)(gui_2.CommandEmpty, { children: "No results" }), (0, jsx_runtime_1.jsxs)(gui_2.CommandGroup, { heading: "Palette", children: [(0, jsx_runtime_1.jsx)(gui_2.CommandItem, { value: "alpha", children: "alpha" }), (0, jsx_runtime_1.jsx)(gui_2.CommandItem, { value: "beta", children: "beta" }), (0, jsx_runtime_1.jsx)(gui_2.CommandItem, { value: "gamma", children: "gamma" })] })] })] }), (0, jsx_runtime_1.jsx)("span", { "data-palette-selected": "" })] }), (0, jsx_runtime_1.jsx)(Section, { name: "models", children: (0, jsx_runtime_1.jsx)(models_1.ModelSelector, { open: true, value: "zen6", onChange: NOOP, models: [
|
|
139
|
+
{ id: 'enso', owned_by: 'hanzo', label: 'Enso', premium: true },
|
|
140
|
+
{ id: 'zen6', owned_by: 'zenlm', label: 'Zen 6', context_window: 1_000_000 },
|
|
141
|
+
...models_1.RESEARCH,
|
|
142
|
+
] }) }), (0, jsx_runtime_1.jsxs)(Section, { name: "overlay", children: [(0, jsx_runtime_1.jsx)(gui_2.Dialog, { open: true, children: (0, jsx_runtime_1.jsxs)(gui_2.DialogContent, { children: [(0, jsx_runtime_1.jsxs)(gui_2.DialogHeader, { children: [(0, jsx_runtime_1.jsx)(gui_2.DialogTitle, { children: "Dialog title" }), (0, jsx_runtime_1.jsx)(gui_2.DialogDescription, { children: "Dialog description" })] }), (0, jsx_runtime_1.jsx)(gui_2.DialogFooter, { children: (0, jsx_runtime_1.jsx)(gui_2.Button, { size: "sm", children: "OK" }) })] }) }), (0, jsx_runtime_1.jsxs)(gui_2.DropdownMenu, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_2.DropdownMenuTrigger, { children: "Menu" }), (0, jsx_runtime_1.jsxs)(gui_2.DropdownMenuContent, { children: [(0, jsx_runtime_1.jsx)(gui_2.DropdownMenuLabel, { children: "Label" }), (0, jsx_runtime_1.jsx)(gui_2.DropdownMenuSeparator, {}), (0, jsx_runtime_1.jsx)(gui_2.DropdownMenuItem, { children: "Item" })] })] }), (0, jsx_runtime_1.jsxs)(gui_2.Popover, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_2.PopoverTrigger, { children: "Popover" }), (0, jsx_runtime_1.jsx)(gui_2.PopoverContent, { children: "Popover content" })] }), (0, jsx_runtime_1.jsxs)(gui_2.Select, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_2.SelectTrigger, { children: (0, jsx_runtime_1.jsx)(gui_2.SelectValue, { placeholder: "Select" }) }), (0, jsx_runtime_1.jsx)(gui_2.SelectContent, { children: (0, jsx_runtime_1.jsx)(gui_2.SelectItem, { value: "x", index: 0, children: "Option" }) })] }), (0, jsx_runtime_1.jsx)(gui_2.TooltipProvider, { delay: 0, children: (0, jsx_runtime_1.jsxs)(gui_2.Tooltip, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_2.TooltipTrigger, { children: "Tooltip" }), (0, jsx_runtime_1.jsx)(gui_2.TooltipContent, { children: "Tooltip content" })] }) }), (0, jsx_runtime_1.jsx)(gui_2.AlertDialog, { open: true, children: (0, jsx_runtime_1.jsxs)(gui_2.AlertDialogContent, { children: [(0, jsx_runtime_1.jsxs)(gui_2.AlertDialogHeader, { children: [(0, jsx_runtime_1.jsx)(gui_2.AlertDialogTitle, { children: "Alert title" }), (0, jsx_runtime_1.jsx)(gui_2.AlertDialogDescription, { children: "Alert description" })] }), (0, jsx_runtime_1.jsxs)(gui_2.AlertDialogFooter, { children: [(0, jsx_runtime_1.jsx)(gui_2.AlertDialogCancel, { children: "Cancel" }), (0, jsx_runtime_1.jsx)(gui_2.AlertDialogAction, { variant: "destructive", children: "Delete" })] })] }) }), (0, jsx_runtime_1.jsxs)(gui_2.HoverCard, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_2.HoverCardTrigger, { children: "Hover card" }), (0, jsx_runtime_1.jsx)(gui_2.HoverCardContent, { children: "Hover card content" })] }), (0, jsx_runtime_1.jsxs)(gui_2.ContextMenu, { children: [(0, jsx_runtime_1.jsx)(gui_2.ContextMenuTrigger, { children: "Context menu" }), (0, jsx_runtime_1.jsxs)(gui_2.ContextMenuContent, { children: [(0, jsx_runtime_1.jsx)(gui_2.ContextMenuLabel, { children: "Label" }), (0, jsx_runtime_1.jsx)(gui_2.ContextMenuSeparator, {}), (0, jsx_runtime_1.jsx)(gui_2.ContextMenuItem, { children: "Item" })] })] }), (0, jsx_runtime_1.jsx)(gui_2.Toaster, {})] }), (0, jsx_runtime_1.jsxs)(Section, { name: "layout", children: [(0, jsx_runtime_1.jsx)(grid_1.Grid, { columns: { min: 240 }, gap: "$3", style: { width: '100%' }, "data-grid": "auto", children: [0, 1, 2, 3, 4, 5, 6].map((i) => ((0, jsx_runtime_1.jsxs)(gui_2.Card, { children: [(0, jsx_runtime_1.jsx)(gui_2.CardMedia, { ratio: 16 / 10, children: (0, jsx_runtime_1.jsx)("img", { src: SWATCH, alt: "" }) }), (0, jsx_runtime_1.jsxs)(gui_2.CardHeader, { children: [(0, jsx_runtime_1.jsxs)(gui_2.CardTitle, { children: ["Card ", i] }), (0, jsx_runtime_1.jsx)(gui_2.CardDescription, { children: "Sized by its content, never by a pinned height." })] })] }, i))) }), (0, jsx_runtime_1.jsx)(grid_1.Grid, { columns: { min: 160, max: 4 }, gap: "$3", style: { width: '100%' }, "data-grid": "capped", children: [0, 1, 2, 3, 4, 5].map((i) => ((0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsxs)(gui_2.CardContent, { children: ["cap ", i] }) }, i))) }), (0, jsx_runtime_1.jsxs)(grid_1.Grid, { columns: { min: 900 }, gap: "$3", style: { width: '100%' }, "data-grid": "wide", children: [(0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "wide" }) }), (0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "wide" }) })] }), (0, jsx_runtime_1.jsxs)(grid_1.Grid, { columns: ['2fr', '1fr'], gap: "$3", style: { width: '100%' }, "data-grid": "list", children: [(0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "2fr" }) }), (0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "1fr" }) })] }), (0, jsx_runtime_1.jsxs)(grid_1.Grid, { columns: "repeat(3, 1fr)", gap: "$3", style: { width: '100%' }, "data-grid": "written", children: [(0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "a" }) }), (0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "b" }) }), (0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "c" }) })] }), (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', overflow: 'hidden' }, children: (0, jsx_runtime_1.jsxs)(grid_1.Grid, { columns: 3, gap: "$3", style: { width: '100%' }, "data-grid": "fixed", children: [(0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "short" }) }), (0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: (0, jsx_runtime_1.jsx)("span", { style: { whiteSpace: 'nowrap' }, children: "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" }) }) }), (0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "short" }) })] }) }), (0, jsx_runtime_1.jsxs)(grid_1.Grid, { columns: 3, rows: 2, gap: "$3", style: { width: '100%' }, "data-grid": "cells", children: [(0, jsx_runtime_1.jsx)(grid_1.Cell, { col: 2, "data-cell": "span2", children: (0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "spans two" }) }) }), (0, jsx_runtime_1.jsx)(grid_1.Cell, { row: 2, "data-cell": "rows2", children: (0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "spans two rows" }) }) }), (0, jsx_runtime_1.jsx)(grid_1.Cell, { "data-cell": "plain", children: (0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "one" }) }) }), (0, jsx_runtime_1.jsx)(grid_1.Cell, { row: "2 / 4", "data-cell": "rowplaced", children: (0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "placed down" }) }) }), (0, jsx_runtime_1.jsx)(grid_1.Cell, { col: "1 / -1", "data-cell": "full", children: (0, jsx_runtime_1.jsx)(gui_2.Card, { children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "the whole row" }) }) })] }), (0, jsx_runtime_1.jsxs)("div", { "data-grid": "growth", style: { display: 'flex', alignItems: 'flex-start', gap: 12, width: '100%' }, children: [(0, jsx_runtime_1.jsx)(gui_2.Card, { "data-card": "lean", children: (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "one line" }) }), (0, jsx_runtime_1.jsxs)(gui_2.Card, { "data-card": "fat", children: [(0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "one line" }), (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "two line" }), (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "three line" }), (0, jsx_runtime_1.jsx)(gui_2.CardContent, { children: "four line" })] })] }), (0, jsx_runtime_1.jsx)(gui_2.Card, { interactive: true, "data-card": "interactive", children: (0, jsx_runtime_1.jsx)(gui_2.CardHeader, { children: (0, jsx_runtime_1.jsx)(gui_2.CardTitle, { children: "Interactive card" }) }) }), (0, jsx_runtime_1.jsx)(gui_2.Band, { measure: 600, "data-section": "demo", children: (0, jsx_runtime_1.jsx)(gui_2.CardTitle, { children: "Section" }) }), (0, jsx_runtime_1.jsx)(gui_2.CardTitle, { fontFamily: "$mono", "data-type": "mono", children: "1234567890" }), (0, jsx_runtime_1.jsx)(gui_2.Button, { "data-button": "block-child", children: (0, jsx_runtime_1.jsx)("span", { "data-block-child": true, style: { display: 'block', height: 119, width: 119 } }) })] }), (0, jsx_runtime_1.jsx)(Section, { name: "workbench", children: (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', height: 220, width: '100%', maxWidth: 880, overflowX: 'auto' }, children: (0, jsx_runtime_1.jsx)(Workbench_1.Workbench, { left: { tabs: [{ id: 'files', title: 'Files', content: (0, jsx_runtime_1.jsx)(gui_2.CardTitle, { children: "left" }) }] }, right: {
|
|
97
143
|
tabs: [
|
|
98
144
|
{ id: 'chat', title: 'Side chat', content: (0, jsx_runtime_1.jsx)(gui_2.CardTitle, { children: "chat" }) },
|
|
99
145
|
{ id: 'browser', title: 'Browser', content: (0, jsx_runtime_1.jsx)(gui_2.CardTitle, { children: "browser" }) },
|
|
@@ -115,6 +161,36 @@ const Gallery = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex'
|
|
|
115
161
|
], height: 200, onHeight: NOOP, onClear: NOOP, onRun: NOOP }), children: (0, jsx_runtime_1.jsx)(agents_1.PreviewFrame, { src: "https://hanzo.ai/", toolbar: (0, jsx_runtime_1.jsx)(gui_2.Button, { size: "icon-sm", variant: "ghost", children: "+" }) }) }) }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', width: 280, height: 240 }, children: (0, jsx_runtime_1.jsx)(agents_1.FileTree, { files: ['src/app.tsx', 'src/lib/a.ts', 'README.md'], value: "src/lib/a.ts", onSelect: NOOP }) }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', width: 360, height: 240 }, children: (0, jsx_runtime_1.jsx)(agents_1.FileTabs, { files: [
|
|
116
162
|
{ path: 'src/app.tsx', content: 'export {}', dirty: true },
|
|
117
163
|
{ path: 'big.bin', error: 'Too large to show here.' },
|
|
118
|
-
], value: "src/app.tsx", onSelect: NOOP, onClose: NOOP, onChange: NOOP }) }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', width: 280, height: 160 }, children: (0, jsx_runtime_1.jsx)(agents_1.PreviewFrame, { src: null }) }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', width: 360 }, children: (0, jsx_runtime_1.jsx)(agents_1.Console, { lines: [], height: 36, onHeight: NOOP }) })] }), (0, jsx_runtime_1.jsxs)(Section, { name: "sessions", children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', width: '100%', maxWidth: 560, height:
|
|
164
|
+
], value: "src/app.tsx", onSelect: NOOP, onClose: NOOP, onChange: NOOP }) }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', width: 280, height: 160 }, children: (0, jsx_runtime_1.jsx)(agents_1.PreviewFrame, { src: null }) }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', width: 360 }, children: (0, jsx_runtime_1.jsx)(agents_1.Console, { lines: [], height: 36, onHeight: NOOP }) })] }), (0, jsx_runtime_1.jsxs)(Section, { name: "sessions", children: [(0, jsx_runtime_1.jsxs)("div", { "data-rail": "shell", style: { display: 'flex', width: '100%', maxWidth: 560, height: 520, gap: 12 }, children: [(0, jsx_runtime_1.jsx)(chat_1.SessionRail, { brand: "Hanzo Build", onSearch: NOOP, searchLabel: "Search runs", onNew: NOOP, fresh: true, links: [{ id: 'a', label: 'Artifacts', icon: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "a" }) }], more: [{ id: 'p', label: 'Projects', icon: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "p" }) }], recents: SESSIONS, active: "s2", onOpen: NOOP, onSort: NOOP, notice: (0, jsx_runtime_1.jsx)(chat_1.RailNotice, { icon: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "s" }), title: "Try Hanzo in Slack", action: "Set up", onAction: NOOP, onDismiss: NOOP }), account: {
|
|
165
|
+
name: 'Dave',
|
|
166
|
+
sub: 'acme',
|
|
167
|
+
email: 'dave@acme.test',
|
|
168
|
+
groups: [{ label: 'Organization', items: [{ id: 'acme', label: 'acme', active: true, onPress: NOOP }] }],
|
|
169
|
+
onSignOut: NOOP,
|
|
170
|
+
}, onCollapse: NOOP }), (0, jsx_runtime_1.jsx)(chat_1.SessionRail, { onNew: NOOP, onSearch: NOOP, recents: SESSIONS, onOpen: NOOP, collapsed: true, onCollapse: NOOP, account: { name: 'Sign in', onPress: NOOP } })] }), (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', maxWidth: 560 }, children: (0, jsx_runtime_1.jsx)(chat_1.RailBar, { onMenu: NOOP, menuLabel: "Open runs", brand: "Hanzo Build", onBrand: NOOP, onSearch: NOOP, searchLabel: "Search runs" }) }), (0, jsx_runtime_1.jsx)(chat_1.EmptyPrompt, { mark: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "h" }) }), (0, jsx_runtime_1.jsx)("div", { "data-home": "demo", style: { display: 'flex', width: '100%', height: 320 }, children: (0, jsx_runtime_1.jsx)(chat_1.Home, { mark: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "h" }), children: (0, jsx_runtime_1.jsx)(chat_1.Composer, { inline: true, value: "", onChange: NOOP, onSend: NOOP, placeholder: "Describe a task or ask a question" }) }) }), (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', maxWidth: 768 }, children: (0, jsx_runtime_1.jsx)(chat_1.Composer, { inline: true, value: "", onChange: NOOP, onSend: NOOP, placeholder: "Describe a task or ask a question", head: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ChipSelect_1.ChipSelect, { name: "Environment", label: "Default", onChange: NOOP, items: [] }), (0, jsx_runtime_1.jsx)(RepoSelect_1.RepoSelect, { value: { owner: 'hanzo-inc', name: 'cloud' }, onChange: NOOP, load: NONE }), (0, jsx_runtime_1.jsx)(BranchSelect_1.BranchSelect, { value: "main", onChange: NOOP, load: NONE }), (0, jsx_runtime_1.jsx)(ChipSelect_1.ChipSelect, { name: "Disabled", label: "off", onChange: NOOP, items: [], disabled: true })] }), foot: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(chat_1.ComposerTool, { label: "Attach", icon: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "+" }), onPress: NOOP }), (0, jsx_runtime_1.jsx)(chat_1.ComposerTool, { label: "Mode", text: "Auto", caret: true, onPress: NOOP }), (0, jsx_runtime_1.jsx)(chat_1.ComposerTool, { label: "Disabled", text: "off", disabled: true }), (0, jsx_runtime_1.jsx)(gui_1.XStack, { flex: 1 }), (0, jsx_runtime_1.jsx)(ChipSelect_1.ChipSelect, { name: "Model", label: "Zen 5", onChange: NOOP, items: [], quiet: true })] }) }) }), (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', maxWidth: 768 }, children: (0, jsx_runtime_1.jsx)(chat_1.Composer, { inline: true, value: "a draft", onChange: NOOP, onSend: NOOP, onStop: NOOP, busy: true }) })] }), (0, jsx_runtime_1.jsx)(Section, { name: "settings", children: (0, jsx_runtime_1.jsx)("div", { "data-settings": "demo", style: { display: 'flex', width: '100%', height: 560 }, children: (0, jsx_runtime_1.jsx)(settings_1.Settings, { entries: ENTRIES, active: "general", onPick: NOOP, children: (0, jsx_runtime_1.jsxs)(gui_1.YStack, { gap: "$6", children: [(0, jsx_runtime_1.jsx)(settings_1.Heading, { title: "General", detail: "How this surface looks and listens.", action: (0, jsx_runtime_1.jsx)(gui_2.Button, { size: "sm", children: "Save" }) }), (0, jsx_runtime_1.jsx)(settings_1.Group, { title: "Appearance", detail: "Per browser.", children: (0, jsx_runtime_1.jsxs)(settings_1.Card, { children: [(0, jsx_runtime_1.jsx)(settings_1.Row, { first: true, title: "Theme", detail: "Follows the system.", trailing: (0, jsx_runtime_1.jsx)(gui_2.Switch, {}) }), (0, jsx_runtime_1.jsx)(settings_1.Row, { mono: true, title: "hk-live-3f9a", leading: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "k" }) })] }) }), (0, jsx_runtime_1.jsx)(settings_1.Field, { label: "Call me", hint: "What the home page greets you by.", children: (0, jsx_runtime_1.jsx)(gui_2.Input, { placeholder: "Name", "aria-label": "Call me" }) }), (0, jsx_runtime_1.jsx)(settings_1.Card, { children: (0, jsx_runtime_1.jsx)(settings_1.Soft, { children: "No keys yet." }) }), (0, jsx_runtime_1.jsx)(settings_1.Soft, { action: (0, jsx_runtime_1.jsx)(gui_2.Button, { size: "sm", children: "Sign in" }), children: "Sign in to see your settings." }), (0, jsx_runtime_1.jsx)(settings_1.Note, { children: "Saved." }), (0, jsx_runtime_1.jsx)(settings_1.Once, { value: "hk-live-3f9a0c", label: "API key" })] }) }) }) }), (0, jsx_runtime_1.jsx)(Section, { name: "catalog", children: (0, jsx_runtime_1.jsx)("div", { "data-shelf": "demo", style: { display: 'flex', width: '100%', height: 720 }, children: (0, jsx_runtime_1.jsxs)(catalog_1.Shelf, { title: "Customize", detail: "What the agent brings to a run.", tabs: KINDS, tab: "skills", onTab: NOOP, view: "discover", onView: NOOP, search: "Search skills", query: "", onQuery: NOOP, add: "New skill", onAdd: NOOP, children: [(0, jsx_runtime_1.jsx)(catalog_1.Featured, { title: "Triage", detail: "How we triage an issue.", meta: "Saved Sep 21", mark: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "t" }), onOpen: NOOP, action: (0, jsx_runtime_1.jsx)(catalog_1.Add, { name: "Triage", added: false, onPress: NOOP }) }), (0, jsx_runtime_1.jsxs)(catalog_1.Tiles, { label: "Skills to add", children: [(0, jsx_runtime_1.jsx)(catalog_1.Tile, { title: "git_repos", detail: "List the forge's repositories.", meta: "git", mark: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "g" }), onOpen: NOOP, action: (0, jsx_runtime_1.jsx)(catalog_1.Add, { name: "git_repos", added: false, onPress: NOOP }) }), (0, jsx_runtime_1.jsx)(catalog_1.Tile, { title: "git_branches", detail: "List a repository's branches.", meta: "git", onOpen: NOOP, action: (0, jsx_runtime_1.jsx)(catalog_1.Add, { name: "git_branches", added: true, onPress: NOOP }) }), (0, jsx_runtime_1.jsx)(catalog_1.Tile, { title: "kms_secrets", detail: "Read the names of an org's secrets.", action: (0, jsx_runtime_1.jsx)(catalog_1.Add, { name: "kms_secrets", added: false, busy: true, onPress: NOOP }) })] })] }) }) }), (0, jsx_runtime_1.jsxs)(Section, { name: "box", children: [(0, jsx_runtime_1.jsx)(gui_1.XStack, { items: "center", gap: 16, px: 24, py: 12, rounded: "var(--radius-lg, 0.75rem)", borderWidth: 1, children: (0, jsx_runtime_1.jsx)(gui_2.CardTitle, { children: "utility classes" }) }), (0, jsx_runtime_1.jsx)(gui_1.YStack, { gap: 8, maxW: 768, ml: "auto", mr: "auto", overflow: "hidden", children: (0, jsx_runtime_1.jsx)(gui_2.CardTitle, { children: "column" }) })] })] }));
|
|
119
171
|
exports.Gallery = Gallery;
|
|
172
|
+
/**
|
|
173
|
+
* A phone's page, driven: the bar opens the rail's drawer, and the host keeps
|
|
174
|
+
* it open or shut and counts every close it is told of (`data-closes`).
|
|
175
|
+
*
|
|
176
|
+
* Not in the gallery, on purpose. The gallery holds a dozen modal surfaces open
|
|
177
|
+
* so each is styled, and every one of them takes focus back the moment the
|
|
178
|
+
* drawer lets go of it — so where focus lands after the drawer closes is a
|
|
179
|
+
* question only a page with nothing else open can answer. The consumer suite
|
|
180
|
+
* renders this at `?page=phone`: a real `<dialog>` moves focus on its own, and
|
|
181
|
+
* jsdom's does not, so this is the only place the drawer's focus return is
|
|
182
|
+
* measured.
|
|
183
|
+
*/
|
|
184
|
+
function Phone() {
|
|
185
|
+
const [open, setOpen] = (0, react_1.useState)(false);
|
|
186
|
+
const [closes, setCloses] = (0, react_1.useState)(0);
|
|
187
|
+
return ((0, jsx_runtime_1.jsxs)("div", { "data-phone": "demo", "data-closes": closes, style: { display: 'flex', flexDirection: 'column', height: '100vh' }, children: [(0, jsx_runtime_1.jsx)(chat_1.RailBar, { onMenu: () => {
|
|
188
|
+
setCloses(0);
|
|
189
|
+
setOpen(true);
|
|
190
|
+
}, menuLabel: "Open runs", brand: "Hanzo Build", onSearch: NOOP }), (0, jsx_runtime_1.jsx)(chat_1.SessionRail, { onNew: NOOP, recents: SESSIONS, onOpen: NOOP, open: open, onOpenChange: (next) => {
|
|
191
|
+
if (!next)
|
|
192
|
+
setCloses((n) => n + 1);
|
|
193
|
+
setOpen(next);
|
|
194
|
+
}, account: { name: 'Dave', groups: [[{ id: 'usage', label: 'Usage', onPress: NOOP }]], onSignOut: NOOP }, label: "Runs" })] }));
|
|
195
|
+
}
|
|
120
196
|
exports.default = exports.Gallery;
|
package/dist/gallery.d.ts
CHANGED
|
@@ -3,5 +3,18 @@
|
|
|
3
3
|
* scope its assertions without depending on document order.
|
|
4
4
|
*/
|
|
5
5
|
export declare const Gallery: () => import("react").JSX.Element;
|
|
6
|
+
/**
|
|
7
|
+
* A phone's page, driven: the bar opens the rail's drawer, and the host keeps
|
|
8
|
+
* it open or shut and counts every close it is told of (`data-closes`).
|
|
9
|
+
*
|
|
10
|
+
* Not in the gallery, on purpose. The gallery holds a dozen modal surfaces open
|
|
11
|
+
* so each is styled, and every one of them takes focus back the moment the
|
|
12
|
+
* drawer lets go of it — so where focus lands after the drawer closes is a
|
|
13
|
+
* question only a page with nothing else open can answer. The consumer suite
|
|
14
|
+
* renders this at `?page=phone`: a real `<dialog>` moves focus on its own, and
|
|
15
|
+
* jsdom's does not, so this is the only place the drawer's focus return is
|
|
16
|
+
* measured.
|
|
17
|
+
*/
|
|
18
|
+
export declare function Phone(): import("react").JSX.Element;
|
|
6
19
|
export default Gallery;
|
|
7
20
|
//# sourceMappingURL=gallery.d.ts.map
|
package/dist/gallery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../src/gallery.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../src/gallery.tsx"],"names":[],"mappings":"AA4NA;;;GAGG;AACH,eAAO,MAAM,OAAO,mCAo0BnB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,KAAK,gCA4BpB;eAEc,OAAO"}
|