@heigin/ui 0.1.0 → 0.2.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/CHANGELOG.md +25 -1
- package/dist/components/crm/agent-decision-tree.d.ts +82 -0
- package/dist/components/crm/agent-decision-tree.js +580 -0
- package/dist/components/crm/agent-decision-tree.module.js +113 -0
- package/dist/components/crm/agent-task-trail.d.ts +56 -0
- package/dist/components/crm/agent-task-trail.js +419 -0
- package/dist/components/crm/agent-thinking.d.ts +36 -0
- package/dist/components/crm/agent-thinking.js +443 -0
- package/dist/components/crm/agent-thinking.module.js +33 -0
- package/dist/components/crm/agent.module.js +81 -0
- package/dist/components/crm/crm.module.js +44 -4
- package/dist/components/crm/record-header.d.ts +2 -2
- package/dist/components/crm/workspace-switcher.d.ts +49 -0
- package/dist/components/crm/workspace-switcher.js +205 -0
- package/dist/components/ui/avatar.d.ts +9 -1
- package/dist/components/ui/avatar.js +61 -4
- package/dist/components/ui/avatar.module.js +4 -2
- package/dist/components/ui/breadcrumb.d.ts +10 -0
- package/dist/components/ui/breadcrumb.js +48 -0
- package/dist/components/ui/breadcrumb.module.js +19 -0
- package/dist/components/ui/heigin-mark.d.ts +11 -0
- package/dist/components/ui/heigin-mark.js +41 -0
- package/dist/components/ui/loader.d.ts +21 -0
- package/dist/components/ui/loader.js +45 -0
- package/dist/components/ui/pagination.d.ts +1 -2
- package/dist/components/ui/pagination.js +0 -1
- package/dist/components/ui/table.d.ts +9 -1
- package/dist/components/ui/table.js +136 -89
- package/dist/components/ui/table.module.js +13 -1
- package/dist/components/ui/thinking-orb.d.ts +27 -0
- package/dist/components/ui/thinking-orb.js +27 -0
- package/dist/components/ui/type-motion.d.ts +31 -0
- package/dist/components/ui/type-motion.js +394 -0
- package/dist/components/ui/type-motion.module.js +31 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +10 -1
- package/dist/styles.css +1733 -8
- package/dist/tokens.css +1 -1
- package/dist/tokens.d.ts +2 -2
- package/dist/tokens.js +7 -6
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@heigin/ui` are recorded here. This project follows [Semantic Versioning](https://semver.org).
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 0.2.0 — 2026-11-18
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `AgentTaskTrail`: a live timeline of an agent working through a task, with service icons, ticking timers, sub-steps on a branching rail and an approval gate (`onApprove` / `onDecline`).
|
|
10
|
+
- `AgentDecisionTree`: a queue of decisions an agent needs from a person, drawn as a tree with follow-up options, consequences, the agent's pick, an agent's note, "Other…" free text and the agent's reply. Number keys work only while focus is inside it. Stacks below a 760px container.
|
|
11
|
+
- `AgentThinking`: a thinking timer, the steps as they happen and a dithered dot visual (raymarched, Bayer-dithered canvas) that reshapes per step, then the answer. The visual pauses offscreen and shows a still frame under reduced motion.
|
|
12
|
+
- `TypeMotion`: a headline whose letters turn into artwork under the pointer, with eight effects (lens, pop, shuffle, word, bubble, swell, sticker, burst). Ships HeiGin orbs, symbols and the mark as default artwork; pass `artwork` for your own images or elements.
|
|
13
|
+
- `Loader`: one loading indicator with `variant="orb"` (the thinking orb, default) or `"spinner"`. The three agent components take the same choice through their `loader` prop.
|
|
14
|
+
- `HeiGinMark`: the HeiGin mark, on its tile or bare in `currentColor`. The agent components use it as the default agent icon.
|
|
15
|
+
- `ThinkingOrb`: a dotted orb for agent activity with nine states at 64, 32 and 20px. Wraps the MIT-licensed [`thinking-orbs`](https://github.com/Jakubantalik/thinking-orbs) package by Jakub Antalik, which is now a dependency.
|
|
16
|
+
- `NativeSelect` is exported from the package root. It was documented but missing from the entry point.
|
|
17
|
+
|
|
18
|
+
## 0.1.1 — 2026-10-11
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Menus and selects opened inside a Dialog or Drawer rendered behind it. The `--hg-z-popover` token is now 110 (above `--hg-z-modal` 100).
|
|
23
|
+
- `Pagination`: removed an unused React import.
|
|
24
|
+
|
|
25
|
+
### Docs
|
|
26
|
+
|
|
27
|
+
- New **Builder**: compose pages, sections or components from library blocks and copy type-checked TSX.
|
|
28
|
+
|
|
29
|
+
## 0.1.0
|
|
6
30
|
|
|
7
31
|
### Added
|
|
8
32
|
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type LoaderVariant } from "../ui/loader.js";
|
|
3
|
+
export interface DecisionOption {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
/** Quiet second line: cost, timing, scope. */
|
|
8
|
+
detail?: React.ReactNode;
|
|
9
|
+
/** A consequence worth flagging; shown in the warning tone instead of `detail`. */
|
|
10
|
+
warning?: React.ReactNode;
|
|
11
|
+
/** Small marks for the services this option touches. */
|
|
12
|
+
apps?: React.ReactNode[];
|
|
13
|
+
/** Context the agent wants you to see before choosing (a policy, a limit). */
|
|
14
|
+
note?: {
|
|
15
|
+
text: React.ReactNode;
|
|
16
|
+
source?: React.ReactNode;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface DecisionBranch {
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
icon?: React.ReactNode;
|
|
23
|
+
/** Follow-up question; pair it with `options`. */
|
|
24
|
+
question?: string;
|
|
25
|
+
options?: DecisionOption[];
|
|
26
|
+
/** The option the agent would pick. */
|
|
27
|
+
recommendedOption?: string;
|
|
28
|
+
/** For a branch with no follow-up: what happens if you pick it. */
|
|
29
|
+
outcome?: React.ReactNode;
|
|
30
|
+
apps?: React.ReactNode[];
|
|
31
|
+
}
|
|
32
|
+
export interface AgentDecision {
|
|
33
|
+
id: string;
|
|
34
|
+
agent: {
|
|
35
|
+
name: string;
|
|
36
|
+
model?: string;
|
|
37
|
+
icon?: React.ReactNode;
|
|
38
|
+
};
|
|
39
|
+
risk?: "high" | "medium" | "low";
|
|
40
|
+
question: string;
|
|
41
|
+
context?: React.ReactNode;
|
|
42
|
+
branches: DecisionBranch[];
|
|
43
|
+
/** The branch the agent would pick. */
|
|
44
|
+
recommended?: string;
|
|
45
|
+
/** Offer an "Other…" branch with a free-text instruction. Default true. */
|
|
46
|
+
allowOther?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export type DecisionChoice = {
|
|
49
|
+
kind: "option";
|
|
50
|
+
branch: DecisionBranch;
|
|
51
|
+
option: DecisionOption;
|
|
52
|
+
} | {
|
|
53
|
+
kind: "outcome";
|
|
54
|
+
branch: DecisionBranch;
|
|
55
|
+
} | {
|
|
56
|
+
kind: "other";
|
|
57
|
+
text: string;
|
|
58
|
+
};
|
|
59
|
+
export interface AgentDecisionTreeProps {
|
|
60
|
+
/** The queue, oldest first. Decided items move on by themselves. */
|
|
61
|
+
decisions: AgentDecision[];
|
|
62
|
+
/**
|
|
63
|
+
* Called when a person commits a choice. Return a Promise to show the loader until it settles.
|
|
64
|
+
* For an "Other…" instruction, resolve with the agent's reply to show it. A rejection leaves the
|
|
65
|
+
* decision open and says it could not be sent.
|
|
66
|
+
*/
|
|
67
|
+
onDecide: (decision: AgentDecision, choice: DecisionChoice) => void | string | Promise<void | string>;
|
|
68
|
+
/** Indicator while a decision is being sent: the thinking orb (default) or a spinner. */
|
|
69
|
+
loader?: LoaderVariant;
|
|
70
|
+
title?: string;
|
|
71
|
+
/** Number keys pick a branch or option while focus is inside the tree. Default true. */
|
|
72
|
+
hotkeys?: boolean;
|
|
73
|
+
/** Shown once every decision is made. */
|
|
74
|
+
empty?: React.ReactNode;
|
|
75
|
+
className?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* A queue of decisions an agent needs from a person, drawn as a tree: the question, the branches it
|
|
79
|
+
* considered, follow-up options with their consequences, and the agent's own pick. One click (or a
|
|
80
|
+
* number key) commits; the next decision slides in.
|
|
81
|
+
*/
|
|
82
|
+
export declare function AgentDecisionTree({ decisions, onDecide, loader, title, hotkeys, empty, className, }: AgentDecisionTreeProps): React.JSX.Element;
|