@hanzo/ui 8.0.63 → 8.0.65
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/README.md +3 -3
- package/dist/backends/gui/index.cjs +26 -1
- package/dist/backends/gui/index.d.ts +1 -0
- package/dist/backends/gui/index.d.ts.map +1 -1
- package/dist/backends/gui/index.js +4 -0
- package/dist/backends/gui/index.js.map +1 -1
- package/dist/backends/gui/layout.cjs +55 -0
- package/dist/backends/gui/layout.d.ts +28 -0
- package/dist/backends/gui/layout.d.ts.map +1 -0
- package/dist/backends/gui/layout.js +37 -0
- package/dist/backends/gui/layout.js.map +1 -0
- package/dist/gui-config.cjs +37 -4
- package/dist/gui-config.d.ts +783 -0
- package/dist/gui-config.d.ts.map +1 -1
- package/dist/gui-config.js +36 -3
- package/dist/gui-config.js.map +1 -1
- package/dist/primitives/Em.cjs +8 -0
- package/dist/primitives/Em.d.ts +2 -0
- package/dist/primitives/Em.d.ts.map +1 -0
- package/dist/primitives/Em.js +5 -0
- package/dist/primitives/Em.js.map +1 -0
- package/dist/primitives/H1.cjs +8 -0
- package/dist/primitives/H1.d.ts +2 -0
- package/dist/primitives/H1.d.ts.map +1 -0
- package/dist/primitives/H1.js +5 -0
- package/dist/primitives/H1.js.map +1 -0
- package/dist/primitives/H2.cjs +8 -0
- package/dist/primitives/H2.d.ts +2 -0
- package/dist/primitives/H2.d.ts.map +1 -0
- package/dist/primitives/H2.js +5 -0
- package/dist/primitives/H2.js.map +1 -0
- package/dist/primitives/H3.cjs +8 -0
- package/dist/primitives/H3.d.ts +2 -0
- package/dist/primitives/H3.d.ts.map +1 -0
- package/dist/primitives/H3.js +5 -0
- package/dist/primitives/H3.js.map +1 -0
- package/dist/primitives/H4.cjs +8 -0
- package/dist/primitives/H4.d.ts +2 -0
- package/dist/primitives/H4.d.ts.map +1 -0
- package/dist/primitives/H4.js +5 -0
- package/dist/primitives/H4.js.map +1 -0
- package/dist/primitives/H5.cjs +8 -0
- package/dist/primitives/H5.d.ts +2 -0
- package/dist/primitives/H5.d.ts.map +1 -0
- package/dist/primitives/H5.js +5 -0
- package/dist/primitives/H5.js.map +1 -0
- package/dist/primitives/H6.cjs +8 -0
- package/dist/primitives/H6.d.ts +2 -0
- package/dist/primitives/H6.d.ts.map +1 -0
- package/dist/primitives/H6.js +5 -0
- package/dist/primitives/H6.js.map +1 -0
- package/dist/primitives/Heading.cjs +8 -0
- package/dist/primitives/Heading.d.ts +2 -0
- package/dist/primitives/Heading.d.ts.map +1 -0
- package/dist/primitives/Heading.js +5 -0
- package/dist/primitives/Heading.js.map +1 -0
- package/dist/primitives/Image.cjs +8 -0
- package/dist/primitives/Image.d.ts +2 -0
- package/dist/primitives/Image.d.ts.map +1 -0
- package/dist/primitives/Image.js +5 -0
- package/dist/primitives/Image.js.map +1 -0
- package/dist/primitives/Paragraph.cjs +8 -0
- package/dist/primitives/Paragraph.d.ts +2 -0
- package/dist/primitives/Paragraph.d.ts.map +1 -0
- package/dist/primitives/Paragraph.js +5 -0
- package/dist/primitives/Paragraph.js.map +1 -0
- package/dist/primitives/ScrollView.cjs +8 -0
- package/dist/primitives/ScrollView.d.ts +2 -0
- package/dist/primitives/ScrollView.d.ts.map +1 -0
- package/dist/primitives/ScrollView.js +5 -0
- package/dist/primitives/ScrollView.js.map +1 -0
- package/dist/primitives/SizableText.cjs +8 -0
- package/dist/primitives/SizableText.d.ts +2 -0
- package/dist/primitives/SizableText.d.ts.map +1 -0
- package/dist/primitives/SizableText.js +5 -0
- package/dist/primitives/SizableText.js.map +1 -0
- package/dist/primitives/Spacer.cjs +8 -0
- package/dist/primitives/Spacer.d.ts +2 -0
- package/dist/primitives/Spacer.d.ts.map +1 -0
- package/dist/primitives/Spacer.js +5 -0
- package/dist/primitives/Spacer.js.map +1 -0
- package/dist/primitives/Span.cjs +8 -0
- package/dist/primitives/Span.d.ts +2 -0
- package/dist/primitives/Span.d.ts.map +1 -0
- package/dist/primitives/Span.js +5 -0
- package/dist/primitives/Span.js.map +1 -0
- package/dist/primitives/Strong.cjs +8 -0
- package/dist/primitives/Strong.d.ts +2 -0
- package/dist/primitives/Strong.d.ts.map +1 -0
- package/dist/primitives/Strong.js +5 -0
- package/dist/primitives/Strong.js.map +1 -0
- package/dist/primitives/Text.cjs +8 -0
- package/dist/primitives/Text.d.ts +2 -0
- package/dist/primitives/Text.d.ts.map +1 -0
- package/dist/primitives/Text.js +5 -0
- package/dist/primitives/Text.js.map +1 -0
- package/dist/primitives/View.cjs +8 -0
- package/dist/primitives/View.d.ts +2 -0
- package/dist/primitives/View.d.ts.map +1 -0
- package/dist/primitives/View.js +5 -0
- package/dist/primitives/View.js.map +1 -0
- package/dist/primitives/XStack.cjs +8 -0
- package/dist/primitives/XStack.d.ts +2 -0
- package/dist/primitives/XStack.d.ts.map +1 -0
- package/dist/primitives/XStack.js +5 -0
- package/dist/primitives/XStack.js.map +1 -0
- package/dist/primitives/YStack.cjs +8 -0
- package/dist/primitives/YStack.d.ts +2 -0
- package/dist/primitives/YStack.d.ts.map +1 -0
- package/dist/primitives/YStack.js +5 -0
- package/dist/primitives/YStack.js.map +1 -0
- package/dist/primitives/ZStack.cjs +8 -0
- package/dist/primitives/ZStack.d.ts +2 -0
- package/dist/primitives/ZStack.d.ts.map +1 -0
- package/dist/primitives/ZStack.js +5 -0
- package/dist/primitives/ZStack.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -119,7 +119,7 @@ registerField('rating', { Display: MyStars, Input: MyStarPicker })
|
|
|
119
119
|
```tsx
|
|
120
120
|
import { Hanzo } from '@hanzo/ui'
|
|
121
121
|
|
|
122
|
-
<Hanzo analytics={{ product: 'console', ingestKey: process.env.
|
|
122
|
+
<Hanzo analytics={{ product: 'console', ingestKey: process.env.NEXT_PUBLIC_PUBLISHABLE_KEY }}>
|
|
123
123
|
<App />
|
|
124
124
|
</Hanzo>
|
|
125
125
|
```
|
|
@@ -183,8 +183,8 @@ in **both** directions, because that is what explicit means. Beyond that:
|
|
|
183
183
|
|
|
184
184
|
`ingestKey` is a publishable `pk-…` — write-only, safe in a bundle, minted per
|
|
185
185
|
org with `POST /v1/keys {"type":"publishable"}`. Omit it and the client reads
|
|
186
|
-
`
|
|
187
|
-
fleet already carries end to end (KMS holds `deploy/
|
|
186
|
+
`NEXT_PUBLIC_PUBLISHABLE_KEY` from the build env, which is the spelling the
|
|
187
|
+
fleet already carries end to end (KMS holds `deploy/PUBLISHABLE_KEY`; the
|
|
188
188
|
Dockerfile takes it as a build-arg and re-exports it with the `NEXT_PUBLIC_`
|
|
189
189
|
prefix Next needs to inline it). A surface with no key reports only for whoever
|
|
190
190
|
is signed in and silently drops every logged-out visitor — the door refuses an
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
// node scripts/gen-primitives.mjs
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.DropdownMenuPortal = exports.DropdownMenuGroup = exports.DropdownMenuShortcut = exports.DropdownMenuSeparator = exports.DropdownMenuLabel = exports.DropdownMenuRadioItem = exports.DropdownMenuCheckboxItem = exports.DropdownMenuItem = exports.DropdownMenuContent = exports.DropdownMenuTrigger = exports.DropdownMenu = exports.DialogTrigger = exports.DialogTitle = exports.DialogPortal = exports.DialogOverlay = exports.DialogHeader = exports.DialogFooter = exports.DialogDescription = exports.DialogContent = exports.DialogClose = exports.Dialog = exports.CommandSeparator = exports.CommandShortcut = exports.CommandItem = exports.CommandGroup = exports.CommandEmpty = exports.CommandList = exports.CommandInput = exports.CommandDialog = exports.Command = exports.CollapsibleContent = exports.CollapsibleTrigger = exports.Collapsible = exports.Checkbox = exports.CardMedia = exports.CardContent = exports.CardDescription = exports.CardAction = exports.CardTitle = exports.CardFooter = exports.CardHeader = exports.Card = exports.buttonVariants = exports.Button = exports.badgeVariants = exports.Badge = exports.AvatarFallback = exports.AvatarImage = exports.Avatar = exports.AspectRatio = void 0;
|
|
20
|
-
exports.
|
|
20
|
+
exports.Section = exports.SelectScrollDownButton = exports.SelectScrollUpButton = exports.SelectSeparator = exports.SelectItem = exports.SelectLabel = exports.SelectContent = exports.SelectTrigger = exports.SelectValue = exports.SelectGroup = exports.Select = exports.ScrollBar = exports.ScrollArea = exports.Text = exports.View = exports.ScrollView = exports.Spacer = exports.Image = exports.Em = exports.Strong = exports.Span = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = exports.Heading = exports.Paragraph = exports.SizableText = exports.ZStack = exports.YStack = exports.XStack = exports.ResizableHandle = exports.ResizablePanel = exports.ResizablePanelGroup = exports.Progress = exports.PopoverClose = exports.PopoverAnchor = exports.PopoverContent = exports.PopoverTrigger = exports.Popover = exports.Label = exports.Input = exports.Grid = exports.Glass = exports.DropdownMenuRadioGroup = exports.DropdownMenuSubTrigger = exports.DropdownMenuSubContent = exports.DropdownMenuSub = void 0;
|
|
21
|
+
exports.TooltipProvider = exports.TooltipContent = exports.TooltipTrigger = exports.Tooltip = exports.toast = exports.Toaster = exports.Textarea = exports.TabsContent = exports.TabsTrigger = exports.TabsList = exports.Tabs = exports.Switch = exports.Slider = exports.Separator = void 0;
|
|
21
22
|
var aspect_ratio_1 = require("./aspect-ratio.cjs");
|
|
22
23
|
Object.defineProperty(exports, "AspectRatio", { enumerable: true, get: function () { return aspect_ratio_1.AspectRatio; } });
|
|
23
24
|
var avatar_1 = require("./avatar.cjs");
|
|
@@ -102,6 +103,30 @@ var resizable_1 = require("./resizable.cjs");
|
|
|
102
103
|
Object.defineProperty(exports, "ResizablePanelGroup", { enumerable: true, get: function () { return resizable_1.ResizablePanelGroup; } });
|
|
103
104
|
Object.defineProperty(exports, "ResizablePanel", { enumerable: true, get: function () { return resizable_1.ResizablePanel; } });
|
|
104
105
|
Object.defineProperty(exports, "ResizableHandle", { enumerable: true, get: function () { return resizable_1.ResizableHandle; } });
|
|
106
|
+
// The layout primitives. Without these an app cannot obey "import from
|
|
107
|
+
// @hanzo/ui" — it has to reach past this package to @hanzo/gui, which is how
|
|
108
|
+
// 216 files in hanzo.app ended up doing exactly that. See ./layout.
|
|
109
|
+
var layout_1 = require("./layout.cjs");
|
|
110
|
+
Object.defineProperty(exports, "XStack", { enumerable: true, get: function () { return layout_1.XStack; } });
|
|
111
|
+
Object.defineProperty(exports, "YStack", { enumerable: true, get: function () { return layout_1.YStack; } });
|
|
112
|
+
Object.defineProperty(exports, "ZStack", { enumerable: true, get: function () { return layout_1.ZStack; } });
|
|
113
|
+
Object.defineProperty(exports, "SizableText", { enumerable: true, get: function () { return layout_1.SizableText; } });
|
|
114
|
+
Object.defineProperty(exports, "Paragraph", { enumerable: true, get: function () { return layout_1.Paragraph; } });
|
|
115
|
+
Object.defineProperty(exports, "Heading", { enumerable: true, get: function () { return layout_1.Heading; } });
|
|
116
|
+
Object.defineProperty(exports, "H1", { enumerable: true, get: function () { return layout_1.H1; } });
|
|
117
|
+
Object.defineProperty(exports, "H2", { enumerable: true, get: function () { return layout_1.H2; } });
|
|
118
|
+
Object.defineProperty(exports, "H3", { enumerable: true, get: function () { return layout_1.H3; } });
|
|
119
|
+
Object.defineProperty(exports, "H4", { enumerable: true, get: function () { return layout_1.H4; } });
|
|
120
|
+
Object.defineProperty(exports, "H5", { enumerable: true, get: function () { return layout_1.H5; } });
|
|
121
|
+
Object.defineProperty(exports, "H6", { enumerable: true, get: function () { return layout_1.H6; } });
|
|
122
|
+
Object.defineProperty(exports, "Span", { enumerable: true, get: function () { return layout_1.Span; } });
|
|
123
|
+
Object.defineProperty(exports, "Strong", { enumerable: true, get: function () { return layout_1.Strong; } });
|
|
124
|
+
Object.defineProperty(exports, "Em", { enumerable: true, get: function () { return layout_1.Em; } });
|
|
125
|
+
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return layout_1.Image; } });
|
|
126
|
+
Object.defineProperty(exports, "Spacer", { enumerable: true, get: function () { return layout_1.Spacer; } });
|
|
127
|
+
Object.defineProperty(exports, "ScrollView", { enumerable: true, get: function () { return layout_1.ScrollView; } });
|
|
128
|
+
Object.defineProperty(exports, "View", { enumerable: true, get: function () { return layout_1.View; } });
|
|
129
|
+
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return layout_1.Text; } });
|
|
105
130
|
var scroll_area_1 = require("./scroll-area.cjs");
|
|
106
131
|
Object.defineProperty(exports, "ScrollArea", { enumerable: true, get: function () { return scroll_area_1.ScrollArea; } });
|
|
107
132
|
Object.defineProperty(exports, "ScrollBar", { enumerable: true, get: function () { return scroll_area_1.ScrollBar; } });
|
|
@@ -15,6 +15,7 @@ export { Label } from './label.js';
|
|
|
15
15
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverClose } from './popover.js';
|
|
16
16
|
export { Progress } from './progress.js';
|
|
17
17
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle, type ResizablePanelGroupProps, type ResizablePanelProps, type ResizableHandleProps, } from './resizable.js';
|
|
18
|
+
export { XStack, YStack, ZStack, SizableText, Paragraph, Heading, H1, H2, H3, H4, H5, H6, Span, Strong, Em, Image, Spacer, ScrollView, View, Text, type GuiElement, } from './layout.js';
|
|
18
19
|
export { ScrollArea, ScrollBar } from './scroll-area.js';
|
|
19
20
|
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from './select.js';
|
|
20
21
|
export { Section, type SectionProps } from './section.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAClF,OAAO,EAAE,MAAM,EAAE,c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ACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -31,6 +31,10 @@ export { Label } from './label.js';
|
|
|
31
31
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverClose } from './popover.js';
|
|
32
32
|
export { Progress } from './progress.js';
|
|
33
33
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from './resizable.js';
|
|
34
|
+
// The layout primitives. Without these an app cannot obey "import from
|
|
35
|
+
// @hanzo/ui" — it has to reach past this package to @hanzo/gui, which is how
|
|
36
|
+
// 216 files in hanzo.app ended up doing exactly that. See ./layout.
|
|
37
|
+
export { XStack, YStack, ZStack, SizableText, Paragraph, Heading, H1, H2, H3, H4, H5, H6, Span, Strong, Em, Image, Spacer, ScrollView, View, Text, } from './layout.js';
|
|
34
38
|
export { ScrollArea, ScrollBar } from './scroll-area.js';
|
|
35
39
|
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from './select.js';
|
|
36
40
|
export { Section } from './section.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/backends/gui/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,EAAE;AACF,kFAAkF;AAClF,4EAA4E;AAC5E,uEAAuE;AACvE,EAAE;AACF,4EAA4E;AAC5E,iFAAiF;AACjF,+EAA+E;AAC/E,0BAA0B;AAC1B,EAAE;AACF,6DAA6D;AAC7D,6EAA6E;AAC7E,iFAAiF;AACjF,+CAA+C;AAC/C,oCAAoC;AAEpC,OAAO,EAAE,WAAW,EAAyB,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAsC,MAAM,SAAS,CAAA;AAClF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAyD,MAAM,UAAU,CAAA;AACxG,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,SAAS,GAEV,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACnF,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,GAGjB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,i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,MAAM,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/backends/gui/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,EAAE;AACF,kFAAkF;AAClF,4EAA4E;AAC5E,uEAAuE;AACvE,EAAE;AACF,4EAA4E;AAC5E,iFAAiF;AACjF,+EAA+E;AAC/E,0BAA0B;AAC1B,EAAE;AACF,6DAA6D;AAC7D,6EAA6E;AAC7E,iFAAiF;AACjF,+CAA+C;AAC/C,oCAAoC;AAEpC,OAAO,EAAE,WAAW,EAAyB,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAsC,MAAM,SAAS,CAAA;AAClF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAyD,MAAM,UAAU,CAAA;AACxG,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,SAAS,GAEV,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACnF,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,GAGjB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EAC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;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Text = exports.View = exports.ScrollView = exports.Spacer = exports.Image = exports.Em = exports.Strong = exports.Span = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = exports.Heading = exports.Paragraph = exports.SizableText = exports.ZStack = exports.YStack = exports.XStack = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* LAYOUT — the primitives an app lays a screen out with.
|
|
7
|
+
*
|
|
8
|
+
* These are re-exports of @hanzo/gui, and that is the whole point: this package
|
|
9
|
+
* is declared to be "the canonical component API apps import", but it shipped
|
|
10
|
+
* Button, Card and Dialog while omitting the stacks and the type scale. So no
|
|
11
|
+
* app could actually obey the rule. Measured in hanzo.app: 216 files import
|
|
12
|
+
* @hanzo/gui DIRECTLY — YStack (199), XStack (185), SizableText (185),
|
|
13
|
+
* Paragraph (161), H3 (66), H1 (43), Anchor (41), H2 (39), Image (20), H4 (15),
|
|
14
|
+
* View, Text, GuiElement — because there was nowhere else to get them.
|
|
15
|
+
*
|
|
16
|
+
* An app reaching past its component library is not a style problem. It is the
|
|
17
|
+
* library failing to be the one door: the app then pins its own @hanzo/gui
|
|
18
|
+
* version, resolves a second copy of the runtime (which is how "Missing theme."
|
|
19
|
+
* happens), and every primitive it draws sits outside anything this package can
|
|
20
|
+
* restyle, theme or fix centrally.
|
|
21
|
+
*
|
|
22
|
+
* So: ONE import source. `@hanzo/gui` is an implementation detail of
|
|
23
|
+
* `@hanzo/ui`, named in exactly one place — here.
|
|
24
|
+
*
|
|
25
|
+
* Named, never `export *`: this is a client boundary and Next refuses a star
|
|
26
|
+
* across one ("It's currently unsupported to use `export *` in a client
|
|
27
|
+
* boundary"), and a star also defeats tree-shaking, so importing XStack would
|
|
28
|
+
* drag the whole gui surface in. Same rule the root barrel already follows.
|
|
29
|
+
*/
|
|
30
|
+
var gui_1 = require("@hanzo/gui");
|
|
31
|
+
// Stacks — @hanzogui/stacks
|
|
32
|
+
Object.defineProperty(exports, "XStack", { enumerable: true, get: function () { return gui_1.XStack; } });
|
|
33
|
+
Object.defineProperty(exports, "YStack", { enumerable: true, get: function () { return gui_1.YStack; } });
|
|
34
|
+
Object.defineProperty(exports, "ZStack", { enumerable: true, get: function () { return gui_1.ZStack; } });
|
|
35
|
+
// Type scale — @hanzogui/text. `SizableText` is the workhorse; the headings
|
|
36
|
+
// carry the scale so a screen never hand-picks a font size.
|
|
37
|
+
Object.defineProperty(exports, "SizableText", { enumerable: true, get: function () { return gui_1.SizableText; } });
|
|
38
|
+
Object.defineProperty(exports, "Paragraph", { enumerable: true, get: function () { return gui_1.Paragraph; } });
|
|
39
|
+
Object.defineProperty(exports, "Heading", { enumerable: true, get: function () { return gui_1.Heading; } });
|
|
40
|
+
Object.defineProperty(exports, "H1", { enumerable: true, get: function () { return gui_1.H1; } });
|
|
41
|
+
Object.defineProperty(exports, "H2", { enumerable: true, get: function () { return gui_1.H2; } });
|
|
42
|
+
Object.defineProperty(exports, "H3", { enumerable: true, get: function () { return gui_1.H3; } });
|
|
43
|
+
Object.defineProperty(exports, "H4", { enumerable: true, get: function () { return gui_1.H4; } });
|
|
44
|
+
Object.defineProperty(exports, "H5", { enumerable: true, get: function () { return gui_1.H5; } });
|
|
45
|
+
Object.defineProperty(exports, "H6", { enumerable: true, get: function () { return gui_1.H6; } });
|
|
46
|
+
Object.defineProperty(exports, "Span", { enumerable: true, get: function () { return gui_1.Span; } });
|
|
47
|
+
Object.defineProperty(exports, "Strong", { enumerable: true, get: function () { return gui_1.Strong; } });
|
|
48
|
+
Object.defineProperty(exports, "Em", { enumerable: true, get: function () { return gui_1.Em; } });
|
|
49
|
+
// Leaves — an image, a rule, a gap, a scroller.
|
|
50
|
+
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return gui_1.Image; } });
|
|
51
|
+
Object.defineProperty(exports, "Spacer", { enumerable: true, get: function () { return gui_1.Spacer; } });
|
|
52
|
+
Object.defineProperty(exports, "ScrollView", { enumerable: true, get: function () { return gui_1.ScrollView; } });
|
|
53
|
+
// The untyped hosts, for the rare case a component needs a bare box.
|
|
54
|
+
Object.defineProperty(exports, "View", { enumerable: true, get: function () { return gui_1.View; } });
|
|
55
|
+
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return gui_1.Text; } });
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LAYOUT — the primitives an app lays a screen out with.
|
|
3
|
+
*
|
|
4
|
+
* These are re-exports of @hanzo/gui, and that is the whole point: this package
|
|
5
|
+
* is declared to be "the canonical component API apps import", but it shipped
|
|
6
|
+
* Button, Card and Dialog while omitting the stacks and the type scale. So no
|
|
7
|
+
* app could actually obey the rule. Measured in hanzo.app: 216 files import
|
|
8
|
+
* @hanzo/gui DIRECTLY — YStack (199), XStack (185), SizableText (185),
|
|
9
|
+
* Paragraph (161), H3 (66), H1 (43), Anchor (41), H2 (39), Image (20), H4 (15),
|
|
10
|
+
* View, Text, GuiElement — because there was nowhere else to get them.
|
|
11
|
+
*
|
|
12
|
+
* An app reaching past its component library is not a style problem. It is the
|
|
13
|
+
* library failing to be the one door: the app then pins its own @hanzo/gui
|
|
14
|
+
* version, resolves a second copy of the runtime (which is how "Missing theme."
|
|
15
|
+
* happens), and every primitive it draws sits outside anything this package can
|
|
16
|
+
* restyle, theme or fix centrally.
|
|
17
|
+
*
|
|
18
|
+
* So: ONE import source. `@hanzo/gui` is an implementation detail of
|
|
19
|
+
* `@hanzo/ui`, named in exactly one place — here.
|
|
20
|
+
*
|
|
21
|
+
* Named, never `export *`: this is a client boundary and Next refuses a star
|
|
22
|
+
* across one ("It's currently unsupported to use `export *` in a client
|
|
23
|
+
* boundary"), and a star also defeats tree-shaking, so importing XStack would
|
|
24
|
+
* drag the whole gui surface in. Same rule the root barrel already follows.
|
|
25
|
+
*/
|
|
26
|
+
export { XStack, YStack, ZStack, SizableText, Paragraph, Heading, H1, H2, H3, H4, H5, H6, Span, Strong, Em, Image, Spacer, ScrollView, View, Text, } from '@hanzo/gui';
|
|
27
|
+
export type { GuiElement } from '@hanzo/gui';
|
|
28
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/layout.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAEL,MAAM,EACN,MAAM,EACN,MAAM,EAIN,WAAW,EACX,SAAS,EACT,OAAO,EACP,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,IAAI,EACJ,MAAM,EACN,EAAE,EAGF,KAAK,EACL,MAAM,EACN,UAAU,EAGV,IAAI,EACJ,IAAI,GACL,MAAM,YAAY,CAAA;AAEnB,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
/**
|
|
3
|
+
* LAYOUT — the primitives an app lays a screen out with.
|
|
4
|
+
*
|
|
5
|
+
* These are re-exports of @hanzo/gui, and that is the whole point: this package
|
|
6
|
+
* is declared to be "the canonical component API apps import", but it shipped
|
|
7
|
+
* Button, Card and Dialog while omitting the stacks and the type scale. So no
|
|
8
|
+
* app could actually obey the rule. Measured in hanzo.app: 216 files import
|
|
9
|
+
* @hanzo/gui DIRECTLY — YStack (199), XStack (185), SizableText (185),
|
|
10
|
+
* Paragraph (161), H3 (66), H1 (43), Anchor (41), H2 (39), Image (20), H4 (15),
|
|
11
|
+
* View, Text, GuiElement — because there was nowhere else to get them.
|
|
12
|
+
*
|
|
13
|
+
* An app reaching past its component library is not a style problem. It is the
|
|
14
|
+
* library failing to be the one door: the app then pins its own @hanzo/gui
|
|
15
|
+
* version, resolves a second copy of the runtime (which is how "Missing theme."
|
|
16
|
+
* happens), and every primitive it draws sits outside anything this package can
|
|
17
|
+
* restyle, theme or fix centrally.
|
|
18
|
+
*
|
|
19
|
+
* So: ONE import source. `@hanzo/gui` is an implementation detail of
|
|
20
|
+
* `@hanzo/ui`, named in exactly one place — here.
|
|
21
|
+
*
|
|
22
|
+
* Named, never `export *`: this is a client boundary and Next refuses a star
|
|
23
|
+
* across one ("It's currently unsupported to use `export *` in a client
|
|
24
|
+
* boundary"), and a star also defeats tree-shaking, so importing XStack would
|
|
25
|
+
* drag the whole gui surface in. Same rule the root barrel already follows.
|
|
26
|
+
*/
|
|
27
|
+
export {
|
|
28
|
+
// Stacks — @hanzogui/stacks
|
|
29
|
+
XStack, YStack, ZStack,
|
|
30
|
+
// Type scale — @hanzogui/text. `SizableText` is the workhorse; the headings
|
|
31
|
+
// carry the scale so a screen never hand-picks a font size.
|
|
32
|
+
SizableText, Paragraph, Heading, H1, H2, H3, H4, H5, H6, Span, Strong, Em,
|
|
33
|
+
// Leaves — an image, a rule, a gap, a scroller.
|
|
34
|
+
Image, Spacer, ScrollView,
|
|
35
|
+
// The untyped hosts, for the rare case a component needs a bare box.
|
|
36
|
+
View, Text, } from '@hanzo/gui';
|
|
37
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/backends/gui/layout.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO;AACL,4BAA4B;AAC5B,MAAM,EACN,MAAM,EACN,MAAM;AAEN,4EAA4E;AAC5E,4DAA4D;AAC5D,WAAW,EACX,SAAS,EACT,OAAO,EACP,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,IAAI,EACJ,MAAM,EACN,EAAE;AAEF,gDAAgD;AAChD,KAAK,EACL,MAAM,EACN,UAAU;AAEV,qEAAqE;AACrE,IAAI,EACJ,IAAI,GACL,MAAM,YAAY,CAAA"}
|
package/dist/gui-config.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.config = void 0;
|
|
3
|
+
exports.monochrome = exports.config = void 0;
|
|
4
4
|
const v5_1 = require("@hanzogui/config/v5");
|
|
5
5
|
const gui_1 = require("@hanzo/gui");
|
|
6
6
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -224,9 +224,10 @@ const themes = Object.fromEntries(Object.entries(v5_1.defaultConfig.themes).map(
|
|
|
224
224
|
: ringed,
|
|
225
225
|
];
|
|
226
226
|
}));
|
|
227
|
-
|
|
227
|
+
// Everything except the theme table, which is the one thing the two configs
|
|
228
|
+
// below disagree about. Stated once so they cannot drift on radius or fonts.
|
|
229
|
+
const base = {
|
|
228
230
|
...v5_1.defaultConfig,
|
|
229
|
-
themes,
|
|
230
231
|
tokens: {
|
|
231
232
|
...v5_1.defaultConfig.tokens,
|
|
232
233
|
radius: RADIUS,
|
|
@@ -243,5 +244,37 @@ exports.config = (0, gui_1.createGui)({
|
|
|
243
244
|
// token, not a silent no-op, so it is defined.
|
|
244
245
|
mono: { ...v5_1.defaultConfig.fonts.body, family: GEIST_MONO, size: FONT_SIZE, lineHeight: LINE_HEIGHT },
|
|
245
246
|
},
|
|
246
|
-
}
|
|
247
|
+
};
|
|
248
|
+
exports.config = (0, gui_1.createGui)({ ...base, themes });
|
|
247
249
|
exports.default = exports.config;
|
|
250
|
+
/**
|
|
251
|
+
* The eight chromatic families. Everything else a sub-theme name can carry —
|
|
252
|
+
* `accent`, `black`, `white`, `gray`, `neutral`, `surface1`, `surface2` — is a
|
|
253
|
+
* position on the greyscale, so it survives into the monochrome table below.
|
|
254
|
+
*
|
|
255
|
+
* Derived from the segment, never from a substring: `dark_teal_Button` is
|
|
256
|
+
* chromatic because one of its segments IS `teal`, while a future
|
|
257
|
+
* `dark_tealish` or a component called `Red` is not caught by accident.
|
|
258
|
+
*/
|
|
259
|
+
const CHROMA = new Set(['blue', 'green', 'orange', 'pink', 'purple', 'red', 'teal', 'yellow']);
|
|
260
|
+
const chromatic = (name) => name.split('_').slice(1).some((s) => CHROMA.has(s));
|
|
261
|
+
/**
|
|
262
|
+
* The same system with the chromatic sub-themes omitted — 150 themes instead of
|
|
263
|
+
* 390, and 62% less theme table.
|
|
264
|
+
*
|
|
265
|
+
* A gui theme table is DATA that ships: it cannot be tree-shaken, because a
|
|
266
|
+
* theme is selected by string at runtime. So a surface that renders no colour
|
|
267
|
+
* still pays for every hue. The browser extension's new-tab page is monochrome
|
|
268
|
+
* by design and loads on every single tab, and 240 themes it can never activate
|
|
269
|
+
* were the difference between it fitting its bundle budget and not.
|
|
270
|
+
*
|
|
271
|
+
* This is NOT a second design system. It is the same `config` with rows
|
|
272
|
+
* removed, from the same scale, so nothing here can drift from `config` — only
|
|
273
|
+
* be absent from it. Reach for it when a surface genuinely renders no hue;
|
|
274
|
+
* anything that does must use `config`, because a missing theme falls back
|
|
275
|
+
* silently rather than failing.
|
|
276
|
+
*/
|
|
277
|
+
exports.monochrome = (0, gui_1.createGui)({
|
|
278
|
+
...base,
|
|
279
|
+
themes: Object.fromEntries(Object.entries(themes).filter(([name]) => !chromatic(name))),
|
|
280
|
+
});
|