@hanzo/build 0.2.55 → 0.2.56

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/lib/prompt.d.ts CHANGED
@@ -61,6 +61,8 @@ export interface PromptOptions {
61
61
  framed?: boolean;
62
62
  /** Centred just above the pill: what every message is sent under. */
63
63
  note?: ReactNode;
64
+ /** A phone: the field takes the pill's whole width above the controls, whatever the draft. */
65
+ narrow?: boolean;
64
66
  }
65
67
  /**
66
68
  * The chip beside send, and the panel it opens: the effort, a sentence saying
package/lib/prompt.js CHANGED
@@ -16,7 +16,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  * thread column's own gutters, centred (`measure`). A transcript reads at
17
17
  * `MEASURE` and this lines up with its words.
18
18
  */
19
- import { SizableText, XStack, YStack } from '@hanzo/gui';
19
+ import { SizableText, useMedia, XStack, YStack } from '@hanzo/gui';
20
20
  import { ArrowUp, AudioLines, Check, ChevronDown, Mic, Plus, Square } from '@hanzogui/lucide-icons-2';
21
21
  import { Control } from '@hanzo/composer';
22
22
  import { Popover, PopoverContent, PopoverTrigger, Separator, Tooltip, TooltipContent, TooltipTrigger } from '@hanzo/ui';
@@ -105,7 +105,7 @@ export function prompt(o) {
105
105
  // A draft past a line takes the pill's width above the controls. The same
106
106
  // field either way, moved by flex order alone: a different tree would remount
107
107
  // it and drop the caret mid-word.
108
- const tall = o.value.includes('\n') || o.value.length > LINE;
108
+ const tall = Boolean(o.narrow) || o.value.includes('\n') || o.value.length > LINE;
109
109
  const head = o.head || o.note ? (_jsxs(YStack, { ...measure, gap: "$1.5", "data-slot": "prompt-head", children: [o.head, o.note ? (_jsx(SizableText, { "data-slot": "prompt-note", fontSize: 12, color: "$soft", text: "center", self: "center", children: o.note })) : null] })) : undefined;
110
110
  return {
111
111
  value: o.value,
@@ -154,5 +154,6 @@ export function prompt(o) {
154
154
  }
155
155
  /** The composer drawn on its own. */
156
156
  export function Prompt(o) {
157
- return _jsx(Composer, { ...prompt(o) });
157
+ const media = useMedia();
158
+ return _jsx(Composer, { ...prompt({ ...o, narrow: o.narrow ?? !media.sm }) });
158
159
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/build",
3
- "version": "0.2.55",
3
+ "version": "0.2.56",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "description": "Hanzo Build — say what you want, watch it built, deployed and running. The builder as a component, mounted by the Hanzo app at hanzo.ai.",