@hanzo/ui 8.27.1 → 8.27.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.
- 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 +32 -1
- package/dist/gitops.cjs +1 -1
- package/dist/glass.css +31 -0
- 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/styles.css +31 -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/theme.css +31 -0
- package/dist/usage.cjs +1 -1
- package/package.json +32 -27
package/dist/product/scope.cjs
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
* orgScope — the active-organization contract every Hanzo surface shares
|
|
4
|
-
* (hoisted from the console; see hanzoai/ui#36).
|
|
5
|
-
*
|
|
6
|
-
* Brand identity (which IAM you log into, the wordmark + logo) is fixed per
|
|
7
|
-
* host; the DATA scope — which org's identity, secrets and resources the app
|
|
8
|
-
* acts on — is orthogonal. This module owns only that switch. Every
|
|
9
|
-
* tenant-scoped call reads `currentOrg()` and stamps it as `X-Org-Id`.
|
|
10
|
-
*
|
|
11
|
-
* Two-level model: the org VALUE (which org) and the SELECTION (has one been
|
|
12
|
-
* chosen yet) are orthogonal. A fresh login is org-LESS: `hasSelectedOrg()` is
|
|
13
|
-
* false so the host can show its org picker even for a one-org user. Entering
|
|
14
|
-
* (`enterOrg`) sets value + flag and navigates home; leaving (`leaveOrg`)
|
|
15
|
-
* clears the flag back to the picker; the in-shell quick switch (`switchOrg`)
|
|
16
|
-
* persists and reloads so every module refetches under the new `X-Org-Id`.
|
|
17
|
-
*
|
|
18
|
-
* Host-agnostic: storage + navigation are injected (browser defaults), so the
|
|
19
|
-
* same contract runs in Next, Vite, Svelte or a test.
|
|
20
|
-
*/
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
21
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
4
|
exports.orgScope = orgScope;
|
|
23
5
|
exports.filterOrgs = filterOrgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/product/scope.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/product/scope.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,MAAM,GAAG,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvE,MAAM,MAAM,cAAc,GAAG;IAC3B,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAA;IAChB,sEAAsE;IACtE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,6EAA6E;IAC7E,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,YAAY,CAAC,CAAA;IAC7D,gFAAgF;IAChF,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,2EAA2E;IAC3E,UAAU,IAAI,MAAM,CAAA;IACpB,0EAA0E;IAC1E,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,wDAAwD;IACxD,YAAY,IAAI,OAAO,CAAA;IACvB,qEAAqE;IACrE,cAAc,IAAI,OAAO,CAAA;IACzB,oEAAoE;IACpE,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,6EAA6E;IAC7E,QAAQ,IAAI,IAAI,CAAA;IAChB,iFAAiF;IACjF,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B,CAAA;AAWD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,QAAQ,CAoDzD;AAED,kFAAkF;AAClF,wBAAgB,UAAU,CAAC,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE,CAMvE"}
|
package/dist/product/scope.js
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* orgScope — the active-organization contract every Hanzo surface shares
|
|
3
|
-
* (hoisted from the console; see hanzoai/ui#36).
|
|
4
|
-
*
|
|
5
|
-
* Brand identity (which IAM you log into, the wordmark + logo) is fixed per
|
|
6
|
-
* host; the DATA scope — which org's identity, secrets and resources the app
|
|
7
|
-
* acts on — is orthogonal. This module owns only that switch. Every
|
|
8
|
-
* tenant-scoped call reads `currentOrg()` and stamps it as `X-Org-Id`.
|
|
9
|
-
*
|
|
10
|
-
* Two-level model: the org VALUE (which org) and the SELECTION (has one been
|
|
11
|
-
* chosen yet) are orthogonal. A fresh login is org-LESS: `hasSelectedOrg()` is
|
|
12
|
-
* false so the host can show its org picker even for a one-org user. Entering
|
|
13
|
-
* (`enterOrg`) sets value + flag and navigates home; leaving (`leaveOrg`)
|
|
14
|
-
* clears the flag back to the picker; the in-shell quick switch (`switchOrg`)
|
|
15
|
-
* persists and reloads so every module refetches under the new `X-Org-Id`.
|
|
16
|
-
*
|
|
17
|
-
* Host-agnostic: storage + navigation are injected (browser defaults), so the
|
|
18
|
-
* same contract runs in Next, Vite, Svelte or a test.
|
|
19
|
-
*/
|
|
1
|
+
'use client';
|
|
20
2
|
function browserStorage() {
|
|
21
3
|
if (typeof window === 'undefined')
|
|
22
4
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../src/product/scope.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../src/product/scope.ts"],"names":[],"mappings":"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"}
|
|
@@ -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/styles.css
CHANGED
|
@@ -1997,6 +1997,37 @@
|
|
|
1997
1997
|
}
|
|
1998
1998
|
}
|
|
1999
1999
|
|
|
2000
|
+
/* FOCUS RINGS THE CONTROL A PERSON SEES, WHICH IS THE WHOLE COMPOSER.
|
|
2001
|
+
|
|
2002
|
+
`Composer` is a bordered box holding a field above a toolbar row, so it reads
|
|
2003
|
+
as one control the way a chat composer everywhere does. The field inside it is
|
|
2004
|
+
an ordinary textarea, so the indicator was drawn round the field alone: a
|
|
2005
|
+
second rounded rectangle nested inside the box, stopping above the mic and the
|
|
2006
|
+
send button, which reads as the top half being selected. WCAG 2.4.11 asks the
|
|
2007
|
+
indicator to enclose the control, and the control here is the composer.
|
|
2008
|
+
|
|
2009
|
+
THE FIELD DOES NOT ABSTAIN, and control.ts is right that it must not: gui
|
|
2010
|
+
compiles `focusVisibleStyle` to `:root:root:root:root … !important`, past any
|
|
2011
|
+
sheet, so a field that says `outlineWidth: 0` deletes the indicator on every
|
|
2012
|
+
surface at once. What gui declares is `outline-color: var(--outlineColor)` —
|
|
2013
|
+
a VARIABLE — so the colour is re-pointed for this one field instead, in the
|
|
2014
|
+
same breath as the host taking the ring up. The declaration gui emits is
|
|
2015
|
+
untouched and `focus.test.tsx` still reads it.
|
|
2016
|
+
|
|
2017
|
+
Both rules turn on the SAME condition, which is what makes it safe: where
|
|
2018
|
+
`:has` is unsupported neither applies and the field keeps drawing its own
|
|
2019
|
+
ring, so no browser reaches a state with a focused composer and no indicator
|
|
2020
|
+
anywhere. */
|
|
2021
|
+
[data-slot='composer']:has([data-slot='composer-field']:focus-visible) {
|
|
2022
|
+
outline: 2px solid var(--ring);
|
|
2023
|
+
outline-offset: 2px;
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
[data-slot='composer']:has([data-slot='composer-field']:focus-visible)
|
|
2027
|
+
[data-slot='composer-field'] {
|
|
2028
|
+
--outlineColor: transparent;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2000
2031
|
[stylesheet-group="0"]{}
|
|
2001
2032
|
body{margin:0;}
|
|
2002
2033
|
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
|
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/theme.css
CHANGED
|
@@ -1994,3 +1994,34 @@
|
|
|
1994
1994
|
animation: none;
|
|
1995
1995
|
}
|
|
1996
1996
|
}
|
|
1997
|
+
|
|
1998
|
+
/* FOCUS RINGS THE CONTROL A PERSON SEES, WHICH IS THE WHOLE COMPOSER.
|
|
1999
|
+
|
|
2000
|
+
`Composer` is a bordered box holding a field above a toolbar row, so it reads
|
|
2001
|
+
as one control the way a chat composer everywhere does. The field inside it is
|
|
2002
|
+
an ordinary textarea, so the indicator was drawn round the field alone: a
|
|
2003
|
+
second rounded rectangle nested inside the box, stopping above the mic and the
|
|
2004
|
+
send button, which reads as the top half being selected. WCAG 2.4.11 asks the
|
|
2005
|
+
indicator to enclose the control, and the control here is the composer.
|
|
2006
|
+
|
|
2007
|
+
THE FIELD DOES NOT ABSTAIN, and control.ts is right that it must not: gui
|
|
2008
|
+
compiles `focusVisibleStyle` to `:root:root:root:root … !important`, past any
|
|
2009
|
+
sheet, so a field that says `outlineWidth: 0` deletes the indicator on every
|
|
2010
|
+
surface at once. What gui declares is `outline-color: var(--outlineColor)` —
|
|
2011
|
+
a VARIABLE — so the colour is re-pointed for this one field instead, in the
|
|
2012
|
+
same breath as the host taking the ring up. The declaration gui emits is
|
|
2013
|
+
untouched and `focus.test.tsx` still reads it.
|
|
2014
|
+
|
|
2015
|
+
Both rules turn on the SAME condition, which is what makes it safe: where
|
|
2016
|
+
`:has` is unsupported neither applies and the field keeps drawing its own
|
|
2017
|
+
ring, so no browser reaches a state with a focused composer and no indicator
|
|
2018
|
+
anywhere. */
|
|
2019
|
+
[data-slot='composer']:has([data-slot='composer-field']:focus-visible) {
|
|
2020
|
+
outline: 2px solid var(--ring);
|
|
2021
|
+
outline-offset: 2px;
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
[data-slot='composer']:has([data-slot='composer-field']:focus-visible)
|
|
2025
|
+
[data-slot='composer-field'] {
|
|
2026
|
+
--outlineColor: transparent;
|
|
2027
|
+
}
|
package/dist/usage.cjs
CHANGED