@hanzo/ui 8.14.0 → 8.14.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/Board.cjs +119 -0
- package/dist/agents/Board.d.ts +98 -0
- package/dist/agents/Board.d.ts.map +1 -0
- package/dist/agents/Board.js +115 -0
- package/dist/agents/Board.js.map +1 -0
- package/dist/agents/Pane.cjs +74 -0
- package/dist/agents/Pane.d.ts +84 -0
- package/dist/agents/Pane.d.ts.map +1 -0
- package/dist/agents/Pane.js +68 -0
- package/dist/agents/Pane.js.map +1 -0
- package/dist/agents/Progress.cjs +130 -0
- package/dist/agents/Progress.d.ts +67 -0
- package/dist/agents/Progress.d.ts.map +1 -0
- package/dist/agents/Progress.js +127 -0
- package/dist/agents/Progress.js.map +1 -0
- package/dist/agents/Screen.cjs +91 -0
- package/dist/agents/Screen.d.ts +53 -0
- package/dist/agents/Screen.d.ts.map +1 -0
- package/dist/agents/Screen.js +89 -0
- package/dist/agents/Screen.js.map +1 -0
- package/dist/agents/Steer.cjs +42 -0
- package/dist/agents/Steer.d.ts +54 -0
- package/dist/agents/Steer.d.ts.map +1 -0
- package/dist/agents/Steer.js +39 -0
- package/dist/agents/Steer.js.map +1 -0
- package/dist/agents/Transcript.cjs +59 -0
- package/dist/agents/Transcript.d.ts +50 -0
- package/dist/agents/Transcript.d.ts.map +1 -0
- package/dist/agents/Transcript.js +56 -0
- package/dist/agents/Transcript.js.map +1 -0
- package/dist/agents/index.cjs +45 -0
- package/dist/agents/index.d.ts +28 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +28 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/box.cjs +19 -0
- package/dist/box.d.ts.map +1 -1
- package/dist/box.js +19 -0
- package/dist/box.js.map +1 -1
- package/dist/css.cjs +17 -0
- package/dist/css.d.ts +30 -0
- package/dist/css.d.ts.map +1 -0
- package/dist/css.js +14 -0
- package/dist/css.js.map +1 -0
- package/dist/gallery.html +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/index.node.js +1 -0
- package/dist/next.cjs +6 -0
- package/package.json +8 -2
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Steer — the controls that reach a run mid-flight, and the roster row.
|
|
3
|
+
*
|
|
4
|
+
* A command is QUEUED, not applied: an agent reads it between turns, so the
|
|
5
|
+
* label a person sees after pressing has to say that. A control that reports
|
|
6
|
+
* "stopped" the instant it is pressed is lying for however long the current
|
|
7
|
+
* turn takes.
|
|
8
|
+
*
|
|
9
|
+
* Presentational: the verbs go out through `onCommand` and the surface decides
|
|
10
|
+
* what they mean. `@hanzo/ai`'s `sessions.steer(id, command)` is the one it
|
|
11
|
+
* wants, but this row does not import it — a channel workspace steering through
|
|
12
|
+
* a BFF composes the same control.
|
|
13
|
+
*/
|
|
14
|
+
import { XStack } from '@hanzo/gui';
|
|
15
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
16
|
+
type Row = Omit<ComponentProps<typeof XStack>, 'children'>;
|
|
17
|
+
/** The verbs a run understands. `message` is the composer's, not a button's. */
|
|
18
|
+
export type Command = 'pause' | 'resume' | 'stop';
|
|
19
|
+
export interface SteerProps extends Row {
|
|
20
|
+
onCommand?: (command: Command) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Verbs to withhold — a finished run cannot be paused.
|
|
23
|
+
*
|
|
24
|
+
* NOT `disabled`: that is gui's own boolean on the underlying stack, and
|
|
25
|
+
* taking the name means the row and the primitive disagree about the type of
|
|
26
|
+
* one prop.
|
|
27
|
+
*/
|
|
28
|
+
withhold?: Command[];
|
|
29
|
+
/** The last thing that happened, in the surface's words. */
|
|
30
|
+
note?: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare function Steer({ onCommand, withhold, note, ...rest }: SteerProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
/**
|
|
34
|
+
* The three kinds of member, and why one row draws all three.
|
|
35
|
+
*
|
|
36
|
+
* An AGENT is summoned and lives for a session. A BOT is the same thing left
|
|
37
|
+
* running — it is present before anyone asks and after everyone leaves, which
|
|
38
|
+
* is the whole difference and the only one a reader needs. A HUMAN is a person.
|
|
39
|
+
*
|
|
40
|
+
* One component with a `kind` prop rather than three, because the three differ
|
|
41
|
+
* in a badge and an icon; three components is how the hover state comes to
|
|
42
|
+
* differ too.
|
|
43
|
+
*/
|
|
44
|
+
export type MemberKind = 'agent' | 'bot' | 'human';
|
|
45
|
+
export interface MemberRowProps extends Row {
|
|
46
|
+
name: string;
|
|
47
|
+
kind: MemberKind;
|
|
48
|
+
/** A line under the name — what it does, or where it is. */
|
|
49
|
+
detail?: string;
|
|
50
|
+
onPress?: () => void;
|
|
51
|
+
}
|
|
52
|
+
export declare function MemberRow({ name, kind, detail, onPress, ...rest }: MemberRowProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=Steer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Steer.d.ts","sourceRoot":"","sources":["../../src/agents/Steer.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAe,MAAM,EAAU,MAAM,YAAY,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItD,KAAK,GAAG,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,UAAU,CAAC,CAAA;AAE1D,gFAAgF;AAChF,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAQjD,MAAM,WAAW,UAAW,SAAQ,GAAG;IACrC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,QAAa,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,UAAU,2CAsC5E;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,CAAA;AAQlD,MAAM,WAAW,cAAe,SAAQ,GAAG;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,UAAU,CAAA;IAChB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,2CA4CjF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Steer — the controls that reach a run mid-flight, and the roster row.
|
|
5
|
+
*
|
|
6
|
+
* A command is QUEUED, not applied: an agent reads it between turns, so the
|
|
7
|
+
* label a person sees after pressing has to say that. A control that reports
|
|
8
|
+
* "stopped" the instant it is pressed is lying for however long the current
|
|
9
|
+
* turn takes.
|
|
10
|
+
*
|
|
11
|
+
* Presentational: the verbs go out through `onCommand` and the surface decides
|
|
12
|
+
* what they mean. `@hanzo/ai`'s `sessions.steer(id, command)` is the one it
|
|
13
|
+
* wants, but this row does not import it — a channel workspace steering through
|
|
14
|
+
* a BFF composes the same control.
|
|
15
|
+
*/
|
|
16
|
+
import { SizableText, XStack, YStack } from '@hanzo/gui';
|
|
17
|
+
import { Bot, Pause, Play, Square, User, Zap } from '@hanzogui/lucide-icons-2';
|
|
18
|
+
import { slot, tip } from '../backends/gui/slot.js';
|
|
19
|
+
const CONTROLS = [
|
|
20
|
+
{ command: 'pause', label: 'Pause', icon: Pause },
|
|
21
|
+
{ command: 'resume', label: 'Resume', icon: Play },
|
|
22
|
+
{ command: 'stop', label: 'Stop', icon: Square },
|
|
23
|
+
];
|
|
24
|
+
export function Steer({ onCommand, withhold = [], note, ...rest }) {
|
|
25
|
+
return (_jsxs(YStack, { ...slot('steer'), gap: "$1", children: [_jsx(XStack, { gap: "$1", items: "center", ...rest, children: CONTROLS.map(({ command, label, icon: Icon }) => {
|
|
26
|
+
const off = withhold.includes(command);
|
|
27
|
+
return (_jsxs(XStack, { items: "center", gap: "$1.5", px: "$2", py: "$1", rounded: "$3", opacity: off ? 0.4 : 0.8, cursor: off ? 'default' : 'pointer', role: "button", tabIndex: off ? -1 : 0, "aria-disabled": off, "aria-label": label, ...tip(label), hoverStyle: off ? undefined : { bg: '$hover', opacity: 1 }, pressStyle: off ? undefined : { bg: '$raised' }, onPress: () => !off && onCommand?.(command), children: [_jsx(Icon, { size: 13 }), _jsx(SizableText, { size: "$1", children: label })] }, command));
|
|
28
|
+
}) }), note ? (_jsx(SizableText, { size: "$1", color: "$soft", children: note })) : null] }));
|
|
29
|
+
}
|
|
30
|
+
const KIND = {
|
|
31
|
+
agent: { icon: Zap, says: 'agent' },
|
|
32
|
+
bot: { icon: Bot, says: 'always on' },
|
|
33
|
+
human: { icon: User, says: 'person' },
|
|
34
|
+
};
|
|
35
|
+
export function MemberRow({ name, kind, detail, onPress, ...rest }) {
|
|
36
|
+
const { icon: Icon, says } = KIND[kind];
|
|
37
|
+
return (_jsxs(XStack, { ...slot('member-row'), items: "center", gap: "$2", px: "$2", py: "$1.5", rounded: "$3", cursor: onPress ? 'pointer' : 'default', role: onPress ? 'button' : undefined, tabIndex: onPress ? 0 : undefined, hoverStyle: onPress ? { bg: '$hover' } : undefined, onPress: onPress, ...rest, children: [_jsx(XStack, { width: 22, height: 22, rounded: 9999, items: "center", justify: "center", bg: "$raised", shrink: 0, children: _jsx(Icon, { size: 12 }) }), _jsxs(YStack, { flex: 1, shrink: 1, children: [_jsx(SizableText, { size: "$2", numberOfLines: 1, children: name }), detail ? (_jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, children: detail })) : null] }), _jsx(SizableText, { size: "$1", color: "$color8", children: says })] }));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=Steer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Steer.js","sourceRoot":"","sources":["../../src/agents/Steer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAA;AAG9E,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAOhD,MAAM,QAAQ,GAA8D;IAC1E,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE;IACjD,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE;IAClD,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;CACjD,CAAA;AAgBD,MAAM,UAAU,KAAK,CAAC,EAAE,SAAS,EAAE,QAAQ,GAAG,EAAE,EAAE,IAAI,EAAE,GAAG,IAAI,EAAc;IAC3E,OAAO,CACL,MAAC,MAAM,OAAK,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,EAAC,IAAI,aACjC,KAAC,MAAM,IAAC,GAAG,EAAC,IAAI,EAAC,KAAK,EAAC,QAAQ,KAAK,IAAI,YACrC,QAAQ,CAAC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IAAC,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,aACxB,KAAC,WAAW,IAAC,IAAI,EAAC,IAAI,EAAC,aAAa,EAAE,CAAC,YACpC,IAAI,GACO,EACb,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,WAAW,IAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,OAAO,EAAC,aAAa,EAAE,CAAC,YAClD,MAAM,GACK,CACf,CAAC,CAAC,CAAC,IAAI,IACD,EAET,KAAC,WAAW,IAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,SAAS,YACnC,IAAI,GACO,IACP,CACV,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.fold = fold;
|
|
5
|
+
exports.Transcript = Transcript;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
/**
|
|
8
|
+
* Transcript — what a run has done, as blocks.
|
|
9
|
+
*
|
|
10
|
+
* A streamed answer arrives one TOKEN per event, so an unfolded transcript
|
|
11
|
+
* prints a sentence as a dozen mid-word cards each under its own actor line —
|
|
12
|
+
* measured at four parts label to one part text. `fold()` joins consecutive
|
|
13
|
+
* turns of the same kind and actor into one block with one label, and this
|
|
14
|
+
* component draws blocks. The folding is exported beside it because it is the
|
|
15
|
+
* same decision every surface has to make and it is pure.
|
|
16
|
+
*
|
|
17
|
+
* Presentational and total: an event whose payload is a shape nobody modelled
|
|
18
|
+
* still renders as its own text rather than as a gap.
|
|
19
|
+
*/
|
|
20
|
+
const gui_1 = require("@hanzo/gui");
|
|
21
|
+
const react_1 = require("react");
|
|
22
|
+
const slot_1 = require("../backends/gui/slot.cjs");
|
|
23
|
+
/**
|
|
24
|
+
* Fold turns into blocks.
|
|
25
|
+
*
|
|
26
|
+
* Message tokens join with NOTHING, because each carries its own leading space
|
|
27
|
+
* and re-inserting one doubles it. Every other kind joins with a newline: two
|
|
28
|
+
* tool results are two facts, not one run-on sentence.
|
|
29
|
+
*/
|
|
30
|
+
function fold(turns) {
|
|
31
|
+
const out = [];
|
|
32
|
+
turns.forEach((turn, i) => {
|
|
33
|
+
const kind = turn.kind ?? 'turn';
|
|
34
|
+
const last = out[out.length - 1];
|
|
35
|
+
if (last && last.kind === kind && last.actor === turn.actor)
|
|
36
|
+
last.parts.push(turn.text);
|
|
37
|
+
// Position is the fallback key and never a random one: a turn carrying
|
|
38
|
+
// neither seq nor id would otherwise be keyed differently on every render,
|
|
39
|
+
// so the list would grow a copy per paint.
|
|
40
|
+
else
|
|
41
|
+
out.push({ key: `${turn.seq ?? turn.id ?? i}`, kind, actor: turn.actor, parts: [turn.text] });
|
|
42
|
+
});
|
|
43
|
+
return out.map((b) => ({
|
|
44
|
+
key: b.key,
|
|
45
|
+
kind: b.kind,
|
|
46
|
+
actor: b.actor,
|
|
47
|
+
text: b.parts.join(b.kind === 'message' ? '' : '\n'),
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
function Transcript({ blocks, follow = true, header, empty, ...rest }) {
|
|
51
|
+
const foot = (0, react_1.useRef)(null);
|
|
52
|
+
(0, react_1.useEffect)(() => {
|
|
53
|
+
if (follow)
|
|
54
|
+
foot.current?.scrollIntoView({ block: 'end' });
|
|
55
|
+
}, [blocks.length, follow]);
|
|
56
|
+
return ((0, jsx_runtime_1.jsx)(gui_1.ScrollView, { ...(0, slot_1.slot)('transcript'), flex: 1, showsVerticalScrollIndicator: false, ...rest, children: (0, jsx_runtime_1.jsxs)(gui_1.YStack, { gap: "$3", p: "$4", children: [header, !blocks.length
|
|
57
|
+
? empty ?? ((0, jsx_runtime_1.jsx)(gui_1.SizableText, { size: "$2", color: "$soft", children: "Nothing yet." }))
|
|
58
|
+
: blocks.map((block) => ((0, jsx_runtime_1.jsxs)(gui_1.YStack, { gap: "$1", children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { gap: "$2", items: "center", children: [(0, jsx_runtime_1.jsx)(gui_1.SizableText, { size: "$1", color: "$soft", children: block.actor ?? block.kind }), block.actor ? ((0, jsx_runtime_1.jsx)(gui_1.SizableText, { size: "$1", color: "$color8", children: block.kind })) : null] }), (0, jsx_runtime_1.jsx)(gui_1.SizableText, { size: "$2", color: "$quiet", children: block.text })] }, block.key))), (0, jsx_runtime_1.jsx)("div", { ref: foot })] }) }));
|
|
59
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transcript — what a run has done, as blocks.
|
|
3
|
+
*
|
|
4
|
+
* A streamed answer arrives one TOKEN per event, so an unfolded transcript
|
|
5
|
+
* prints a sentence as a dozen mid-word cards each under its own actor line —
|
|
6
|
+
* measured at four parts label to one part text. `fold()` joins consecutive
|
|
7
|
+
* turns of the same kind and actor into one block with one label, and this
|
|
8
|
+
* component draws blocks. The folding is exported beside it because it is the
|
|
9
|
+
* same decision every surface has to make and it is pure.
|
|
10
|
+
*
|
|
11
|
+
* Presentational and total: an event whose payload is a shape nobody modelled
|
|
12
|
+
* still renders as its own text rather than as a gap.
|
|
13
|
+
*/
|
|
14
|
+
import { ScrollView } from '@hanzo/gui';
|
|
15
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
16
|
+
type Scroll = Omit<ComponentProps<typeof ScrollView>, 'children'>;
|
|
17
|
+
/** The shape a transcript needs from an event. A superset is fine. */
|
|
18
|
+
export interface Turn {
|
|
19
|
+
kind?: string;
|
|
20
|
+
actor?: string;
|
|
21
|
+
seq?: number;
|
|
22
|
+
id?: string;
|
|
23
|
+
text: string;
|
|
24
|
+
}
|
|
25
|
+
/** One folded run of same-kind, same-actor turns. */
|
|
26
|
+
export interface Block {
|
|
27
|
+
key: string;
|
|
28
|
+
kind: string;
|
|
29
|
+
actor?: string;
|
|
30
|
+
text: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Fold turns into blocks.
|
|
34
|
+
*
|
|
35
|
+
* Message tokens join with NOTHING, because each carries its own leading space
|
|
36
|
+
* and re-inserting one doubles it. Every other kind joins with a newline: two
|
|
37
|
+
* tool results are two facts, not one run-on sentence.
|
|
38
|
+
*/
|
|
39
|
+
export declare function fold(turns: Turn[]): Block[];
|
|
40
|
+
export interface TranscriptProps extends Scroll {
|
|
41
|
+
blocks: Block[];
|
|
42
|
+
/** Keep the newest turn in view as the run streams. */
|
|
43
|
+
follow?: boolean;
|
|
44
|
+
/** Drawn above the blocks — a status line, a turn count. */
|
|
45
|
+
header?: ReactNode;
|
|
46
|
+
empty?: ReactNode;
|
|
47
|
+
}
|
|
48
|
+
export declare function Transcript({ blocks, follow, header, empty, ...rest }: TranscriptProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=Transcript.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Transcript.d.ts","sourceRoot":"","sources":["../../src/agents/Transcript.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,UAAU,EAA+B,MAAM,YAAY,CAAA;AACpE,OAAO,EAAqB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAI9E,KAAK,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,EAAE,UAAU,CAAC,CAAA;AAEjE,sEAAsE;AACtE,MAAM,WAAW,IAAI;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,qDAAqD;AACrD,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,CAiB3C;AAED,MAAM,WAAW,eAAgB,SAAQ,MAAM;IAC7C,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,uDAAuD;IACvD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,MAAa,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,2CAsC5F"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Transcript — what a run has done, as blocks.
|
|
5
|
+
*
|
|
6
|
+
* A streamed answer arrives one TOKEN per event, so an unfolded transcript
|
|
7
|
+
* prints a sentence as a dozen mid-word cards each under its own actor line —
|
|
8
|
+
* measured at four parts label to one part text. `fold()` joins consecutive
|
|
9
|
+
* turns of the same kind and actor into one block with one label, and this
|
|
10
|
+
* component draws blocks. The folding is exported beside it because it is the
|
|
11
|
+
* same decision every surface has to make and it is pure.
|
|
12
|
+
*
|
|
13
|
+
* Presentational and total: an event whose payload is a shape nobody modelled
|
|
14
|
+
* still renders as its own text rather than as a gap.
|
|
15
|
+
*/
|
|
16
|
+
import { ScrollView, SizableText, XStack, YStack } from '@hanzo/gui';
|
|
17
|
+
import { useEffect, useRef } from 'react';
|
|
18
|
+
import { slot } from '../backends/gui/slot.js';
|
|
19
|
+
/**
|
|
20
|
+
* Fold turns into blocks.
|
|
21
|
+
*
|
|
22
|
+
* Message tokens join with NOTHING, because each carries its own leading space
|
|
23
|
+
* and re-inserting one doubles it. Every other kind joins with a newline: two
|
|
24
|
+
* tool results are two facts, not one run-on sentence.
|
|
25
|
+
*/
|
|
26
|
+
export function fold(turns) {
|
|
27
|
+
const out = [];
|
|
28
|
+
turns.forEach((turn, i) => {
|
|
29
|
+
const kind = turn.kind ?? 'turn';
|
|
30
|
+
const last = out[out.length - 1];
|
|
31
|
+
if (last && last.kind === kind && last.actor === turn.actor)
|
|
32
|
+
last.parts.push(turn.text);
|
|
33
|
+
// Position is the fallback key and never a random one: a turn carrying
|
|
34
|
+
// neither seq nor id would otherwise be keyed differently on every render,
|
|
35
|
+
// so the list would grow a copy per paint.
|
|
36
|
+
else
|
|
37
|
+
out.push({ key: `${turn.seq ?? turn.id ?? i}`, kind, actor: turn.actor, parts: [turn.text] });
|
|
38
|
+
});
|
|
39
|
+
return out.map((b) => ({
|
|
40
|
+
key: b.key,
|
|
41
|
+
kind: b.kind,
|
|
42
|
+
actor: b.actor,
|
|
43
|
+
text: b.parts.join(b.kind === 'message' ? '' : '\n'),
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
export function Transcript({ blocks, follow = true, header, empty, ...rest }) {
|
|
47
|
+
const foot = useRef(null);
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (follow)
|
|
50
|
+
foot.current?.scrollIntoView({ block: 'end' });
|
|
51
|
+
}, [blocks.length, follow]);
|
|
52
|
+
return (_jsx(ScrollView, { ...slot('transcript'), flex: 1, showsVerticalScrollIndicator: false, ...rest, children: _jsxs(YStack, { gap: "$3", p: "$4", children: [header, !blocks.length
|
|
53
|
+
? empty ?? (_jsx(SizableText, { size: "$2", color: "$soft", children: "Nothing yet." }))
|
|
54
|
+
: blocks.map((block) => (_jsxs(YStack, { gap: "$1", children: [_jsxs(XStack, { gap: "$2", items: "center", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: block.actor ?? block.kind }), block.actor ? (_jsx(SizableText, { size: "$1", color: "$color8", children: block.kind })) : null] }), _jsx(SizableText, { size: "$2", color: "$quiet", children: block.text })] }, block.key))), _jsx("div", { ref: foot })] }) }));
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=Transcript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Transcript.js","sourceRoot":"","sources":["../../src/agents/Transcript.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAuC,MAAM,OAAO,CAAA;AAE9E,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAqB3C;;;;;;GAMG;AACH,MAAM,UAAU,IAAI,CAAC,KAAa;IAChC,MAAM,GAAG,GAAqE,EAAE,CAAA;IAChF,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,MAAM,CAAA;QAChC,MAAM,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QAChC,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACvF,uEAAuE;QACvE,2EAA2E;QAC3E,2CAA2C;;YACtC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACpG,CAAC,CAAC,CAAA;IACF,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,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,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,OAAO,YACjC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,GACd,EACb,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CACb,KAAC,WAAW,IAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,SAAS,YACnC,KAAK,CAAC,IAAI,GACC,CACf,CAAC,CAAC,CAAC,IAAI,IACD,EACT,KAAC,WAAW,IAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,QAAQ,YAClC,KAAK,CAAC,IAAI,GACC,KAbH,KAAK,CAAC,GAAG,CAcb,CACV,CAAC,EAEN,cAAK,GAAG,EAAE,IAAI,GAAI,IACX,GACE,CACd,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SystemLine = exports.Pane = exports.OrgRail = exports.ChannelHeader = exports.ArtifactCard = exports.steps = exports.ProgressBlock = exports.Screen = exports.Steer = exports.MemberRow = exports.fold = exports.Transcript = exports.nest = exports.RunRow = exports.AgentBoard = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @hanzo/ui/agents — the agents working view, on @hanzo/gui primitives.
|
|
6
|
+
*
|
|
7
|
+
* `AgentBoard` shows what is running, grouped by project and nested by fan-out;
|
|
8
|
+
* `Transcript` shows what one run has done; `Steer` reaches a run mid-flight;
|
|
9
|
+
* `Screen` watches one that has something to look at; `MemberRow` draws an
|
|
10
|
+
* agent, a bot or a person with the kind legible.
|
|
11
|
+
*
|
|
12
|
+
* Props-in, callbacks-out — no transport, no store, no routing, and no import
|
|
13
|
+
* of `@hanzo/ai` anywhere in the module. The data belongs to the surface, which
|
|
14
|
+
* is what lets hanzo.ai, a channel workspace and the desktop compose the same
|
|
15
|
+
* five components over three different ways of fetching.
|
|
16
|
+
*
|
|
17
|
+
* The two pure helpers ship beside the components because both are decisions a
|
|
18
|
+
* surface would otherwise make differently each time: `nest` builds the tree a
|
|
19
|
+
* board draws from the flat list an API answers with, and `fold` joins a
|
|
20
|
+
* token-per-event stream into readable blocks.
|
|
21
|
+
*
|
|
22
|
+
* The composer is not here — a draft box is not agent-specific, so it stays at
|
|
23
|
+
* `@hanzo/ui/chat` and this module composes it.
|
|
24
|
+
*/
|
|
25
|
+
var Board_1 = require("./Board.cjs");
|
|
26
|
+
Object.defineProperty(exports, "AgentBoard", { enumerable: true, get: function () { return Board_1.AgentBoard; } });
|
|
27
|
+
Object.defineProperty(exports, "RunRow", { enumerable: true, get: function () { return Board_1.RunRow; } });
|
|
28
|
+
Object.defineProperty(exports, "nest", { enumerable: true, get: function () { return Board_1.nest; } });
|
|
29
|
+
var Transcript_1 = require("./Transcript.cjs");
|
|
30
|
+
Object.defineProperty(exports, "Transcript", { enumerable: true, get: function () { return Transcript_1.Transcript; } });
|
|
31
|
+
Object.defineProperty(exports, "fold", { enumerable: true, get: function () { return Transcript_1.fold; } });
|
|
32
|
+
var Steer_1 = require("./Steer.cjs");
|
|
33
|
+
Object.defineProperty(exports, "MemberRow", { enumerable: true, get: function () { return Steer_1.MemberRow; } });
|
|
34
|
+
Object.defineProperty(exports, "Steer", { enumerable: true, get: function () { return Steer_1.Steer; } });
|
|
35
|
+
var Screen_1 = require("./Screen.cjs");
|
|
36
|
+
Object.defineProperty(exports, "Screen", { enumerable: true, get: function () { return Screen_1.Screen; } });
|
|
37
|
+
var Progress_1 = require("./Progress.cjs");
|
|
38
|
+
Object.defineProperty(exports, "ProgressBlock", { enumerable: true, get: function () { return Progress_1.ProgressBlock; } });
|
|
39
|
+
Object.defineProperty(exports, "steps", { enumerable: true, get: function () { return Progress_1.steps; } });
|
|
40
|
+
var Pane_1 = require("./Pane.cjs");
|
|
41
|
+
Object.defineProperty(exports, "ArtifactCard", { enumerable: true, get: function () { return Pane_1.ArtifactCard; } });
|
|
42
|
+
Object.defineProperty(exports, "ChannelHeader", { enumerable: true, get: function () { return Pane_1.ChannelHeader; } });
|
|
43
|
+
Object.defineProperty(exports, "OrgRail", { enumerable: true, get: function () { return Pane_1.OrgRail; } });
|
|
44
|
+
Object.defineProperty(exports, "Pane", { enumerable: true, get: function () { return Pane_1.Pane; } });
|
|
45
|
+
Object.defineProperty(exports, "SystemLine", { enumerable: true, get: function () { return Pane_1.SystemLine; } });
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @hanzo/ui/agents — the agents working view, on @hanzo/gui primitives.
|
|
3
|
+
*
|
|
4
|
+
* `AgentBoard` shows what is running, grouped by project and nested by fan-out;
|
|
5
|
+
* `Transcript` shows what one run has done; `Steer` reaches a run mid-flight;
|
|
6
|
+
* `Screen` watches one that has something to look at; `MemberRow` draws an
|
|
7
|
+
* agent, a bot or a person with the kind legible.
|
|
8
|
+
*
|
|
9
|
+
* Props-in, callbacks-out — no transport, no store, no routing, and no import
|
|
10
|
+
* of `@hanzo/ai` anywhere in the module. The data belongs to the surface, which
|
|
11
|
+
* is what lets hanzo.ai, a channel workspace and the desktop compose the same
|
|
12
|
+
* five components over three different ways of fetching.
|
|
13
|
+
*
|
|
14
|
+
* The two pure helpers ship beside the components because both are decisions a
|
|
15
|
+
* surface would otherwise make differently each time: `nest` builds the tree a
|
|
16
|
+
* board draws from the flat list an API answers with, and `fold` joins a
|
|
17
|
+
* token-per-event stream into readable blocks.
|
|
18
|
+
*
|
|
19
|
+
* The composer is not here — a draft box is not agent-specific, so it stays at
|
|
20
|
+
* `@hanzo/ui/chat` and this module composes it.
|
|
21
|
+
*/
|
|
22
|
+
export { AgentBoard, RunRow, nest, type AgentBoardProps, type Run, type RunRowProps, type RunStatus, } from './Board.js';
|
|
23
|
+
export { Transcript, fold, type Block, type TranscriptProps, type Turn } from './Transcript.js';
|
|
24
|
+
export { MemberRow, Steer, type Command, type MemberKind, type MemberRowProps, type SteerProps, } from './Steer.js';
|
|
25
|
+
export { Screen, type ScreenKind, type ScreenProps, type Ticket } from './Screen.js';
|
|
26
|
+
export { ProgressBlock, steps, type Event, type ProgressBlockProps, type Step, type StepKind, } from './Progress.js';
|
|
27
|
+
export { ArtifactCard, ChannelHeader, OrgRail, Pane, SystemLine, type ArtifactCardProps, type ArtifactKind, type ChannelHeaderProps, type Org, type OrgRailProps, type PaneProps, type PaneTab, type SystemLineProps, } from './Pane.js';
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EACL,UAAU,EACV,MAAM,EACN,IAAI,EACJ,KAAK,eAAe,EACpB,KAAK,GAAG,EACR,KAAK,WAAW,EAChB,KAAK,SAAS,GACf,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,KAAK,EAAE,KAAK,eAAe,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAA;AAE5F,OAAO,EACL,SAAS,EACT,KAAK,EACL,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,UAAU,GAChB,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,MAAM,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjF,OAAO,EACL,aAAa,EACb,KAAK,EACL,KAAK,KAAK,EACV,KAAK,kBAAkB,EACvB,KAAK,IAAI,EACT,KAAK,QAAQ,GACd,MAAM,YAAY,CAAA;AAEnB,OAAO,EACL,YAAY,EACZ,aAAa,EACb,OAAO,EACP,IAAI,EACJ,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,GAAG,EACR,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,eAAe,GACrB,MAAM,QAAQ,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @hanzo/ui/agents — the agents working view, on @hanzo/gui primitives.
|
|
3
|
+
*
|
|
4
|
+
* `AgentBoard` shows what is running, grouped by project and nested by fan-out;
|
|
5
|
+
* `Transcript` shows what one run has done; `Steer` reaches a run mid-flight;
|
|
6
|
+
* `Screen` watches one that has something to look at; `MemberRow` draws an
|
|
7
|
+
* agent, a bot or a person with the kind legible.
|
|
8
|
+
*
|
|
9
|
+
* Props-in, callbacks-out — no transport, no store, no routing, and no import
|
|
10
|
+
* of `@hanzo/ai` anywhere in the module. The data belongs to the surface, which
|
|
11
|
+
* is what lets hanzo.ai, a channel workspace and the desktop compose the same
|
|
12
|
+
* five components over three different ways of fetching.
|
|
13
|
+
*
|
|
14
|
+
* The two pure helpers ship beside the components because both are decisions a
|
|
15
|
+
* surface would otherwise make differently each time: `nest` builds the tree a
|
|
16
|
+
* board draws from the flat list an API answers with, and `fold` joins a
|
|
17
|
+
* token-per-event stream into readable blocks.
|
|
18
|
+
*
|
|
19
|
+
* The composer is not here — a draft box is not agent-specific, so it stays at
|
|
20
|
+
* `@hanzo/ui/chat` and this module composes it.
|
|
21
|
+
*/
|
|
22
|
+
export { AgentBoard, RunRow, nest, } from './Board.js';
|
|
23
|
+
export { Transcript, fold } from './Transcript.js';
|
|
24
|
+
export { MemberRow, Steer, } from './Steer.js';
|
|
25
|
+
export { Screen } from './Screen.js';
|
|
26
|
+
export { ProgressBlock, steps, } from './Progress.js';
|
|
27
|
+
export { ArtifactCard, ChannelHeader, OrgRail, Pane, SystemLine, } from './Pane.js';
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EACL,UAAU,EACV,MAAM,EACN,IAAI,GAKL,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,UAAU,EAAE,IAAI,EAA+C,MAAM,cAAc,CAAA;AAE5F,OAAO,EACL,SAAS,EACT,KAAK,GAKN,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,MAAM,EAAkD,MAAM,UAAU,CAAA;AAEjF,OAAO,EACL,aAAa,EACb,KAAK,GAKN,MAAM,YAAY,CAAA;AAEnB,OAAO,EACL,YAAY,EACZ,aAAa,EACb,OAAO,EACP,IAAI,EACJ,UAAU,GASX,MAAM,QAAQ,CAAA"}
|
package/dist/box.cjs
CHANGED
|
@@ -39,6 +39,25 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
39
39
|
const react_1 = require("react");
|
|
40
40
|
const gui_1 = require("@hanzo/gui");
|
|
41
41
|
const tw_1 = require("./tw.cjs");
|
|
42
|
+
const gui_config_1 = require("./gui-config.cjs");
|
|
43
|
+
/**
|
|
44
|
+
* The process-global gui config, named as a VALUE so it survives bundling.
|
|
45
|
+
*
|
|
46
|
+
* A rendered gui component resolves `$background` and friends against one
|
|
47
|
+
* config, and it is `gui-config.ts` calling `createGui` at module scope that
|
|
48
|
+
* installs it. `<Hanzo>` names it too — but an app that imports only `Box`
|
|
49
|
+
* never loads `<Hanzo>`, so nothing installed it and the first render throws
|
|
50
|
+
*
|
|
51
|
+
* Error: Err0
|
|
52
|
+
*
|
|
53
|
+
* which in production is the whole message. A bare `import './gui-config.cjs'`
|
|
54
|
+
* does not fix it: Vite 8 ignores a package.json `sideEffects` ARRAY, so the
|
|
55
|
+
* side-effect-only import is shaken out. A value the module references cannot
|
|
56
|
+
* be. Measured on zoo.industries, where 58 files render Box and none mount
|
|
57
|
+
* Hanzo directly.
|
|
58
|
+
*/
|
|
59
|
+
if (!gui_config_1.config)
|
|
60
|
+
throw new Error('@hanzo/ui: the gui config did not install');
|
|
42
61
|
/**
|
|
43
62
|
* The display each element has before any class touches it.
|
|
44
63
|
*
|
package/dist/box.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../src/box.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAM,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../src/box.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAM,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAkE1C;;;;;;;;;GASG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,KAAK,CAAC,GAAG,CAAC,iBAAiB,GAAG,KAAK,IAWtE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EACpC,aAAa,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,GAAG,IAAI,GAC3E,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GACnE,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,YAAY,GAC7D,cAAc,GAAG,cAAc,GAAG,aAAa,GAAG,WAAW,GAC7D,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC,GACzC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,GAAG;IAC3F,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACpB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B;;OAEG;IACH,GAAG,CAAC,EAAE,CAAC,CAAA;IACP;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;CAC3C,CAAA;AAwEH;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,EAAe,CAAC,CAAC,SAAS,MAAM,KAAK,CAAC,GAAG,CAAC,iBAAiB,GAAG,KAAK,EACjF,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAAE,KAC1C,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;eAEf,GAAG"}
|
package/dist/box.js
CHANGED
|
@@ -36,6 +36,25 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
36
36
|
import { createElement, forwardRef } from 'react';
|
|
37
37
|
import { YStack } from '@hanzo/gui';
|
|
38
38
|
import { tw } from './tw.js';
|
|
39
|
+
import { config } from './gui-config.js';
|
|
40
|
+
/**
|
|
41
|
+
* The process-global gui config, named as a VALUE so it survives bundling.
|
|
42
|
+
*
|
|
43
|
+
* A rendered gui component resolves `$background` and friends against one
|
|
44
|
+
* config, and it is `gui-config.ts` calling `createGui` at module scope that
|
|
45
|
+
* installs it. `<Hanzo>` names it too — but an app that imports only `Box`
|
|
46
|
+
* never loads `<Hanzo>`, so nothing installed it and the first render throws
|
|
47
|
+
*
|
|
48
|
+
* Error: Err0
|
|
49
|
+
*
|
|
50
|
+
* which in production is the whole message. A bare `import './gui-config.js'`
|
|
51
|
+
* does not fix it: Vite 8 ignores a package.json `sideEffects` ARRAY, so the
|
|
52
|
+
* side-effect-only import is shaken out. A value the module references cannot
|
|
53
|
+
* be. Measured on zoo.industries, where 58 files render Box and none mount
|
|
54
|
+
* Hanzo directly.
|
|
55
|
+
*/
|
|
56
|
+
if (!config)
|
|
57
|
+
throw new Error('@hanzo/ui: the gui config did not install');
|
|
39
58
|
/**
|
|
40
59
|
* The display each element has before any class touches it.
|
|
41
60
|
*
|
package/dist/box.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box.js","sourceRoot":"","sources":["../src/box.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,EAAE,EAAmB,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"box.js","sourceRoot":"","sources":["../src/box.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,EAAE,EAAmB,MAAM,MAAM,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC;;;;;;;;;;;;;;;GAeG;AACH,IAAI,CAAC,MAAM;IAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAA;AAEzE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO;IAC9E,MAAM,EAAE,MAAM,EAAE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E,yEAAyE;QACzE,gEAAgE;QAChE,2EAA2E;QAC3E,2EAA2E;QAC3E,MAAM,EAAE,CAAC,iBACI,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,KAAK,KACjF,KAAgB,KAIjB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAE,IAAe,CAAC,EACjC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,IAAI,SAAS,EAChD,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,YAK7B,GAAG;YACF,CAAC,CAAC,aAAa,CACX,GAAG,EACH,EAAE,GAAI,IAAe,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,IAAI,SAAS,EAAE,KAAK,EAAE,EACnE,QAAQ,CACT;YACH,CAAC,CAAC,QAAQ,GACL,CACV,CAAA;IAED,OAAO,KAAK,CAAA;AACd,CAAC,CAAC,CAAA;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,QAEW,CAAA;AAE9B,eAAe,GAAG,CAAA"}
|
package/dist/css.cjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.css = void 0;
|
|
4
|
+
const cn_1 = require("./core/cn.cjs");
|
|
5
|
+
const tw_1 = require("./tw.cjs");
|
|
6
|
+
/** gui writes a breakpoint group under a `$`-prefixed key. */
|
|
7
|
+
const responsive = (key) => key.startsWith('$');
|
|
8
|
+
const css = (...classes) => {
|
|
9
|
+
const { props } = (0, tw_1.tw)((0, cn_1.cn)(...classes));
|
|
10
|
+
const out = {};
|
|
11
|
+
for (const key in props)
|
|
12
|
+
if (!responsive(key))
|
|
13
|
+
out[key] = props[key];
|
|
14
|
+
return out;
|
|
15
|
+
};
|
|
16
|
+
exports.css = css;
|
|
17
|
+
exports.default = exports.css;
|
package/dist/css.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class notation as an inline style — for a component that is neither ours nor
|
|
3
|
+
* an element.
|
|
4
|
+
*
|
|
5
|
+
* There are three kinds of thing you can put class notation on, and each needs
|
|
6
|
+
* its own answer:
|
|
7
|
+
*
|
|
8
|
+
* <Box className="grid gap-4"> an element — Box converts
|
|
9
|
+
* <Card {...sx('grid gap-4')}> a gui component — sx converts
|
|
10
|
+
* <Link style={css('gap-2')}> someone else's — this
|
|
11
|
+
*
|
|
12
|
+
* The third is `next/link`, `next/image`, a lucide icon: components that accept
|
|
13
|
+
* a `style` and hand every other prop straight to the element. `sx` is wrong for
|
|
14
|
+
* them — its output is gui's prop vocabulary, and a component that does not
|
|
15
|
+
* speak it forwards `fontSize` to the DOM as an attribute. `className` is wrong
|
|
16
|
+
* too: it arrives intact and means nothing, which is the defect this replaces.
|
|
17
|
+
*
|
|
18
|
+
* `tw` already speaks CSS — `h-4 w-4 ml-2` is `{height:16,width:16,marginLeft:8}`
|
|
19
|
+
* — so this is that, with the one part an inline style cannot hold removed.
|
|
20
|
+
*
|
|
21
|
+
* BREAKPOINTS DO NOT SURVIVE. `md:grid-cols-2` is a media query, and there is no
|
|
22
|
+
* media query inside a `style` attribute. Those keys are dropped rather than
|
|
23
|
+
* flattened, because flattening would apply a large-screen rule on a phone —
|
|
24
|
+
* silently wrong beats visibly absent. Responsive layout belongs on a `Box`.
|
|
25
|
+
*/
|
|
26
|
+
import type { CSSProperties } from 'react';
|
|
27
|
+
import { type ClassValue } from './tw.js';
|
|
28
|
+
export declare const css: (...classes: ClassValue[]) => CSSProperties;
|
|
29
|
+
export default css;
|
|
30
|
+
//# sourceMappingURL=css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../src/css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C,OAAO,EAAE,KAAK,UAAU,EAAM,MAAM,MAAM,CAAA;AAK1C,eAAO,MAAM,GAAG,eAAgB,UAAU,EAAE,KAAG,aAK9C,CAAA;eAEc,GAAG"}
|
package/dist/css.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cn } from './core/cn.js';
|
|
2
|
+
import { tw } from './tw.js';
|
|
3
|
+
/** gui writes a breakpoint group under a `$`-prefixed key. */
|
|
4
|
+
const responsive = (key) => key.startsWith('$');
|
|
5
|
+
export const css = (...classes) => {
|
|
6
|
+
const { props } = tw(cn(...classes));
|
|
7
|
+
const out = {};
|
|
8
|
+
for (const key in props)
|
|
9
|
+
if (!responsive(key))
|
|
10
|
+
out[key] = props[key];
|
|
11
|
+
return out;
|
|
12
|
+
};
|
|
13
|
+
export default css;
|
|
14
|
+
//# sourceMappingURL=css.js.map
|
package/dist/css.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.js","sourceRoot":"","sources":["../src/css.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAmB,EAAE,EAAE,MAAM,MAAM,CAAA;AAE1C,8DAA8D;AAC9D,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;AAEvD,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,GAAG,OAAqB,EAAiB,EAAE;IAC7D,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAA;IACpC,MAAM,GAAG,GAA4B,EAAE,CAAA;IACvC,KAAK,MAAM,GAAG,IAAI,KAAK;QAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;IACpE,OAAO,GAAoB,CAAA;AAC7B,CAAC,CAAA;AAED,eAAe,GAAG,CAAA"}
|
package/dist/gallery.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.14.
|
|
1
|
+
<!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.14.2</title><style>/* @hanzo/ui — generated by scripts/gen-css.mjs. Do not edit. */
|
|
2
2
|
:root { --hanzo-ui-styles: 1; }
|
|
3
3
|
/* Hanzo Design System — the entry point. Import THIS one file.
|
|
4
4
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ exports.DropdownMenuSubContent = exports.DropdownMenuSub = exports.DropdownMenuS
|
|
|
4
4
|
exports.TabsContent = exports.Tabs = exports.Switch = exports.Strong = exports.Spinner = exports.Span = exports.Spacer = exports.Slider = exports.SizableText = exports.Separator = exports.Band = exports.ScrollView = exports.Screen = exports.Paragraph = exports.SelectValue = exports.SelectTrigger = exports.SelectSeparator = exports.SelectScrollUpButton = exports.SelectScrollDownButton = exports.SelectLabel = exports.SelectItem = exports.SelectGroup = exports.SelectContent = exports.Select = exports.ScrollBar = exports.ScrollArea = exports.ResizablePanelGroup = exports.ResizablePanel = exports.ResizableHandle = exports.Progress = exports.PopoverTrigger = exports.PopoverContent = exports.PopoverClose = exports.PopoverAnchor = exports.Popover = exports.Label = exports.Input = exports.Image = exports.Heading = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = exports.Fill = exports.Glass = exports.Em = exports.DropdownMenuTrigger = exports.DropdownMenuSubTrigger = void 0;
|
|
5
5
|
exports.SheetTitle = exports.SheetPortal = exports.SheetOverlay = exports.SheetHeader = exports.SheetFooter = exports.SheetDescription = exports.SheetContent = exports.SheetClose = exports.Sheet = exports.StepIndicator = exports.NavItems = exports.fit = exports.MediaStack = exports.Skeleton = exports.CarouselNext = exports.CarouselPrevious = exports.CarouselItem = exports.CarouselContent = exports.Carousel = exports.useFormField = exports.FormMessage = exports.FormDescription = exports.FormControl = exports.FormLabel = exports.FormItem = exports.FormField = exports.Form = exports.useLink = exports.YouTubeEmbed = exports.VideoPlayer = exports.MDXLink = exports.LinkElement = exports.Link = exports.ApplyTypography = exports.toast = exports.buttonVariants = exports.badgeVariants = exports.ZStack = exports.YStack = exports.XStack = exports.View = exports.TooltipTrigger = exports.TooltipProvider = exports.TooltipContent = exports.Tooltip = exports.Text = exports.Toaster = exports.Textarea = exports.TabsTrigger = exports.TabsList = void 0;
|
|
6
6
|
exports.ContextMenuSub = exports.ContextMenuShortcut = exports.ContextMenuSeparator = exports.ContextMenuRadioItem = exports.ContextMenuRadioGroup = exports.ContextMenuPortal = exports.ContextMenuLabel = exports.ContextMenuItem = exports.ContextMenuGroup = exports.ContextMenuContent = exports.ContextMenuCheckboxItem = exports.ContextMenu = exports.AlertDialogTrigger = exports.AlertDialogTitle = exports.AlertDialogPortal = exports.AlertDialogOverlay = exports.AlertDialogHeader = exports.AlertDialogFooter = exports.AlertDialogDescription = exports.AlertDialogContent = exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialog = exports.AccordionTrigger = exports.AccordionItem = exports.AccordionContent = exports.Accordion = exports.DrawerTrigger = exports.DrawerHandle = exports.DrawerContent = exports.Drawer = exports.navigationMenuTriggerStyle = exports.NavigationMenuTrigger = exports.NavigationMenuList = exports.NavigationMenuLink = exports.NavigationMenuItem = exports.NavigationMenuContent = exports.NavigationMenu = exports.InputOTPSlot = exports.InputOTPSeparator = exports.InputOTPGroup = exports.InputOTP = exports.BreadcrumbSeparator = exports.BreadcrumbPage = exports.BreadcrumbList = exports.BreadcrumbLink = exports.BreadcrumbItem = exports.BreadcrumbEllipsis = exports.Breadcrumb = exports.SheetTrigger = void 0;
|
|
7
|
-
exports.sx = exports.Box = exports.tw = exports.capitalize = exports.cn = exports.Hanzo = exports.Anchor = exports.ToggleGroupItem = exports.ToggleGroup = exports.RadioGroupItem = exports.RadioGroup = exports.HoverCardTrigger = exports.HoverCardContent = exports.HoverCard = exports.ContextMenuTrigger = exports.ContextMenuSubTrigger = exports.ContextMenuSubContent = void 0;
|
|
7
|
+
exports.css = exports.sx = exports.Box = exports.tw = exports.capitalize = exports.cn = exports.Hanzo = exports.Anchor = exports.ToggleGroupItem = exports.ToggleGroup = exports.RadioGroupItem = exports.RadioGroup = exports.HoverCardTrigger = exports.HoverCardContent = exports.HoverCard = exports.ContextMenuTrigger = exports.ContextMenuSubTrigger = exports.ContextMenuSubContent = void 0;
|
|
8
8
|
// @hanzo/ui — the one Hanzo component library, on @hanzo/gui + @hanzo/design.
|
|
9
9
|
//
|
|
10
10
|
// ONE substrate: every component renders through @hanzo/gui primitives, so the
|
|
@@ -290,3 +290,5 @@ var box_1 = require("./box.cjs");
|
|
|
290
290
|
Object.defineProperty(exports, "Box", { enumerable: true, get: function () { return box_1.Box; } });
|
|
291
291
|
var sx_1 = require("./sx.cjs");
|
|
292
292
|
Object.defineProperty(exports, "sx", { enumerable: true, get: function () { return sx_1.sx; } });
|
|
293
|
+
var css_1 = require("./css.cjs");
|
|
294
|
+
Object.defineProperty(exports, "css", { enumerable: true, get: function () { return css_1.css; } });
|
package/dist/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export { cn, capitalize, type ClassValue } from './core/cn.js';
|
|
|
6
6
|
export { tw, type Parsed, type Props as TwProps } from './tw.js';
|
|
7
7
|
export { Box, type BoxProps } from './box.js';
|
|
8
8
|
export { sx } from './sx.js';
|
|
9
|
+
export { css } from './css.js';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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