@hanzo/ui 8.1.16 → 8.1.17
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/index.cjs +5 -2
- package/dist/backends/gui/index.d.ts +1 -0
- package/dist/backends/gui/index.d.ts.map +1 -1
- package/dist/backends/gui/index.js +1 -0
- package/dist/backends/gui/index.js.map +1 -1
- package/dist/backends/gui/screen.cjs +61 -0
- package/dist/backends/gui/screen.d.ts +54 -0
- package/dist/backends/gui/screen.d.ts.map +1 -0
- package/dist/backends/gui/screen.js +58 -0
- package/dist/backends/gui/screen.js.map +1 -0
- package/dist/gallery.cjs +1 -10
- package/dist/gallery.d.ts.map +1 -1
- package/dist/gallery.html +7 -3
- package/dist/gallery.js +2 -11
- package/dist/gallery.js.map +1 -1
- package/dist/index.cjs +5 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +4 -0
- package/package.json +1 -1
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.ContextMenuRadioItem = exports.ContextMenuCheckboxItem = exports.ContextMenuItem = exports.ContextMenuContent = exports.ContextMenuTrigger = exports.ContextMenu = exports.CommandSeparator = exports.CommandShortcut = exports.CommandItem = exports.CommandGroup = exports.CommandEmpty = exports.CommandList = exports.CommandInput = exports.CommandDialog = exports.Command = exports.CollapsibleContent = exports.CollapsibleTrigger = exports.Collapsible = exports.Checkbox = exports.CardMedia = exports.CardContent = exports.CardDescription = exports.CardAction = exports.CardTitle = exports.CardFooter = exports.CardHeader = exports.Card = exports.buttonVariants = exports.Button = exports.badgeVariants = exports.Badge = exports.AvatarFallback = exports.AvatarImage = exports.Avatar = exports.AspectRatio = exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialogDescription = exports.AlertDialogTitle = exports.AlertDialogFooter = exports.AlertDialogHeader = exports.AlertDialogContent = exports.AlertDialogOverlay = exports.AlertDialogPortal = exports.AlertDialogTrigger = exports.AlertDialog = exports.AccordionContent = exports.AccordionTrigger = exports.AccordionItem = exports.Accordion = void 0;
|
|
20
20
|
exports.ResizablePanelGroup = exports.RadioGroupItem = exports.RadioGroup = exports.Progress = exports.PopoverClose = exports.PopoverAnchor = exports.PopoverContent = exports.PopoverTrigger = exports.Popover = exports.Label = exports.Input = exports.HoverCardContent = exports.HoverCardTrigger = exports.HoverCard = exports.Grid = exports.Glass = exports.DropdownMenuRadioGroup = exports.DropdownMenuSubTrigger = exports.DropdownMenuSubContent = exports.DropdownMenuSub = exports.DropdownMenuPortal = exports.DropdownMenuGroup = exports.DropdownMenuShortcut = exports.DropdownMenuSeparator = exports.DropdownMenuLabel = exports.DropdownMenuRadioItem = exports.DropdownMenuCheckboxItem = exports.DropdownMenuItem = exports.DropdownMenuContent = exports.DropdownMenuTrigger = exports.DropdownMenu = exports.DialogTrigger = exports.DialogTitle = exports.DialogPortal = exports.DialogOverlay = exports.DialogHeader = exports.DialogFooter = exports.DialogDescription = exports.DialogContent = exports.DialogClose = exports.Dialog = exports.ContextMenuRadioGroup = exports.ContextMenuSubTrigger = exports.ContextMenuSubContent = exports.ContextMenuSub = exports.ContextMenuPortal = exports.ContextMenuGroup = exports.ContextMenuShortcut = exports.ContextMenuSeparator = exports.ContextMenuLabel = void 0;
|
|
21
|
-
exports.
|
|
22
|
-
exports.TooltipProvider = exports.TooltipContent = exports.TooltipTrigger = void 0;
|
|
21
|
+
exports.ToggleGroup = exports.toast = exports.Toaster = exports.Textarea = exports.TabsContent = exports.TabsTrigger = exports.TabsList = exports.Tabs = exports.Switch = exports.Spinner = exports.Slider = exports.Separator = exports.Fill = exports.Screen = exports.Section = exports.SelectScrollDownButton = exports.SelectScrollUpButton = exports.SelectSeparator = exports.SelectItem = exports.SelectLabel = exports.SelectContent = exports.SelectTrigger = exports.SelectValue = exports.SelectGroup = exports.Select = exports.ScrollBar = exports.ScrollArea = exports.Text = exports.View = exports.ScrollView = exports.Spacer = exports.Image = exports.Anchor = exports.Em = exports.Strong = exports.Span = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = exports.Heading = exports.Paragraph = exports.SizableText = exports.ZStack = exports.YStack = exports.XStack = exports.ResizableHandle = exports.ResizablePanel = void 0;
|
|
22
|
+
exports.TooltipProvider = exports.TooltipContent = exports.TooltipTrigger = exports.Tooltip = exports.ToggleGroupItem = void 0;
|
|
23
23
|
var accordion_1 = require("./accordion.cjs");
|
|
24
24
|
Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return accordion_1.Accordion; } });
|
|
25
25
|
Object.defineProperty(exports, "AccordionItem", { enumerable: true, get: function () { return accordion_1.AccordionItem; } });
|
|
@@ -190,6 +190,9 @@ Object.defineProperty(exports, "SelectScrollUpButton", { enumerable: true, get:
|
|
|
190
190
|
Object.defineProperty(exports, "SelectScrollDownButton", { enumerable: true, get: function () { return select_1.SelectScrollDownButton; } });
|
|
191
191
|
var section_1 = require("./section.cjs");
|
|
192
192
|
Object.defineProperty(exports, "Section", { enumerable: true, get: function () { return section_1.Section; } });
|
|
193
|
+
var screen_1 = require("./screen.cjs");
|
|
194
|
+
Object.defineProperty(exports, "Screen", { enumerable: true, get: function () { return screen_1.Screen; } });
|
|
195
|
+
Object.defineProperty(exports, "Fill", { enumerable: true, get: function () { return screen_1.Fill; } });
|
|
193
196
|
var separator_1 = require("./separator.cjs");
|
|
194
197
|
Object.defineProperty(exports, "Separator", { enumerable: true, get: function () { return separator_1.Separator; } });
|
|
195
198
|
var slider_1 = require("./slider.cjs");
|
|
@@ -24,6 +24,7 @@ export { XStack, YStack, ZStack, SizableText, Paragraph, Heading, H1, H2, H3, H4
|
|
|
24
24
|
export { ScrollArea, ScrollBar } from './scroll-area.js';
|
|
25
25
|
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from './select.js';
|
|
26
26
|
export { Section, type SectionProps } from './section.js';
|
|
27
|
+
export { Screen, Fill, type ScreenProps, type FillProps } from './screen.js';
|
|
27
28
|
export { Separator } from './separator.js';
|
|
28
29
|
export { Slider } from './slider.js';
|
|
29
30
|
export { Spinner, type SpinnerProps } from './spinner.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAClF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAA;AACxG,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,SAAS,EACT,KAAK,cAAc,GACpB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AO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAA;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EACL,WAAW,EACX,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -48,6 +48,7 @@ export { XStack, YStack, ZStack, SizableText, Paragraph, Heading, H1, H2, H3, H4
|
|
|
48
48
|
export { ScrollArea, ScrollBar } from './scroll-area.js';
|
|
49
49
|
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from './select.js';
|
|
50
50
|
export { Section } from './section.js';
|
|
51
|
+
export { Screen, Fill } from './screen.js';
|
|
51
52
|
export { Separator } from './separator.js';
|
|
52
53
|
export { Slider } from './slider.js';
|
|
53
54
|
export { Spinner } from './spinner.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/backends/gui/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,EAAE;AACF,kFAAkF;AAClF,4EAA4E;AAC5E,uEAAuE;AACvE,EAAE;AACF,4EAA4E;AAC5E,iFAAiF;AACjF,+EAA+E;AAC/E,0BAA0B;AAC1B,EAAE;AACF,6DAA6D;AAC7D,6EAA6E;AAC7E,iFAAiF;AACjF,+CAA+C;AAC/C,oCAAoC;AAEpC,OAAO,EACL,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,gBAAgB,GAKjB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GAKlB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,WAAW,EAAyB,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAsC,MAAM,SAAS,CAAA;AAClF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAyD,MAAM,UAAU,CAAA;AACxG,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,SAAS,GAEV,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB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M,gBAAgB,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/backends/gui/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,EAAE;AACF,kFAAkF;AAClF,4EAA4E;AAC5E,uEAAuE;AACvE,EAAE;AACF,4EAA4E;AAC5E,iFAAiF;AACjF,+EAA+E;AAC/E,0BAA0B;AAC1B,EAAE;AACF,6DAA6D;AAC7D,6EAA6E;AAC7E,iFAAiF;AACjF,+CAA+C;AAC/C,oCAAoC;AAEpC,OAAO,EACL,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,gBAAgB,GAKjB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GAKlB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,WAAW,EAAyB,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAsC,MAAM,SAAS,CAAA;AAClF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAyD,MAAM,UAAU,CAAA;AACxG,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,SAAS,GAEV,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACnF,OAAO,EACL,OAAO,EACP,aAAa,EACb,YA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AAgB,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Fill = exports.Screen = void 0;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/**
|
|
7
|
+
* Screen — an app shell, once, so nobody re-derives it.
|
|
8
|
+
*
|
|
9
|
+
* The shape is always the same: something pinned at the top, something pinned at
|
|
10
|
+
* the bottom, and a middle that takes whatever is left and scrolls. Chat writes
|
|
11
|
+
* it, the console writes it, every workbench pane writes it. Written by hand it
|
|
12
|
+
* is two declarations, and BOTH have to be right or the failure is silent:
|
|
13
|
+
*
|
|
14
|
+
* `flex: 1` alone gives the middle the slack…
|
|
15
|
+
* `minHeight: 0` is what lets it actually shrink to take it.
|
|
16
|
+
*
|
|
17
|
+
* Without the second, a flex item's automatic minimum is its CONTENT, so the
|
|
18
|
+
* middle refuses to go below its natural height, grows the shell instead, and —
|
|
19
|
+
* because a scroll container that never overflows never scrolls — paints its
|
|
20
|
+
* content straight over whatever follows. Measured in this package: `Thread`
|
|
21
|
+
* rendered 976px of turns in a 332px box and drew every one of them across the
|
|
22
|
+
* composer. 37 files here set `flex={1}`; exactly one had ever written the
|
|
23
|
+
* second declaration, and only after that bug was found.
|
|
24
|
+
*
|
|
25
|
+
* So the rule stops being a rule. `Fill` IS the middle, with both halves and the
|
|
26
|
+
* clip built in, and a caller cannot forget a thing it does not have to write.
|
|
27
|
+
*
|
|
28
|
+
* WHY NOT CSS GRID, which expresses this as one line — `grid-template-rows: auto
|
|
29
|
+
* 1fr auto` — with no escape hatch at all: because this package's premise is that
|
|
30
|
+
* one import runs on web AND native, and React Native lays out through Yoga,
|
|
31
|
+
* which implements flexbox and has no grid. That is not a gap a fork can close;
|
|
32
|
+
* Yoga is the native runtime's engine. Grid is right where the target is a
|
|
33
|
+
* browser, and `Grid` exists for that. A shell has to work on both, so it is
|
|
34
|
+
* flexbox on the inside and neither caller has to know.
|
|
35
|
+
*/
|
|
36
|
+
const gui_1 = require("@hanzo/gui");
|
|
37
|
+
const slot_1 = require("./slot.cjs");
|
|
38
|
+
/**
|
|
39
|
+
* The frame. A column that fills its parent and CLIPS — clipping is half the
|
|
40
|
+
* contract, because a shell whose content escapes is the same defect one level
|
|
41
|
+
* out, and `overflow: visible` is what let the thread paint over the composer.
|
|
42
|
+
*/
|
|
43
|
+
const Screen = ({ children, ...props }) => ((0, jsx_runtime_1.jsx)(gui_1.YStack, { ...(0, slot_1.slot)('screen'),
|
|
44
|
+
// `flexBasis: auto`, not the 0 that `flex={1}` alone implies. A shell is
|
|
45
|
+
// usually the only thing in its parent, where either spelling fills it — but
|
|
46
|
+
// put one in a ROW beside siblings and a zero basis makes it share the line
|
|
47
|
+
// rather than take it, so a 720px shell rendered 276px wide. Basis auto
|
|
48
|
+
// starts from its own size and grows into whatever is left, which is what
|
|
49
|
+
// "fills its parent" has to mean in both directions. Same trap as the thread.
|
|
50
|
+
flex: 1, flexBasis: "auto", minH: 0, width: "100%", overflow: "hidden", ...props, children: children }));
|
|
51
|
+
exports.Screen = Screen;
|
|
52
|
+
/**
|
|
53
|
+
* The middle. Takes the slack, and can give it back.
|
|
54
|
+
*
|
|
55
|
+
* `flexBasis: 0` with `minHeight: 0` is the pair that makes "takes the slack"
|
|
56
|
+
* true in both directions: grow into a bigger shell, shrink inside a smaller
|
|
57
|
+
* one. Siblings need nothing — a bar keeps its natural height because it never
|
|
58
|
+
* asked for slack.
|
|
59
|
+
*/
|
|
60
|
+
const Fill = ({ children, scroll = true, ...props }) => ((0, jsx_runtime_1.jsx)(gui_1.YStack, { ...(0, slot_1.slot)('fill'), flex: 1, flexBasis: 0, minH: 0, width: "100%", overflowY: scroll ? 'auto' : 'hidden', ...props, children: children }));
|
|
61
|
+
exports.Fill = Fill;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Screen — an app shell, once, so nobody re-derives it.
|
|
3
|
+
*
|
|
4
|
+
* The shape is always the same: something pinned at the top, something pinned at
|
|
5
|
+
* the bottom, and a middle that takes whatever is left and scrolls. Chat writes
|
|
6
|
+
* it, the console writes it, every workbench pane writes it. Written by hand it
|
|
7
|
+
* is two declarations, and BOTH have to be right or the failure is silent:
|
|
8
|
+
*
|
|
9
|
+
* `flex: 1` alone gives the middle the slack…
|
|
10
|
+
* `minHeight: 0` is what lets it actually shrink to take it.
|
|
11
|
+
*
|
|
12
|
+
* Without the second, a flex item's automatic minimum is its CONTENT, so the
|
|
13
|
+
* middle refuses to go below its natural height, grows the shell instead, and —
|
|
14
|
+
* because a scroll container that never overflows never scrolls — paints its
|
|
15
|
+
* content straight over whatever follows. Measured in this package: `Thread`
|
|
16
|
+
* rendered 976px of turns in a 332px box and drew every one of them across the
|
|
17
|
+
* composer. 37 files here set `flex={1}`; exactly one had ever written the
|
|
18
|
+
* second declaration, and only after that bug was found.
|
|
19
|
+
*
|
|
20
|
+
* So the rule stops being a rule. `Fill` IS the middle, with both halves and the
|
|
21
|
+
* clip built in, and a caller cannot forget a thing it does not have to write.
|
|
22
|
+
*
|
|
23
|
+
* WHY NOT CSS GRID, which expresses this as one line — `grid-template-rows: auto
|
|
24
|
+
* 1fr auto` — with no escape hatch at all: because this package's premise is that
|
|
25
|
+
* one import runs on web AND native, and React Native lays out through Yoga,
|
|
26
|
+
* which implements flexbox and has no grid. That is not a gap a fork can close;
|
|
27
|
+
* Yoga is the native runtime's engine. Grid is right where the target is a
|
|
28
|
+
* browser, and `Grid` exists for that. A shell has to work on both, so it is
|
|
29
|
+
* flexbox on the inside and neither caller has to know.
|
|
30
|
+
*/
|
|
31
|
+
import { type YStackProps } from '@hanzo/gui';
|
|
32
|
+
export interface ScreenProps extends YStackProps {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The frame. A column that fills its parent and CLIPS — clipping is half the
|
|
36
|
+
* contract, because a shell whose content escapes is the same defect one level
|
|
37
|
+
* out, and `overflow: visible` is what let the thread paint over the composer.
|
|
38
|
+
*/
|
|
39
|
+
declare const Screen: ({ children, ...props }: ScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export interface FillProps extends YStackProps {
|
|
41
|
+
/** Scroll the overflow. `false` clips it instead — for a pane that pages. */
|
|
42
|
+
scroll?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The middle. Takes the slack, and can give it back.
|
|
46
|
+
*
|
|
47
|
+
* `flexBasis: 0` with `minHeight: 0` is the pair that makes "takes the slack"
|
|
48
|
+
* true in both directions: grow into a bigger shell, shrink inside a smaller
|
|
49
|
+
* one. Siblings need nothing — a bar keeps its natural height because it never
|
|
50
|
+
* asked for slack.
|
|
51
|
+
*/
|
|
52
|
+
declare const Fill: ({ children, scroll, ...props }: FillProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export { Screen, Fill };
|
|
54
|
+
//# sourceMappingURL=screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/screen.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA;AAGrD,MAAM,WAAW,WAAY,SAAQ,WAAW;CAAG;AAEnD;;;;GAIG;AACH,QAAA,MAAM,MAAM,GAAI,wBAAwB,WAAW,4CAkBlD,CAAA;AAED,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C,6EAA6E;IAC7E,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,IAAI,GAAI,gCAAuC,SAAS,4CAY7D,CAAA;AAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Screen — an app shell, once, so nobody re-derives it.
|
|
5
|
+
*
|
|
6
|
+
* The shape is always the same: something pinned at the top, something pinned at
|
|
7
|
+
* the bottom, and a middle that takes whatever is left and scrolls. Chat writes
|
|
8
|
+
* it, the console writes it, every workbench pane writes it. Written by hand it
|
|
9
|
+
* is two declarations, and BOTH have to be right or the failure is silent:
|
|
10
|
+
*
|
|
11
|
+
* `flex: 1` alone gives the middle the slack…
|
|
12
|
+
* `minHeight: 0` is what lets it actually shrink to take it.
|
|
13
|
+
*
|
|
14
|
+
* Without the second, a flex item's automatic minimum is its CONTENT, so the
|
|
15
|
+
* middle refuses to go below its natural height, grows the shell instead, and —
|
|
16
|
+
* because a scroll container that never overflows never scrolls — paints its
|
|
17
|
+
* content straight over whatever follows. Measured in this package: `Thread`
|
|
18
|
+
* rendered 976px of turns in a 332px box and drew every one of them across the
|
|
19
|
+
* composer. 37 files here set `flex={1}`; exactly one had ever written the
|
|
20
|
+
* second declaration, and only after that bug was found.
|
|
21
|
+
*
|
|
22
|
+
* So the rule stops being a rule. `Fill` IS the middle, with both halves and the
|
|
23
|
+
* clip built in, and a caller cannot forget a thing it does not have to write.
|
|
24
|
+
*
|
|
25
|
+
* WHY NOT CSS GRID, which expresses this as one line — `grid-template-rows: auto
|
|
26
|
+
* 1fr auto` — with no escape hatch at all: because this package's premise is that
|
|
27
|
+
* one import runs on web AND native, and React Native lays out through Yoga,
|
|
28
|
+
* which implements flexbox and has no grid. That is not a gap a fork can close;
|
|
29
|
+
* Yoga is the native runtime's engine. Grid is right where the target is a
|
|
30
|
+
* browser, and `Grid` exists for that. A shell has to work on both, so it is
|
|
31
|
+
* flexbox on the inside and neither caller has to know.
|
|
32
|
+
*/
|
|
33
|
+
import { YStack } from '@hanzo/gui';
|
|
34
|
+
import { slot } from './slot.js';
|
|
35
|
+
/**
|
|
36
|
+
* The frame. A column that fills its parent and CLIPS — clipping is half the
|
|
37
|
+
* contract, because a shell whose content escapes is the same defect one level
|
|
38
|
+
* out, and `overflow: visible` is what let the thread paint over the composer.
|
|
39
|
+
*/
|
|
40
|
+
const Screen = ({ children, ...props }) => (_jsx(YStack, { ...slot('screen'),
|
|
41
|
+
// `flexBasis: auto`, not the 0 that `flex={1}` alone implies. A shell is
|
|
42
|
+
// usually the only thing in its parent, where either spelling fills it — but
|
|
43
|
+
// put one in a ROW beside siblings and a zero basis makes it share the line
|
|
44
|
+
// rather than take it, so a 720px shell rendered 276px wide. Basis auto
|
|
45
|
+
// starts from its own size and grows into whatever is left, which is what
|
|
46
|
+
// "fills its parent" has to mean in both directions. Same trap as the thread.
|
|
47
|
+
flex: 1, flexBasis: "auto", minH: 0, width: "100%", overflow: "hidden", ...props, children: children }));
|
|
48
|
+
/**
|
|
49
|
+
* The middle. Takes the slack, and can give it back.
|
|
50
|
+
*
|
|
51
|
+
* `flexBasis: 0` with `minHeight: 0` is the pair that makes "takes the slack"
|
|
52
|
+
* true in both directions: grow into a bigger shell, shrink inside a smaller
|
|
53
|
+
* one. Siblings need nothing — a bar keeps its natural height because it never
|
|
54
|
+
* asked for slack.
|
|
55
|
+
*/
|
|
56
|
+
const Fill = ({ children, scroll = true, ...props }) => (_jsx(YStack, { ...slot('fill'), flex: 1, flexBasis: 0, minH: 0, width: "100%", overflowY: scroll ? 'auto' : 'hidden', ...props, children: children }));
|
|
57
|
+
export { Screen, Fill };
|
|
58
|
+
//# sourceMappingURL=screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen.js","sourceRoot":"","sources":["../../../src/backends/gui/screen.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,MAAM,EAAoB,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAI7B;;;;GAIG;AACH,MAAM,MAAM,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAe,EAAE,EAAE,CAAC,CACtD,KAAC,MAAM,OACD,IAAI,CAAC,QAAQ,CAAC;IAClB,yEAAyE;IACzE,6EAA6E;IAC7E,4EAA4E;IAC5E,wEAAwE;IACxE,0EAA0E;IAC1E,8EAA8E;IAC9E,IAAI,EAAE,CAAC,EACP,SAAS,EAAC,MAAM,EAChB,IAAI,EAAE,CAAC,EACP,KAAK,EAAC,MAAM,EACZ,QAAQ,EAAC,QAAQ,KACb,KAAK,YAER,QAAQ,GACF,CACV,CAAA;AAOD;;;;;;;GAOG;AACH,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,KAAK,EAAa,EAAE,EAAE,CAAC,CACjE,KAAC,MAAM,OACD,IAAI,CAAC,MAAM,CAAC,EAChB,IAAI,EAAE,CAAC,EACP,SAAS,EAAE,CAAC,EACZ,IAAI,EAAE,CAAC,EACP,KAAK,EAAC,MAAM,EACZ,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,KACjC,KAAK,YAER,QAAQ,GACF,CACV,CAAA;AAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA"}
|
package/dist/gallery.cjs
CHANGED
|
@@ -77,15 +77,6 @@ const Gallery = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex'
|
|
|
77
77
|
tabs: [
|
|
78
78
|
{ id: 'console', title: 'Console', closable: false, content: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "console" }) },
|
|
79
79
|
],
|
|
80
|
-
}, children: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "center" }) }) }) }), (0, jsx_runtime_1.jsxs)(Section, { name: "product-arrangements", children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: 12, width: '100%', maxWidth: 320 }, children: [(0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { width: 120 }), (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { width: "100%", height: 72, rounded: "$4" }), (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton.Text, { lines: 3 })] }), (0, jsx_runtime_1.jsx)(TooltipAnchor_1.TooltipAnchor, { description: "Delete this agent", children: (0, jsx_runtime_1.jsx)(gui_1.Button, { children: "hinted" }) }), (0, jsx_runtime_1.jsx)(gui_1.Dialog, { open: true, children: (0, jsx_runtime_1.jsx)(DialogTemplate_1.DialogTemplate, { title: "Delete agent", description: "This removes every run recorded against it.", confirm: { label: 'Delete', tone: 'danger' }, children: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "body" }) }) })] }), (0, jsx_runtime_1.jsxs)(Section, { name: "chat", children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
81
|
-
display: 'flex',
|
|
82
|
-
flexDirection: 'column',
|
|
83
|
-
gap: 12,
|
|
84
|
-
width: '100%',
|
|
85
|
-
maxWidth: 720,
|
|
86
|
-
height: 'min(72vh, 620px)',
|
|
87
|
-
minHeight: 420,
|
|
88
|
-
overflow: 'hidden',
|
|
89
|
-
}, children: [(0, jsx_runtime_1.jsxs)(chat_1.Header, { title: "A conversation with a long enough name to clamp", leading: (0, jsx_runtime_1.jsx)(chat_1.AsideToggle, {}), onOpenMenu: NOOP, children: [(0, jsx_runtime_1.jsx)(chat_1.ShareButton, {}), (0, jsx_runtime_1.jsx)(chat_1.AsideToggle, {})] }), (0, jsx_runtime_1.jsxs)(chat_1.Thread, { children: [(0, jsx_runtime_1.jsx)(chat_1.Message, { role: "user", children: "ask" }), (0, jsx_runtime_1.jsxs)(chat_1.Message, { role: "assistant", icon: (0, jsx_runtime_1.jsx)(gui_1.Spinner, {}), actions: (0, jsx_runtime_1.jsx)(gui_1.Badge, { children: "copy" }), children: [(0, jsx_runtime_1.jsx)(chat_1.Step, { name: "shell", status: "running", detail: "git status --porcelain" }), (0, jsx_runtime_1.jsx)(chat_1.Step, { name: "write", status: "done", detail: "src/index.ts", defaultOpen: true, children: (0, jsx_runtime_1.jsx)(chat_1.Code, { language: "json", value: "{}", children: '{}' }) }), (0, jsx_runtime_1.jsx)(chat_1.Step, { name: "fetch", status: "error", detail: "timed out", children: "plain body" }), (0, jsx_runtime_1.jsx)(chat_1.Step, { name: "plan", status: "cancelled" }), (0, jsx_runtime_1.jsx)(chat_1.Code, { language: "typescript", value: "const x = 1", children: "const x = 1" }), (0, jsx_runtime_1.jsx)(chat_1.Sources, { sources: SOURCES })] }), (0, jsx_runtime_1.jsx)(chat_1.Message, { role: "assistant", busy: true, children: "answering" }), (0, jsx_runtime_1.jsx)(chat_1.Message, { role: "assistant", children: (0, jsx_runtime_1.jsx)(chat_1.Failure, { onRetry: NOOP, children: "The model stopped before finishing." }) }), (0, jsx_runtime_1.jsx)(chat_1.Message, { role: "assistant", children: (0, jsx_runtime_1.jsx)(chat_1.Failure, { children: "Rate limited." }) }), (0, jsx_runtime_1.jsx)(chat_1.Message, { role: "user", body: { bg: '$color5', rounded: '$3' }, children: "restyled bubble" }), (0, jsx_runtime_1.jsx)(chat_1.Message, { role: "system", children: "note" })] }), (0, jsx_runtime_1.jsx)(chat_1.Composer, { value: "a draft", onChange: NOOP, onSend: NOOP, hint: "Enter to send", children: (0, jsx_runtime_1.jsx)(gui_1.Badge, { children: "tool" }) }), (0, jsx_runtime_1.jsx)(chat_1.Composer, { value: "", onChange: NOOP, onSend: NOOP, onStop: NOOP, busy: true })] }), (0, jsx_runtime_1.jsx)(chat_1.Aside, { children: (0, jsx_runtime_1.jsx)(chat_1.Sources, { sources: SOURCES }) }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', width: '100%', maxWidth: 260, height: 320 }, children: (0, jsx_runtime_1.jsxs)(chat_1.Sidebar, { children: [(0, jsx_runtime_1.jsx)(chat_1.SidebarHeader, { title: "Hanzo", onOpenSwitcher: NOOP, onSearch: NOOP, onCollapse: NOOP }), (0, jsx_runtime_1.jsx)(chat_1.SidebarNewChat, { onPress: NOOP }), (0, jsx_runtime_1.jsxs)(chat_1.SidebarScroll, { children: [(0, jsx_runtime_1.jsxs)(chat_1.SidebarSection, { label: "Today", children: [(0, jsx_runtime_1.jsx)(chat_1.SidebarItem, { active: true, onPress: NOOP, children: "Selected thread" }), (0, jsx_runtime_1.jsx)(chat_1.SidebarItem, { onPress: NOOP, children: "Another thread" })] }), (0, jsx_runtime_1.jsx)(chat_1.SidebarFolder, { name: "Archive", defaultOpen: true, children: (0, jsx_runtime_1.jsx)(chat_1.SidebarItem, { onPress: NOOP, children: "Nested thread" }) })] }), (0, jsx_runtime_1.jsx)(chat_1.SidebarUser, { name: "z", secondary: "z@hanzo.ai", onPress: NOOP, onHelp: NOOP })] }) })] }), (0, jsx_runtime_1.jsxs)(Section, { name: "box", children: [(0, jsx_runtime_1.jsx)(box_1.Box, { className: "flex items-center gap-4 px-6 py-3 rounded-lg border", children: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "utility classes" }) }), (0, jsx_runtime_1.jsx)(box_1.Box, { className: "flex-col gap-2 max-w-3xl mx-auto overflow-hidden", children: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "column" }) })] })] }));
|
|
80
|
+
}, children: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "center" }) }) }) }), (0, jsx_runtime_1.jsxs)(Section, { name: "product-arrangements", children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: 12, width: '100%', maxWidth: 320 }, children: [(0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { width: 120 }), (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { width: "100%", height: 72, rounded: "$4" }), (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton.Text, { lines: 3 })] }), (0, jsx_runtime_1.jsx)(TooltipAnchor_1.TooltipAnchor, { description: "Delete this agent", children: (0, jsx_runtime_1.jsx)(gui_1.Button, { children: "hinted" }) }), (0, jsx_runtime_1.jsx)(gui_1.Dialog, { open: true, children: (0, jsx_runtime_1.jsx)(DialogTemplate_1.DialogTemplate, { title: "Delete agent", description: "This removes every run recorded against it.", confirm: { label: 'Delete', tone: 'danger' }, children: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "body" }) }) })] }), (0, jsx_runtime_1.jsxs)(Section, { name: "chat", children: [(0, jsx_runtime_1.jsxs)(gui_1.Screen, { height: "min(72vh, 620px)", minH: 420, maxW: 720, gap: "$3", children: [(0, jsx_runtime_1.jsxs)(chat_1.Header, { title: "A conversation with a long enough name to clamp", leading: (0, jsx_runtime_1.jsx)(chat_1.AsideToggle, {}), onOpenMenu: NOOP, children: [(0, jsx_runtime_1.jsx)(chat_1.ShareButton, {}), (0, jsx_runtime_1.jsx)(chat_1.AsideToggle, {})] }), (0, jsx_runtime_1.jsx)(gui_1.Fill, { children: (0, jsx_runtime_1.jsx)(chat_1.Message, { role: "user", children: "plain Fill \u2014 the middle, without a Thread" }) }), (0, jsx_runtime_1.jsxs)(chat_1.Thread, { children: [(0, jsx_runtime_1.jsx)(chat_1.Message, { role: "user", children: "ask" }), (0, jsx_runtime_1.jsxs)(chat_1.Message, { role: "assistant", icon: (0, jsx_runtime_1.jsx)(gui_1.Spinner, {}), actions: (0, jsx_runtime_1.jsx)(gui_1.Badge, { children: "copy" }), children: [(0, jsx_runtime_1.jsx)(chat_1.Step, { name: "shell", status: "running", detail: "git status --porcelain" }), (0, jsx_runtime_1.jsx)(chat_1.Step, { name: "write", status: "done", detail: "src/index.ts", defaultOpen: true, children: (0, jsx_runtime_1.jsx)(chat_1.Code, { language: "json", value: "{}", children: '{}' }) }), (0, jsx_runtime_1.jsx)(chat_1.Step, { name: "fetch", status: "error", detail: "timed out", children: "plain body" }), (0, jsx_runtime_1.jsx)(chat_1.Step, { name: "plan", status: "cancelled" }), (0, jsx_runtime_1.jsx)(chat_1.Code, { language: "typescript", value: "const x = 1", children: "const x = 1" }), (0, jsx_runtime_1.jsx)(chat_1.Sources, { sources: SOURCES })] }), (0, jsx_runtime_1.jsx)(chat_1.Message, { role: "assistant", busy: true, children: "answering" }), (0, jsx_runtime_1.jsx)(chat_1.Message, { role: "assistant", children: (0, jsx_runtime_1.jsx)(chat_1.Failure, { onRetry: NOOP, children: "The model stopped before finishing." }) }), (0, jsx_runtime_1.jsx)(chat_1.Message, { role: "assistant", children: (0, jsx_runtime_1.jsx)(chat_1.Failure, { children: "Rate limited." }) }), (0, jsx_runtime_1.jsx)(chat_1.Message, { role: "user", body: { bg: '$color5', rounded: '$3' }, children: "restyled bubble" }), (0, jsx_runtime_1.jsx)(chat_1.Message, { role: "system", children: "note" })] }), (0, jsx_runtime_1.jsx)(chat_1.Composer, { value: "a draft", onChange: NOOP, onSend: NOOP, hint: "Enter to send", children: (0, jsx_runtime_1.jsx)(gui_1.Badge, { children: "tool" }) }), (0, jsx_runtime_1.jsx)(chat_1.Composer, { value: "", onChange: NOOP, onSend: NOOP, onStop: NOOP, busy: true })] }), (0, jsx_runtime_1.jsx)(chat_1.Aside, { children: (0, jsx_runtime_1.jsx)(chat_1.Sources, { sources: SOURCES }) }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', width: '100%', maxWidth: 260, height: 320 }, children: (0, jsx_runtime_1.jsxs)(chat_1.Sidebar, { children: [(0, jsx_runtime_1.jsx)(chat_1.SidebarHeader, { title: "Hanzo", onOpenSwitcher: NOOP, onSearch: NOOP, onCollapse: NOOP }), (0, jsx_runtime_1.jsx)(chat_1.SidebarNewChat, { onPress: NOOP }), (0, jsx_runtime_1.jsxs)(chat_1.SidebarScroll, { children: [(0, jsx_runtime_1.jsxs)(chat_1.SidebarSection, { label: "Today", children: [(0, jsx_runtime_1.jsx)(chat_1.SidebarItem, { active: true, onPress: NOOP, children: "Selected thread" }), (0, jsx_runtime_1.jsx)(chat_1.SidebarItem, { onPress: NOOP, children: "Another thread" })] }), (0, jsx_runtime_1.jsx)(chat_1.SidebarFolder, { name: "Archive", defaultOpen: true, children: (0, jsx_runtime_1.jsx)(chat_1.SidebarItem, { onPress: NOOP, children: "Nested thread" }) })] }), (0, jsx_runtime_1.jsx)(chat_1.SidebarUser, { name: "z", secondary: "z@hanzo.ai", onPress: NOOP, onHelp: NOOP })] }) })] }), (0, jsx_runtime_1.jsxs)(Section, { name: "box", children: [(0, jsx_runtime_1.jsx)(box_1.Box, { className: "flex items-center gap-4 px-6 py-3 rounded-lg border", children: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "utility classes" }) }), (0, jsx_runtime_1.jsx)(box_1.Box, { className: "flex-col gap-2 max-w-3xl mx-auto overflow-hidden", children: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "column" }) })] })] }));
|
|
90
81
|
exports.Gallery = Gallery;
|
|
91
82
|
exports.default = exports.Gallery;
|
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":"AAyIA;;;GAGG;AACH,eAAO,MAAM,OAAO,+CAwhBnB,CAAA;AAED,eAAe,OAAO,CAAA"}
|