@hanzo/ui 8.25.1 → 8.25.3

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.
@@ -0,0 +1,297 @@
1
+ 'use client';"use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DropdownMenuSubContent = exports.DropdownMenuSub = exports.DropdownMenuShortcut = exports.DropdownMenuSeparator = exports.DropdownMenuRadioItem = exports.DropdownMenuRadioGroup = exports.DropdownMenuPortal = exports.DropdownMenuLabel = exports.DropdownMenuItem = exports.DropdownMenuGroup = exports.DropdownMenuContent = exports.DropdownMenuCheckboxItem = exports.DropdownMenu = exports.DialogTrigger = exports.DialogTitle = exports.DialogPortal = exports.DialogOverlay = exports.DialogHeader = exports.DialogFooter = exports.DialogDescription = exports.DialogContent = exports.DialogClose = exports.Dialog = exports.CommandShortcut = exports.CommandSeparator = exports.CommandList = exports.CommandItem = exports.CommandInput = exports.CommandGroup = exports.CommandEmpty = exports.CommandDialog = exports.Command = exports.CollapsibleTrigger = exports.CollapsibleContent = exports.Collapsible = exports.Checkbox = exports.CardTitle = exports.CardMedia = exports.CardHeader = exports.CardFooter = exports.CardDescription = exports.CardContent = exports.CardAction = exports.Card = exports.Button = exports.Badge = exports.AvatarImage = exports.AvatarFallback = exports.Avatar = exports.AspectRatio = void 0;
4
+ exports.TabsContent = exports.Tabs = exports.Switch = exports.Strong = exports.Spinner = exports.Span = exports.Spacer = exports.Slider = exports.SizableText = exports.Separator = exports.Band = exports.ScrollView = exports.Screen = exports.Paragraph = exports.SelectValue = exports.SelectTrigger = exports.SelectSeparator = exports.SelectScrollUpButton = exports.SelectScrollDownButton = exports.SelectLabel = exports.SelectItem = exports.SelectGroup = exports.SelectContent = exports.Select = exports.ScrollBar = exports.ScrollArea = exports.ResizablePanelGroup = exports.ResizablePanel = exports.ResizableHandle = exports.Progress = exports.PopoverTrigger = exports.PopoverContent = exports.PopoverClose = exports.PopoverAnchor = exports.Popover = exports.Label = exports.Input = exports.Image = exports.Heading = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = exports.Fill = exports.Glass = exports.Em = exports.DropdownMenuTrigger = exports.DropdownMenuSubTrigger = void 0;
5
+ exports.SheetTitle = exports.SheetPortal = exports.SheetOverlay = exports.SheetHeader = exports.SheetFooter = exports.SheetDescription = exports.SheetContent = exports.SheetClose = exports.Sheet = exports.StepIndicator = exports.NavItems = exports.fit = exports.MediaStack = exports.Skeleton = exports.CarouselNext = exports.CarouselPrevious = exports.CarouselItem = exports.CarouselContent = exports.Carousel = exports.useFormField = exports.FormMessage = exports.FormDescription = exports.FormControl = exports.FormLabel = exports.FormItem = exports.FormField = exports.Form = exports.useLink = exports.YouTubeEmbed = exports.VideoPlayer = exports.MDXLink = exports.LinkElement = exports.Link = exports.ApplyTypography = exports.toast = exports.buttonVariants = exports.badgeVariants = exports.ZStack = exports.YStack = exports.XStack = exports.View = exports.TooltipTrigger = exports.TooltipProvider = exports.TooltipContent = exports.Tooltip = exports.Text = exports.Toaster = exports.Textarea = exports.TabsTrigger = exports.TabsList = void 0;
6
+ exports.ContextMenuSub = exports.ContextMenuShortcut = exports.ContextMenuSeparator = exports.ContextMenuRadioItem = exports.ContextMenuRadioGroup = exports.ContextMenuPortal = exports.ContextMenuLabel = exports.ContextMenuItem = exports.ContextMenuGroup = exports.ContextMenuContent = exports.ContextMenuCheckboxItem = exports.ContextMenu = exports.AlertDialogTrigger = exports.AlertDialogTitle = exports.AlertDialogPortal = exports.AlertDialogOverlay = exports.AlertDialogHeader = exports.AlertDialogFooter = exports.AlertDialogDescription = exports.AlertDialogContent = exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialog = exports.AccordionTrigger = exports.AccordionItem = exports.AccordionContent = exports.Accordion = exports.DrawerTrigger = exports.DrawerHandle = exports.DrawerContent = exports.Drawer = exports.navigationMenuTriggerStyle = exports.NavigationMenuTrigger = exports.NavigationMenuList = exports.NavigationMenuLink = exports.NavigationMenuItem = exports.NavigationMenuContent = exports.NavigationMenu = exports.InputOTPSlot = exports.InputOTPSeparator = exports.InputOTPGroup = exports.InputOTP = exports.BreadcrumbSeparator = exports.BreadcrumbPage = exports.BreadcrumbList = exports.BreadcrumbLink = exports.BreadcrumbItem = exports.BreadcrumbEllipsis = exports.Breadcrumb = exports.SheetTrigger = void 0;
7
+ exports.css = exports.sx = exports.Box = exports.tw = exports.variants = exports.capitalize = exports.cn = exports.Slot = exports.Hanzo = exports.Anchor = exports.ToggleGroupItem = exports.ToggleGroup = exports.RadioGroupItem = exports.RadioGroup = exports.HoverCardTrigger = exports.HoverCardContent = exports.HoverCard = exports.ContextMenuTrigger = exports.ContextMenuSubTrigger = exports.ContextMenuSubContent = void 0;
8
+ // @hanzo/ui — the one Hanzo component library, on @hanzo/gui + @hanzo/design.
9
+ //
10
+ // ONE substrate: every component renders through @hanzo/gui primitives, so the
11
+ // same import works on web, native (expo) and desktop (Tauri). The ROOT barrel is
12
+ // the canonical component API apps import; the product layer and the design
13
+ // tokens are their own subpaths, so importing a Button never drags in a chart.
14
+ //
15
+ // import { Button, Card, Dialog, DropdownMenu, Input, Toaster } from '@hanzo/ui' // component API
16
+ // import { PageHeader, Sparkline, EmptyState } from '@hanzo/ui/product' // product/app layer
17
+ // import { RecordsView, registerField } from '@hanzo/ui/data' // metadata record layer
18
+ // import { ModelSelector } from '@hanzo/ui/models' // unified model picker
19
+ // import { cn, themes, colors } from '@hanzo/ui/core' // design core + tokens
20
+ // import '@hanzo/ui/theme.css' // the self-contained identity
21
+ //
22
+ // Styling is theme tokens, never utility classes: `$background`, `$color12`,
23
+ // `$borderColor` resolve through the gui token config on every host. Touch
24
+ // targets meet the 44px floor via `hitSlop`, never via padding.
25
+ // Named, not `export *`.
26
+ //
27
+ // This module is a client boundary ('use client' above), and Next 16 refuses
28
+ // `export *` across one: "It's currently unsupported to use `export *` in a client
29
+ // boundary." Every app importing the root barrel failed to build on that one line.
30
+ //
31
+ // Naming them also restores tree-shaking, which `export *` defeats — a bundler
32
+ // cannot prove which members are unused through a star, so importing Button pulled
33
+ // the whole surface in.
34
+ //
35
+ // ./backends/gui declares these as explicit named blocks and this list mirrors it.
36
+ //
37
+ // It is maintained BY HAND — `scripts/gen-primitives.mjs` writes `src/primitives/`,
38
+ // not this file, so nothing regenerates it and nothing used to notice when the two
39
+ // drifted. Glass, Grid, Band and CardMedia were all exported by the backend and
40
+ // absent here, which means a consumer could not import them AT ALL: the component
41
+ // existed, the docs named it, and `import { Grid } from '@hanzo/ui'` was undefined.
42
+ // `src/__tests__/barrel.test.ts` now fails when the two disagree.
43
+ var gui_1 = require("./backends/gui/index.cjs");
44
+ Object.defineProperty(exports, "AspectRatio", { enumerable: true, get: function () { return gui_1.AspectRatio; } });
45
+ Object.defineProperty(exports, "Avatar", { enumerable: true, get: function () { return gui_1.Avatar; } });
46
+ Object.defineProperty(exports, "AvatarFallback", { enumerable: true, get: function () { return gui_1.AvatarFallback; } });
47
+ Object.defineProperty(exports, "AvatarImage", { enumerable: true, get: function () { return gui_1.AvatarImage; } });
48
+ Object.defineProperty(exports, "Badge", { enumerable: true, get: function () { return gui_1.Badge; } });
49
+ Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return gui_1.Button; } });
50
+ Object.defineProperty(exports, "Card", { enumerable: true, get: function () { return gui_1.Card; } });
51
+ Object.defineProperty(exports, "CardAction", { enumerable: true, get: function () { return gui_1.CardAction; } });
52
+ Object.defineProperty(exports, "CardContent", { enumerable: true, get: function () { return gui_1.CardContent; } });
53
+ Object.defineProperty(exports, "CardDescription", { enumerable: true, get: function () { return gui_1.CardDescription; } });
54
+ Object.defineProperty(exports, "CardFooter", { enumerable: true, get: function () { return gui_1.CardFooter; } });
55
+ Object.defineProperty(exports, "CardHeader", { enumerable: true, get: function () { return gui_1.CardHeader; } });
56
+ Object.defineProperty(exports, "CardMedia", { enumerable: true, get: function () { return gui_1.CardMedia; } });
57
+ Object.defineProperty(exports, "CardTitle", { enumerable: true, get: function () { return gui_1.CardTitle; } });
58
+ Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function () { return gui_1.Checkbox; } });
59
+ Object.defineProperty(exports, "Collapsible", { enumerable: true, get: function () { return gui_1.Collapsible; } });
60
+ Object.defineProperty(exports, "CollapsibleContent", { enumerable: true, get: function () { return gui_1.CollapsibleContent; } });
61
+ Object.defineProperty(exports, "CollapsibleTrigger", { enumerable: true, get: function () { return gui_1.CollapsibleTrigger; } });
62
+ Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return gui_1.Command; } });
63
+ Object.defineProperty(exports, "CommandDialog", { enumerable: true, get: function () { return gui_1.CommandDialog; } });
64
+ Object.defineProperty(exports, "CommandEmpty", { enumerable: true, get: function () { return gui_1.CommandEmpty; } });
65
+ Object.defineProperty(exports, "CommandGroup", { enumerable: true, get: function () { return gui_1.CommandGroup; } });
66
+ Object.defineProperty(exports, "CommandInput", { enumerable: true, get: function () { return gui_1.CommandInput; } });
67
+ Object.defineProperty(exports, "CommandItem", { enumerable: true, get: function () { return gui_1.CommandItem; } });
68
+ Object.defineProperty(exports, "CommandList", { enumerable: true, get: function () { return gui_1.CommandList; } });
69
+ Object.defineProperty(exports, "CommandSeparator", { enumerable: true, get: function () { return gui_1.CommandSeparator; } });
70
+ Object.defineProperty(exports, "CommandShortcut", { enumerable: true, get: function () { return gui_1.CommandShortcut; } });
71
+ Object.defineProperty(exports, "Dialog", { enumerable: true, get: function () { return gui_1.Dialog; } });
72
+ Object.defineProperty(exports, "DialogClose", { enumerable: true, get: function () { return gui_1.DialogClose; } });
73
+ Object.defineProperty(exports, "DialogContent", { enumerable: true, get: function () { return gui_1.DialogContent; } });
74
+ Object.defineProperty(exports, "DialogDescription", { enumerable: true, get: function () { return gui_1.DialogDescription; } });
75
+ Object.defineProperty(exports, "DialogFooter", { enumerable: true, get: function () { return gui_1.DialogFooter; } });
76
+ Object.defineProperty(exports, "DialogHeader", { enumerable: true, get: function () { return gui_1.DialogHeader; } });
77
+ Object.defineProperty(exports, "DialogOverlay", { enumerable: true, get: function () { return gui_1.DialogOverlay; } });
78
+ Object.defineProperty(exports, "DialogPortal", { enumerable: true, get: function () { return gui_1.DialogPortal; } });
79
+ Object.defineProperty(exports, "DialogTitle", { enumerable: true, get: function () { return gui_1.DialogTitle; } });
80
+ Object.defineProperty(exports, "DialogTrigger", { enumerable: true, get: function () { return gui_1.DialogTrigger; } });
81
+ Object.defineProperty(exports, "DropdownMenu", { enumerable: true, get: function () { return gui_1.DropdownMenu; } });
82
+ Object.defineProperty(exports, "DropdownMenuCheckboxItem", { enumerable: true, get: function () { return gui_1.DropdownMenuCheckboxItem; } });
83
+ Object.defineProperty(exports, "DropdownMenuContent", { enumerable: true, get: function () { return gui_1.DropdownMenuContent; } });
84
+ Object.defineProperty(exports, "DropdownMenuGroup", { enumerable: true, get: function () { return gui_1.DropdownMenuGroup; } });
85
+ Object.defineProperty(exports, "DropdownMenuItem", { enumerable: true, get: function () { return gui_1.DropdownMenuItem; } });
86
+ Object.defineProperty(exports, "DropdownMenuLabel", { enumerable: true, get: function () { return gui_1.DropdownMenuLabel; } });
87
+ Object.defineProperty(exports, "DropdownMenuPortal", { enumerable: true, get: function () { return gui_1.DropdownMenuPortal; } });
88
+ Object.defineProperty(exports, "DropdownMenuRadioGroup", { enumerable: true, get: function () { return gui_1.DropdownMenuRadioGroup; } });
89
+ Object.defineProperty(exports, "DropdownMenuRadioItem", { enumerable: true, get: function () { return gui_1.DropdownMenuRadioItem; } });
90
+ Object.defineProperty(exports, "DropdownMenuSeparator", { enumerable: true, get: function () { return gui_1.DropdownMenuSeparator; } });
91
+ Object.defineProperty(exports, "DropdownMenuShortcut", { enumerable: true, get: function () { return gui_1.DropdownMenuShortcut; } });
92
+ Object.defineProperty(exports, "DropdownMenuSub", { enumerable: true, get: function () { return gui_1.DropdownMenuSub; } });
93
+ Object.defineProperty(exports, "DropdownMenuSubContent", { enumerable: true, get: function () { return gui_1.DropdownMenuSubContent; } });
94
+ Object.defineProperty(exports, "DropdownMenuSubTrigger", { enumerable: true, get: function () { return gui_1.DropdownMenuSubTrigger; } });
95
+ Object.defineProperty(exports, "DropdownMenuTrigger", { enumerable: true, get: function () { return gui_1.DropdownMenuTrigger; } });
96
+ Object.defineProperty(exports, "Em", { enumerable: true, get: function () { return gui_1.Em; } });
97
+ Object.defineProperty(exports, "Glass", { enumerable: true, get: function () { return gui_1.Glass; } });
98
+ Object.defineProperty(exports, "Fill", { enumerable: true, get: function () { return gui_1.Fill; } });
99
+ Object.defineProperty(exports, "H1", { enumerable: true, get: function () { return gui_1.H1; } });
100
+ Object.defineProperty(exports, "H2", { enumerable: true, get: function () { return gui_1.H2; } });
101
+ Object.defineProperty(exports, "H3", { enumerable: true, get: function () { return gui_1.H3; } });
102
+ Object.defineProperty(exports, "H4", { enumerable: true, get: function () { return gui_1.H4; } });
103
+ Object.defineProperty(exports, "H5", { enumerable: true, get: function () { return gui_1.H5; } });
104
+ Object.defineProperty(exports, "H6", { enumerable: true, get: function () { return gui_1.H6; } });
105
+ Object.defineProperty(exports, "Heading", { enumerable: true, get: function () { return gui_1.Heading; } });
106
+ Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return gui_1.Image; } });
107
+ Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return gui_1.Input; } });
108
+ Object.defineProperty(exports, "Label", { enumerable: true, get: function () { return gui_1.Label; } });
109
+ Object.defineProperty(exports, "Popover", { enumerable: true, get: function () { return gui_1.Popover; } });
110
+ Object.defineProperty(exports, "PopoverAnchor", { enumerable: true, get: function () { return gui_1.PopoverAnchor; } });
111
+ Object.defineProperty(exports, "PopoverClose", { enumerable: true, get: function () { return gui_1.PopoverClose; } });
112
+ Object.defineProperty(exports, "PopoverContent", { enumerable: true, get: function () { return gui_1.PopoverContent; } });
113
+ Object.defineProperty(exports, "PopoverTrigger", { enumerable: true, get: function () { return gui_1.PopoverTrigger; } });
114
+ Object.defineProperty(exports, "Progress", { enumerable: true, get: function () { return gui_1.Progress; } });
115
+ Object.defineProperty(exports, "ResizableHandle", { enumerable: true, get: function () { return gui_1.ResizableHandle; } });
116
+ Object.defineProperty(exports, "ResizablePanel", { enumerable: true, get: function () { return gui_1.ResizablePanel; } });
117
+ Object.defineProperty(exports, "ResizablePanelGroup", { enumerable: true, get: function () { return gui_1.ResizablePanelGroup; } });
118
+ Object.defineProperty(exports, "ScrollArea", { enumerable: true, get: function () { return gui_1.ScrollArea; } });
119
+ Object.defineProperty(exports, "ScrollBar", { enumerable: true, get: function () { return gui_1.ScrollBar; } });
120
+ Object.defineProperty(exports, "Select", { enumerable: true, get: function () { return gui_1.Select; } });
121
+ Object.defineProperty(exports, "SelectContent", { enumerable: true, get: function () { return gui_1.SelectContent; } });
122
+ Object.defineProperty(exports, "SelectGroup", { enumerable: true, get: function () { return gui_1.SelectGroup; } });
123
+ Object.defineProperty(exports, "SelectItem", { enumerable: true, get: function () { return gui_1.SelectItem; } });
124
+ Object.defineProperty(exports, "SelectLabel", { enumerable: true, get: function () { return gui_1.SelectLabel; } });
125
+ Object.defineProperty(exports, "SelectScrollDownButton", { enumerable: true, get: function () { return gui_1.SelectScrollDownButton; } });
126
+ Object.defineProperty(exports, "SelectScrollUpButton", { enumerable: true, get: function () { return gui_1.SelectScrollUpButton; } });
127
+ Object.defineProperty(exports, "SelectSeparator", { enumerable: true, get: function () { return gui_1.SelectSeparator; } });
128
+ Object.defineProperty(exports, "SelectTrigger", { enumerable: true, get: function () { return gui_1.SelectTrigger; } });
129
+ Object.defineProperty(exports, "SelectValue", { enumerable: true, get: function () { return gui_1.SelectValue; } });
130
+ Object.defineProperty(exports, "Paragraph", { enumerable: true, get: function () { return gui_1.Paragraph; } });
131
+ Object.defineProperty(exports, "Screen", { enumerable: true, get: function () { return gui_1.Screen; } });
132
+ Object.defineProperty(exports, "ScrollView", { enumerable: true, get: function () { return gui_1.ScrollView; } });
133
+ Object.defineProperty(exports, "Band", { enumerable: true, get: function () { return gui_1.Band; } });
134
+ Object.defineProperty(exports, "Separator", { enumerable: true, get: function () { return gui_1.Separator; } });
135
+ Object.defineProperty(exports, "SizableText", { enumerable: true, get: function () { return gui_1.SizableText; } });
136
+ Object.defineProperty(exports, "Slider", { enumerable: true, get: function () { return gui_1.Slider; } });
137
+ Object.defineProperty(exports, "Spacer", { enumerable: true, get: function () { return gui_1.Spacer; } });
138
+ Object.defineProperty(exports, "Span", { enumerable: true, get: function () { return gui_1.Span; } });
139
+ Object.defineProperty(exports, "Spinner", { enumerable: true, get: function () { return gui_1.Spinner; } });
140
+ Object.defineProperty(exports, "Strong", { enumerable: true, get: function () { return gui_1.Strong; } });
141
+ Object.defineProperty(exports, "Switch", { enumerable: true, get: function () { return gui_1.Switch; } });
142
+ Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return gui_1.Tabs; } });
143
+ Object.defineProperty(exports, "TabsContent", { enumerable: true, get: function () { return gui_1.TabsContent; } });
144
+ Object.defineProperty(exports, "TabsList", { enumerable: true, get: function () { return gui_1.TabsList; } });
145
+ Object.defineProperty(exports, "TabsTrigger", { enumerable: true, get: function () { return gui_1.TabsTrigger; } });
146
+ Object.defineProperty(exports, "Textarea", { enumerable: true, get: function () { return gui_1.Textarea; } });
147
+ Object.defineProperty(exports, "Toaster", { enumerable: true, get: function () { return gui_1.Toaster; } });
148
+ Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return gui_1.Text; } });
149
+ Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return gui_1.Tooltip; } });
150
+ Object.defineProperty(exports, "TooltipContent", { enumerable: true, get: function () { return gui_1.TooltipContent; } });
151
+ Object.defineProperty(exports, "TooltipProvider", { enumerable: true, get: function () { return gui_1.TooltipProvider; } });
152
+ Object.defineProperty(exports, "TooltipTrigger", { enumerable: true, get: function () { return gui_1.TooltipTrigger; } });
153
+ Object.defineProperty(exports, "View", { enumerable: true, get: function () { return gui_1.View; } });
154
+ Object.defineProperty(exports, "XStack", { enumerable: true, get: function () { return gui_1.XStack; } });
155
+ Object.defineProperty(exports, "YStack", { enumerable: true, get: function () { return gui_1.YStack; } });
156
+ Object.defineProperty(exports, "ZStack", { enumerable: true, get: function () { return gui_1.ZStack; } });
157
+ Object.defineProperty(exports, "badgeVariants", { enumerable: true, get: function () { return gui_1.badgeVariants; } });
158
+ Object.defineProperty(exports, "buttonVariants", { enumerable: true, get: function () { return gui_1.buttonVariants; } });
159
+ Object.defineProperty(exports, "toast", { enumerable: true, get: function () { return gui_1.toast; } });
160
+ Object.defineProperty(exports, "ApplyTypography", { enumerable: true, get: function () { return gui_1.ApplyTypography; } });
161
+ Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return gui_1.Link; } });
162
+ Object.defineProperty(exports, "LinkElement", { enumerable: true, get: function () { return gui_1.LinkElement; } });
163
+ Object.defineProperty(exports, "MDXLink", { enumerable: true, get: function () { return gui_1.MDXLink; } });
164
+ Object.defineProperty(exports, "VideoPlayer", { enumerable: true, get: function () { return gui_1.VideoPlayer; } });
165
+ Object.defineProperty(exports, "YouTubeEmbed", { enumerable: true, get: function () { return gui_1.YouTubeEmbed; } });
166
+ Object.defineProperty(exports, "useLink", { enumerable: true, get: function () { return gui_1.useLink; } });
167
+ Object.defineProperty(exports, "Form", { enumerable: true, get: function () { return gui_1.Form; } });
168
+ Object.defineProperty(exports, "FormField", { enumerable: true, get: function () { return gui_1.FormField; } });
169
+ Object.defineProperty(exports, "FormItem", { enumerable: true, get: function () { return gui_1.FormItem; } });
170
+ Object.defineProperty(exports, "FormLabel", { enumerable: true, get: function () { return gui_1.FormLabel; } });
171
+ Object.defineProperty(exports, "FormControl", { enumerable: true, get: function () { return gui_1.FormControl; } });
172
+ Object.defineProperty(exports, "FormDescription", { enumerable: true, get: function () { return gui_1.FormDescription; } });
173
+ Object.defineProperty(exports, "FormMessage", { enumerable: true, get: function () { return gui_1.FormMessage; } });
174
+ Object.defineProperty(exports, "useFormField", { enumerable: true, get: function () { return gui_1.useFormField; } });
175
+ Object.defineProperty(exports, "Carousel", { enumerable: true, get: function () { return gui_1.Carousel; } });
176
+ Object.defineProperty(exports, "CarouselContent", { enumerable: true, get: function () { return gui_1.CarouselContent; } });
177
+ Object.defineProperty(exports, "CarouselItem", { enumerable: true, get: function () { return gui_1.CarouselItem; } });
178
+ Object.defineProperty(exports, "CarouselPrevious", { enumerable: true, get: function () { return gui_1.CarouselPrevious; } });
179
+ Object.defineProperty(exports, "CarouselNext", { enumerable: true, get: function () { return gui_1.CarouselNext; } });
180
+ Object.defineProperty(exports, "Skeleton", { enumerable: true, get: function () { return gui_1.Skeleton; } });
181
+ Object.defineProperty(exports, "MediaStack", { enumerable: true, get: function () { return gui_1.MediaStack; } });
182
+ Object.defineProperty(exports, "fit", { enumerable: true, get: function () { return gui_1.fit; } });
183
+ Object.defineProperty(exports, "NavItems", { enumerable: true, get: function () { return gui_1.NavItems; } });
184
+ Object.defineProperty(exports, "StepIndicator", { enumerable: true, get: function () { return gui_1.StepIndicator; } });
185
+ Object.defineProperty(exports, "Sheet", { enumerable: true, get: function () { return gui_1.Sheet; } });
186
+ Object.defineProperty(exports, "SheetClose", { enumerable: true, get: function () { return gui_1.SheetClose; } });
187
+ Object.defineProperty(exports, "SheetContent", { enumerable: true, get: function () { return gui_1.SheetContent; } });
188
+ Object.defineProperty(exports, "SheetDescription", { enumerable: true, get: function () { return gui_1.SheetDescription; } });
189
+ Object.defineProperty(exports, "SheetFooter", { enumerable: true, get: function () { return gui_1.SheetFooter; } });
190
+ Object.defineProperty(exports, "SheetHeader", { enumerable: true, get: function () { return gui_1.SheetHeader; } });
191
+ Object.defineProperty(exports, "SheetOverlay", { enumerable: true, get: function () { return gui_1.SheetOverlay; } });
192
+ Object.defineProperty(exports, "SheetPortal", { enumerable: true, get: function () { return gui_1.SheetPortal; } });
193
+ Object.defineProperty(exports, "SheetTitle", { enumerable: true, get: function () { return gui_1.SheetTitle; } });
194
+ Object.defineProperty(exports, "SheetTrigger", { enumerable: true, get: function () { return gui_1.SheetTrigger; } });
195
+ Object.defineProperty(exports, "Breadcrumb", { enumerable: true, get: function () { return gui_1.Breadcrumb; } });
196
+ Object.defineProperty(exports, "BreadcrumbEllipsis", { enumerable: true, get: function () { return gui_1.BreadcrumbEllipsis; } });
197
+ Object.defineProperty(exports, "BreadcrumbItem", { enumerable: true, get: function () { return gui_1.BreadcrumbItem; } });
198
+ Object.defineProperty(exports, "BreadcrumbLink", { enumerable: true, get: function () { return gui_1.BreadcrumbLink; } });
199
+ Object.defineProperty(exports, "BreadcrumbList", { enumerable: true, get: function () { return gui_1.BreadcrumbList; } });
200
+ Object.defineProperty(exports, "BreadcrumbPage", { enumerable: true, get: function () { return gui_1.BreadcrumbPage; } });
201
+ Object.defineProperty(exports, "BreadcrumbSeparator", { enumerable: true, get: function () { return gui_1.BreadcrumbSeparator; } });
202
+ Object.defineProperty(exports, "InputOTP", { enumerable: true, get: function () { return gui_1.InputOTP; } });
203
+ Object.defineProperty(exports, "InputOTPGroup", { enumerable: true, get: function () { return gui_1.InputOTPGroup; } });
204
+ Object.defineProperty(exports, "InputOTPSeparator", { enumerable: true, get: function () { return gui_1.InputOTPSeparator; } });
205
+ Object.defineProperty(exports, "InputOTPSlot", { enumerable: true, get: function () { return gui_1.InputOTPSlot; } });
206
+ Object.defineProperty(exports, "NavigationMenu", { enumerable: true, get: function () { return gui_1.NavigationMenu; } });
207
+ Object.defineProperty(exports, "NavigationMenuContent", { enumerable: true, get: function () { return gui_1.NavigationMenuContent; } });
208
+ Object.defineProperty(exports, "NavigationMenuItem", { enumerable: true, get: function () { return gui_1.NavigationMenuItem; } });
209
+ Object.defineProperty(exports, "NavigationMenuLink", { enumerable: true, get: function () { return gui_1.NavigationMenuLink; } });
210
+ Object.defineProperty(exports, "NavigationMenuList", { enumerable: true, get: function () { return gui_1.NavigationMenuList; } });
211
+ Object.defineProperty(exports, "NavigationMenuTrigger", { enumerable: true, get: function () { return gui_1.NavigationMenuTrigger; } });
212
+ Object.defineProperty(exports, "navigationMenuTriggerStyle", { enumerable: true, get: function () { return gui_1.navigationMenuTriggerStyle; } });
213
+ Object.defineProperty(exports, "Drawer", { enumerable: true, get: function () { return gui_1.Drawer; } });
214
+ Object.defineProperty(exports, "DrawerContent", { enumerable: true, get: function () { return gui_1.DrawerContent; } });
215
+ Object.defineProperty(exports, "DrawerHandle", { enumerable: true, get: function () { return gui_1.DrawerHandle; } });
216
+ Object.defineProperty(exports, "DrawerTrigger", { enumerable: true, get: function () { return gui_1.DrawerTrigger; } });
217
+ Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return gui_1.Accordion; } });
218
+ Object.defineProperty(exports, "AccordionContent", { enumerable: true, get: function () { return gui_1.AccordionContent; } });
219
+ Object.defineProperty(exports, "AccordionItem", { enumerable: true, get: function () { return gui_1.AccordionItem; } });
220
+ Object.defineProperty(exports, "AccordionTrigger", { enumerable: true, get: function () { return gui_1.AccordionTrigger; } });
221
+ Object.defineProperty(exports, "AlertDialog", { enumerable: true, get: function () { return gui_1.AlertDialog; } });
222
+ Object.defineProperty(exports, "AlertDialogAction", { enumerable: true, get: function () { return gui_1.AlertDialogAction; } });
223
+ Object.defineProperty(exports, "AlertDialogCancel", { enumerable: true, get: function () { return gui_1.AlertDialogCancel; } });
224
+ Object.defineProperty(exports, "AlertDialogContent", { enumerable: true, get: function () { return gui_1.AlertDialogContent; } });
225
+ Object.defineProperty(exports, "AlertDialogDescription", { enumerable: true, get: function () { return gui_1.AlertDialogDescription; } });
226
+ Object.defineProperty(exports, "AlertDialogFooter", { enumerable: true, get: function () { return gui_1.AlertDialogFooter; } });
227
+ Object.defineProperty(exports, "AlertDialogHeader", { enumerable: true, get: function () { return gui_1.AlertDialogHeader; } });
228
+ Object.defineProperty(exports, "AlertDialogOverlay", { enumerable: true, get: function () { return gui_1.AlertDialogOverlay; } });
229
+ Object.defineProperty(exports, "AlertDialogPortal", { enumerable: true, get: function () { return gui_1.AlertDialogPortal; } });
230
+ Object.defineProperty(exports, "AlertDialogTitle", { enumerable: true, get: function () { return gui_1.AlertDialogTitle; } });
231
+ Object.defineProperty(exports, "AlertDialogTrigger", { enumerable: true, get: function () { return gui_1.AlertDialogTrigger; } });
232
+ Object.defineProperty(exports, "ContextMenu", { enumerable: true, get: function () { return gui_1.ContextMenu; } });
233
+ Object.defineProperty(exports, "ContextMenuCheckboxItem", { enumerable: true, get: function () { return gui_1.ContextMenuCheckboxItem; } });
234
+ Object.defineProperty(exports, "ContextMenuContent", { enumerable: true, get: function () { return gui_1.ContextMenuContent; } });
235
+ Object.defineProperty(exports, "ContextMenuGroup", { enumerable: true, get: function () { return gui_1.ContextMenuGroup; } });
236
+ Object.defineProperty(exports, "ContextMenuItem", { enumerable: true, get: function () { return gui_1.ContextMenuItem; } });
237
+ Object.defineProperty(exports, "ContextMenuLabel", { enumerable: true, get: function () { return gui_1.ContextMenuLabel; } });
238
+ Object.defineProperty(exports, "ContextMenuPortal", { enumerable: true, get: function () { return gui_1.ContextMenuPortal; } });
239
+ Object.defineProperty(exports, "ContextMenuRadioGroup", { enumerable: true, get: function () { return gui_1.ContextMenuRadioGroup; } });
240
+ Object.defineProperty(exports, "ContextMenuRadioItem", { enumerable: true, get: function () { return gui_1.ContextMenuRadioItem; } });
241
+ Object.defineProperty(exports, "ContextMenuSeparator", { enumerable: true, get: function () { return gui_1.ContextMenuSeparator; } });
242
+ Object.defineProperty(exports, "ContextMenuShortcut", { enumerable: true, get: function () { return gui_1.ContextMenuShortcut; } });
243
+ Object.defineProperty(exports, "ContextMenuSub", { enumerable: true, get: function () { return gui_1.ContextMenuSub; } });
244
+ Object.defineProperty(exports, "ContextMenuSubContent", { enumerable: true, get: function () { return gui_1.ContextMenuSubContent; } });
245
+ Object.defineProperty(exports, "ContextMenuSubTrigger", { enumerable: true, get: function () { return gui_1.ContextMenuSubTrigger; } });
246
+ Object.defineProperty(exports, "ContextMenuTrigger", { enumerable: true, get: function () { return gui_1.ContextMenuTrigger; } });
247
+ Object.defineProperty(exports, "HoverCard", { enumerable: true, get: function () { return gui_1.HoverCard; } });
248
+ Object.defineProperty(exports, "HoverCardContent", { enumerable: true, get: function () { return gui_1.HoverCardContent; } });
249
+ Object.defineProperty(exports, "HoverCardTrigger", { enumerable: true, get: function () { return gui_1.HoverCardTrigger; } });
250
+ Object.defineProperty(exports, "RadioGroup", { enumerable: true, get: function () { return gui_1.RadioGroup; } });
251
+ Object.defineProperty(exports, "RadioGroupItem", { enumerable: true, get: function () { return gui_1.RadioGroupItem; } });
252
+ Object.defineProperty(exports, "ToggleGroup", { enumerable: true, get: function () { return gui_1.ToggleGroup; } });
253
+ Object.defineProperty(exports, "ToggleGroupItem", { enumerable: true, get: function () { return gui_1.ToggleGroupItem; } });
254
+ // LAYOUT — the stacks and the type scale reach consumers through the component
255
+ // barrel above, which already names XStack/YStack/ZStack, the type scale
256
+ // (SizableText, Paragraph, Heading, H1-H6, Span, Strong, Em) and Image, Spacer,
257
+ // ScrollView, View and Text. This block adds only what that one lacks.
258
+ //
259
+ // It used to repeat all twenty, and TypeScript rejects a name exported twice from
260
+ // one module: `error TS2300: Duplicate identifier 'Em'` and nineteen more, so
261
+ // `tsc -p tsconfig.build.json` failed and @hanzo/ui could not build AT ALL. That
262
+ // took the whole cicd lane down with it — the test gate runs
263
+ // `pnpm --filter @hanzo/ui... build` first, so no test ever ran and ui.hanzo.ai
264
+ // could not ship.
265
+ //
266
+ // The concern the duplication came from is real and still holds: a name must be
267
+ // on the ROOT barrel to reach a consumer — 8.0.65 added these to the backend only
268
+ // and the dist still had no XStack, a green release that changed nothing. The fix
269
+ // for that is to name it once here, not twice.
270
+ var gui_2 = require("./backends/gui/index.cjs");
271
+ Object.defineProperty(exports, "Anchor", { enumerable: true, get: function () { return gui_2.Anchor; } });
272
+ // `Hanzo` — the root, and the only thing an app mounts. It carries the gui
273
+ // config and the generated stylesheet, so `npm i @hanzo/ui` is the whole setup:
274
+ // no gui.config.ts, no CSS import, no generator script.
275
+ var root_1 = require("./root.node.cjs");
276
+ Object.defineProperty(exports, "Hanzo", { enumerable: true, get: function () { return root_1.Hanzo; } });
277
+ // `cn` — the class-name composer, surfaced for convenience.
278
+ // The type goes with the function. `cn(...inputs: ClassValue[])` cannot be
279
+ // typed at a call site without it, so exporting one and not the other left
280
+ // every consumer reaching into a subpath for half of a pair.
281
+ var slot_1 = require("./slot.cjs");
282
+ Object.defineProperty(exports, "Slot", { enumerable: true, get: function () { return slot_1.Slot; } });
283
+ var cn_1 = require("./core/cn.cjs");
284
+ Object.defineProperty(exports, "cn", { enumerable: true, get: function () { return cn_1.cn; } });
285
+ Object.defineProperty(exports, "capitalize", { enumerable: true, get: function () { return cn_1.capitalize; } });
286
+ Object.defineProperty(exports, "variants", { enumerable: true, get: function () { return cn_1.variants; } });
287
+ // The design-token scale (colors, dark/light themes, radii, spacing, typography)
288
+ // lives on the `@hanzo/ui/core` / `@hanzo/ui/tokens` subpath — pure data, no
289
+ // runtime.
290
+ var tw_1 = require("./tw.cjs");
291
+ Object.defineProperty(exports, "tw", { enumerable: true, get: function () { return tw_1.tw; } });
292
+ var box_1 = require("./box.cjs");
293
+ Object.defineProperty(exports, "Box", { enumerable: true, get: function () { return box_1.Box; } });
294
+ var sx_1 = require("./sx.cjs");
295
+ Object.defineProperty(exports, "sx", { enumerable: true, get: function () { return sx_1.sx; } });
296
+ var css_1 = require("./css.cjs");
297
+ Object.defineProperty(exports, "css", { enumerable: true, get: function () { return css_1.css; } });
package/dist/root.cjs CHANGED
@@ -47,25 +47,21 @@ require("./styles.css");
47
47
  * production. `styles.css` declares `--hanzo-ui-styles`, so the check is one
48
48
  * lookup, it runs once, and it names the fix. Development only.
49
49
  *
50
- * Only a sheet with an OWNER ELEMENT counts. A bundler that processed the CSS
51
- * emits a `<link>` or a `<style>`; jsdom loads no CSS at all, so a document
52
- * with no such element cannot answer the question and must not be asked —
53
- * throwing there breaks every consumer's unit tests to report a condition that
54
- * cannot exist. Counting SHEETS instead of elements is what made that happen:
55
- * the gui runtime inserts its own ownerless sheet while this module is being
56
- * imported, so by first render jsdom was never empty and every jest consumer
57
- * rendering `<Hanzo>` threw. */
50
+ * It REPORTS. An unstyled page is already plain to whoever is looking at it, so
51
+ * the message only has to say why; refusing to render costs a consumer their
52
+ * whole suite to announce a condition their browser would have shown them.
53
+ * Asking whether any stylesheet has an owner element does not narrow it either
54
+ * — that is true of any dependency that inserts a `<style>`, which is how a
55
+ * DOM-SVG icon backend came to fail every test file that mounts `<Hanzo>`. The
56
+ * marker is the only sound signal, so it is the only one consulted. */
58
57
  let checked = false;
59
- const styled = () => [...document.styleSheets].some((s) => s.ownerNode);
60
58
  const assertStylesheet = () => {
61
- if (checked || typeof document === 'undefined' || !styled())
59
+ if (checked || typeof document === 'undefined')
62
60
  return;
63
61
  checked = true;
64
62
  if (getComputedStyle(document.documentElement).getPropertyValue('--hanzo-ui-styles').trim())
65
63
  return;
66
- throw new Error('@hanzo/ui: styles.css did not reach the document. <Hanzo> imports it, so a bundler ' +
67
- 'that does not process CSS imported from node_modules has dropped it. Import it ' +
68
- "directly instead: import '@hanzo/ui/styles.css'.");
64
+ console.error("@hanzo/ui: styles.css did not reach the document. Import it directly: import '@hanzo/ui/styles.css'.");
69
65
  };
70
66
  const Hanzo = ({ children, theme = 'dark', analytics }) => {
71
67
  if (process.env.NODE_ENV !== 'production')
@@ -1 +1 @@
1
- {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../src/root.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjD,OAAO,cAAc,CAAA;AAErB,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAA;CACtC,CAAA;AA2BD,eAAO,MAAM,KAAK,mCAA6C,UAAU,gCA+BxE,CAAA;eAEc,KAAK"}
1
+ {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../src/root.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjD,OAAO,cAAc,CAAA;AAErB,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAA;CACtC,CAAA;AAuBD,eAAO,MAAM,KAAK,mCAA6C,UAAU,gCA+BxE,CAAA;eAEc,KAAK"}
package/dist/root.js CHANGED
@@ -44,25 +44,21 @@ import './styles.css';
44
44
  * production. `styles.css` declares `--hanzo-ui-styles`, so the check is one
45
45
  * lookup, it runs once, and it names the fix. Development only.
46
46
  *
47
- * Only a sheet with an OWNER ELEMENT counts. A bundler that processed the CSS
48
- * emits a `<link>` or a `<style>`; jsdom loads no CSS at all, so a document
49
- * with no such element cannot answer the question and must not be asked —
50
- * throwing there breaks every consumer's unit tests to report a condition that
51
- * cannot exist. Counting SHEETS instead of elements is what made that happen:
52
- * the gui runtime inserts its own ownerless sheet while this module is being
53
- * imported, so by first render jsdom was never empty and every jest consumer
54
- * rendering `<Hanzo>` threw. */
47
+ * It REPORTS. An unstyled page is already plain to whoever is looking at it, so
48
+ * the message only has to say why; refusing to render costs a consumer their
49
+ * whole suite to announce a condition their browser would have shown them.
50
+ * Asking whether any stylesheet has an owner element does not narrow it either
51
+ * — that is true of any dependency that inserts a `<style>`, which is how a
52
+ * DOM-SVG icon backend came to fail every test file that mounts `<Hanzo>`. The
53
+ * marker is the only sound signal, so it is the only one consulted. */
55
54
  let checked = false;
56
- const styled = () => [...document.styleSheets].some((s) => s.ownerNode);
57
55
  const assertStylesheet = () => {
58
- if (checked || typeof document === 'undefined' || !styled())
56
+ if (checked || typeof document === 'undefined')
59
57
  return;
60
58
  checked = true;
61
59
  if (getComputedStyle(document.documentElement).getPropertyValue('--hanzo-ui-styles').trim())
62
60
  return;
63
- throw new Error('@hanzo/ui: styles.css did not reach the document. <Hanzo> imports it, so a bundler ' +
64
- 'that does not process CSS imported from node_modules has dropped it. Import it ' +
65
- "directly instead: import '@hanzo/ui/styles.css'.");
61
+ console.error("@hanzo/ui: styles.css did not reach the document. Import it directly: import '@hanzo/ui/styles.css'.");
66
62
  };
67
63
  export const Hanzo = ({ children, theme = 'dark', analytics }) => {
68
64
  if (process.env.NODE_ENV !== 'production')
package/dist/root.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"root.js","sourceRoot":"","sources":["../src/root.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAwB,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAE,SAAS,EAAkB,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,cAAc,CAAA;AAgCrB;;;;;;;;;;;iCAWiC;AACjC,IAAI,OAAO,GAAG,KAAK,CAAA;AACnB,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;AACvE,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC5B,IAAI,OAAO,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,CAAC,MAAM,EAAE;QAAE,OAAM;IACnE,OAAO,GAAG,IAAI,CAAA;IACd,IAAI,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,IAAI,EAAE;QAAE,OAAM;IACnG,MAAM,IAAI,KAAK,CACb,qFAAqF;QACnF,iFAAiF;QACjF,kDAAkD,CACrD,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,SAAS,EAAc,EAAE,EAAE;IAC3E,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;QAAE,gBAAgB,EAAE,CAAA;IAC7D,wEAAwE;IACxE,EAAE;IACF,4EAA4E;IAC5E,4EAA4E;IAC5E,0EAA0E;IAC1E,8EAA8E;IAC9E,8EAA8E;IAC9E,wBAAwB;IACxB,EAAE;IACF,sEAAsE;IACtE,4EAA4E;IAC5E,qCAAqC;IACrC,EAAE;IACF,yEAAyE;IACzE,mEAAmE;IACnE,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;IACf,CAAC,EAAE,EAAE,CAAC,CAAA;IACN,MAAM,IAAI,GAAG,CACX,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB,kBAC/D,QAAQ,GACG,CACf,CAAA;IACD,6EAA6E;IAC7E,yEAAyE;IACzE,8EAA8E;IAC9E,qDAAqD;IACrD,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAA;IAC3B,OAAO,KAAC,iBAAiB,OAAK,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,YAAG,IAAI,GAAqB,CAAA;AACjG,CAAC,CAAA;AAED,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"root.js","sourceRoot":"","sources":["../src/root.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAwB,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAE,SAAS,EAAkB,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,cAAc,CAAA;AAgCrB;;;;;;;;;;wEAUwE;AACxE,IAAI,OAAO,GAAG,KAAK,CAAA;AACnB,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC5B,IAAI,OAAO,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAM;IACtD,OAAO,GAAG,IAAI,CAAA;IACd,IAAI,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,IAAI,EAAE;QAAE,OAAM;IACnG,OAAO,CAAC,KAAK,CACX,sGAAsG,CACvG,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,SAAS,EAAc,EAAE,EAAE;IAC3E,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;QAAE,gBAAgB,EAAE,CAAA;IAC7D,wEAAwE;IACxE,EAAE;IACF,4EAA4E;IAC5E,4EAA4E;IAC5E,0EAA0E;IAC1E,8EAA8E;IAC9E,8EAA8E;IAC9E,wBAAwB;IACxB,EAAE;IACF,sEAAsE;IACtE,4EAA4E;IAC5E,qCAAqC;IACrC,EAAE;IACF,yEAAyE;IACzE,mEAAmE;IACnE,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;IACf,CAAC,EAAE,EAAE,CAAC,CAAA;IACN,MAAM,IAAI,GAAG,CACX,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB,kBAC/D,QAAQ,GACG,CACf,CAAA;IACD,6EAA6E;IAC7E,yEAAyE;IACzE,8EAA8E;IAC9E,qDAAqD;IACrD,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAA;IAC3B,OAAO,KAAC,iBAAiB,OAAK,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,YAAG,IAAI,GAAqB,CAAA;AACjG,CAAC,CAAA;AAED,eAAe,KAAK,CAAA"}
@@ -0,0 +1,97 @@
1
+ 'use client';"use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Hanzo = void 0;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ /**
7
+ * `Hanzo` — the root. The only thing an app has to mount.
8
+ *
9
+ * import { Hanzo, Button } from '@hanzo/ui'
10
+ * <Hanzo><Button>Ship</Button></Hanzo>
11
+ *
12
+ * No config file, no CSS import, no generator script, no bundler aliases. Three
13
+ * things used to be the app's job and are now the package's:
14
+ *
15
+ * the config — @hanzo/gui resolves `$3` / `$background` / `$borderColor`
16
+ * against ONE process-global config, and @hanzo/ui owns it (gui-config.ts).
17
+ * It is passed here as a value, not imported for its side effect: Vite 8
18
+ * ignores package.json `sideEffects` ARRAYS outright, so a bare
19
+ * `import './gui-config.cjs'` is dropped and the first render dies on "Missing
20
+ * hanzogui config". A value a rendered component needs cannot be shaken out.
21
+ *
22
+ * the stylesheet — `styles.css` is generated at OUR publish time by rendering
23
+ * every component and harvesting the atomic CSS that render produces
24
+ * (scripts/gen-css.mjs). It used to be each app's job to run a generator and
25
+ * import its output; hanzo.app never did, and shipped 103 `_bg-` classes
26
+ * against zero `_bg-` rules with a green build the whole time.
27
+ *
28
+ * the theme — gui throws "Missing theme." for any component without a root
29
+ * theme context, so there is no version of this that works with no root at
30
+ * all. Dark-first, matching the Hanzo identity.
31
+ *
32
+ * `disableInjectCSS` because the sheet is a real file. Left on, the provider
33
+ * inlines `config.getCSS()` into the document on every streaming flush — that is
34
+ * how hanzo.ai once shipped thirteen byte-identical copies, 591,305 of its
35
+ * 638,443 bytes. A file is cached once and costs nothing after the first page.
36
+ * Styles gui generates at runtime for props we could not know at publish time
37
+ * still reach the document: that path is `insertStyleRules`, and it is not what
38
+ * this flag controls.
39
+ */
40
+ const gui_1 = require("@hanzo/gui");
41
+ const telemetry_1 = require("@hanzogui/telemetry");
42
+ const react_1 = require("react");
43
+ const state_1 = require("@hanzo/appearance/state");
44
+ const gui_config_1 = require("./gui-config.cjs");
45
+ // styles.css is omitted from the node entry: node cannot load a stylesheet.
46
+ /** A stylesheet that did not reach the document is invisible until someone opens
47
+ * production. `styles.css` declares `--hanzo-ui-styles`, so the check is one
48
+ * lookup, it runs once, and it names the fix. Development only.
49
+ *
50
+ * It REPORTS. An unstyled page is already plain to whoever is looking at it, so
51
+ * the message only has to say why; refusing to render costs a consumer their
52
+ * whole suite to announce a condition their browser would have shown them.
53
+ * Asking whether any stylesheet has an owner element does not narrow it either
54
+ * — that is true of any dependency that inserts a `<style>`, which is how a
55
+ * DOM-SVG icon backend came to fail every test file that mounts `<Hanzo>`. The
56
+ * marker is the only sound signal, so it is the only one consulted. */
57
+ let checked = false;
58
+ const assertStylesheet = () => {
59
+ if (checked || typeof document === 'undefined')
60
+ return;
61
+ checked = true;
62
+ if (getComputedStyle(document.documentElement).getPropertyValue('--hanzo-ui-styles').trim())
63
+ return;
64
+ console.error("@hanzo/ui: styles.css did not reach the document. Import it directly: import '@hanzo/ui/styles.css'.");
65
+ };
66
+ const Hanzo = ({ children, theme = 'dark', analytics }) => {
67
+ if (process.env.NODE_ENV !== 'production')
68
+ assertStylesheet();
69
+ // A person's stored type size, density and accent, put on the document.
70
+ //
71
+ // Unconditional, unlike `analytics`, and the difference is the whole reason
72
+ // that one is a prop. Analytics starts a conversation with a server the app
73
+ // did not ask for; this reads a preference the PERSON already set on this
74
+ // device and honours it. An app that has to opt in is an app that forgets to,
75
+ // and then the setting silently does nothing on that surface — which is worse
76
+ // than not offering it.
77
+ //
78
+ // Costs nothing when unused: an axis nobody set is absent rather than
79
+ // neutral, so `apply()` removes the property instead of stamping a `1` that
80
+ // would outrank a brand's own scale.
81
+ //
82
+ // This is the MOUNT half only. First paint still wants `bootScript()` in
83
+ // <head>, because no component can run before the document exists.
84
+ (0, react_1.useEffect)(() => {
85
+ (0, state_1.apply)((0, state_1.read)());
86
+ }, []);
87
+ const tree = ((0, jsx_runtime_1.jsx)(gui_1.GuiProvider, { config: gui_config_1.config, defaultTheme: theme, disableInjectCSS: true, children: children }));
88
+ // OUTSIDE the gui provider: capture is delegated at the document, so it does
89
+ // not need to be inside the styled tree, and an app that renders its own
90
+ // `<TelemetryProvider/>` above `<Hanzo>` then nests two providers of the same
91
+ // kind rather than interleaving them with the theme.
92
+ if (!analytics)
93
+ return tree;
94
+ return (0, jsx_runtime_1.jsx)(telemetry_1.TelemetryProvider, { ...(analytics === true ? {} : analytics), children: tree });
95
+ };
96
+ exports.Hanzo = Hanzo;
97
+ exports.default = exports.Hanzo;
package/dist/root.node.js CHANGED
@@ -44,25 +44,21 @@ import { config } from './gui-config.js';
44
44
  * production. `styles.css` declares `--hanzo-ui-styles`, so the check is one
45
45
  * lookup, it runs once, and it names the fix. Development only.
46
46
  *
47
- * Only a sheet with an OWNER ELEMENT counts. A bundler that processed the CSS
48
- * emits a `<link>` or a `<style>`; jsdom loads no CSS at all, so a document
49
- * with no such element cannot answer the question and must not be asked —
50
- * throwing there breaks every consumer's unit tests to report a condition that
51
- * cannot exist. Counting SHEETS instead of elements is what made that happen:
52
- * the gui runtime inserts its own ownerless sheet while this module is being
53
- * imported, so by first render jsdom was never empty and every jest consumer
54
- * rendering `<Hanzo>` threw. */
47
+ * It REPORTS. An unstyled page is already plain to whoever is looking at it, so
48
+ * the message only has to say why; refusing to render costs a consumer their
49
+ * whole suite to announce a condition their browser would have shown them.
50
+ * Asking whether any stylesheet has an owner element does not narrow it either
51
+ * — that is true of any dependency that inserts a `<style>`, which is how a
52
+ * DOM-SVG icon backend came to fail every test file that mounts `<Hanzo>`. The
53
+ * marker is the only sound signal, so it is the only one consulted. */
55
54
  let checked = false;
56
- const styled = () => [...document.styleSheets].some((s) => s.ownerNode);
57
55
  const assertStylesheet = () => {
58
- if (checked || typeof document === 'undefined' || !styled())
56
+ if (checked || typeof document === 'undefined')
59
57
  return;
60
58
  checked = true;
61
59
  if (getComputedStyle(document.documentElement).getPropertyValue('--hanzo-ui-styles').trim())
62
60
  return;
63
- throw new Error('@hanzo/ui: styles.css did not reach the document. <Hanzo> imports it, so a bundler ' +
64
- 'that does not process CSS imported from node_modules has dropped it. Import it ' +
65
- "directly instead: import '@hanzo/ui/styles.css'.");
61
+ console.error("@hanzo/ui: styles.css did not reach the document. Import it directly: import '@hanzo/ui/styles.css'.");
66
62
  };
67
63
  export const Hanzo = ({ children, theme = 'dark', analytics }) => {
68
64
  if (process.env.NODE_ENV !== 'production')
package/dist/styles.css CHANGED
@@ -3242,6 +3242,7 @@ a svg,
3242
3242
  :root ._btw-0px._btw-0px{border-top-width:0px;}
3243
3243
  :root ._btw-1px._btw-1px{border-top-width:1px;}
3244
3244
  :root ._bxsh-0px0px0pxrg933189164{box-shadow:0px 0px 0px rgba(0, 0, 0, 0);}
3245
+ :root ._bxsh-0px1px3pxco907201451{box-shadow:0px 1px 3px color-mix(in srgb, var(--shadowColor) 12%, transparent);}
3245
3246
  :root:root:root ._col-0active-colorPress:active{color:var(--colorPress) !important;}
3246
3247
  @media (hover) {:root:root ._col-0hover-ink:hover{color:var(--ink) !important;}}
3247
3248
  :root ._col-accentColor{color:var(--accentColor);}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "8.25.1",
3
+ "version": "8.25.3",
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": {
@@ -8,7 +8,7 @@
8
8
  "types": "./dist/index.d.ts",
9
9
  "node": {
10
10
  "import": "./dist/index.node.js",
11
- "require": "./dist/index.cjs"
11
+ "require": "./dist/index.node.cjs"
12
12
  },
13
13
  "import": "./dist/index.js",
14
14
  "require": "./dist/index.cjs",
@@ -237,7 +237,9 @@
237
237
  "@hanzo/design": "0.5.24",
238
238
  "@hanzo/font": "1.9.2",
239
239
  "@hanzo/logo": "1.0.26",
240
- "@hanzo/products": "0.2.6"
240
+ "@hanzo/products": "0.2.6",
241
+ "react-native-svg": "npm:react-native-svg-web@^1.0.9",
242
+ "react-native-web": "^0.21"
241
243
  },
242
244
  "peerDependencies": {
243
245
  "@hanzo/canvas": ">=0.2.3",
@@ -256,8 +258,7 @@
256
258
  "next-themes": ">=0.2.1",
257
259
  "react": ">=19.2.8",
258
260
  "react-dom": ">=19.2.8",
259
- "react-hook-form": ">=7",
260
- "react-native-web": ">=0.21"
261
+ "react-hook-form": ">=7"
261
262
  },
262
263
  "peerDependenciesMeta": {
263
264
  "@hanzo/canvas": {
@@ -281,9 +282,6 @@
281
282
  "next-themes": {
282
283
  "optional": true
283
284
  },
284
- "react-native-web": {
285
- "optional": true
286
- },
287
285
  "react-hook-form": {
288
286
  "optional": true
289
287
  }
@@ -292,7 +290,7 @@
292
290
  "@hanzo/cd": "0.1.2",
293
291
  "@hanzo/dashboard": "0.2.0",
294
292
  "@hanzo/data": "1.2.4",
295
- "@hanzo/gui": "8.2.1",
293
+ "@hanzo/gui": "8.3.0",
296
294
  "@hanzo/usage": "0.1.7",
297
295
  "@hanzogui/animations-css": "8.2.1",
298
296
  "@hanzogui/config": "8.2.1",