@hanzo/ui 8.0.117 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/backends/gui/place.cjs +13 -5
  2. package/dist/backends/gui/place.d.ts +9 -2
  3. package/dist/backends/gui/place.d.ts.map +1 -1
  4. package/dist/backends/gui/place.js +13 -5
  5. package/dist/backends/gui/place.js.map +1 -1
  6. package/dist/gallery.cjs +4 -1
  7. package/dist/gallery.d.ts.map +1 -1
  8. package/dist/gallery.js +4 -1
  9. package/dist/gallery.js.map +1 -1
  10. package/dist/product/DialogTemplate.cjs +23 -0
  11. package/dist/product/DialogTemplate.d.ts +55 -0
  12. package/dist/product/DialogTemplate.d.ts.map +1 -0
  13. package/dist/product/DialogTemplate.js +21 -0
  14. package/dist/product/DialogTemplate.js.map +1 -0
  15. package/dist/product/Skeleton.cjs +33 -0
  16. package/dist/product/Skeleton.d.ts +34 -0
  17. package/dist/product/Skeleton.d.ts.map +1 -0
  18. package/dist/product/Skeleton.js +31 -0
  19. package/dist/product/Skeleton.js.map +1 -0
  20. package/dist/product/Toast.cjs +23 -5
  21. package/dist/product/Toast.d.ts +23 -3
  22. package/dist/product/Toast.d.ts.map +1 -1
  23. package/dist/product/Toast.js +25 -7
  24. package/dist/product/Toast.js.map +1 -1
  25. package/dist/product/TooltipAnchor.cjs +37 -0
  26. package/dist/product/TooltipAnchor.d.ts +42 -0
  27. package/dist/product/TooltipAnchor.d.ts.map +1 -0
  28. package/dist/product/TooltipAnchor.js +35 -0
  29. package/dist/product/TooltipAnchor.js.map +1 -0
  30. package/dist/product/index.cjs +8 -0
  31. package/dist/product/index.d.ts +3 -0
  32. package/dist/product/index.d.ts.map +1 -1
  33. package/dist/product/index.js +8 -0
  34. package/dist/product/index.js.map +1 -1
  35. package/dist/styles/motion.css +7 -4
  36. package/dist/styles.css +10 -4
  37. package/package.json +1 -1
@@ -23,12 +23,20 @@ exports.place = void 0;
23
23
  * side that already carries one is RE-aligned rather than appended to — so the
24
24
  * result is always a legal placement and applying it twice changes nothing.
25
25
  *
26
- * place('bottom') === 'bottom'
27
- * place('bottom', 'start') === 'bottom-start'
26
+ * An align that is not named does not mean centre. A side arrives already
27
+ * carrying its own alignment whenever the root was given a whole placement, and
28
+ * only a Content that names one has anything to say about it — so the carried
29
+ * suffix survives, and naming `center` is how a caller re-centres on purpose.
30
+ *
31
+ * place('bottom') === 'bottom'
32
+ * place('bottom', 'start') === 'bottom-start'
33
+ * place('bottom-start') === 'bottom-start'
28
34
  * place('bottom-end', 'start') === 'bottom-start'
35
+ * place('bottom-start', 'center') === 'bottom'
29
36
  */
30
- const place = (side, align = 'center') => {
31
- const base = side.split('-')[0];
32
- return align === 'center' ? base : `${base}-${align}`;
37
+ const place = (side, align) => {
38
+ const [base, carried] = side.split('-');
39
+ const named = align ?? carried;
40
+ return !named || named === 'center' ? base : `${base}-${named}`;
33
41
  };
34
42
  exports.place = place;
@@ -24,9 +24,16 @@ export type Align = 'start' | 'center' | 'end';
24
24
  * side that already carries one is RE-aligned rather than appended to — so the
25
25
  * result is always a legal placement and applying it twice changes nothing.
26
26
  *
27
- * place('bottom') === 'bottom'
28
- * place('bottom', 'start') === 'bottom-start'
27
+ * An align that is not named does not mean centre. A side arrives already
28
+ * carrying its own alignment whenever the root was given a whole placement, and
29
+ * only a Content that names one has anything to say about it — so the carried
30
+ * suffix survives, and naming `center` is how a caller re-centres on purpose.
31
+ *
32
+ * place('bottom') === 'bottom'
33
+ * place('bottom', 'start') === 'bottom-start'
34
+ * place('bottom-start') === 'bottom-start'
29
35
  * place('bottom-end', 'start') === 'bottom-start'
36
+ * place('bottom-start', 'center') === 'bottom'
30
37
  */
31
38
  export declare const place: (side: string, align?: Align) => string;
32
39
  //# sourceMappingURL=place.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"place.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/place.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oDAAoD;AACpD,MAAM,MAAM,IAAI,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAEtD,gDAAgD;AAChD,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;AAE9C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,EAAE,QAAO,KAAgB,KAAG,MAG7D,CAAA"}
1
+ {"version":3,"file":"place.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/place.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oDAAoD;AACpD,MAAM,MAAM,IAAI,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAEtD,gDAAgD;AAChD,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;AAE9C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,EAAE,QAAQ,KAAK,KAAG,MAInD,CAAA"}
@@ -20,12 +20,20 @@
20
20
  * side that already carries one is RE-aligned rather than appended to — so the
21
21
  * result is always a legal placement and applying it twice changes nothing.
22
22
  *
23
- * place('bottom') === 'bottom'
24
- * place('bottom', 'start') === 'bottom-start'
23
+ * An align that is not named does not mean centre. A side arrives already
24
+ * carrying its own alignment whenever the root was given a whole placement, and
25
+ * only a Content that names one has anything to say about it — so the carried
26
+ * suffix survives, and naming `center` is how a caller re-centres on purpose.
27
+ *
28
+ * place('bottom') === 'bottom'
29
+ * place('bottom', 'start') === 'bottom-start'
30
+ * place('bottom-start') === 'bottom-start'
25
31
  * place('bottom-end', 'start') === 'bottom-start'
32
+ * place('bottom-start', 'center') === 'bottom'
26
33
  */
27
- export const place = (side, align = 'center') => {
28
- const base = side.split('-')[0];
29
- return align === 'center' ? base : `${base}-${align}`;
34
+ export const place = (side, align) => {
35
+ const [base, carried] = side.split('-');
36
+ const named = align ?? carried;
37
+ return !named || named === 'center' ? base : `${base}-${named}`;
30
38
  };
31
39
  //# sourceMappingURL=place.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"place.js","sourceRoot":"","sources":["../../../src/backends/gui/place.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,IAAY,EAAE,QAAe,QAAQ,EAAU,EAAE;IACrE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/B,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,KAAK,EAAE,CAAA;AACvD,CAAC,CAAA"}
1
+ {"version":3,"file":"place.js","sourceRoot":"","sources":["../../../src/backends/gui/place.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,IAAY,EAAE,KAAa,EAAU,EAAE;IAC3D,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACvC,MAAM,KAAK,GAAG,KAAK,IAAK,OAA6B,CAAA;IACrD,OAAO,CAAC,KAAK,IAAI,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,KAAK,EAAE,CAAA;AACjE,CAAC,CAAA"}
package/dist/gallery.cjs CHANGED
@@ -5,6 +5,9 @@ exports.Gallery = void 0;
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const box_1 = require("./box.cjs");
7
7
  const Workbench_1 = require("./product/Workbench.cjs");
8
+ const Skeleton_1 = require("./product/Skeleton.cjs");
9
+ const TooltipAnchor_1 = require("./product/TooltipAnchor.cjs");
10
+ const DialogTemplate_1 = require("./product/DialogTemplate.cjs");
8
11
  const gui_1 = require("./backends/gui/index.cjs");
9
12
  /** A real <img> with real intrinsic pixels, inline so nothing hits the network.
10
13
  * 120x40 on purpose: the wrong ratio for every box it goes in, so a frame that
@@ -42,6 +45,6 @@ const Gallery = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex'
42
45
  tabs: [
43
46
  { id: 'console', title: 'Console', closable: false, content: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "console" }) },
44
47
  ],
45
- }, children: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "center" }) }) }) }), (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" }) })] })] }));
48
+ }, 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: 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: "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" }) })] })] }));
46
49
  exports.Gallery = Gallery;
47
50
  exports.default = exports.Gallery;
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../src/gallery.tsx"],"names":[],"mappings":"AA8EA;;;GAGG;AACH,eAAO,MAAM,OAAO,+CAkZnB,CAAA;AAED,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../src/gallery.tsx"],"names":[],"mappings":"AAiFA;;;GAGG;AACH,eAAO,MAAM,OAAO,+CA+anB,CAAA;AAED,eAAe,OAAO,CAAA"}
package/dist/gallery.js CHANGED
@@ -2,6 +2,9 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Box } from './box.js';
4
4
  import { Workbench } from './product/Workbench.js';
5
+ import { Skeleton } from './product/Skeleton.js';
6
+ import { TooltipAnchor } from './product/TooltipAnchor.js';
7
+ import { DialogTemplate } from './product/DialogTemplate.js';
5
8
  import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, RadioGroup, RadioGroupItem, ToggleGroup, ToggleGroupItem, AspectRatio, Avatar, AvatarFallback, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Input, Label, Popover, PopoverContent, PopoverTrigger, Progress, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Separator, Slider, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Grid, Section as PageSection, CardMedia, CommandDialog, Spinner, } from './backends/gui/index.js';
6
9
  /** A real <img> with real intrinsic pixels, inline so nothing hits the network.
7
10
  * 120x40 on purpose: the wrong ratio for every box it goes in, so a frame that
@@ -39,6 +42,6 @@ export const Gallery = () => (_jsxs("div", { style: { display: 'flex', flexDirec
39
42
  tabs: [
40
43
  { id: 'console', title: 'Console', closable: false, content: _jsx(CardTitle, { children: "console" }) },
41
44
  ],
42
- }, children: _jsx(CardTitle, { children: "center" }) }) }) }), _jsxs(Section, { name: "box", children: [_jsx(Box, { className: "flex items-center gap-4 px-6 py-3 rounded-lg border", children: _jsx(CardTitle, { children: "utility classes" }) }), _jsx(Box, { className: "flex-col gap-2 max-w-3xl mx-auto overflow-hidden", children: _jsx(CardTitle, { children: "column" }) })] })] }));
45
+ }, children: _jsx(CardTitle, { children: "center" }) }) }) }), _jsxs(Section, { name: "product-arrangements", children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 12, width: 320 }, children: [_jsx(Skeleton, { width: 120 }), _jsx(Skeleton, { width: "100%", height: 72, rounded: "$4" }), _jsx(Skeleton.Text, { lines: 3 })] }), _jsx(TooltipAnchor, { description: "Delete this agent", children: _jsx(Button, { children: "hinted" }) }), _jsx(Dialog, { open: true, children: _jsx(DialogTemplate, { title: "Delete agent", description: "This removes every run recorded against it.", confirm: { label: 'Delete', tone: 'danger' }, children: _jsx(CardTitle, { children: "body" }) }) })] }), _jsxs(Section, { name: "box", children: [_jsx(Box, { className: "flex items-center gap-4 px-6 py-3 rounded-lg border", children: _jsx(CardTitle, { children: "utility classes" }) }), _jsx(Box, { className: "flex-col gap-2 max-w-3xl mx-auto overflow-hidden", children: _jsx(CardTitle, { children: "column" }) })] })] }));
43
46
  export default Gallery;
44
47
  //# sourceMappingURL=gallery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.js","sourceRoot":"","sources":["../src/gallery.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAwBZ,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,OAAO,EACL,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAC5F,iBAAiB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,iBAAiB,EAChF,iBAAiB,EAAE,gBAAgB,EAAE,WAAW,EAAE,kBAAkB,EAAE,eAAe,EACrF,gBAAgB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,SAAS,EAAE,gBAAgB,EACvF,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAC1E,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EACjF,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EACzE,kBAAkB,EAAE,kBAAkB,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EACzF,WAAW,E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9F;qBACF,YAED,KAAC,SAAS,yBAAmB,GACnB,GACR,GACE,EAUV,MAAC,OAAO,IAAC,IAAI,EAAC,sBAAsB,aAClC,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,aAC3E,KAAC,QAAQ,IAAC,KAAK,EAAE,GAAG,GAAI,EACxB,KAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAE,EAAE,EAAE,OAAO,EAAC,IAAI,GAAG,EAClD,KAAC,QAAQ,CAAC,IAAI,IAAC,KAAK,EAAE,CAAC,GAAI,IACvB,EACN,KAAC,aAAa,IAAC,WAAW,EAAC,mBAAmB,YAC5C,KAAC,MAAM,yBAAgB,GACT,EAGhB,KAAC,MAAM,IAAC,IAAI,kBACV,KAAC,cAAc,IACb,KAAK,EAAC,cAAc,EACpB,WAAW,EAAC,6CAA6C,EACzD,OAAO,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,YAE5C,KAAC,SAAS,uBAAiB,GACZ,GACV,IACD,EAIV,MAAC,OAAO,IAAC,IAAI,EAAC,KAAK,aACjB,KAAC,GAAG,IAAC,SAAS,EAAC,qDAAqD,YAClE,KAAC,SAAS,kCAA4B,GAClC,EACN,KAAC,GAAG,IAAC,SAAS,EAAC,kDAAkD,YAC/D,KAAC,SAAS,yBAAmB,GACzB,IACE,IAEN,CACP,CAAA;AAED,eAAe,OAAO,CAAA"}
@@ -0,0 +1,23 @@
1
+ 'use client';"use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.DialogTemplate = DialogTemplate;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const gui_1 = require("@hanzo/gui");
7
+ const dialog_1 = require("../backends/gui/dialog.cjs");
8
+ const PrimaryButton_1 = require("./PrimaryButton.cjs");
9
+ /**
10
+ * The affirmative action. `PrimaryButton` is the console's one high-emphasis
11
+ * button, so it draws the ordinary confirm; a destructive one takes the neutral
12
+ * Button in the red theme instead, per that component's own rule that
13
+ * destructive actions do not wear the primary fill. A delete should not be the
14
+ * brightest thing on screen.
15
+ */
16
+ function Confirm({ label, onPress, tone, disabled, busy }) {
17
+ const off = busy || disabled;
18
+ return tone === 'danger' ? ((0, jsx_runtime_1.jsx)(gui_1.Button, { theme: "red", disabled: off, onPress: onPress, children: label })) : ((0, jsx_runtime_1.jsx)(PrimaryButton_1.PrimaryButton, { disabled: off, onPress: onPress, children: label }));
19
+ }
20
+ function DialogTemplate({ title, description, children, confirm, cancelLabel = 'Cancel', showCancel = true, leftActions, busy = false, ...content }) {
21
+ const footer = showCancel || confirm || leftActions;
22
+ return ((0, jsx_runtime_1.jsxs)(dialog_1.DialogContent, { ...content, children: [(0, jsx_runtime_1.jsxs)(dialog_1.DialogHeader, { children: [(0, jsx_runtime_1.jsx)(dialog_1.DialogTitle, { children: title }), description ? (0, jsx_runtime_1.jsx)(dialog_1.DialogDescription, { children: description }) : null] }), children ? (0, jsx_runtime_1.jsx)(gui_1.YStack, { gap: "$3", children: children }) : null, footer ? ((0, jsx_runtime_1.jsxs)(dialog_1.DialogFooter, { justify: leftActions ? 'space-between' : 'flex-end', children: [leftActions ? ((0, jsx_runtime_1.jsx)(gui_1.XStack, { gap: "$2", items: "center", children: leftActions })) : null, (0, jsx_runtime_1.jsxs)(gui_1.XStack, { gap: "$2", items: "center", children: [showCancel ? ((0, jsx_runtime_1.jsx)(dialog_1.DialogClose, { asChild: true, children: (0, jsx_runtime_1.jsx)(gui_1.Button, { disabled: busy, children: cancelLabel }) })) : null, confirm ? (0, jsx_runtime_1.jsx)(Confirm, { ...confirm, busy: busy }) : null] })] })) : null] }));
23
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * DialogTemplate — the shape almost every dialog already is.
3
+ *
4
+ * The Dialog primitive gives you a box and the parts to fill it. Nearly every
5
+ * dialog then fills them the same way: a title, an optional line of
6
+ * explanation, a body, and a right-aligned row of buttons with cancel on the
7
+ * left of confirm. Measured on a real surface, 31 call sites had written that
8
+ * arrangement out by hand, which is 31 chances to order the buttons differently.
9
+ *
10
+ * So the arrangement is the component and the content is the props. The parts
11
+ * stay exported for a dialog that genuinely is not this shape — a full-bleed
12
+ * preview, a wizard — and reaching for them is the honest signal that you have
13
+ * left the common case.
14
+ *
15
+ * <Dialog open={open} onOpenChange={setOpen}>
16
+ * <DialogTemplate
17
+ * title="Delete agent"
18
+ * description="This removes every run recorded against it."
19
+ * confirm={{ label: 'Delete', tone: 'danger', onPress: remove }}
20
+ * />
21
+ * </Dialog>
22
+ *
23
+ * Cancel is rendered unless you turn it off, because a dialog you cannot back
24
+ * out of is a trap; it closes the dialog on its own through `DialogClose`, so
25
+ * the caller does not wire dismissal. `busy` disables both buttons rather than
26
+ * only the confirm, so a slow request cannot be cancelled halfway into itself.
27
+ */
28
+ import type { ComponentProps, ReactNode } from 'react';
29
+ import { DialogContent } from '../backends/gui/dialog.js';
30
+ /** A dialog's action. `tone: 'danger'` is for the one that destroys something. */
31
+ export type DialogAction = {
32
+ label: string;
33
+ onPress?: () => void;
34
+ tone?: 'default' | 'danger';
35
+ disabled?: boolean;
36
+ };
37
+ export type DialogTemplateProps = Omit<ComponentProps<typeof DialogContent>, 'title'> & {
38
+ title: ReactNode;
39
+ /** One line under the title. A paragraph belongs in `children`. */
40
+ description?: ReactNode;
41
+ /** The body. Omit it for a plain confirm. */
42
+ children?: ReactNode;
43
+ /** The affirmative action. Omit it for a dialog that only informs. */
44
+ confirm?: DialogAction;
45
+ /** Overrides the cancel label. */
46
+ cancelLabel?: string;
47
+ /** Drops cancel — only for a dialog with no way to get it wrong. */
48
+ showCancel?: boolean;
49
+ /** Extra controls, left-aligned opposite the confirm pair. */
50
+ leftActions?: ReactNode;
51
+ /** A request is in flight: both actions are disabled. */
52
+ busy?: boolean;
53
+ };
54
+ export declare function DialogTemplate({ title, description, children, confirm, cancelLabel, showCancel, leftActions, busy, ...content }: DialogTemplateProps): import("react/jsx-runtime").JSX.Element;
55
+ //# sourceMappingURL=DialogTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogTemplate.d.ts","sourceRoot":"","sources":["../../src/product/DialogTemplate.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtD,OAAO,EAEL,aAAa,EAKd,MAAM,wBAAwB,CAAA;AAG/B,kFAAkF;AAClF,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EAAE,OAAO,CAAC,GAAG;IACtF,KAAK,EAAE,SAAS,CAAA;IAChB,mEAAmE;IACnE,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,sEAAsE;IACtE,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oEAAoE;IACpE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,yDAAyD;IACzD,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAsBD,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,WAAW,EACX,QAAQ,EACR,OAAO,EACP,WAAsB,EACtB,UAAiB,EACjB,WAAW,EACX,IAAY,EACZ,GAAG,OAAO,EACX,EAAE,mBAAmB,2CA8BrB"}
@@ -0,0 +1,21 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Button, XStack, YStack } from '@hanzo/gui';
4
+ import { DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '../backends/gui/dialog.js';
5
+ import { PrimaryButton } from './PrimaryButton.js';
6
+ /**
7
+ * The affirmative action. `PrimaryButton` is the console's one high-emphasis
8
+ * button, so it draws the ordinary confirm; a destructive one takes the neutral
9
+ * Button in the red theme instead, per that component's own rule that
10
+ * destructive actions do not wear the primary fill. A delete should not be the
11
+ * brightest thing on screen.
12
+ */
13
+ function Confirm({ label, onPress, tone, disabled, busy }) {
14
+ const off = busy || disabled;
15
+ return tone === 'danger' ? (_jsx(Button, { theme: "red", disabled: off, onPress: onPress, children: label })) : (_jsx(PrimaryButton, { disabled: off, onPress: onPress, children: label }));
16
+ }
17
+ export function DialogTemplate({ title, description, children, confirm, cancelLabel = 'Cancel', showCancel = true, leftActions, busy = false, ...content }) {
18
+ const footer = showCancel || confirm || leftActions;
19
+ return (_jsxs(DialogContent, { ...content, children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: title }), description ? _jsx(DialogDescription, { children: description }) : null] }), children ? _jsx(YStack, { gap: "$3", children: children }) : null, footer ? (_jsxs(DialogFooter, { justify: leftActions ? 'space-between' : 'flex-end', children: [leftActions ? (_jsx(XStack, { gap: "$2", items: "center", children: leftActions })) : null, _jsxs(XStack, { gap: "$2", items: "center", children: [showCancel ? (_jsx(DialogClose, { asChild: true, children: _jsx(Button, { disabled: busy, children: cancelLabel }) })) : null, confirm ? _jsx(Confirm, { ...confirm, busy: busy }) : null] })] })) : null] }));
20
+ }
21
+ //# sourceMappingURL=DialogTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogTemplate.js","sourceRoot":"","sources":["../../src/product/DialogTemplate.tsx"],"names":[],"mappings":"AAAA,YAAY,CA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I,EAEtD,MAAM,CAAC,CAAC,CAAC,CACR,MAAC,YAAY,IAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,UAAU,aAC9D,WAAW,CAAC,CAAC,CAAC,CACb,KAAC,MAAM,IAAC,GAAG,EAAC,IAAI,EAAC,KAAK,EAAC,QAAQ,YAC5B,WAAW,GACL,CACV,CAAC,CAAC,CAAC,IAAI,EACR,MAAC,MAAM,IAAC,GAAG,EAAC,IAAI,EAAC,KAAK,EAAC,QAAQ,aAC5B,UAAU,CAAC,CAAC,CAAC,CACZ,KAAC,WAAW,IAAC,OAAO,kBAClB,KAAC,MAAM,IAAC,QAAQ,EAAE,IAAI,YAAG,WAAW,GAAU,GAClC,CACf,CAAC,CAAC,CAAC,IAAI,EACP,OAAO,CAAC,CAAC,CAAC,KAAC,OAAO,OAAK,OAAO,EAAE,IAAI,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IAC/C,IACI,CAChB,CAAC,CAAC,CAAC,IAAI,IACM,CACjB,CAAA;AACH,CAAC"}
@@ -0,0 +1,33 @@
1
+ 'use client';"use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Skeleton = void 0;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ /**
7
+ * Skeleton — the honest "loading", never fabricated content.
8
+ *
9
+ * The shimmer itself has shipped in `styles/motion.css` as `.hz-skeleton` since
10
+ * the living-overview work; what was missing was a component to reach it, so
11
+ * every surface hand-rolled a grey `<div>` and picked its own radius. This is
12
+ * that div, once, sized in the same `$` space as the rest of the package.
13
+ *
14
+ * It renders a BLOCK, not a spinner: a placeholder the size and shape of the
15
+ * thing that is coming keeps the layout from jumping when the data lands. Give
16
+ * it the dimensions of the real content — that is the whole discipline.
17
+ *
18
+ * <Skeleton height="$2" width={180} /> // a line of text
19
+ * <Skeleton height={120} rounded="$4" /> // a card
20
+ * <Skeleton.Text lines={3} /> // a paragraph
21
+ */
22
+ const gui_1 = require("@hanzo/gui");
23
+ function Block({ height = '$1', rounded = '$2', ...props }) {
24
+ return ((0, jsx_runtime_1.jsx)(gui_1.View, { className: "hz-skeleton", height: height, rounded: rounded, "aria-hidden": true, ...props }));
25
+ }
26
+ /**
27
+ * A paragraph's worth of lines. The last one is short, because a real paragraph
28
+ * ends mid-line and a stack of equal bars reads as a table.
29
+ */
30
+ function SkeletonText({ lines = 3, gap = '$2', ...props }) {
31
+ return ((0, jsx_runtime_1.jsx)(gui_1.YStack, { gap: gap, width: "100%", children: Array.from({ length: Math.max(1, lines) }, (_, i) => ((0, jsx_runtime_1.jsx)(Block, { width: i === lines - 1 ? '60%' : '100%', ...props }, i))) }));
32
+ }
33
+ exports.Skeleton = Object.assign(Block, { Text: SkeletonText });
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Skeleton — the honest "loading", never fabricated content.
3
+ *
4
+ * The shimmer itself has shipped in `styles/motion.css` as `.hz-skeleton` since
5
+ * the living-overview work; what was missing was a component to reach it, so
6
+ * every surface hand-rolled a grey `<div>` and picked its own radius. This is
7
+ * that div, once, sized in the same `$` space as the rest of the package.
8
+ *
9
+ * It renders a BLOCK, not a spinner: a placeholder the size and shape of the
10
+ * thing that is coming keeps the layout from jumping when the data lands. Give
11
+ * it the dimensions of the real content — that is the whole discipline.
12
+ *
13
+ * <Skeleton height="$2" width={180} /> // a line of text
14
+ * <Skeleton height={120} rounded="$4" /> // a card
15
+ * <Skeleton.Text lines={3} /> // a paragraph
16
+ */
17
+ import { View } from '@hanzo/gui';
18
+ import type { ComponentProps } from 'react';
19
+ export type SkeletonProps = ComponentProps<typeof View>;
20
+ declare function Block({ height, rounded, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
21
+ export type SkeletonTextProps = SkeletonProps & {
22
+ /** How many lines to stand in for. */
23
+ lines?: number;
24
+ };
25
+ /**
26
+ * A paragraph's worth of lines. The last one is short, because a real paragraph
27
+ * ends mid-line and a stack of equal bars reads as a table.
28
+ */
29
+ declare function SkeletonText({ lines, gap, ...props }: SkeletonTextProps): import("react/jsx-runtime").JSX.Element;
30
+ export declare const Skeleton: typeof Block & {
31
+ Text: typeof SkeletonText;
32
+ };
33
+ export {};
34
+ //# sourceMappingURL=Skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../src/product/Skeleton.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,IAAI,EAAU,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA;AAEvD,iBAAS,KAAK,CAAC,EAAE,MAAa,EAAE,OAAc,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CAYxE;AAED,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG;IAC9C,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;GAGG;AACH,iBAAS,YAAY,CAAC,EAAE,KAAS,EAAE,GAAU,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAQ3E;AAED,eAAO,MAAM,QAAQ;;CAA+C,CAAA"}
@@ -0,0 +1,31 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ /**
4
+ * Skeleton — the honest "loading", never fabricated content.
5
+ *
6
+ * The shimmer itself has shipped in `styles/motion.css` as `.hz-skeleton` since
7
+ * the living-overview work; what was missing was a component to reach it, so
8
+ * every surface hand-rolled a grey `<div>` and picked its own radius. This is
9
+ * that div, once, sized in the same `$` space as the rest of the package.
10
+ *
11
+ * It renders a BLOCK, not a spinner: a placeholder the size and shape of the
12
+ * thing that is coming keeps the layout from jumping when the data lands. Give
13
+ * it the dimensions of the real content — that is the whole discipline.
14
+ *
15
+ * <Skeleton height="$2" width={180} /> // a line of text
16
+ * <Skeleton height={120} rounded="$4" /> // a card
17
+ * <Skeleton.Text lines={3} /> // a paragraph
18
+ */
19
+ import { View, YStack } from '@hanzo/gui';
20
+ function Block({ height = '$1', rounded = '$2', ...props }) {
21
+ return (_jsx(View, { className: "hz-skeleton", height: height, rounded: rounded, "aria-hidden": true, ...props }));
22
+ }
23
+ /**
24
+ * A paragraph's worth of lines. The last one is short, because a real paragraph
25
+ * ends mid-line and a stack of equal bars reads as a table.
26
+ */
27
+ function SkeletonText({ lines = 3, gap = '$2', ...props }) {
28
+ return (_jsx(YStack, { gap: gap, width: "100%", children: Array.from({ length: Math.max(1, lines) }, (_, i) => (_jsx(Block, { width: i === lines - 1 ? '60%' : '100%', ...props }, i))) }));
29
+ }
30
+ export const Skeleton = Object.assign(Block, { Text: SkeletonText });
31
+ //# sourceMappingURL=Skeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../src/product/Skeleton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAKzC,SAAS,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,GAAG,KAAK,EAAiB;IACvE,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAC,aAAa,EACvB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,0BAIZ,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAOD;;;GAGG;AACH,SAAS,YAAY,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,EAAE,GAAG,KAAK,EAAqB;IAC1E,OAAO,CACL,KAAC,MAAM,IAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAC,MAAM,YAC3B,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACpD,KAAC,KAAK,IAAS,KAAK,EAAE,CAAC,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,KAAM,KAAK,IAArD,CAAC,CAAwD,CACtE,CAAC,GACK,CACV,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAA"}
@@ -25,17 +25,26 @@ const ToastContext = (0, react_1.createContext)(null);
25
25
  const ACCENT = {
26
26
  success: '$green10',
27
27
  error: '$red10',
28
+ warning: '$yellow10',
28
29
  info: '$color11',
29
30
  };
30
31
  const ICON = {
31
32
  success: lucide_icons_2_1.CircleCheck,
32
33
  error: lucide_icons_2_1.CircleX,
34
+ warning: lucide_icons_2_1.TriangleAlert,
33
35
  info: lucide_icons_2_1.Info,
34
36
  };
37
+ /** How long each kind stays. Anything that went wrong is worth re-reading. */
38
+ const DURATION = {
39
+ success: 3500,
40
+ error: 6000,
41
+ warning: 6000,
42
+ info: 3500,
43
+ };
35
44
  function ToastCard({ t, onClose }) {
36
45
  const Icon = ICON[t.kind];
37
46
  const accent = ACCENT[t.kind];
38
- return ((0, jsx_runtime_1.jsx)(gui_1.Card, { width: 360, maxWidth: "90%", p: "$3", gap: "$2", bg: "$color2", borderWidth: 1, borderColor: "$borderColor", borderLeftWidth: 3, borderLeftColor: accent, rounded: "$4", elevation: "$2", children: (0, jsx_runtime_1.jsxs)(gui_1.XStack, { gap: "$2.5", items: "flex-start", children: [(0, jsx_runtime_1.jsx)(gui_1.YStack, { pt: 1, children: (0, jsx_runtime_1.jsx)(Icon, { size: 18, color: accent }) }), (0, jsx_runtime_1.jsxs)(gui_1.YStack, { flex: 1, gap: "$1", children: [(0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$3", fontWeight: "700", color: "$color12", children: t.title }), t.description ? ((0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$2", color: "$color11", children: t.description })) : null] }), (0, jsx_runtime_1.jsx)(gui_1.Button, { size: "$1", chromeless: true, icon: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.X, { size: 14 }), onPress: onClose, "aria-label": "Dismiss" })] }) }));
47
+ return ((0, jsx_runtime_1.jsx)(gui_1.Card, { width: 360, maxWidth: "90%", p: "$3", gap: "$2", bg: "$color2", borderWidth: 1, borderColor: "$borderColor", borderLeftWidth: 3, borderLeftColor: accent, rounded: "$4", elevation: "$2", children: (0, jsx_runtime_1.jsxs)(gui_1.XStack, { gap: "$2.5", items: "flex-start", children: [t.showIcon ? ((0, jsx_runtime_1.jsx)(gui_1.YStack, { pt: 1, children: (0, jsx_runtime_1.jsx)(Icon, { size: 18, color: accent }) })) : null, (0, jsx_runtime_1.jsxs)(gui_1.YStack, { flex: 1, gap: "$1", children: [(0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$3", fontWeight: "700", color: "$color12", children: t.title }), t.description ? ((0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$2", color: "$color11", children: t.description })) : null] }), (0, jsx_runtime_1.jsx)(gui_1.Button, { size: "$1", chromeless: true, icon: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.X, { size: 14 }), onPress: onClose, "aria-label": "Dismiss" })] }) }));
39
48
  }
40
49
  /** Portalled, fixed top-right stack. Rendered only after mount (SSR-safe). */
41
50
  function ToastViewport({ toasts, dismiss }) {
@@ -61,9 +70,13 @@ function ToastProvider({ children }) {
61
70
  const toast = (0, react_1.useCallback)((input) => {
62
71
  const id = ++seq.current;
63
72
  const kind = input.kind ?? 'info';
64
- const durationMs = input.durationMs ?? (kind === 'error' ? 6000 : 3500);
73
+ const durationMs = input.durationMs ?? DURATION[kind];
74
+ const showIcon = input.showIcon ?? true;
65
75
  track({ component: 'Toast', action: kind === 'error' ? 'error' : 'view', id: input.title, value: kind });
66
- setToasts((ts) => [...ts, { id, kind, title: input.title, description: input.description, durationMs }]);
76
+ setToasts((ts) => [
77
+ ...ts,
78
+ { id, kind, title: input.title, description: input.description, durationMs, showIcon },
79
+ ]);
67
80
  if (durationMs > 0) {
68
81
  timers.current.set(id, setTimeout(() => dismiss(id), durationMs));
69
82
  }
@@ -73,13 +86,18 @@ function ToastProvider({ children }) {
73
86
  const map = timers.current;
74
87
  return () => map.forEach((t) => clearTimeout(t));
75
88
  }, []);
76
- const api = {
89
+ // Memoized because the api is what a consumer holds. Rebuilt every render it
90
+ // is a new identity every render, so any `useCallback`/`useEffect` keyed on it
91
+ // re-runs on each parent render — which is exactly what an adapter wrapping
92
+ // this hook does. `toast` and `dismiss` are already stable.
93
+ const api = (0, react_1.useMemo)(() => ({
77
94
  toast,
78
95
  success: (title, description) => toast({ title, description, kind: 'success' }),
79
96
  error: (title, description) => toast({ title, description, kind: 'error' }),
97
+ warning: (title, description) => toast({ title, description, kind: 'warning' }),
80
98
  info: (title, description) => toast({ title, description, kind: 'info' }),
81
99
  dismiss,
82
- };
100
+ }), [toast, dismiss]);
83
101
  return ((0, jsx_runtime_1.jsxs)(ToastContext.Provider, { value: api, children: [children, (0, jsx_runtime_1.jsx)(ToastViewport, { toasts: toasts, dismiss: dismiss })] }));
84
102
  }
85
103
  function useToast() {
@@ -10,18 +10,39 @@
10
10
  * toast.error(err instanceof ApiError ? err.message : 'Failed to create')
11
11
  */
12
12
  import { type ReactNode } from 'react';
13
- export type ToastKind = 'success' | 'error' | 'info';
13
+ /**
14
+ * The four things a mutation can report. `warning` is here because surfaces
15
+ * genuinely raise it — "saved, but the version did not change", "3 of 5 files
16
+ * downloaded" — and without it those land as `error` (alarming, and wrong) or
17
+ * `info` (invisible). Measured on one surface alone: 14 call sites.
18
+ */
19
+ export type ToastKind = 'success' | 'error' | 'warning' | 'info';
14
20
  export type ToastInput = {
15
21
  title: string;
16
22
  description?: string;
17
23
  kind?: ToastKind;
18
24
  /** Auto-dismiss after this many ms; 0 keeps it until dismissed. */
19
25
  durationMs?: number;
26
+ /** Drop the leading icon. Defaults to showing it. */
27
+ showIcon?: boolean;
28
+ };
29
+ /** A toast on screen: an input with its defaults resolved, and an id. */
30
+ export type Toast = ToastInput & {
31
+ id: number;
32
+ kind: ToastKind;
33
+ durationMs: number;
34
+ showIcon: boolean;
20
35
  };
21
- type ToastApi = {
36
+ /**
37
+ * What `useToast()` answers. Exported because a consumer that passes the api
38
+ * down, or stores it, has to be able to name its type — it could not before,
39
+ * which made the hook awkward to build on.
40
+ */
41
+ export type ToastApi = {
22
42
  toast: (t: ToastInput) => void;
23
43
  success: (title: string, description?: string) => void;
24
44
  error: (title: string, description?: string) => void;
45
+ warning: (title: string, description?: string) => void;
25
46
  info: (title: string, description?: string) => void;
26
47
  dismiss: (id: number) => void;
27
48
  };
@@ -29,5 +50,4 @@ export declare function ToastProvider({ children }: {
29
50
  children: ReactNode;
30
51
  }): import("react/jsx-runtime").JSX.Element;
31
52
  export declare function useToast(): ToastApi;
32
- export {};
33
53
  //# sourceMappingURL=Toast.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../src/product/Toast.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,OAAO,EAAuE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAO3G,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;AAEpD,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAID,KAAK,QAAQ,GAAG;IACd,KAAK,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;IAC9B,OAAO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,EAAE,UAAU,KAAK,IAAI,CAAA;IAC9B,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACtD,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACpD,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACtD,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B,CAAA;AAqFD,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAgElE;AAED,wBAAgB,QAAQ,IAAI,QAAQ,CAInC"}
@@ -11,27 +11,36 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  * toast.success('Created my-db')
12
12
  * toast.error(err instanceof ApiError ? err.message : 'Failed to create')
13
13
  */
14
- import { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';
14
+ import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
15
15
  import { createPortal } from 'react-dom';
16
16
  import { Button, Card, Text, XStack, YStack } from '@hanzo/gui';
17
- import { CircleCheck, CircleX, Info, X } from '@hanzogui/lucide-icons-2';
17
+ import { CircleCheck, CircleX, Info, TriangleAlert, X } from '@hanzogui/lucide-icons-2';
18
18
  import { useEmit } from './instrument.js';
19
19
  const ToastContext = createContext(null);
20
20
  /** Theme-aware accent per kind (adapts to light/dark). */
21
21
  const ACCENT = {
22
22
  success: '$green10',
23
23
  error: '$red10',
24
+ warning: '$yellow10',
24
25
  info: '$color11',
25
26
  };
26
27
  const ICON = {
27
28
  success: CircleCheck,
28
29
  error: CircleX,
30
+ warning: TriangleAlert,
29
31
  info: Info,
30
32
  };
33
+ /** How long each kind stays. Anything that went wrong is worth re-reading. */
34
+ const DURATION = {
35
+ success: 3500,
36
+ error: 6000,
37
+ warning: 6000,
38
+ info: 3500,
39
+ };
31
40
  function ToastCard({ t, onClose }) {
32
41
  const Icon = ICON[t.kind];
33
42
  const accent = ACCENT[t.kind];
34
- return (_jsx(Card, { width: 360, maxWidth: "90%", p: "$3", gap: "$2", bg: "$color2", borderWidth: 1, borderColor: "$borderColor", borderLeftWidth: 3, borderLeftColor: accent, rounded: "$4", elevation: "$2", children: _jsxs(XStack, { gap: "$2.5", items: "flex-start", children: [_jsx(YStack, { pt: 1, children: _jsx(Icon, { size: 18, color: accent }) }), _jsxs(YStack, { flex: 1, gap: "$1", children: [_jsx(Text, { fontSize: "$3", fontWeight: "700", color: "$color12", children: t.title }), t.description ? (_jsx(Text, { fontSize: "$2", color: "$color11", children: t.description })) : null] }), _jsx(Button, { size: "$1", chromeless: true, icon: _jsx(X, { size: 14 }), onPress: onClose, "aria-label": "Dismiss" })] }) }));
43
+ return (_jsx(Card, { width: 360, maxWidth: "90%", p: "$3", gap: "$2", bg: "$color2", borderWidth: 1, borderColor: "$borderColor", borderLeftWidth: 3, borderLeftColor: accent, rounded: "$4", elevation: "$2", children: _jsxs(XStack, { gap: "$2.5", items: "flex-start", children: [t.showIcon ? (_jsx(YStack, { pt: 1, children: _jsx(Icon, { size: 18, color: accent }) })) : null, _jsxs(YStack, { flex: 1, gap: "$1", children: [_jsx(Text, { fontSize: "$3", fontWeight: "700", color: "$color12", children: t.title }), t.description ? (_jsx(Text, { fontSize: "$2", color: "$color11", children: t.description })) : null] }), _jsx(Button, { size: "$1", chromeless: true, icon: _jsx(X, { size: 14 }), onPress: onClose, "aria-label": "Dismiss" })] }) }));
35
44
  }
36
45
  /** Portalled, fixed top-right stack. Rendered only after mount (SSR-safe). */
37
46
  function ToastViewport({ toasts, dismiss }) {
@@ -57,9 +66,13 @@ export function ToastProvider({ children }) {
57
66
  const toast = useCallback((input) => {
58
67
  const id = ++seq.current;
59
68
  const kind = input.kind ?? 'info';
60
- const durationMs = input.durationMs ?? (kind === 'error' ? 6000 : 3500);
69
+ const durationMs = input.durationMs ?? DURATION[kind];
70
+ const showIcon = input.showIcon ?? true;
61
71
  track({ component: 'Toast', action: kind === 'error' ? 'error' : 'view', id: input.title, value: kind });
62
- setToasts((ts) => [...ts, { id, kind, title: input.title, description: input.description, durationMs }]);
72
+ setToasts((ts) => [
73
+ ...ts,
74
+ { id, kind, title: input.title, description: input.description, durationMs, showIcon },
75
+ ]);
63
76
  if (durationMs > 0) {
64
77
  timers.current.set(id, setTimeout(() => dismiss(id), durationMs));
65
78
  }
@@ -69,13 +82,18 @@ export function ToastProvider({ children }) {
69
82
  const map = timers.current;
70
83
  return () => map.forEach((t) => clearTimeout(t));
71
84
  }, []);
72
- const api = {
85
+ // Memoized because the api is what a consumer holds. Rebuilt every render it
86
+ // is a new identity every render, so any `useCallback`/`useEffect` keyed on it
87
+ // re-runs on each parent render — which is exactly what an adapter wrapping
88
+ // this hook does. `toast` and `dismiss` are already stable.
89
+ const api = useMemo(() => ({
73
90
  toast,
74
91
  success: (title, description) => toast({ title, description, kind: 'success' }),
75
92
  error: (title, description) => toast({ title, description, kind: 'error' }),
93
+ warning: (title, description) => toast({ title, description, kind: 'warning' }),
76
94
  info: (title, description) => toast({ title, description, kind: 'info' }),
77
95
  dismiss,
78
- };
96
+ }), [toast, dismiss]);
79
97
  return (_jsxs(ToastContext.Provider, { value: api, children: [children, _jsx(ToastViewport, { toasts: toasts, dismiss: dismiss })] }));
80
98
  }
81
99
  export function useToast() {
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.js","sourceRoot":"","sources":["../../src/product/Toast.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;GAUG;AACH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EA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E,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC/E,IAAI,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QACzE,OAAO;KACR,CAAC,EACF,CAAC,KAAK,EAAE,OAAO,CAAC,CACjB,CAAA;IAED,OAAO,CACL,MAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,GAAG,aAC9B,QAAQ,EACT,KAAC,aAAa,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAI,IAC7B,CACzB,CAAA;AACH,CAAC;AAED,MAAM,UAAU,QAAQ;IACtB,MAAM,GAAG,GAAG,UAAU,CAAC,YAAY,CAAC,CAAA;IACpC,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAA;IACzE,OAAO,GAAG,CAAA;AACZ,CAAC"}
@@ -0,0 +1,37 @@
1
+ 'use client';"use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TooltipAnchor = TooltipAnchor;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ /**
7
+ * TooltipAnchor — a hint on one element, in one prop.
8
+ *
9
+ * The Tooltip primitive is a triple: root, trigger, content. That shape is
10
+ * right when the hint is rich, and it is three levels of nesting when the hint
11
+ * is a sentence — which is nearly always. Measured on a real surface, 48 call
12
+ * sites wanted the same thing: wrap this control, say this string on hover.
13
+ * So say it in one prop.
14
+ *
15
+ * <TooltipAnchor description="Delete this agent">
16
+ * <Button icon={<Trash />} />
17
+ * </TooltipAnchor>
18
+ *
19
+ * `description` is a STRING, deliberately. A tooltip is an accessible name for
20
+ * a control that has none, so it is also spelled onto the child as
21
+ * `aria-label` — which markup cannot be. A hint that needs layout is not a
22
+ * tooltip; reach for the triple, or a HoverCard.
23
+ *
24
+ * An empty or absent `description` renders the child alone, with no wrapper and
25
+ * no listeners: a disabled hint costs nothing and needs no branch at the call
26
+ * site.
27
+ */
28
+ const react_1 = require("react");
29
+ const tooltip_1 = require("../backends/gui/tooltip.cjs");
30
+ function TooltipAnchor({ description, children, side = 'top', delayMs, label = true, }) {
31
+ if (!description)
32
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
33
+ const child = label && (0, react_1.isValidElement)(children) && !children.props['aria-label']
34
+ ? (0, react_1.cloneElement)(children, { 'aria-label': description })
35
+ : children;
36
+ return ((0, jsx_runtime_1.jsxs)(tooltip_1.Tooltip, { placement: side, ...(delayMs === undefined ? {} : { delay: delayMs }), children: [(0, jsx_runtime_1.jsx)(tooltip_1.TooltipTrigger, { asChild: true, children: child }), (0, jsx_runtime_1.jsx)(tooltip_1.TooltipContent, { children: description })] }));
37
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * TooltipAnchor — a hint on one element, in one prop.
3
+ *
4
+ * The Tooltip primitive is a triple: root, trigger, content. That shape is
5
+ * right when the hint is rich, and it is three levels of nesting when the hint
6
+ * is a sentence — which is nearly always. Measured on a real surface, 48 call
7
+ * sites wanted the same thing: wrap this control, say this string on hover.
8
+ * So say it in one prop.
9
+ *
10
+ * <TooltipAnchor description="Delete this agent">
11
+ * <Button icon={<Trash />} />
12
+ * </TooltipAnchor>
13
+ *
14
+ * `description` is a STRING, deliberately. A tooltip is an accessible name for
15
+ * a control that has none, so it is also spelled onto the child as
16
+ * `aria-label` — which markup cannot be. A hint that needs layout is not a
17
+ * tooltip; reach for the triple, or a HoverCard.
18
+ *
19
+ * An empty or absent `description` renders the child alone, with no wrapper and
20
+ * no listeners: a disabled hint costs nothing and needs no branch at the call
21
+ * site.
22
+ */
23
+ import { type ReactNode } from 'react';
24
+ export type TooltipSide = 'top' | 'right' | 'bottom' | 'left';
25
+ export type TooltipAnchorProps = {
26
+ /** The hint. Empty or absent renders the child untouched. */
27
+ description?: string;
28
+ children: ReactNode;
29
+ /** Which edge the hint sits on. Defaults to `top`. */
30
+ side?: TooltipSide;
31
+ /** Delay before it opens, in ms. */
32
+ delayMs?: number;
33
+ /**
34
+ * By default the hint also becomes the child's `aria-label`, because the
35
+ * control it labels usually has no text of its own. Turn this off when the
36
+ * child already names itself and the hint only elaborates — two names on one
37
+ * control is worse than none.
38
+ */
39
+ label?: boolean;
40
+ };
41
+ export declare function TooltipAnchor({ description, children, side, delayMs, label, }: TooltipAnchorProps): import("react/jsx-runtime").JSX.Element;
42
+ //# sourceMappingURL=TooltipAnchor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TooltipAnchor.d.ts","sourceRoot":"","sources":["../../src/product/TooltipAnchor.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAmD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAIvF,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE7D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,SAAS,CAAA;IACnB,sDAAsD;IACtD,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,wBAAgB,aAAa,CAAC,EAC5B,WAAW,EACX,QAAQ,EACR,IAAY,EACZ,OAAO,EACP,KAAY,GACb,EAAE,kBAAkB,2CAcpB"}
@@ -0,0 +1,35 @@
1
+ 'use client';
2
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * TooltipAnchor — a hint on one element, in one prop.
5
+ *
6
+ * The Tooltip primitive is a triple: root, trigger, content. That shape is
7
+ * right when the hint is rich, and it is three levels of nesting when the hint
8
+ * is a sentence — which is nearly always. Measured on a real surface, 48 call
9
+ * sites wanted the same thing: wrap this control, say this string on hover.
10
+ * So say it in one prop.
11
+ *
12
+ * <TooltipAnchor description="Delete this agent">
13
+ * <Button icon={<Trash />} />
14
+ * </TooltipAnchor>
15
+ *
16
+ * `description` is a STRING, deliberately. A tooltip is an accessible name for
17
+ * a control that has none, so it is also spelled onto the child as
18
+ * `aria-label` — which markup cannot be. A hint that needs layout is not a
19
+ * tooltip; reach for the triple, or a HoverCard.
20
+ *
21
+ * An empty or absent `description` renders the child alone, with no wrapper and
22
+ * no listeners: a disabled hint costs nothing and needs no branch at the call
23
+ * site.
24
+ */
25
+ import { cloneElement, isValidElement } from 'react';
26
+ import { Tooltip, TooltipContent, TooltipTrigger } from '../backends/gui/tooltip.js';
27
+ export function TooltipAnchor({ description, children, side = 'top', delayMs, label = true, }) {
28
+ if (!description)
29
+ return _jsx(_Fragment, { children: children });
30
+ const child = label && isValidElement(children) && !children.props['aria-label']
31
+ ? cloneElement(children, { 'aria-label': description })
32
+ : children;
33
+ return (_jsxs(Tooltip, { placement: side, ...(delayMs === undefined ? {} : { delay: delayMs }), children: [_jsx(TooltipTrigger, { asChild: true, children: child }), _jsx(TooltipContent, { children: description })] }));
34
+ }
35
+ //# sourceMappingURL=TooltipAnchor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TooltipAnchor.js","sourceRoot":"","sources":["../../src/product/TooltipAnchor.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAqC,MAAM,OAAO,CAAA;AAEvF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAqBjF,MAAM,UAAU,aAAa,CAAC,EAC5B,WAAW,EACX,QAAQ,EACR,IAAI,GAAG,KAAK,EACZ,OAAO,EACP,KAAK,GAAG,IAAI,GACO;IACnB,IAAI,CAAC,WAAW;QAAE,OAAO,4BAAG,QAAQ,GAAI,CAAA;IAExC,MAAM,KAAK,GACT,KAAK,IAAI,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAE,QAAQ,CAAC,KAAmC,CAAC,YAAY,CAAC;QAC/F,CAAC,CAAC,YAAY,CAAC,QAAmD,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;QAClG,CAAC,CAAC,QAAQ,CAAA;IAEd,OAAO,CACL,MAAC,OAAO,IAAC,SAAS,EAAE,IAAI,KAAM,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,aAC7E,KAAC,cAAc,IAAC,OAAO,kBAAE,KAAK,GAAkB,EAChD,KAAC,cAAc,cAAE,WAAW,GAAkB,IACtC,CACX,CAAA;AACH,CAAC"}
@@ -125,10 +125,18 @@ __exportStar(require("./ProductIcon.cjs"), exports);
125
125
  __exportStar(require("./ProviderLogo.cjs"), exports);
126
126
  __exportStar(require("./Reorder.cjs"), exports);
127
127
  __exportStar(require("./SelectMenu.cjs"), exports);
128
+ __exportStar(require("./Skeleton.cjs"), exports);
128
129
  __exportStar(require("./SlideOver.cjs"), exports);
129
130
  __exportStar(require("./StatusTag.cjs"), exports);
130
131
  __exportStar(require("./tone.cjs"), exports);
131
132
  __exportStar(require("./ThemeToggle.cjs"), exports);
133
+ // `DialogTemplate` and `TooltipAnchor` are the two arrangements every surface
134
+ // was already writing by hand over the Dialog and Tooltip primitives — a
135
+ // titled dialog with a cancel/confirm footer, and a one-string hint on a
136
+ // control. The primitives stay exported for the cases that genuinely are not
137
+ // those shapes; reaching for them is the signal you have left the common case.
138
+ __exportStar(require("./DialogTemplate.cjs"), exports);
139
+ __exportStar(require("./TooltipAnchor.cjs"), exports);
132
140
  // `ThemeToggleNext` is NOT re-exported here, and that is the whole reason this
133
141
  // comment exists. It is the @hanzogui/next-theme binding, and next-theme's
134
142
  // provider imports `next/script` — so a static edge from this barrel put Next in
@@ -41,10 +41,13 @@ export * from './ProductIcon.js';
41
41
  export * from './ProviderLogo.js';
42
42
  export * from './Reorder.js';
43
43
  export * from './SelectMenu.js';
44
+ export * from './Skeleton.js';
44
45
  export * from './SlideOver.js';
45
46
  export * from './StatusTag.js';
46
47
  export * from './tone.js';
47
48
  export * from './ThemeToggle.js';
49
+ export * from './DialogTemplate.js';
50
+ export * from './TooltipAnchor.js';
48
51
  export * from './Toast.js';
49
52
  export * from './accent.js';
50
53
  export * from './color.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/product/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAA;AAKxB,OAAO,EACL,MAAM,EACN,aAAa,EACb,SAAS,EACT,SAAS,IAAI,eAAe,EAC5B,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,KAAK,GACN,MAAM,UAAU,CAAA;AAGjB,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAK/D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,cAAc,mBAAmB,CAAA;AASjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AAKvB,cAAc,QAAQ,CAAA;AAKtB,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAK5B,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AAOzB,cAAc,cAAc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cAAc,UAAU,CAAA;AAKxB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAA"}
@@ -96,10 +96,18 @@ export * from './ProductIcon.js';
96
96
  export * from './ProviderLogo.js';
97
97
  export * from './Reorder.js';
98
98
  export * from './SelectMenu.js';
99
+ export * from './Skeleton.js';
99
100
  export * from './SlideOver.js';
100
101
  export * from './StatusTag.js';
101
102
  export * from './tone.js';
102
103
  export * from './ThemeToggle.js';
104
+ // `DialogTemplate` and `TooltipAnchor` are the two arrangements every surface
105
+ // was already writing by hand over the Dialog and Tooltip primitives — a
106
+ // titled dialog with a cancel/confirm footer, and a one-string hint on a
107
+ // control. The primitives stay exported for the cases that genuinely are not
108
+ // those shapes; reaching for them is the signal you have left the common case.
109
+ export * from './DialogTemplate.js';
110
+ export * from './TooltipAnchor.js';
103
111
  // `ThemeToggleNext` is NOT re-exported here, and that is the whole reason this
104
112
  // comment exists. It is the @hanzogui/next-theme binding, and next-theme's
105
113
  // provider imports `next/script` — so a static edge from this barrel put Next in
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/product/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,iFAAiF;AACjF,gFAAgF;AAChF,wEAAwE;AACxE,EAAE;AACF,kFAAkF;AAClF,6EAA6E;AAE7E,kFAAkF;AAClF,gEAAgE;AAChE,cAAc,UAAU,CAAA;AAExB,2EAA2E;AAC3E,+EAA+E;AAC/E,4CAA4C;AAC5C,OAAO,EACL,MAAM,EACN,aAAa,EACb,SAAS,EACT,SAAS,IAAI,eAAe,EAC5B,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,KAAK,GACN,MAAM,UAAU,CAAA;AAEjB,6EAA6E;AAC7E,OAAO,EAAE,KAAK,IAAI,SAAS,EAAqB,MAAM,SAAS,CAAA;AA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AiF;AACjF,kFAAkF;AAClF,kEAAkE;AAClE,cAAc,UAAU,CAAA;AAExB,sEAAsE;AACtE,+EAA+E;AAC/E,8EAA8E;AAC9E,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAgB,MAAM,aAAa,CAAA"}
@@ -14,10 +14,13 @@
14
14
  a stylesheet it never opened. A library's utility classes are its namespace,
15
15
  so they carry its name.
16
16
 
17
- The unprefixed selectors are kept as aliases on the SAME rule for one minor
18
- version so nothing breaks mid-flight, and are REMOVED IN 8.1.0. Nothing in
19
- this package emits them any more — they exist only for a consumer who typed
20
- `className="skeleton"` against the old sheet. Keyframe names are prefixed too
17
+ The unprefixed selectors are kept as aliases on the SAME rule so nothing
18
+ breaks mid-flight, and are REMOVED IN 8.2.0. Nothing in this package emits
19
+ them any more — they exist only for a consumer who typed
20
+ `className="skeleton"` against the old sheet. (The target was 8.1.0, and
21
+ 8.1.0 went out carrying additions instead. Moving the date is the honest
22
+ edit: shipping the version a comment says removed something, without
23
+ removing it, is how a deprecation note stops being read.) Keyframe names are prefixed too
21
24
  and have no alias: nothing outside this file ever referenced them. */
22
25
 
23
26
  /* Fade-up entrance — <FadeIn> applies the class + a per-item stagger delay.
package/dist/styles.css CHANGED
@@ -1702,10 +1702,13 @@
1702
1702
  a stylesheet it never opened. A library's utility classes are its namespace,
1703
1703
  so they carry its name.
1704
1704
 
1705
- The unprefixed selectors are kept as aliases on the SAME rule for one minor
1706
- version so nothing breaks mid-flight, and are REMOVED IN 8.1.0. Nothing in
1707
- this package emits them any more — they exist only for a consumer who typed
1708
- `className="skeleton"` against the old sheet. Keyframe names are prefixed too
1705
+ The unprefixed selectors are kept as aliases on the SAME rule so nothing
1706
+ breaks mid-flight, and are REMOVED IN 8.2.0. Nothing in this package emits
1707
+ them any more — they exist only for a consumer who typed
1708
+ `className="skeleton"` against the old sheet. (The target was 8.1.0, and
1709
+ 8.1.0 went out carrying additions instead. Moving the date is the honest
1710
+ edit: shipping the version a comment says removed something, without
1711
+ removing it, is how a deprecation note stops being read.) Keyframe names are prefixed too
1709
1712
  and have no alias: nothing outside this file ever referenced them. */
1710
1713
 
1711
1714
  /* Fade-up entrance — <FadeIn> applies the class + a per-item stagger delay.
@@ -2379,6 +2382,7 @@
2379
2382
  :root ._height-44px{height:44px;}
2380
2383
  :root ._height-5px{height:5px;}
2381
2384
  :root ._height-6px{height:6px;}
2385
+ :root ._height-72px{height:72px;}
2382
2386
  :root ._height-7px{height:7px;}
2383
2387
  :root ._height-80px{height:80px;}
2384
2388
  :root ._height-8px{height:8px;}
@@ -2549,6 +2553,7 @@
2549
2553
  :root ._width-0px{width:0px;}
2550
2554
  :root ._width-10037{width:100%;}
2551
2555
  :root ._width-10px{width:10px;}
2556
+ :root ._width-120px{width:120px;}
2552
2557
  :root ._width-16px{width:16px;}
2553
2558
  :root ._width-20037{width:200%;}
2554
2559
  :root ._width-260px{width:260px;}
@@ -2557,6 +2562,7 @@
2557
2562
  :root ._width-380px{width:380px;}
2558
2563
  :root ._width-4px{width:4px;}
2559
2564
  :root ._width-5px{width:5px;}
2565
+ :root ._width-6037{width:60%;}
2560
2566
  :root ._width-8px{width:8px;}
2561
2567
  :root ._width-auto{width:auto;}
2562
2568
  :root ._width-c-size-1{width:var(--c-size-1);}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "8.0.117",
3
+ "version": "8.1.0",
4
4
  "type": "module",
5
5
  "description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
6
6
  "exports": {