@superxd-studio/adptr 0.5.0 → 0.6.0
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/GENERATIVE.md +1 -1
- package/README.md +20 -11
- package/REUSE.md +11 -1
- package/REVIEW.md +2 -2
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/chunks/{callout-DKMHSnjc.js → callout-B89MDU9m.js} +31 -35
- package/chunks/{canvas-BJ15-XxE.js → canvas-Dd78FPe0.js} +9 -9
- package/chunks/{text-field-BLtoaZFn.js → text-field-mMHllx03.js} +1 -1
- package/chunks/thinking-DlBmZsgc.js +13 -0
- package/chunks/{ui-9DyNsYXY.js → ui-WR0qTNm7.js} +309 -260
- package/generative/index.js +156 -155
- package/interactions/index.js +1073 -499
- package/package.json +2 -1
- package/source/components/icons.tsx +14 -0
- package/source/components/peek.tsx +113 -0
- package/source/components/thinking.tsx +13 -2
- package/source/reusable/generative/index.tsx +14 -9
- package/source/reusable/generative/vocabulary.tsx +4 -2
- package/source/reusable/interactions/context.tsx +4 -0
- package/source/reusable/interactions/copy.ts +39 -0
- package/source/reusable/interactions/gate.tsx +246 -0
- package/source/reusable/interactions/index.ts +14 -0
- package/source/reusable/interactions/presentation.tsx +4 -1
- package/source/reusable/interactions/progress.tsx +240 -0
- package/source/reusable/interactions/receipt.tsx +230 -0
- package/source/reusable/interactions/run.tsx +206 -0
- package/source/reusable/ui/index.ts +1 -0
- package/source/reusable/web/review/index.tsx +21 -10
- package/source/styles/library.css +56 -0
- package/styles.css +1 -1
- package/types/components/icons.d.ts +8 -0
- package/types/components/peek.d.ts +17 -0
- package/types/components/thinking.d.ts +3 -1
- package/types/reusable/interactions/context.d.ts +39 -0
- package/types/reusable/interactions/copy.d.ts +43 -0
- package/types/reusable/interactions/gate.d.ts +39 -0
- package/types/reusable/interactions/index.d.ts +8 -0
- package/types/reusable/interactions/progress.d.ts +45 -0
- package/types/reusable/interactions/receipt.d.ts +54 -0
- package/types/reusable/interactions/run.d.ts +83 -0
- package/types/reusable/ui/index.d.ts +1 -0
- package/ui/index.js +3 -3
- package/web/index.js +350 -353
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/** Working, possibly stuck, waiting for the person, or done */
|
|
3
|
+
export type TaskProgressStatus = "working" | "stuck" | "needs-you" | "done";
|
|
4
|
+
export interface TaskProgressMove {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
onPress: () => void;
|
|
8
|
+
primary?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface TaskProgressProps {
|
|
11
|
+
/** The task, in words: "Building the new pricing page". Shown once it's done. */
|
|
12
|
+
task: string;
|
|
13
|
+
/** What it's doing now, in human words: "Testing the annual toggle", not "Running command" */
|
|
14
|
+
now: string;
|
|
15
|
+
/** The agent's plan */
|
|
16
|
+
stages: readonly string[];
|
|
17
|
+
/** The stage it's on, from 0. Stages before it are done; stages.length means all done. */
|
|
18
|
+
stage: number;
|
|
19
|
+
status?: TaskProgressStatus;
|
|
20
|
+
/** Time as a range, never a countdown: "~3–8 min left" */
|
|
21
|
+
estimate: string;
|
|
22
|
+
/** What the estimate is based on: "From the last 20 runs" */
|
|
23
|
+
basis?: string;
|
|
24
|
+
/** Counted progress, when the work can be counted */
|
|
25
|
+
counted?: {
|
|
26
|
+
label: string;
|
|
27
|
+
value: number;
|
|
28
|
+
max: number;
|
|
29
|
+
valueLabel?: string;
|
|
30
|
+
};
|
|
31
|
+
/** Why the estimate changed */
|
|
32
|
+
changed?: ReactNode;
|
|
33
|
+
/** Whether it needs the person, in words. Defaults to "No action needed". */
|
|
34
|
+
needs?: string;
|
|
35
|
+
/** Shows Review on the line while it needs the person */
|
|
36
|
+
onReview?: () => void;
|
|
37
|
+
/** Moves such as Keep waiting or Stop, at the right end */
|
|
38
|
+
moves?: readonly TaskProgressMove[];
|
|
39
|
+
defaultExpanded?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Agent task progress, in one line: what it's doing, how many stages are done and roughly how
|
|
43
|
+
* long is left. Progress is a fact; time is a range with its basis. It opens to the stages.
|
|
44
|
+
*/
|
|
45
|
+
export declare function TaskProgress({ task, now, stages, stage, status, estimate, basis, counted, changed, needs, onReview, moves, defaultExpanded, }: TaskProgressProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/** How it went: as approved, differently, partly, not at all, not known yet, or undone */
|
|
3
|
+
export type ReceiptOutcome = "done" | "different" | "partial" | "failed" | "unknown" | "undone";
|
|
4
|
+
export type ReceiptChangeState = "changed" | "not-changed" | "unknown" | "reverted";
|
|
5
|
+
export interface ReceiptChange {
|
|
6
|
+
id: string;
|
|
7
|
+
/** What changed, in a word or two: "Padding" */
|
|
8
|
+
what: string;
|
|
9
|
+
/** How: "12 → 16px" */
|
|
10
|
+
detail: string;
|
|
11
|
+
state?: ReceiptChangeState;
|
|
12
|
+
/** Your own word for the state, such as "Held back" */
|
|
13
|
+
stateLabel?: string;
|
|
14
|
+
/** This line's own way back, available while undo is open */
|
|
15
|
+
back?: {
|
|
16
|
+
label: string;
|
|
17
|
+
onPress: () => void;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface ReceiptAction {
|
|
21
|
+
id: string;
|
|
22
|
+
label: string;
|
|
23
|
+
onPress: () => void;
|
|
24
|
+
primary?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface ActionReceiptProps {
|
|
27
|
+
outcome: ReceiptOutcome;
|
|
28
|
+
/** What happened, as a fact with its scale: "Updated the shared Button on 34 screens" */
|
|
29
|
+
title: string;
|
|
30
|
+
/** When, and who approved it: "3:41pm · approved by you" */
|
|
31
|
+
meta?: string;
|
|
32
|
+
/** What differs from what was approved, or why: said before anything else */
|
|
33
|
+
note?: ReactNode;
|
|
34
|
+
changes: readonly ReceiptChange[];
|
|
35
|
+
/**
|
|
36
|
+
* A choice with too many answers for buttons, handed back to the person to answer in the
|
|
37
|
+
* conversation: "What should happen to the 3 locked screens? Reply to the build agent."
|
|
38
|
+
*/
|
|
39
|
+
ask?: ReactNode;
|
|
40
|
+
/** Next moves such as Try again or Check what happened; they sit at the right end */
|
|
41
|
+
actions?: readonly ReceiptAction[];
|
|
42
|
+
/** When the ways back close. Shows a quiet countdown in whole minutes. */
|
|
43
|
+
undoClosesAt?: Date;
|
|
44
|
+
/** When undo closes, in words, for screen readers: "to undo, until 3:51pm" */
|
|
45
|
+
undoClosesLabel?: string;
|
|
46
|
+
/** While the host checks what happened */
|
|
47
|
+
checking?: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The Action Receipt: what happened after the person approved, what changed, and how to undo
|
|
51
|
+
* it. Each change is a line with its own way back while undo is open, and a quiet countdown
|
|
52
|
+
* says how long that lasts. Facts, not reassurance; the host proves what happened.
|
|
53
|
+
*/
|
|
54
|
+
export declare function ActionReceipt({ outcome, title, meta, note, changes, ask, actions, undoClosesAt, undoClosesLabel, checking, }: ActionReceiptProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* What a dot says: green when a step succeeded, grey for thoughts and the agent's words (smaller
|
|
4
|
+
* for thoughts), blue while waiting for the person, the pixel matrix while working.
|
|
5
|
+
*/
|
|
6
|
+
export type RunDot = "success" | "note" | "thought" | "waiting" | "working";
|
|
7
|
+
/** Inside a run, a Decision Gate becomes the run's next entry */
|
|
8
|
+
export declare const RunContext: import("react").Context<boolean>;
|
|
9
|
+
export declare const useInRun: () => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* An agent's run as a timeline, like Claude Code or VS Code: one rail down the left through a
|
|
12
|
+
* dot for each entry. Put RunStep, RunThought, RunMessage, a DecisionGate and RunWorking inside.
|
|
13
|
+
*/
|
|
14
|
+
export declare function RunTimeline({ label, children }: {
|
|
15
|
+
label?: string;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* One entry: a dot and what happened. The rail runs from the first dot to the last. A text
|
|
20
|
+
* entry's dot sits on its first line; a card's sits level with the card's tile.
|
|
21
|
+
*/
|
|
22
|
+
export declare function RunEntry({ dot, card, children, }: {
|
|
23
|
+
dot: RunDot;
|
|
24
|
+
card?: boolean;
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
/** A file the agent touched */
|
|
28
|
+
export interface RunFile {
|
|
29
|
+
name: string;
|
|
30
|
+
path: string;
|
|
31
|
+
/** Its contents, or the part worth showing: opens when the name is pressed */
|
|
32
|
+
lines: readonly string[];
|
|
33
|
+
}
|
|
34
|
+
/** A file's name, as a link to it: ultramarine and monospaced, opening when pressed */
|
|
35
|
+
export declare function RunFileLink({ file }: {
|
|
36
|
+
file: RunFile;
|
|
37
|
+
}): import("react").JSX.Element;
|
|
38
|
+
/** The icon beside what a step did, as in Claude Code */
|
|
39
|
+
declare const kindIcons: {
|
|
40
|
+
read: {
|
|
41
|
+
({ className, ...props }: import("../../components/icons.js").IconProps): import("react").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
edit: {
|
|
45
|
+
({ className, ...props }: import("../../components/icons.js").IconProps): import("react").JSX.Element;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
48
|
+
run: {
|
|
49
|
+
({ className, ...props }: import("../../components/icons.js").IconProps): import("react").JSX.Element;
|
|
50
|
+
displayName: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* A step that succeeded: an icon and what it did, to which file or with which command, and what
|
|
55
|
+
* came of it underneath. An edit can show how many lines changed and its first lines.
|
|
56
|
+
*/
|
|
57
|
+
export declare function RunStep({ kind, icon, verb, file, command, result, added, removed, preview, }: {
|
|
58
|
+
/** Picks the icon beside the verb: an open book, a pencil or a terminal */
|
|
59
|
+
kind?: keyof typeof kindIcons;
|
|
60
|
+
/** Your own icon, for any other kind of step, sized like the text */
|
|
61
|
+
icon?: ReactNode;
|
|
62
|
+
verb: string;
|
|
63
|
+
file?: RunFile;
|
|
64
|
+
command?: string;
|
|
65
|
+
result?: string;
|
|
66
|
+
added?: number;
|
|
67
|
+
removed?: number;
|
|
68
|
+
/** Show the file's first lines under the step, fading out, as VS Code does for an edit */
|
|
69
|
+
preview?: boolean;
|
|
70
|
+
}): import("react").JSX.Element;
|
|
71
|
+
/** A thought, such as "Thought for 12s": a smaller grey dot and quiet text */
|
|
72
|
+
export declare function RunThought({ children }: {
|
|
73
|
+
children: ReactNode;
|
|
74
|
+
}): import("react").JSX.Element;
|
|
75
|
+
/** The agent, in its own words */
|
|
76
|
+
export declare function RunMessage({ children }: {
|
|
77
|
+
children: ReactNode;
|
|
78
|
+
}): import("react").JSX.Element;
|
|
79
|
+
/** What the agent is doing now, with the working matrix */
|
|
80
|
+
export declare function RunWorking({ children }: {
|
|
81
|
+
children: ReactNode;
|
|
82
|
+
}): import("react").JSX.Element;
|
|
83
|
+
export {};
|
|
@@ -14,6 +14,7 @@ export { Avatar } from "../../components/avatar.js";
|
|
|
14
14
|
export { Skeleton } from "../../components/skeleton.js";
|
|
15
15
|
export { Spinner } from "../../components/spinner.js";
|
|
16
16
|
export { ScrollArea } from "../../components/scroll-area.js";
|
|
17
|
+
export { Peek } from "../../components/peek.js";
|
|
17
18
|
export { ResponsiveOverlay } from "../../components/responsive-overlay.js";
|
|
18
19
|
export { DateTimeField } from "../../components/date-time-field.js";
|
|
19
20
|
export { ScenarioPicker } from "../../components/scenario-picker/index.js";
|
package/ui/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "../chunks/callout-
|
|
3
|
-
import { A as o, C as s, D as c, E as l, F as u,
|
|
4
|
-
export {
|
|
2
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "../chunks/callout-B89MDU9m.js";
|
|
3
|
+
import { A as o, C as s, D as c, E as l, F as u, I as d, M as f, N as p, O as m, P as h, S as g, T as _, _ as v, a as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as A, n as j, o as M, p as N, r as P, s as F, t as I, u as L, v as R, w as z, x as B, y as V } from "../chunks/ui-WR0qTNm7.js";
|
|
4
|
+
export { B as Accordion, S as AspectRatio, F as Avatar, C as Badge, g as Breadcrumbs, n as Button, i as ButtonLink, a as Callout, N as Card, m as Checkbox, O as CheckboxGroup, A as DataTable, j as DateTimeField, o as Form, T as KeyboardHint, s as Menu, z as ModalDialog, _ as Pagination, E as Peek, w as Progress, D as RadioGroup, P as ResponsiveOverlay, I as ScenarioPicker, y as ScrollArea, k as SearchPicker, x as SegmentedControl, f as Select, v as Separator, M as Skeleton, p as Slider, r as Spinner, L as Switch, l as Tabs, h as TextField, t as TextLink, R as ToastRegion, u as Toggle, c as Tooltip, e as buttonStyles, V as createNotificationQueue, b as sortRows, d as uiCopy };
|