@hanzo/ui 8.27.1 → 8.27.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/index.cjs +1 -1
- package/dist/backends/gui/badge.cjs +3 -3
- package/dist/backends/gui/badge.d.ts +2 -3
- package/dist/backends/gui/badge.d.ts.map +1 -1
- package/dist/backends/gui/badge.js +2 -1
- package/dist/backends/gui/badge.js.map +1 -1
- package/dist/backends/gui/button.cjs +3 -8
- package/dist/backends/gui/button.d.ts +2 -5
- package/dist/backends/gui/button.d.ts.map +1 -1
- package/dist/backends/gui/button.js +2 -6
- package/dist/backends/gui/button.js.map +1 -1
- package/dist/backends/gui/command.logic.cjs +1 -1
- package/dist/backends/gui/command.logic.js +1 -1
- package/dist/backends/gui/control.cjs +1 -1
- package/dist/backends/gui/control.js +1 -1
- package/dist/backends/gui/form.d.ts +1 -1
- package/dist/backends/gui/form.d.ts.map +1 -1
- package/dist/backends/gui/index.cjs +1 -1
- package/dist/backends/gui/ink.cjs +1 -0
- package/dist/backends/gui/ink.d.ts.map +1 -1
- package/dist/backends/gui/ink.js +2 -1
- package/dist/backends/gui/ink.js.map +1 -1
- package/dist/backends/gui/media-stack.cjs +4 -9
- package/dist/backends/gui/media-stack.d.ts +2 -1
- package/dist/backends/gui/media-stack.d.ts.map +1 -1
- package/dist/backends/gui/media-stack.js +2 -6
- package/dist/backends/gui/media-stack.js.map +1 -1
- package/dist/backends/gui/microdata.cjs +1 -1
- package/dist/backends/gui/navigation-menu.cjs +3 -3
- package/dist/backends/gui/navigation-menu.d.ts +2 -1
- package/dist/backends/gui/navigation-menu.d.ts.map +1 -1
- package/dist/backends/gui/navigation-menu.js +2 -1
- package/dist/backends/gui/navigation-menu.js.map +1 -1
- package/dist/backends/gui/place.cjs +1 -1
- package/dist/backends/gui/place.js +1 -1
- package/dist/backends/gui/prose.cjs +1 -0
- package/dist/backends/gui/prose.d.ts.map +1 -1
- package/dist/backends/gui/prose.js +2 -1
- package/dist/backends/gui/prose.js.map +1 -1
- package/dist/backends/gui/resizable.logic.cjs +1 -1
- package/dist/backends/gui/resizable.logic.js +1 -1
- package/dist/backends/gui/slot.cjs +1 -1
- package/dist/backends/gui/slot.js +1 -1
- package/dist/blocks/accordian.cjs +1 -1
- package/dist/blocks/accordian.js +1 -1
- package/dist/blocks/bullet-cards.cjs +1 -1
- package/dist/blocks/bullet-cards.js +1 -1
- package/dist/blocks/card.cjs +1 -1
- package/dist/blocks/card.js +1 -1
- package/dist/blocks/carte-blanche.cjs +1 -0
- package/dist/blocks/carte-blanche.d.ts.map +1 -1
- package/dist/blocks/carte-blanche.js +2 -1
- package/dist/blocks/carte-blanche.js.map +1 -1
- package/dist/blocks/content.cjs +1 -1
- package/dist/blocks/content.js +1 -1
- package/dist/blocks/def.cjs +1 -1
- package/dist/blocks/def.js +1 -1
- package/dist/blocks/enh-heading.cjs +1 -1
- package/dist/blocks/enh-heading.js +1 -1
- package/dist/blocks/grid.cjs +1 -1
- package/dist/blocks/grid.js +1 -1
- package/dist/blocks/group.cjs +1 -1
- package/dist/blocks/group.js +1 -1
- package/dist/blocks/heading.cjs +1 -1
- package/dist/blocks/heading.js +1 -1
- package/dist/blocks/image.cjs +1 -0
- package/dist/blocks/image.d.ts.map +1 -1
- package/dist/blocks/image.js +2 -1
- package/dist/blocks/image.js.map +1 -1
- package/dist/blocks/index.cjs +1 -1
- package/dist/blocks/space.cjs +1 -1
- package/dist/blocks/space.js +1 -1
- package/dist/blocks/spec.cjs +1 -1
- package/dist/blocks/spec.js +1 -1
- package/dist/brands.cjs +16 -0
- package/dist/brands.d.ts +8 -0
- package/dist/brands.d.ts.map +1 -0
- package/dist/brands.js +6 -0
- package/dist/brands.js.map +1 -0
- package/dist/canvas.cjs +1 -1
- package/dist/cd/layout.cjs +1 -1
- package/dist/cd/layout.js +1 -1
- package/dist/cd/status.cjs +1 -1
- package/dist/cd/status.js +1 -1
- package/dist/cd/time.cjs +1 -1
- package/dist/cd/time.js +1 -1
- package/dist/cd/types.cjs +1 -1
- package/dist/chat/index.cjs +1 -1
- package/dist/chat/words.cjs +1 -1
- package/dist/chat/words.js +1 -1
- package/dist/core/fonts.cjs +1 -1
- package/dist/core/fonts.js +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/dashboard.cjs +1 -1
- package/dist/data.cjs +1 -1
- package/dist/framework/builder-logic.cjs +1 -1
- package/dist/framework/builder-logic.js +1 -1
- package/dist/framework/client.cjs +1 -1
- package/dist/framework/client.js +1 -1
- package/dist/framework/data.cjs +1 -1
- package/dist/framework/data.js +1 -1
- package/dist/framework/fields.cjs +1 -1
- package/dist/framework/fields.js +1 -1
- package/dist/framework/index.cjs +1 -1
- package/dist/framework/media.cjs +1 -1
- package/dist/framework/media.js +1 -1
- package/dist/framework/types.cjs +1 -1
- package/dist/framework/types.js +1 -1
- package/dist/gallery.html +1 -1
- package/dist/gitops.cjs +1 -1
- package/dist/gui-config.cjs +2 -1
- package/dist/gui-config.d.ts.map +1 -1
- package/dist/gui-config.js +1 -0
- package/dist/gui-config.js.map +1 -1
- package/dist/index.cjs +9 -8
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.node.cjs +298 -0
- package/dist/index.node.js +2 -1
- package/dist/models/catalog.cjs +1 -1
- package/dist/models/catalog.js +1 -1
- package/dist/models/index.cjs +1 -1
- package/dist/models/types.cjs +1 -1
- package/dist/next.cjs +38 -1
- package/dist/oss/blueprint.cjs +1 -1
- package/dist/oss/blueprint.js +1 -1
- package/dist/oss/catalog.cjs +1 -1
- package/dist/oss/catalog.js +1 -1
- package/dist/oss.cjs +1 -1
- package/dist/primitives/Accordion.cjs +1 -1
- package/dist/primitives/AccordionContent.cjs +1 -1
- package/dist/primitives/AccordionItem.cjs +1 -1
- package/dist/primitives/AccordionTrigger.cjs +1 -1
- package/dist/primitives/AlertDialog.cjs +1 -1
- package/dist/primitives/AlertDialogAction.cjs +1 -1
- package/dist/primitives/AlertDialogCancel.cjs +1 -1
- package/dist/primitives/AlertDialogContent.cjs +1 -1
- package/dist/primitives/AlertDialogDescription.cjs +1 -1
- package/dist/primitives/AlertDialogFooter.cjs +1 -1
- package/dist/primitives/AlertDialogHeader.cjs +1 -1
- package/dist/primitives/AlertDialogOverlay.cjs +1 -1
- package/dist/primitives/AlertDialogPortal.cjs +1 -1
- package/dist/primitives/AlertDialogTitle.cjs +1 -1
- package/dist/primitives/AlertDialogTrigger.cjs +1 -1
- package/dist/primitives/Anchor.cjs +1 -1
- package/dist/primitives/ApplyTypography.cjs +1 -1
- package/dist/primitives/AspectRatio.cjs +1 -1
- package/dist/primitives/Avatar.cjs +1 -1
- package/dist/primitives/AvatarFallback.cjs +1 -1
- package/dist/primitives/AvatarImage.cjs +1 -1
- package/dist/primitives/Badge.cjs +1 -1
- package/dist/primitives/Band.cjs +1 -1
- package/dist/primitives/Breadcrumb.cjs +1 -1
- package/dist/primitives/BreadcrumbEllipsis.cjs +1 -1
- package/dist/primitives/BreadcrumbItem.cjs +1 -1
- package/dist/primitives/BreadcrumbLink.cjs +1 -1
- package/dist/primitives/BreadcrumbList.cjs +1 -1
- package/dist/primitives/BreadcrumbPage.cjs +1 -1
- package/dist/primitives/BreadcrumbSeparator.cjs +1 -1
- package/dist/primitives/Button.cjs +1 -1
- package/dist/primitives/Card.cjs +1 -1
- package/dist/primitives/CardAction.cjs +1 -1
- package/dist/primitives/CardContent.cjs +1 -1
- package/dist/primitives/CardDescription.cjs +1 -1
- package/dist/primitives/CardFooter.cjs +1 -1
- package/dist/primitives/CardHeader.cjs +1 -1
- package/dist/primitives/CardMedia.cjs +1 -1
- package/dist/primitives/CardTitle.cjs +1 -1
- package/dist/primitives/Carousel.cjs +1 -1
- package/dist/primitives/CarouselContent.cjs +1 -1
- package/dist/primitives/CarouselItem.cjs +1 -1
- package/dist/primitives/CarouselNext.cjs +1 -1
- package/dist/primitives/CarouselPrevious.cjs +1 -1
- package/dist/primitives/Checkbox.cjs +1 -1
- package/dist/primitives/Collapsible.cjs +1 -1
- package/dist/primitives/CollapsibleContent.cjs +1 -1
- package/dist/primitives/CollapsibleTrigger.cjs +1 -1
- package/dist/primitives/Command.cjs +1 -1
- package/dist/primitives/CommandDialog.cjs +1 -1
- package/dist/primitives/CommandEmpty.cjs +1 -1
- package/dist/primitives/CommandGroup.cjs +1 -1
- package/dist/primitives/CommandInput.cjs +1 -1
- package/dist/primitives/CommandItem.cjs +1 -1
- package/dist/primitives/CommandList.cjs +1 -1
- package/dist/primitives/CommandSeparator.cjs +1 -1
- package/dist/primitives/CommandShortcut.cjs +1 -1
- package/dist/primitives/ContextMenu.cjs +1 -1
- package/dist/primitives/ContextMenuCheckboxItem.cjs +1 -1
- package/dist/primitives/ContextMenuContent.cjs +1 -1
- package/dist/primitives/ContextMenuGroup.cjs +1 -1
- package/dist/primitives/ContextMenuItem.cjs +1 -1
- package/dist/primitives/ContextMenuLabel.cjs +1 -1
- package/dist/primitives/ContextMenuPortal.cjs +1 -1
- package/dist/primitives/ContextMenuRadioGroup.cjs +1 -1
- package/dist/primitives/ContextMenuRadioItem.cjs +1 -1
- package/dist/primitives/ContextMenuSeparator.cjs +1 -1
- package/dist/primitives/ContextMenuShortcut.cjs +1 -1
- package/dist/primitives/ContextMenuSub.cjs +1 -1
- package/dist/primitives/ContextMenuSubContent.cjs +1 -1
- package/dist/primitives/ContextMenuSubTrigger.cjs +1 -1
- package/dist/primitives/ContextMenuTrigger.cjs +1 -1
- package/dist/primitives/Dialog.cjs +1 -1
- package/dist/primitives/DialogClose.cjs +1 -1
- package/dist/primitives/DialogContent.cjs +1 -1
- package/dist/primitives/DialogDescription.cjs +1 -1
- package/dist/primitives/DialogFooter.cjs +1 -1
- package/dist/primitives/DialogHeader.cjs +1 -1
- package/dist/primitives/DialogOverlay.cjs +1 -1
- package/dist/primitives/DialogPortal.cjs +1 -1
- package/dist/primitives/DialogTitle.cjs +1 -1
- package/dist/primitives/DialogTrigger.cjs +1 -1
- package/dist/primitives/Drawer.cjs +1 -1
- package/dist/primitives/DrawerContent.cjs +1 -1
- package/dist/primitives/DrawerHandle.cjs +1 -1
- package/dist/primitives/DrawerTrigger.cjs +1 -1
- package/dist/primitives/DropdownMenu.cjs +1 -1
- package/dist/primitives/DropdownMenuCheckboxItem.cjs +1 -1
- package/dist/primitives/DropdownMenuContent.cjs +1 -1
- package/dist/primitives/DropdownMenuGroup.cjs +1 -1
- package/dist/primitives/DropdownMenuItem.cjs +1 -1
- package/dist/primitives/DropdownMenuLabel.cjs +1 -1
- package/dist/primitives/DropdownMenuPortal.cjs +1 -1
- package/dist/primitives/DropdownMenuRadioGroup.cjs +1 -1
- package/dist/primitives/DropdownMenuRadioItem.cjs +1 -1
- package/dist/primitives/DropdownMenuSeparator.cjs +1 -1
- package/dist/primitives/DropdownMenuShortcut.cjs +1 -1
- package/dist/primitives/DropdownMenuSub.cjs +1 -1
- package/dist/primitives/DropdownMenuSubContent.cjs +1 -1
- package/dist/primitives/DropdownMenuSubTrigger.cjs +1 -1
- package/dist/primitives/DropdownMenuTrigger.cjs +1 -1
- package/dist/primitives/Em.cjs +1 -1
- package/dist/primitives/Fill.cjs +1 -1
- package/dist/primitives/Form.cjs +1 -1
- package/dist/primitives/FormControl.cjs +1 -1
- package/dist/primitives/FormDescription.cjs +1 -1
- package/dist/primitives/FormField.cjs +1 -1
- package/dist/primitives/FormItem.cjs +1 -1
- package/dist/primitives/FormLabel.cjs +1 -1
- package/dist/primitives/FormMessage.cjs +1 -1
- package/dist/primitives/Glass.cjs +1 -1
- package/dist/primitives/H1.cjs +1 -1
- package/dist/primitives/H2.cjs +1 -1
- package/dist/primitives/H3.cjs +1 -1
- package/dist/primitives/H4.cjs +1 -1
- package/dist/primitives/H5.cjs +1 -1
- package/dist/primitives/H6.cjs +1 -1
- package/dist/primitives/Heading.cjs +1 -1
- package/dist/primitives/HoverCard.cjs +1 -1
- package/dist/primitives/HoverCardContent.cjs +1 -1
- package/dist/primitives/HoverCardTrigger.cjs +1 -1
- package/dist/primitives/Image.cjs +1 -1
- package/dist/primitives/Input.cjs +1 -1
- package/dist/primitives/InputOTP.cjs +1 -1
- package/dist/primitives/InputOTPGroup.cjs +1 -1
- package/dist/primitives/InputOTPSeparator.cjs +1 -1
- package/dist/primitives/InputOTPSlot.cjs +1 -1
- package/dist/primitives/Label.cjs +1 -1
- package/dist/primitives/Link.cjs +1 -1
- package/dist/primitives/LinkElement.cjs +1 -1
- package/dist/primitives/MDXLink.cjs +1 -1
- package/dist/primitives/MediaStack.cjs +1 -1
- package/dist/primitives/NavItems.cjs +1 -1
- package/dist/primitives/NavigationMenu.cjs +1 -1
- package/dist/primitives/NavigationMenuContent.cjs +1 -1
- package/dist/primitives/NavigationMenuItem.cjs +1 -1
- package/dist/primitives/NavigationMenuLink.cjs +1 -1
- package/dist/primitives/NavigationMenuList.cjs +1 -1
- package/dist/primitives/NavigationMenuTrigger.cjs +1 -1
- package/dist/primitives/Paragraph.cjs +1 -1
- package/dist/primitives/Popover.cjs +1 -1
- package/dist/primitives/PopoverAnchor.cjs +1 -1
- package/dist/primitives/PopoverClose.cjs +1 -1
- package/dist/primitives/PopoverContent.cjs +1 -1
- package/dist/primitives/PopoverTrigger.cjs +1 -1
- package/dist/primitives/Progress.cjs +1 -1
- package/dist/primitives/RadioGroup.cjs +1 -1
- package/dist/primitives/RadioGroupItem.cjs +1 -1
- package/dist/primitives/ResizableHandle.cjs +1 -1
- package/dist/primitives/ResizablePanel.cjs +1 -1
- package/dist/primitives/ResizablePanelGroup.cjs +1 -1
- package/dist/primitives/Screen.cjs +1 -1
- package/dist/primitives/ScrollArea.cjs +1 -1
- package/dist/primitives/ScrollBar.cjs +1 -1
- package/dist/primitives/ScrollView.cjs +1 -1
- package/dist/primitives/Select.cjs +1 -1
- package/dist/primitives/SelectContent.cjs +1 -1
- package/dist/primitives/SelectGroup.cjs +1 -1
- package/dist/primitives/SelectItem.cjs +1 -1
- package/dist/primitives/SelectLabel.cjs +1 -1
- package/dist/primitives/SelectScrollDownButton.cjs +1 -1
- package/dist/primitives/SelectScrollUpButton.cjs +1 -1
- package/dist/primitives/SelectSeparator.cjs +1 -1
- package/dist/primitives/SelectTrigger.cjs +1 -1
- package/dist/primitives/SelectValue.cjs +1 -1
- package/dist/primitives/Separator.cjs +1 -1
- package/dist/primitives/Sheet.cjs +1 -1
- package/dist/primitives/SheetClose.cjs +1 -1
- package/dist/primitives/SheetContent.cjs +1 -1
- package/dist/primitives/SheetDescription.cjs +1 -1
- package/dist/primitives/SheetFooter.cjs +1 -1
- package/dist/primitives/SheetHeader.cjs +1 -1
- package/dist/primitives/SheetOverlay.cjs +1 -1
- package/dist/primitives/SheetPortal.cjs +1 -1
- package/dist/primitives/SheetTitle.cjs +1 -1
- package/dist/primitives/SheetTrigger.cjs +1 -1
- package/dist/primitives/SizableText.cjs +1 -1
- package/dist/primitives/Skeleton.cjs +1 -1
- package/dist/primitives/Slider.cjs +1 -1
- package/dist/primitives/Spacer.cjs +1 -1
- package/dist/primitives/Span.cjs +1 -1
- package/dist/primitives/Spinner.cjs +1 -1
- package/dist/primitives/StepIndicator.cjs +1 -1
- package/dist/primitives/Strong.cjs +1 -1
- package/dist/primitives/Switch.cjs +1 -1
- package/dist/primitives/Tabs.cjs +1 -1
- package/dist/primitives/TabsContent.cjs +1 -1
- package/dist/primitives/TabsList.cjs +1 -1
- package/dist/primitives/TabsTrigger.cjs +1 -1
- package/dist/primitives/Text.cjs +1 -1
- package/dist/primitives/Textarea.cjs +1 -1
- package/dist/primitives/Toaster.cjs +1 -1
- package/dist/primitives/ToggleGroup.cjs +1 -1
- package/dist/primitives/ToggleGroupItem.cjs +1 -1
- package/dist/primitives/Tooltip.cjs +1 -1
- package/dist/primitives/TooltipContent.cjs +1 -1
- package/dist/primitives/TooltipProvider.cjs +1 -1
- package/dist/primitives/TooltipTrigger.cjs +1 -1
- package/dist/primitives/VideoPlayer.cjs +1 -1
- package/dist/primitives/View.cjs +1 -1
- package/dist/primitives/XStack.cjs +1 -1
- package/dist/primitives/YStack.cjs +1 -1
- package/dist/primitives/YouTubeEmbed.cjs +1 -1
- package/dist/primitives/ZStack.cjs +1 -1
- package/dist/primitives/badgeVariants.cjs +1 -1
- package/dist/primitives/bases/data/index.cjs +1 -1
- package/dist/primitives/buttonVariants.cjs +1 -1
- package/dist/primitives/fit.cjs +1 -1
- package/dist/primitives/index.cjs +1 -1
- package/dist/primitives/navigationMenuTriggerStyle.cjs +1 -1
- package/dist/primitives/toast.cjs +1 -1
- package/dist/primitives/useFormField.cjs +1 -1
- package/dist/primitives/useLink.cjs +1 -1
- package/dist/product/Donut.cjs +1 -2
- package/dist/product/Donut.d.ts.map +1 -1
- package/dist/product/Donut.js +0 -1
- package/dist/product/Donut.js.map +1 -1
- package/dist/product/FadeIn.cjs +1 -2
- package/dist/product/FadeIn.d.ts.map +1 -1
- package/dist/product/FadeIn.js +0 -1
- package/dist/product/FadeIn.js.map +1 -1
- package/dist/product/HanzoMark.cjs +1 -2
- package/dist/product/HanzoMark.d.ts.map +1 -1
- package/dist/product/HanzoMark.js +0 -1
- package/dist/product/HanzoMark.js.map +1 -1
- package/dist/product/TooltipAnchor.cjs +1 -2
- package/dist/product/TooltipAnchor.d.ts.map +1 -1
- package/dist/product/TooltipAnchor.js +0 -1
- package/dist/product/TooltipAnchor.js.map +1 -1
- package/dist/product/color.cjs +1 -0
- package/dist/product/color.d.ts.map +1 -1
- package/dist/product/color.js +2 -1
- package/dist/product/color.js.map +1 -1
- package/dist/product/index.cjs +1 -1
- package/dist/product/instrument.cjs +6 -5
- package/dist/product/instrument.d.ts.map +1 -1
- package/dist/product/instrument.js +2 -1
- package/dist/product/instrument.js.map +1 -1
- package/dist/product/match.cjs +1 -1
- package/dist/product/match.js +1 -1
- package/dist/product/menu/index.cjs +1 -1
- package/dist/product/scope.cjs +2 -20
- package/dist/product/scope.d.ts.map +1 -1
- package/dist/product/scope.js +1 -19
- package/dist/product/scope.js.map +1 -1
- package/dist/product/social/format.cjs +1 -1
- package/dist/product/social/format.js +1 -1
- package/dist/product/social/index.cjs +1 -1
- package/dist/product/surfaces.data.cjs +1 -1
- package/dist/product/surfaces.data.js +1 -1
- package/dist/root.cjs +9 -13
- package/dist/root.d.ts.map +1 -1
- package/dist/root.js +9 -13
- package/dist/root.js.map +1 -1
- package/dist/root.node.cjs +97 -0
- package/dist/root.node.js +9 -13
- package/dist/slot.cjs +1 -1
- package/dist/slot.js +1 -1
- package/dist/style.cjs +48 -0
- package/dist/style.d.ts +30 -0
- package/dist/style.d.ts.map +1 -0
- package/dist/style.js +42 -0
- package/dist/style.js.map +1 -0
- package/dist/telemetry.cjs +1 -0
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +1 -0
- package/dist/telemetry.js.map +1 -1
- package/dist/usage.cjs +1 -1
- package/package.json +32 -27
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// Re-export shim. The launcher surface DATA now lives ONCE in `@hanzo/products`
|
|
2
2
|
// (`SURFACES` — the collapse of this list and `@hanzogui/shell`'s `HANZO_APPS`).
|
|
3
3
|
// This file preserves the legacy `Surface` / `SurfaceId` / `SURFACES` /
|
|
4
4
|
// `otherSurfaces` shape byte-for-byte, so existing importers (the `AppHeader`
|
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
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
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'
|
|
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
|
-
|
|
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')
|
package/dist/root.d.ts.map
CHANGED
|
@@ -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;
|
|
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
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
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'
|
|
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
|
-
|
|
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
|
|
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
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
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'
|
|
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
|
-
|
|
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/slot.cjs
CHANGED
package/dist/slot.js
CHANGED
package/dist/style.cjs
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// style.ts — the class names a component wears, as functions.
|
|
3
|
+
//
|
|
4
|
+
// These are strings and arithmetic. They live apart from the components that use
|
|
5
|
+
// them because a component renders through @hanzo/gui, the engine holds its theme
|
|
6
|
+
// in React context, and a module that reaches context is a client module — so a
|
|
7
|
+
// page computing a button's classes on the server would be calling across a
|
|
8
|
+
// boundary, which React reports as "Invalid reference" from a component nobody
|
|
9
|
+
// wrote.
|
|
10
|
+
//
|
|
11
|
+
// The boundary belongs on the components, not on the functions. `dist.test.ts`
|
|
12
|
+
// asserts that for `cn`, `tw`, `sx` and `types`; this is the same rule applied to
|
|
13
|
+
// the names those components wear.
|
|
14
|
+
//
|
|
15
|
+
// The types come from the components as TYPES, which erase — so naming them here
|
|
16
|
+
// costs no import at run time and keeps one definition of what a variant is.
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.fit = exports.navigationMenuTriggerStyle = exports.badgeVariants = exports.buttonVariants = void 0;
|
|
19
|
+
/**
|
|
20
|
+
* A button's classes.
|
|
21
|
+
*
|
|
22
|
+
* Variant and size share the `btn-` namespace, so the two defaults collide on
|
|
23
|
+
* `btn-default`. A Set emits it once; no name is used by both a variant and a
|
|
24
|
+
* size, so nothing else can merge.
|
|
25
|
+
*/
|
|
26
|
+
const buttonVariants = ({ variant, size, className, } = {}) => [...new Set([`btn`, `btn-${variant ?? 'default'}`, `btn-${size ?? 'default'}`, className].filter(Boolean))]
|
|
27
|
+
.join(' ');
|
|
28
|
+
exports.buttonVariants = buttonVariants;
|
|
29
|
+
/** A badge's classes. */
|
|
30
|
+
const badgeVariants = ({ variant } = {}) => `badge badge-${variant ?? 'default'}`;
|
|
31
|
+
exports.badgeVariants = badgeVariants;
|
|
32
|
+
/** The class a navigation-menu trigger wears. Declared in motion.css. */
|
|
33
|
+
const navigationMenuTriggerStyle = () => 'hz-nav-menu-trigger';
|
|
34
|
+
exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle;
|
|
35
|
+
/**
|
|
36
|
+
* `dim` scaled to sit inside `to`, keeping its proportions.
|
|
37
|
+
*
|
|
38
|
+
* Returns `to` unchanged for a source with no dimensions: a media element whose
|
|
39
|
+
* intrinsic size is not known yet occupies the space it was given rather than
|
|
40
|
+
* collapsing.
|
|
41
|
+
*/
|
|
42
|
+
const fit = (dim, to, scale = 1) => {
|
|
43
|
+
if (!dim?.w || !dim?.h)
|
|
44
|
+
return to;
|
|
45
|
+
const r = Math.min(to.w / dim.w, to.h / dim.h) * scale;
|
|
46
|
+
return { w: Math.round(dim.w * r), h: Math.round(dim.h * r) };
|
|
47
|
+
};
|
|
48
|
+
exports.fit = fit;
|
package/dist/style.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Dimensions } from './types.js';
|
|
2
|
+
import type { ButtonSize, ButtonVariant } from './backends/gui/button.js';
|
|
3
|
+
import type { BadgeVariant } from './backends/gui/badge.js';
|
|
4
|
+
/**
|
|
5
|
+
* A button's classes.
|
|
6
|
+
*
|
|
7
|
+
* Variant and size share the `btn-` namespace, so the two defaults collide on
|
|
8
|
+
* `btn-default`. A Set emits it once; no name is used by both a variant and a
|
|
9
|
+
* size, so nothing else can merge.
|
|
10
|
+
*/
|
|
11
|
+
export declare const buttonVariants: ({ variant, size, className, }?: {
|
|
12
|
+
variant?: ButtonVariant | null;
|
|
13
|
+
size?: ButtonSize | null;
|
|
14
|
+
className?: string;
|
|
15
|
+
}) => string;
|
|
16
|
+
/** A badge's classes. */
|
|
17
|
+
export declare const badgeVariants: ({ variant }?: {
|
|
18
|
+
variant?: BadgeVariant | null;
|
|
19
|
+
}) => string;
|
|
20
|
+
/** The class a navigation-menu trigger wears. Declared in motion.css. */
|
|
21
|
+
export declare const navigationMenuTriggerStyle: () => string;
|
|
22
|
+
/**
|
|
23
|
+
* `dim` scaled to sit inside `to`, keeping its proportions.
|
|
24
|
+
*
|
|
25
|
+
* Returns `to` unchanged for a source with no dimensions: a media element whose
|
|
26
|
+
* intrinsic size is not known yet occupies the space it was given rather than
|
|
27
|
+
* collapsing.
|
|
28
|
+
*/
|
|
29
|
+
export declare const fit: (dim: Dimensions, to: Dimensions, scale?: number) => Dimensions;
|
|
30
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,mCAIxB;IAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,WAErE,CAAA;AAEd,yBAAyB;AACzB,eAAO,MAAM,aAAa,iBAAiB;IAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;CAAE,WACrC,CAAA;AAEvC,yEAAyE;AACzE,eAAO,MAAM,0BAA0B,cAA8B,CAAA;AAErE;;;;;;GAMG;AACH,eAAO,MAAM,GAAG,QAAS,UAAU,MAAM,UAAU,qBAAc,UAIhE,CAAA"}
|
package/dist/style.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// style.ts — the class names a component wears, as functions.
|
|
2
|
+
//
|
|
3
|
+
// These are strings and arithmetic. They live apart from the components that use
|
|
4
|
+
// them because a component renders through @hanzo/gui, the engine holds its theme
|
|
5
|
+
// in React context, and a module that reaches context is a client module — so a
|
|
6
|
+
// page computing a button's classes on the server would be calling across a
|
|
7
|
+
// boundary, which React reports as "Invalid reference" from a component nobody
|
|
8
|
+
// wrote.
|
|
9
|
+
//
|
|
10
|
+
// The boundary belongs on the components, not on the functions. `dist.test.ts`
|
|
11
|
+
// asserts that for `cn`, `tw`, `sx` and `types`; this is the same rule applied to
|
|
12
|
+
// the names those components wear.
|
|
13
|
+
//
|
|
14
|
+
// The types come from the components as TYPES, which erase — so naming them here
|
|
15
|
+
// costs no import at run time and keeps one definition of what a variant is.
|
|
16
|
+
/**
|
|
17
|
+
* A button's classes.
|
|
18
|
+
*
|
|
19
|
+
* Variant and size share the `btn-` namespace, so the two defaults collide on
|
|
20
|
+
* `btn-default`. A Set emits it once; no name is used by both a variant and a
|
|
21
|
+
* size, so nothing else can merge.
|
|
22
|
+
*/
|
|
23
|
+
export const buttonVariants = ({ variant, size, className, } = {}) => [...new Set([`btn`, `btn-${variant ?? 'default'}`, `btn-${size ?? 'default'}`, className].filter(Boolean))]
|
|
24
|
+
.join(' ');
|
|
25
|
+
/** A badge's classes. */
|
|
26
|
+
export const badgeVariants = ({ variant } = {}) => `badge badge-${variant ?? 'default'}`;
|
|
27
|
+
/** The class a navigation-menu trigger wears. Declared in motion.css. */
|
|
28
|
+
export const navigationMenuTriggerStyle = () => 'hz-nav-menu-trigger';
|
|
29
|
+
/**
|
|
30
|
+
* `dim` scaled to sit inside `to`, keeping its proportions.
|
|
31
|
+
*
|
|
32
|
+
* Returns `to` unchanged for a source with no dimensions: a media element whose
|
|
33
|
+
* intrinsic size is not known yet occupies the space it was given rather than
|
|
34
|
+
* collapsing.
|
|
35
|
+
*/
|
|
36
|
+
export const fit = (dim, to, scale = 1) => {
|
|
37
|
+
if (!dim?.w || !dim?.h)
|
|
38
|
+
return to;
|
|
39
|
+
const r = Math.min(to.w / dim.w, to.h / dim.h) * scale;
|
|
40
|
+
return { w: Math.round(dim.w * r), h: Math.round(dim.h * r) };
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,EAAE;AACF,iFAAiF;AACjF,kFAAkF;AAClF,gFAAgF;AAChF,4EAA4E;AAC5E,+EAA+E;AAC/E,SAAS;AACT,EAAE;AACF,+EAA+E;AAC/E,kFAAkF;AAClF,mCAAmC;AACnC,EAAE;AACF,iFAAiF;AACjF,6EAA6E;AAM7E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,OAAO,EACP,IAAI,EACJ,SAAS,GACV,GAAqF,EAAE,EAAE,EAAE,CAC1F,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,OAAO,OAAO,IAAI,SAAS,EAAE,EAAE,OAAO,IAAI,IAAI,SAAS,EAAE,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;KACxG,IAAI,CAAC,GAAG,CAAC,CAAA;AAEd,yBAAyB;AACzB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,OAAO,EAAE,GAAsC,EAAE,EAAE,EAAE,CACnF,eAAe,OAAO,IAAI,SAAS,EAAE,CAAA;AAEvC,yEAAyE;AACzE,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,EAAE,CAAC,qBAAqB,CAAA;AAErE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,GAAe,EAAE,EAAc,EAAE,KAAK,GAAG,CAAC,EAAc,EAAE;IAC5E,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QAAE,OAAO,EAAE,CAAA;IACjC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;IACtD,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAA;AAC/D,CAAC,CAAA"}
|
package/dist/telemetry.cjs
CHANGED
package/dist/telemetry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAeA,cAAc,qBAAqB,CAAA"}
|
package/dist/telemetry.js
CHANGED
package/dist/telemetry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,8EAA8E;AAC9E,iEAAiE;AACjE,EAAE;AACF,4DAA4D;AAC5D,sDAAsD;AACtD,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAC9E,sCAAsC;AACtC,EAAE;AACF,wDAAwD;AACxD,cAAc,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AACZ,gFAAgF;AAChF,8EAA8E;AAC9E,iEAAiE;AACjE,EAAE;AACF,4DAA4D;AAC5D,sDAAsD;AACtD,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAC9E,sCAAsC;AACtC,EAAE;AACF,wDAAwD;AACxD,cAAc,qBAAqB,CAAA"}
|
package/dist/usage.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.27.
|
|
3
|
+
"version": "8.27.2",
|
|
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",
|
|
@@ -216,6 +216,12 @@
|
|
|
216
216
|
"import": "./dist/agents/index.js",
|
|
217
217
|
"require": "./dist/agents/index.cjs",
|
|
218
218
|
"default": "./dist/agents/index.js"
|
|
219
|
+
},
|
|
220
|
+
"./brands": {
|
|
221
|
+
"types": "./dist/brands.d.ts",
|
|
222
|
+
"import": "./dist/brands.js",
|
|
223
|
+
"require": "./dist/brands.cjs",
|
|
224
|
+
"default": "./dist/brands.js"
|
|
219
225
|
}
|
|
220
226
|
},
|
|
221
227
|
"main": "./dist/index.cjs",
|
|
@@ -237,7 +243,10 @@
|
|
|
237
243
|
"@hanzo/design": "0.5.24",
|
|
238
244
|
"@hanzo/font": "1.9.2",
|
|
239
245
|
"@hanzo/logo": "1.0.26",
|
|
240
|
-
"@hanzo/products": "0.2.6"
|
|
246
|
+
"@hanzo/products": "0.2.6",
|
|
247
|
+
"react-native-svg": "npm:react-native-svg-web@^1.0.9",
|
|
248
|
+
"react-native-web": "^0.21.2",
|
|
249
|
+
"@icons-pack/react-simple-icons": "^13.15.1"
|
|
241
250
|
},
|
|
242
251
|
"peerDependencies": {
|
|
243
252
|
"@hanzo/canvas": ">=0.2.3",
|
|
@@ -246,18 +255,17 @@
|
|
|
246
255
|
"@hanzo/data": ">=1.2.4",
|
|
247
256
|
"@hanzo/gui": ">=8.3.0",
|
|
248
257
|
"@hanzo/usage": ">=0.1.7",
|
|
249
|
-
"@hanzogui/animations-css": "
|
|
250
|
-
"@hanzogui/config": "
|
|
251
|
-
"@hanzogui/lucide-icons-2": "
|
|
252
|
-
"@hanzogui/next-theme": "
|
|
253
|
-
"@hanzogui/telemetry": "
|
|
254
|
-
"@hanzogui/toast": "
|
|
258
|
+
"@hanzogui/animations-css": "8.3.1",
|
|
259
|
+
"@hanzogui/config": "8.3.1",
|
|
260
|
+
"@hanzogui/lucide-icons-2": "8.3.1",
|
|
261
|
+
"@hanzogui/next-theme": "8.3.1",
|
|
262
|
+
"@hanzogui/telemetry": "8.3.1",
|
|
263
|
+
"@hanzogui/toast": "8.3.1",
|
|
255
264
|
"next": ">=16.3.3",
|
|
256
|
-
"next-themes": ">=0
|
|
265
|
+
"next-themes": ">=0",
|
|
257
266
|
"react": ">=19.2.8",
|
|
258
267
|
"react-dom": ">=19.2.8",
|
|
259
|
-
"react-hook-form": ">=7"
|
|
260
|
-
"react-native-web": ">=0.21"
|
|
268
|
+
"react-hook-form": ">=7"
|
|
261
269
|
},
|
|
262
270
|
"peerDependenciesMeta": {
|
|
263
271
|
"@hanzo/canvas": {
|
|
@@ -281,9 +289,6 @@
|
|
|
281
289
|
"next-themes": {
|
|
282
290
|
"optional": true
|
|
283
291
|
},
|
|
284
|
-
"react-native-web": {
|
|
285
|
-
"optional": true
|
|
286
|
-
},
|
|
287
292
|
"react-hook-form": {
|
|
288
293
|
"optional": true
|
|
289
294
|
}
|
|
@@ -292,27 +297,27 @@
|
|
|
292
297
|
"@hanzo/cd": "0.1.2",
|
|
293
298
|
"@hanzo/dashboard": "0.2.0",
|
|
294
299
|
"@hanzo/data": "1.2.4",
|
|
295
|
-
"@hanzo/gui": "8.
|
|
300
|
+
"@hanzo/gui": "8.3.1",
|
|
296
301
|
"@hanzo/usage": "0.1.7",
|
|
297
|
-
"@hanzogui/animations-css": "8.
|
|
298
|
-
"@hanzogui/config": "8.
|
|
299
|
-
"@hanzogui/core": "8.
|
|
300
|
-
"@hanzogui/lucide-icons-2": "8.
|
|
301
|
-
"@hanzogui/next-theme": "8.
|
|
302
|
-
"@hanzogui/telemetry": "8.
|
|
303
|
-
"@hanzogui/toast": "8.
|
|
304
|
-
"@hanzogui/web": "8.
|
|
305
|
-
"@playwright/test": "^1.
|
|
302
|
+
"@hanzogui/animations-css": "8.3.1",
|
|
303
|
+
"@hanzogui/config": "8.3.1",
|
|
304
|
+
"@hanzogui/core": "8.3.1",
|
|
305
|
+
"@hanzogui/lucide-icons-2": "8.3.1",
|
|
306
|
+
"@hanzogui/next-theme": "8.3.1",
|
|
307
|
+
"@hanzogui/telemetry": "8.3.1",
|
|
308
|
+
"@hanzogui/toast": "8.3.1",
|
|
309
|
+
"@hanzogui/web": "8.3.1",
|
|
310
|
+
"@playwright/test": "^1.62.1",
|
|
306
311
|
"@types/node": "26.4.0",
|
|
307
312
|
"@types/react": "19.2.18",
|
|
308
313
|
"@types/react-dom": "19.2.5",
|
|
309
314
|
"next-themes": "^0.4.6",
|
|
310
315
|
"react": "19.2.8",
|
|
311
316
|
"react-dom": "19.2.8",
|
|
312
|
-
"react-hook-form": "^7.
|
|
317
|
+
"react-hook-form": "^7.86.0",
|
|
313
318
|
"react-native-web": "^0.21.2",
|
|
314
319
|
"typescript": "7.0.2",
|
|
315
|
-
"vitest": "^4.1.
|
|
320
|
+
"vitest": "^4.1.11"
|
|
316
321
|
},
|
|
317
322
|
"publishConfig": {
|
|
318
323
|
"access": "public"
|