akanjs 3.0.0-alpha.27 → 3.0.0-alpha.29
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/local/apps/serverLifecycle/serverLifecycle-local.db-shm +0 -0
- package/local/apps/serverLifecycle/serverLifecycle-local_solid.db-shm +0 -0
- package/package.json +1 -5
- package/server/systemPageDocument.tsx +1 -1
- package/types/server/systemPageDocument.d.ts +1 -1
- package/types/ui/Agent/Markdown.d.ts +11 -0
- package/types/ui/Agent/markdownBlocks.d.ts +34 -0
- package/types/ui/Agent/markdownSpans.d.ts +2 -0
- package/types/ui/Agent/markdownTable.d.ts +16 -0
- package/types/ui/Constant/Graph.d.ts +10 -0
- package/types/ui/Constant/index.d.ts +2 -1
- package/types/ui/Constant/schemaGraph.d.ts +39 -0
- package/types/ui/DraggableList.d.ts +1 -1
- package/types/ui/Layout/BottomTab.d.ts +3 -2
- package/types/ui/Loading/ProgressBar.d.ts +4 -0
- package/types/ui/Loading/Spin.d.ts +2 -1
- package/types/ui/Model/EditModal.d.ts +1 -1
- package/types/ui/Pagination.d.ts +2 -2
- package/types/ui/Radio.d.ts +1 -1
- package/types/ui/Reference/Collapse.d.ts +11 -0
- package/types/ui/Reference/Panel.d.ts +29 -0
- package/types/ui/Reference/Segmented.d.ts +17 -0
- package/types/ui/Reference/Summary.d.ts +13 -0
- package/types/ui/Reference/Toolbar.d.ts +21 -0
- package/types/ui/Reference/dictText.d.ts +6 -0
- package/types/ui/Reference/index.d.ts +7 -0
- package/types/ui/Reference/style.d.ts +20 -0
- package/types/ui/Reference.d.ts +1 -0
- package/types/ui/Signal/Doc.d.ts +3 -1
- package/types/ui/Signal/Object.d.ts +2 -1
- package/types/ui/Signal/RestApi.d.ts +2 -1
- package/types/ui/Signal/WebSocket.d.ts +2 -1
- package/types/ui/Signal/endpointEntries.d.ts +10 -0
- package/types/ui/Signal/style.d.ts +8 -10
- package/types/ui/System/Messages.d.ts +1 -1
- package/ui/Agent/Approval.tsx +1 -1
- package/ui/Agent/Bubble.tsx +5 -4
- package/ui/Agent/Chat.tsx +48 -7
- package/ui/Agent/Context.tsx +1 -1
- package/ui/Agent/Dock.tsx +1 -1
- package/ui/Agent/Markdown.tsx +125 -0
- package/ui/Agent/StateKey.tsx +3 -1
- package/ui/Agent/Tool.tsx +2 -2
- package/ui/Agent/Transcript.tsx +2 -2
- package/ui/Agent/markdownBlocks.ts +135 -0
- package/ui/Agent/markdownSpans.tsx +49 -0
- package/ui/Agent/markdownTable.ts +54 -0
- package/ui/BottomSheet.tsx +31 -35
- package/ui/Clipboard.tsx +3 -6
- package/ui/Constant/Doc.tsx +265 -254
- package/ui/Constant/Graph.tsx +151 -0
- package/ui/Constant/index.ts +3 -2
- package/ui/Constant/schemaGraph.ts +232 -0
- package/ui/Data/Item.tsx +1 -1
- package/ui/Data/ListContainer.tsx +2 -2
- package/ui/Dialog/Modal.tsx +48 -53
- package/ui/DraggableList.tsx +1 -1
- package/ui/Dropdown.tsx +1 -1
- package/ui/Empty.tsx +6 -4
- package/ui/Field.tsx +3 -3
- package/ui/Input.tsx +13 -4
- package/ui/Layout/BottomTab.tsx +32 -37
- package/ui/Layout/Sider.tsx +24 -13
- package/ui/Loading/Area.tsx +7 -6
- package/ui/Loading/Button.tsx +7 -9
- package/ui/Loading/Input.tsx +7 -9
- package/ui/Loading/ProgressBar.tsx +16 -7
- package/ui/Loading/Skeleton.tsx +8 -13
- package/ui/Loading/Spin.tsx +20 -14
- package/ui/Model/EditModal.tsx +2 -2
- package/ui/Model/index_.tsx +1 -1
- package/ui/Pagination.tsx +51 -66
- package/ui/Popconfirm.tsx +46 -54
- package/ui/Radio.tsx +53 -24
- package/ui/Reference/Collapse.tsx +26 -0
- package/ui/Reference/Panel.tsx +79 -0
- package/ui/Reference/Segmented.tsx +41 -0
- package/ui/Reference/Summary.tsx +25 -0
- package/ui/Reference/Toolbar.tsx +44 -0
- package/ui/Reference/dictText.ts +9 -0
- package/ui/Reference/index.ts +7 -0
- package/ui/Reference/style.ts +45 -0
- package/ui/Select.tsx +3 -3
- package/ui/Signal/Arg.tsx +50 -52
- package/ui/Signal/Doc.tsx +122 -102
- package/ui/Signal/Listener.tsx +24 -28
- package/ui/Signal/Message.tsx +86 -135
- package/ui/Signal/Object.tsx +79 -57
- package/ui/Signal/PubSub.tsx +71 -113
- package/ui/Signal/Request.tsx +2 -22
- package/ui/Signal/Response.tsx +19 -45
- package/ui/Signal/RestApi.tsx +163 -204
- package/ui/Signal/WebSocket.tsx +22 -26
- package/ui/Signal/endpointEntries.ts +29 -0
- package/ui/Signal/style.ts +34 -34
- package/ui/System/Messages.tsx +51 -30
- package/ui/System/Reconnect.tsx +22 -56
- package/ui/Tab/Menu.tsx +12 -5
- package/ui/Tab/Menus.tsx +6 -3
- package/ui/Table.tsx +65 -59
- package/ui/ToggleSelect.tsx +4 -6
- package/ui/Tooltip.tsx +15 -1
- package/ui/Unauthorized.tsx +6 -4
- package/types/ui/Constant/Mermaid.d.ts +0 -8
- package/types/ui/Signal/Collapse.d.ts +0 -12
- package/ui/Constant/Mermaid.tsx +0 -149
- package/ui/Signal/Collapse.tsx +0 -29
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akanjs",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.29",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -213,7 +213,6 @@
|
|
|
213
213
|
"firebase": "^12.13.0",
|
|
214
214
|
"happy-dom": "^20.11.2",
|
|
215
215
|
"ioredis": "^5.10.1",
|
|
216
|
-
"mermaid": "^11.15.0",
|
|
217
216
|
"postgres": "^3.4.9",
|
|
218
217
|
"protobufjs": "^8.4.0",
|
|
219
218
|
"react": "19.2.7",
|
|
@@ -316,9 +315,6 @@
|
|
|
316
315
|
"ioredis": {
|
|
317
316
|
"optional": true
|
|
318
317
|
},
|
|
319
|
-
"mermaid": {
|
|
320
|
-
"optional": true
|
|
321
|
-
},
|
|
322
318
|
"postgres": {
|
|
323
319
|
"optional": true
|
|
324
320
|
},
|
|
@@ -39,7 +39,7 @@ export const SYSTEM_PAGE_STATUS_COPY = {
|
|
|
39
39
|
} as const;
|
|
40
40
|
|
|
41
41
|
export const SYSTEM_PAGE_STYLE = `
|
|
42
|
-
:root { color-scheme: dark; --akan-primary: #ff493b; --akan-secondary: #2b2e33; --akan-accent: #d1a23b; --akan-foreground: #ffffff; --akan-background: #1a1a1a; --akan-
|
|
42
|
+
:root { color-scheme: dark; --akan-primary: #ff493b; --akan-secondary: #2b2e33; --akan-accent: #d1a23b; --akan-foreground: #ffffff; --akan-background: #1a1a1a; --akan-error: #f02020; }
|
|
43
43
|
body { margin: 0; min-height: 100vh; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--akan-background); color: var(--akan-foreground); }
|
|
44
44
|
a { color: inherit; }
|
|
45
45
|
.akan-system-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; box-sizing: border-box; background: radial-gradient(circle at top left, rgba(255, 73, 59, 0.16), transparent 34%), linear-gradient(135deg, var(--akan-background), #111); }
|
|
@@ -32,7 +32,7 @@ export declare const SYSTEM_PAGE_STATUS_COPY: {
|
|
|
32
32
|
readonly actionLabel: "Back to safety";
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
export declare const SYSTEM_PAGE_STYLE = "\n:root { color-scheme: dark; --akan-primary: #ff493b; --akan-secondary: #2b2e33; --akan-accent: #d1a23b; --akan-foreground: #ffffff; --akan-background: #1a1a1a; --akan-
|
|
35
|
+
export declare const SYSTEM_PAGE_STYLE = "\n:root { color-scheme: dark; --akan-primary: #ff493b; --akan-secondary: #2b2e33; --akan-accent: #d1a23b; --akan-foreground: #ffffff; --akan-background: #1a1a1a; --akan-error: #f02020; }\nbody { margin: 0; min-height: 100vh; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif; background: var(--akan-background); color: var(--akan-foreground); }\na { color: inherit; }\n.akan-system-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; box-sizing: border-box; background: radial-gradient(circle at top left, rgba(255, 73, 59, 0.16), transparent 34%), linear-gradient(135deg, var(--akan-background), #111); }\n.akan-system-card { width: min(720px, 100%); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 32px; background: linear-gradient(145deg, rgba(42, 42, 42, 0.96), rgba(43, 46, 51, 0.78)); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36); padding: clamp(28px, 6vw, 56px); }\n.akan-system-status { margin: 0 0 18px; font-weight: 800; font-size: clamp(4rem, 18vw, 8rem); line-height: 0.85; letter-spacing: -0.08em; color: var(--akan-primary); }\n.akan-system-eyebrow { margin: 0 0 10px; color: var(--akan-accent); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }\n.akan-system-title { margin: 0; max-width: 12ch; font-size: clamp(2rem, 7vw, 4rem); line-height: 0.95; letter-spacing: -0.055em; color: var(--akan-foreground); }\n.akan-system-description { margin: 22px 0 0; max-width: 56ch; color: rgba(255, 255, 255, 0.76); font-size: 1.05rem; line-height: 1.75; }\n.akan-system-path { margin: 22px 0 0; overflow-wrap: anywhere; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; background: rgba(26, 26, 26, 0.72); padding: 12px 14px; color: rgba(255, 255, 255, 0.72); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.88rem; }\n.akan-system-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }\n.akan-system-action { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--akan-primary); border-radius: 999px; background: var(--akan-primary); box-shadow: 0 12px 34px rgba(255, 73, 59, 0.26); color: var(--akan-foreground); padding: 0 18px; font-weight: 800; text-decoration: none; }\n.akan-system-secondary { border: 1px solid rgba(255, 255, 255, 0.12); background: var(--akan-secondary); color: var(--akan-foreground); }\n.akan-system-details { margin-top: 28px; max-height: 260px; overflow: auto; border-radius: 18px; background: rgba(26, 26, 26, 0.82); border: 1px solid rgba(240, 32, 32, 0.22); padding: 16px; color: rgba(255, 255, 255, 0.78); font-size: 0.82rem; line-height: 1.55; white-space: pre-wrap; }\n";
|
|
36
36
|
export declare function createSystemPageDocument(options: SystemPageOptions): ReactNode;
|
|
37
37
|
export declare function getSystemPageErrorDetails(error: unknown): string;
|
|
38
38
|
export declare function getSystemPageHomeHref({ pathname, i18n, basePaths, headerBasePath, }: SystemPageHomeHrefOptions): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface MarkdownProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
children: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The chat's own markdown renderer: React elements, never `dangerouslySetInnerHTML`, and no parser dependency.
|
|
7
|
+
* `Bun.markdown` is the obvious candidate and cannot serve this — it is a runtime API the bundler passes through
|
|
8
|
+
* verbatim, so it is undefined in the browser, and assistant text arrives here as SSE deltas the client accrues.
|
|
9
|
+
*/
|
|
10
|
+
export default function Markdown({ className, children }: MarkdownProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type TableBlock } from "./markdownTable.d.ts";
|
|
2
|
+
export interface MarkdownItem {
|
|
3
|
+
depth: number;
|
|
4
|
+
ordered: boolean;
|
|
5
|
+
num: number;
|
|
6
|
+
text: string;
|
|
7
|
+
}
|
|
8
|
+
export type MarkdownBlock = {
|
|
9
|
+
kind: "code";
|
|
10
|
+
text: string;
|
|
11
|
+
} | {
|
|
12
|
+
kind: "heading";
|
|
13
|
+
level: number;
|
|
14
|
+
text: string;
|
|
15
|
+
} | {
|
|
16
|
+
kind: "list";
|
|
17
|
+
items: MarkdownItem[];
|
|
18
|
+
} | {
|
|
19
|
+
kind: "quote";
|
|
20
|
+
text: string;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "rule";
|
|
23
|
+
} | {
|
|
24
|
+
kind: "para";
|
|
25
|
+
text: string;
|
|
26
|
+
} | TableBlock;
|
|
27
|
+
/**
|
|
28
|
+
* Block scanner for assistant chat text — the CommonMark subset a model actually emits over this wire.
|
|
29
|
+
*/
|
|
30
|
+
export declare class MarkdownBlocks {
|
|
31
|
+
#private;
|
|
32
|
+
static of(source: string): MarkdownBlock[];
|
|
33
|
+
constructor(source: string);
|
|
34
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type Align = "left" | "center" | "right";
|
|
2
|
+
export interface TableBlock {
|
|
3
|
+
kind: "table";
|
|
4
|
+
aligns: (Align | null)[];
|
|
5
|
+
head: string[];
|
|
6
|
+
rows: string[][];
|
|
7
|
+
}
|
|
8
|
+
/** GFM table scan, kept out of the block scanner because the delimiter row makes it the one shape that has to
|
|
9
|
+
* read the line after the one it starts on. */
|
|
10
|
+
export declare class MarkdownTable {
|
|
11
|
+
#private;
|
|
12
|
+
static at(lines: string[], at: number): {
|
|
13
|
+
block: TableBlock;
|
|
14
|
+
next: number;
|
|
15
|
+
} | null;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type SchemaGraphEdge, type SchemaGraphNode } from "./schemaGraph.d.ts";
|
|
2
|
+
export interface GraphProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
nodes: SchemaGraphNode[];
|
|
6
|
+
edges: SchemaGraphEdge[];
|
|
7
|
+
selectedId?: string | null;
|
|
8
|
+
onSelect?: (nodeId: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const Graph: ({ className, title, nodes, edges, selectedId, onSelect }: GraphProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Doc from "./Doc.d.ts";
|
|
2
2
|
export * from "./schemaDoc.d.ts";
|
|
3
|
+
export * from "./schemaGraph.d.ts";
|
|
3
4
|
export declare const Constant: {
|
|
4
5
|
Doc: typeof Doc;
|
|
5
|
-
|
|
6
|
+
Graph: ({ className, title, nodes, edges, selectedId, onSelect }: import("./Graph.d.ts").GraphProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type SchemaNodeKind = "database" | "scalar" | "external";
|
|
2
|
+
export interface SchemaGraphNode {
|
|
3
|
+
id: string;
|
|
4
|
+
refName: string;
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle: string;
|
|
7
|
+
kind: SchemaNodeKind;
|
|
8
|
+
}
|
|
9
|
+
export interface SchemaGraphEdge {
|
|
10
|
+
from: string;
|
|
11
|
+
to: string;
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
export interface PlacedNode extends SchemaGraphNode {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
textX: number;
|
|
20
|
+
titleText: string;
|
|
21
|
+
subtitleText: string;
|
|
22
|
+
}
|
|
23
|
+
export interface PlacedEdge extends SchemaGraphEdge {
|
|
24
|
+
path: string;
|
|
25
|
+
labelX: number;
|
|
26
|
+
labelY: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Layered left-to-right placement (longest-path layering + barycenter ordering), the same shape a `flowchart LR`
|
|
30
|
+
* produces without the renderer. Pure geometry so it is unit-testable and runs identically on the server.
|
|
31
|
+
*/
|
|
32
|
+
export declare class SchemaGraphLayout {
|
|
33
|
+
#private;
|
|
34
|
+
readonly nodes: PlacedNode[];
|
|
35
|
+
readonly edges: PlacedEdge[];
|
|
36
|
+
readonly width: number;
|
|
37
|
+
readonly height: number;
|
|
38
|
+
constructor(nodes: SchemaGraphNode[], edges: SchemaGraphEdge[]);
|
|
39
|
+
}
|
|
@@ -3,4 +3,8 @@ export interface ProgressBarProps {
|
|
|
3
3
|
value: number;
|
|
4
4
|
max: number;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* A div track rather than a native `<progress>`. `accent-color` themes only the fill; the track keeps the UA
|
|
8
|
+
* grey, which reads as a light bar on a dark theme, and no browser applies the element's radius to the fill.
|
|
9
|
+
*/
|
|
6
10
|
export declare const ProgressBar: ({ className, value, max }: ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,5 +3,6 @@ export interface SpinProps {
|
|
|
3
3
|
indicator?: ReactNode;
|
|
4
4
|
isCenter?: boolean;
|
|
5
5
|
className?: string;
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
6
7
|
}
|
|
7
|
-
export declare const Spin: ({ indicator, isCenter, className }: SpinProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Spin: ({ indicator, isCenter, className, size }: SpinProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,7 +14,7 @@ interface EditModelProps<Full> {
|
|
|
14
14
|
edit?: ClientEdit<string, Full> | Partial<Full>;
|
|
15
15
|
/** Store modal name that should activate this editor. */
|
|
16
16
|
modal?: string;
|
|
17
|
-
children:
|
|
17
|
+
children: ReactNode;
|
|
18
18
|
/** Custom loading overlay wrapper, or false to disable the default overlay. */
|
|
19
19
|
loadingWrapper?: boolean | ((props: {
|
|
20
20
|
children?: any;
|
package/types/ui/Pagination.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
2
|
export interface PaginationProps {
|
|
3
3
|
/** Current 1-based page number. */
|
|
4
4
|
currentPage: number;
|
|
@@ -17,7 +17,7 @@ export interface PaginationProps {
|
|
|
17
17
|
pageNumClassName?: string;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
export declare const DefaultPagination:
|
|
20
|
+
export declare const DefaultPagination: ({ currentPage, total, onPageSelect, itemsPerPage, renderEmpty, classNames, }: PaginationProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
21
21
|
/**
|
|
22
22
|
* Pager. Resolves to a route-scoped override when a `page/**\/_overrides.tsx` in
|
|
23
23
|
* the route's ancestry declares one, otherwise renders {@link DefaultPagination}.
|
package/types/ui/Radio.d.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
interface CollapseProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
contentClassName?: string;
|
|
5
|
+
summary: ReactNode;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
open?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** 레퍼런스 카드의 접이식 컨테이너. daisyui `collapse` 대신 네이티브 `<details>/<summary>` — 열고 닫는 데 JS 가 없다. */
|
|
10
|
+
export declare const Collapse: ({ summary, children, open, className, contentClassName }: CollapseProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ReactNode, RefObject } from "react";
|
|
2
|
+
import { docBorder } from "./style.d.ts";
|
|
3
|
+
interface PanelProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
bodyClassName?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
meta?: ReactNode;
|
|
8
|
+
tone?: Parameters<typeof docBorder>[0];
|
|
9
|
+
/** Rendered outside the scrolling body so it can cover the whole panel. */
|
|
10
|
+
overlay?: ReactNode;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const Panel: ({ className, bodyClassName, label, meta, tone, overlay, children }: PanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
interface CodeProps {
|
|
15
|
+
className?: string;
|
|
16
|
+
label?: string;
|
|
17
|
+
code: string;
|
|
18
|
+
tone?: PanelProps["tone"];
|
|
19
|
+
meta?: ReactNode;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
bodyRef?: RefObject<HTMLPreElement | null>;
|
|
22
|
+
overlay?: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Read-only code surface. A `<pre>` rather than a `<textarea>`: every one of these panels ignored what was typed
|
|
26
|
+
* into it, so the caret and the resize grip were promising an edit that never landed anywhere.
|
|
27
|
+
*/
|
|
28
|
+
export declare const Code: ({ className, label, code, tone, meta, placeholder, bodyRef, overlay }: CodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface SegmentedItem<Key extends string> {
|
|
3
|
+
key: Key;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface SegmentedProps<Key extends string> {
|
|
8
|
+
className?: string;
|
|
9
|
+
items: readonly SegmentedItem<Key>[];
|
|
10
|
+
value: Key;
|
|
11
|
+
onChange: (value: Key) => void;
|
|
12
|
+
}
|
|
13
|
+
/** The track and its items are also the shape of a multi-select chip group, which `Segmented` itself cannot be. */
|
|
14
|
+
export declare const segmentTrackClass = "inline-flex w-fit flex-wrap gap-1 rounded-field bg-muted p-1";
|
|
15
|
+
export declare const segmentItemClass: (active: boolean) => string;
|
|
16
|
+
export declare const Segmented: <Key extends string>({ className, items, value, onChange }: SegmentedProps<Key>) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
interface SummaryCardProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
label: string;
|
|
5
|
+
value: number | string;
|
|
6
|
+
}
|
|
7
|
+
export declare const SummaryCard: ({ className, label, value }: SummaryCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
interface SummaryGridProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const SummaryGrid: ({ className, children }: SummaryGridProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
interface ToolbarProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const Toolbar: ({ className, children }: ToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
interface ToolbarFieldProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
label: string;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const ToolbarField: ({ className, label, children }: ToolbarFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
interface SectionProps {
|
|
14
|
+
className?: string;
|
|
15
|
+
title: string;
|
|
16
|
+
action?: ReactNode;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
/** Titled band with a rule running to the edge, so a long document reads as sections rather than as one list. */
|
|
20
|
+
export declare const Section: ({ className, title, action, children }: SectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Collapse } from "./Collapse.d.ts";
|
|
2
|
+
export { dictText } from "./dictText.d.ts";
|
|
3
|
+
export { Code, Panel } from "./Panel.d.ts";
|
|
4
|
+
export { Segmented, type SegmentedItem, segmentItemClass, segmentTrackClass } from "./Segmented.d.ts";
|
|
5
|
+
export { SummaryCard, SummaryGrid } from "./Summary.d.ts";
|
|
6
|
+
export { docDash, docPill, docUi, type Tone } from "./style.d.ts";
|
|
7
|
+
export { Section, Toolbar, ToolbarField } from "./Toolbar.d.ts";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type Tone = "info" | "success" | "warning" | "error" | "muted";
|
|
2
|
+
/** Shared vocabulary for the generated reference surfaces — Constant schema docs and Signal API docs. */
|
|
3
|
+
export declare const docUi: {
|
|
4
|
+
card: string;
|
|
5
|
+
panel: string;
|
|
6
|
+
tablePanel: string;
|
|
7
|
+
sectionLabel: string;
|
|
8
|
+
sectionTitle: string;
|
|
9
|
+
pageTitle: string;
|
|
10
|
+
sectionDescription: string;
|
|
11
|
+
prose: string;
|
|
12
|
+
key: string;
|
|
13
|
+
subLabel: string;
|
|
14
|
+
tableClass: string;
|
|
15
|
+
emptyPanel: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const docPill: (tone: Tone, className?: string) => string;
|
|
18
|
+
export declare const docBorder: (tone: Tone) => string;
|
|
19
|
+
/** Absent optional cell. One glyph everywhere, so an empty column reads as empty rather than as data. */
|
|
20
|
+
export declare const docDash = "text-foreground/25";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Reference/index.d.ts";
|
package/types/ui/Signal/Doc.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { type FetchProxy } from "akanjs/fetch";
|
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
3
|
declare function Doc(): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare namespace Doc {
|
|
5
|
-
var Setting: ({ guardNames, roleTypes, roleKeys, }: DocSettingProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
var Setting: ({ guardNames, roleTypes, roleKeys, search, onSearch, }: DocSettingProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
var AuthModal: ({ children }: DocAuthModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
var DocSignals: ({ fetch }: DocSignalsProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
var DocSignal: ({ refName, fetch }: DocSignalProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,6 +15,8 @@ interface DocSettingProps {
|
|
|
15
15
|
roleKeys?: {
|
|
16
16
|
[key: string]: string;
|
|
17
17
|
};
|
|
18
|
+
search?: string;
|
|
19
|
+
onSearch?: (search: string) => void;
|
|
18
20
|
}
|
|
19
21
|
interface DocAuthModalProps {
|
|
20
22
|
children: ReactNode;
|
|
@@ -3,7 +3,7 @@ import { type ConstantCls } from "akanjs/constant";
|
|
|
3
3
|
declare function Object(): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare namespace Object {
|
|
5
5
|
var Type: ({ objRef, arrDepth, nullable }: ObjectTypeProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
var Detail: ({ objRef }: ObjectDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
var Detail: ({ className, objRef }: ObjectDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
var Schema: ({ objRef }: ObjectSchemaProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
}
|
|
9
9
|
export default Object;
|
|
@@ -13,6 +13,7 @@ interface ObjectTypeProps {
|
|
|
13
13
|
nullable?: boolean;
|
|
14
14
|
}
|
|
15
15
|
interface ObjectDetailProps {
|
|
16
|
+
className?: string;
|
|
16
17
|
objRef: ConstantCls;
|
|
17
18
|
}
|
|
18
19
|
interface ObjectSchemaProps {
|
|
@@ -2,7 +2,7 @@ import { type FetchProxy } from "akanjs/fetch";
|
|
|
2
2
|
import type { SerializedEndpoint } from "akanjs/signal";
|
|
3
3
|
declare function RestApi(): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare namespace RestApi {
|
|
5
|
-
var Endpoints: ({ refName, fetch, prefix, endpoints, openAll, httpUri }: RestApiEndpointsProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
var Endpoints: ({ refName, fetch, prefix, endpoints, openAll, httpUri, search }: RestApiEndpointsProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
var Endpoint: ({ refName, fetch, signalPrefix, endpointKey, endpoint, open, httpUri, }: RestApiEndpointProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
var Interface: ({ refName, endpointKey, endpoint }: RestApiInterfaceProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
var Try: ({ signalPrefix, refName, endpointKey, endpoint, fetch, httpUri }: RestApiTryProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,6 +15,7 @@ interface RestApiEndpointsProps {
|
|
|
15
15
|
endpoints?: string[];
|
|
16
16
|
openAll?: boolean;
|
|
17
17
|
httpUri?: string;
|
|
18
|
+
search?: string;
|
|
18
19
|
}
|
|
19
20
|
interface RestApiEndpointProps {
|
|
20
21
|
refName: string;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { FetchProxy } from "akanjs/fetch";
|
|
2
2
|
declare function WebSocket(): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace WebSocket {
|
|
4
|
-
var Endpoints: ({ refName, fetch, openAll }: WebSocketEndpointsProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
var Endpoints: ({ refName, fetch, openAll, search }: WebSocketEndpointsProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
}
|
|
6
6
|
export default WebSocket;
|
|
7
7
|
interface WebSocketEndpointsProps {
|
|
8
8
|
refName: string;
|
|
9
9
|
fetch: FetchProxy;
|
|
10
10
|
openAll?: boolean;
|
|
11
|
+
search?: string;
|
|
11
12
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FetchProxy } from "akanjs/fetch";
|
|
2
|
+
import type { SerializedEndpoint } from "akanjs/signal";
|
|
3
|
+
export interface EndpointEntry {
|
|
4
|
+
key: string;
|
|
5
|
+
endpoint: SerializedEndpoint;
|
|
6
|
+
}
|
|
7
|
+
export declare const isWsEndpoint: (endpoint: SerializedEndpoint) => boolean;
|
|
8
|
+
/** Generated CRUD, slice reads, and hand-written endpoints in one list — what the summary counts and the list share. */
|
|
9
|
+
export declare const endpointEntriesOf: (refName: string, fetch: FetchProxy) => EndpointEntry[];
|
|
10
|
+
export declare const matchesSearch: (key: string, path: string, search: string) => boolean;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
+
import { type Tone } from "../Reference.d.ts";
|
|
1
2
|
export declare const signalUi: {
|
|
2
|
-
sectionTitle: string;
|
|
3
|
-
sectionDescription: string;
|
|
4
|
-
sectionPanel: string;
|
|
5
|
-
tablePanel: string;
|
|
6
|
-
tableClass: string;
|
|
7
3
|
inputRow: string;
|
|
8
4
|
inputLabel: string;
|
|
9
|
-
codePanel: string;
|
|
10
5
|
};
|
|
11
|
-
/**
|
|
12
|
-
|
|
6
|
+
/** Only a mutation is a POST — enumerating that side leaves a `prompt` a GET beside the queries, and lets a
|
|
7
|
+
* read-shaped type added later inherit the right verb rather than be mislabelled. */
|
|
8
|
+
export declare const getMethodLabel: (type: string) => string;
|
|
9
|
+
export declare const getMethodBadgeClassName: (type: string) => string;
|
|
10
|
+
export declare const getWsBadgeClassName: (type: string) => string;
|
|
13
11
|
export declare const getGuardBadgeClassName: (guard: string) => string;
|
|
14
|
-
/** Published to agents
|
|
12
|
+
/** Published to agents is quiet; refused is amber, because it is a thing to go fix. */
|
|
15
13
|
export declare const getMcpBadgeClassName: (exposed: boolean) => string;
|
|
14
|
+
export declare const getStatusTone: (status: string) => Tone;
|
|
16
15
|
export declare const getStatusBadgeClassName: (status: string) => string;
|
|
17
|
-
export declare const getStatusTextareaClassName: (status: string) => "" | "border-primary" | "pointer-events-none opacity-50" | "border-destructive text-destructive";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Messages: () => import("react
|
|
1
|
+
export declare const Messages: () => import("react").ReactPortal | null;
|
package/ui/Agent/Approval.tsx
CHANGED
|
@@ -13,7 +13,7 @@ export default function Approval({ className, approval }: ApprovalProps) {
|
|
|
13
13
|
return (
|
|
14
14
|
<div className={cn("flex flex-col gap-2 border-warning/30 border-t bg-warning/10 px-4 py-3", className)}>
|
|
15
15
|
<p className="text-sm">{approval.message}</p>
|
|
16
|
-
<pre className="max-h-24 overflow-auto rounded-field bg-
|
|
16
|
+
<pre className="scrollbar-thin max-h-24 overflow-auto rounded-field bg-background/60 p-2 font-mono text-[10px]">
|
|
17
17
|
{JSON.stringify(approval.args, null, 2)}
|
|
18
18
|
</pre>
|
|
19
19
|
<div className="flex justify-end gap-2">
|
package/ui/Agent/Bubble.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "akanjs/client";
|
|
3
3
|
import type { ChatMessage, ToolCallResult } from "../../vendor/use-agentic";
|
|
4
|
+
import Markdown from "./Markdown";
|
|
4
5
|
|
|
5
6
|
interface BubbleProps {
|
|
6
7
|
className?: string;
|
|
@@ -23,7 +24,7 @@ interface RowProps {
|
|
|
23
24
|
const Row = ({ name, args, result }: RowProps) => (
|
|
24
25
|
<div className="flex items-baseline gap-2 rounded-field bg-muted px-2 py-1">
|
|
25
26
|
{result ? (
|
|
26
|
-
<span className={cn("shrink-0 text-[10px]", result.error ? "text-
|
|
27
|
+
<span className={cn("shrink-0 text-[10px]", result.error ? "text-destructive" : "text-success")}>
|
|
27
28
|
{result.error ? "✕" : "✓"}
|
|
28
29
|
</span>
|
|
29
30
|
) : (
|
|
@@ -33,7 +34,7 @@ const Row = ({ name, args, result }: RowProps) => (
|
|
|
33
34
|
{args && Object.keys(args).length ? (
|
|
34
35
|
<span className="truncate font-mono text-[10px] text-foreground/50">{JSON.stringify(args)}</span>
|
|
35
36
|
) : null}
|
|
36
|
-
{result?.error ? <span className="truncate text-[10px] text-
|
|
37
|
+
{result?.error ? <span className="truncate text-[10px] text-destructive">{result.error}</span> : null}
|
|
37
38
|
{result?.changes?.length ? (
|
|
38
39
|
<span className="ml-auto shrink-0 text-[10px] text-foreground/40">Δ {result.changes.length}</span>
|
|
39
40
|
) : null}
|
|
@@ -63,11 +64,11 @@ export default function Bubble({ className, message, results }: BubbleProps) {
|
|
|
63
64
|
const isDrafting = !message.text && !message.toolCalls?.length && !message.error;
|
|
64
65
|
return (
|
|
65
66
|
<div className={cn("flex max-w-[85%] flex-col gap-1 self-start", className)}>
|
|
66
|
-
{message.text ? <
|
|
67
|
+
{message.text ? <Markdown className="text-sm">{message.text}</Markdown> : null}
|
|
67
68
|
{(message.toolCalls ?? []).map((call) => (
|
|
68
69
|
<Row key={call.id} args={call.args} name={call.name} result={results?.get(call.id)} />
|
|
69
70
|
))}
|
|
70
|
-
{message.error ? <p className="text-
|
|
71
|
+
{message.error ? <p className="text-destructive text-xs">{message.error}</p> : null}
|
|
71
72
|
{isDrafting ? <span className="size-2 animate-pulse rounded-full bg-foreground/30" /> : null}
|
|
72
73
|
</div>
|
|
73
74
|
);
|