@echothink-ui/developer 0.1.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.
Files changed (56) hide show
  1. package/README.md +5 -0
  2. package/dist/components/APIExplorer.d.ts +2 -0
  3. package/dist/components/BranchSelector.d.ts +2 -0
  4. package/dist/components/CodeBlock.d.ts +2 -0
  5. package/dist/components/CodeEditor.d.ts +2 -0
  6. package/dist/components/CommitList.d.ts +2 -0
  7. package/dist/components/DiffTable.d.ts +2 -0
  8. package/dist/components/DiffViewer.d.ts +2 -0
  9. package/dist/components/EventPayloadViewer.d.ts +2 -0
  10. package/dist/components/GitRepositoryPanel.d.ts +2 -0
  11. package/dist/components/JSONViewer.d.ts +2 -0
  12. package/dist/components/LogConsole.d.ts +2 -0
  13. package/dist/components/PullRequestPanel.d.ts +2 -0
  14. package/dist/components/RequestResponseViewer.d.ts +2 -0
  15. package/dist/components/SchemaViewer.d.ts +2 -0
  16. package/dist/components/TerminalPanel.d.ts +2 -0
  17. package/dist/components/TraceTimeline.d.ts +2 -0
  18. package/dist/components/WebhookEventViewer.d.ts +2 -0
  19. package/dist/components/YAMLViewer.d.ts +2 -0
  20. package/dist/components/devUtils.d.ts +10 -0
  21. package/dist/components/types.d.ts +196 -0
  22. package/dist/index.cjs +2627 -0
  23. package/dist/index.cjs.map +1 -0
  24. package/dist/index.css +3651 -0
  25. package/dist/index.css.map +1 -0
  26. package/dist/index.d.ts +22 -0
  27. package/dist/index.js +2572 -0
  28. package/dist/index.js.map +1 -0
  29. package/package.json +43 -0
  30. package/src/components/APIExplorer.tsx +205 -0
  31. package/src/components/BranchSelector.tsx +54 -0
  32. package/src/components/CodeBlock.tsx +127 -0
  33. package/src/components/CodeEditor.tsx +95 -0
  34. package/src/components/CommitList.tsx +100 -0
  35. package/src/components/DiffTable.tsx +288 -0
  36. package/src/components/DiffViewer.tsx +145 -0
  37. package/src/components/EventPayloadViewer.tsx +91 -0
  38. package/src/components/GitRepositoryPanel.tsx +73 -0
  39. package/src/components/JSONViewer.tsx +189 -0
  40. package/src/components/LogConsole.tsx +160 -0
  41. package/src/components/PullRequestPanel.test.tsx +52 -0
  42. package/src/components/PullRequestPanel.tsx +215 -0
  43. package/src/components/RequestResponseViewer.test.tsx +45 -0
  44. package/src/components/RequestResponseViewer.tsx +169 -0
  45. package/src/components/SchemaViewer.tsx +157 -0
  46. package/src/components/TerminalPanel.test.tsx +33 -0
  47. package/src/components/TerminalPanel.tsx +134 -0
  48. package/src/components/TraceTimeline.test.tsx +63 -0
  49. package/src/components/TraceTimeline.tsx +207 -0
  50. package/src/components/WebhookEventViewer.test.tsx +57 -0
  51. package/src/components/WebhookEventViewer.tsx +184 -0
  52. package/src/components/YAMLViewer.tsx +207 -0
  53. package/src/components/devUtils.ts +81 -0
  54. package/src/components/types.ts +230 -0
  55. package/src/index.tsx +72 -0
  56. package/src/styles.css +4296 -0
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @echothink-ui/developer
2
+
3
+ Developer package for EchoThink app-domain websites.
4
+
5
+ This package is part of the EchoThink-UI app-domain library. It is designed for normal website app domains rendered inside EchoThink Studio's Chromium shell, not for implementing the studio browser chrome itself.
@@ -0,0 +1,2 @@
1
+ import type { APIExplorerProps } from "./types";
2
+ export declare function APIExplorer({ endpoints, selectedId, onSelect, onSend, className, ...props }: APIExplorerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { BranchSelectorProps } from "./types";
2
+ export declare function BranchSelector({ branches, value, onChange, className, disabled, labelText, helperText, density, ...props }: BranchSelectorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { CodeBlockProps } from "./types";
2
+ export declare function CodeBlock({ code, language, showLineNumbers, className, ...props }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { CodeEditorProps } from "./types";
2
+ export declare function CodeEditor({ value, onChange, language, readonly, readOnly, schemaRef, className, disabled, onScroll, rows, wrap, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, ...props }: CodeEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { CommitListProps } from "./types";
2
+ export declare function CommitList({ commits, className, ...props }: CommitListProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { DiffTableProps } from "./types";
2
+ export declare function DiffTable({ rows, mode, title, subtitle, showSummary, emptyState, className, "aria-label": ariaLabel, ...props }: DiffTableProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { DiffViewerProps } from "./types";
2
+ export declare function DiffViewer({ before, after, mode, language, className, ...props }: DiffViewerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { EventPayloadViewerProps } from "./types";
2
+ export declare function EventPayloadViewer({ eventId, payload, className, "aria-label": ariaLabel, ...props }: EventPayloadViewerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { GitRepositoryPanelProps } from "./types";
2
+ export declare function GitRepositoryPanel({ repo, className, ...props }: GitRepositoryPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { JSONViewerProps } from "./types";
2
+ export declare function JSONViewer({ value, defaultExpandedDepth, className, ...props }: JSONViewerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { LogConsoleProps } from "./types";
2
+ export declare function LogConsole({ entries, onPause, streaming, filters, className, role, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: LogConsoleProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { PullRequestPanelProps } from "./types";
2
+ export declare function PullRequestPanel({ pr, onApprove, onComment, className, ...props }: PullRequestPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { RequestResponseViewerProps } from "./types";
2
+ export declare function RequestResponseViewer({ request, response, className, "aria-label": ariaLabel, ...props }: RequestResponseViewerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { SchemaViewerProps } from "./types";
2
+ export declare function SchemaViewer({ schema, validationState, className, ...props }: SchemaViewerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { TerminalPanelProps } from "./types";
2
+ export declare function TerminalPanel({ lines, prompt, onCommand, disabled, className, role, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: TerminalPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { TraceTimelineProps } from "./types";
2
+ export declare function TraceTimeline({ spans, className, role, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: TraceTimelineProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { WebhookEventViewerProps } from "./types";
2
+ export declare function WebhookEventViewer({ events, onRetry, className, "aria-label": ariaLabel, ...props }: WebhookEventViewerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { YAMLViewerProps } from "./types";
2
+ export declare function YAMLViewer({ value, editable, onChange, className, "aria-label": ariaLabel, ...props }: YAMLViewerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export interface DiffLine {
2
+ type: "equal" | "add" | "remove";
3
+ beforeLine?: number;
4
+ afterLine?: number;
5
+ text: string;
6
+ }
7
+ export declare function splitLines(value: string): string[];
8
+ export declare function buildLineDiff(before: string, after: string): DiffLine[];
9
+ export declare function formatUnknown(value: unknown): string;
10
+ export declare function compactSha(sha: string): string;
@@ -0,0 +1,196 @@
1
+ import type * as React from "react";
2
+ import type { EthOperationalStatus, SelectProps } from "@echothink-ui/core";
3
+ export interface CodeBlockProps extends React.HTMLAttributes<HTMLElement> {
4
+ code: string;
5
+ language?: string;
6
+ showLineNumbers?: boolean;
7
+ }
8
+ export interface CodeEditorProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange" | "value" | "readOnly"> {
9
+ value: string;
10
+ onChange?: (value: string) => void;
11
+ language?: string;
12
+ readonly?: boolean;
13
+ readOnly?: boolean;
14
+ schemaRef?: string;
15
+ }
16
+ export interface DiffViewerProps extends React.HTMLAttributes<HTMLElement> {
17
+ before: string;
18
+ after: string;
19
+ mode?: "inline" | "side-by-side";
20
+ language?: string;
21
+ }
22
+ export type DiffTableChangeType = "added" | "modified" | "removed" | "renamed" | "unchanged" | "conflict";
23
+ export interface DiffTableRow extends Record<string, unknown> {
24
+ id: string;
25
+ file?: string;
26
+ path?: string;
27
+ beforePath?: string;
28
+ afterPath?: string;
29
+ changeType?: DiffTableChangeType;
30
+ added?: number;
31
+ additions?: number;
32
+ removed?: number;
33
+ deletions?: number;
34
+ hunks?: number;
35
+ summary?: React.ReactNode;
36
+ }
37
+ export interface DiffTableProps extends Omit<React.HTMLAttributes<HTMLElement>, "children" | "title"> {
38
+ rows: DiffTableRow[];
39
+ mode?: "inline" | "side-by-side";
40
+ title?: React.ReactNode;
41
+ subtitle?: React.ReactNode;
42
+ showSummary?: boolean;
43
+ emptyState?: React.ReactNode;
44
+ }
45
+ export interface JSONViewerProps extends React.HTMLAttributes<HTMLElement> {
46
+ value: unknown;
47
+ defaultExpandedDepth?: number;
48
+ }
49
+ export interface YAMLViewerProps extends Omit<React.HTMLAttributes<HTMLElement>, "onChange"> {
50
+ value: string;
51
+ editable?: boolean;
52
+ onChange?: (value: string) => void;
53
+ }
54
+ export interface SchemaViewerProps extends React.HTMLAttributes<HTMLElement> {
55
+ schema: object;
56
+ validationState?: "valid" | "invalid" | "warning";
57
+ }
58
+ export interface APIEndpoint extends Record<string, unknown> {
59
+ id: string;
60
+ method: string;
61
+ path: string;
62
+ summary?: string;
63
+ headers?: Record<string, string> | string;
64
+ body?: unknown;
65
+ }
66
+ export interface APIRequest {
67
+ endpointId?: string;
68
+ method: string;
69
+ path: string;
70
+ headers: string;
71
+ body: string;
72
+ }
73
+ export interface APIExplorerProps extends Omit<React.HTMLAttributes<HTMLElement>, "onSelect"> {
74
+ endpoints: APIEndpoint[];
75
+ selectedId?: string;
76
+ onSelect?: (id: string) => void;
77
+ onSend?: (request: APIRequest) => unknown | Promise<unknown>;
78
+ }
79
+ export interface EventPayloadViewerProps extends React.HTMLAttributes<HTMLElement> {
80
+ eventId?: string;
81
+ payload: unknown;
82
+ }
83
+ export interface LogEntry extends Record<string, unknown> {
84
+ id: string;
85
+ timestamp?: string;
86
+ level?: "debug" | "info" | "warn" | "error" | string;
87
+ message?: string;
88
+ text?: string;
89
+ source?: string;
90
+ stream?: "stdout" | "stderr";
91
+ }
92
+ export interface LogConsoleProps extends React.HTMLAttributes<HTMLElement> {
93
+ entries: LogEntry[];
94
+ onPause?: () => void;
95
+ streaming?: boolean;
96
+ filters?: React.ReactNode;
97
+ }
98
+ export interface TerminalLine extends Record<string, unknown> {
99
+ id: string;
100
+ stream: "stdout" | "stderr";
101
+ text: string;
102
+ }
103
+ export interface TerminalPanelProps extends React.HTMLAttributes<HTMLElement> {
104
+ lines: TerminalLine[];
105
+ prompt?: string;
106
+ onCommand?: (cmd: string) => void;
107
+ disabled?: boolean;
108
+ }
109
+ export interface TraceSpan extends Record<string, unknown> {
110
+ id: string;
111
+ name: string;
112
+ startMs: number;
113
+ durationMs: number;
114
+ status?: EthOperationalStatus;
115
+ parentId?: string;
116
+ service?: string;
117
+ }
118
+ export interface TraceTimelineProps extends React.HTMLAttributes<HTMLElement> {
119
+ spans: TraceSpan[];
120
+ }
121
+ export interface HTTPMessage {
122
+ method?: string;
123
+ url?: string;
124
+ status?: number;
125
+ headers?: Record<string, string>;
126
+ body?: unknown;
127
+ durationMs?: number;
128
+ }
129
+ export interface RequestResponseViewerProps extends React.HTMLAttributes<HTMLElement> {
130
+ request: {
131
+ method: string;
132
+ url: string;
133
+ headers?: Record<string, string>;
134
+ body?: unknown;
135
+ };
136
+ response: {
137
+ status: number;
138
+ headers?: Record<string, string>;
139
+ body?: unknown;
140
+ durationMs?: number;
141
+ };
142
+ }
143
+ export interface WebhookEvent extends Record<string, unknown> {
144
+ id: string;
145
+ url: string;
146
+ status: string;
147
+ retries: number;
148
+ deliveredAt?: string;
149
+ payload: unknown;
150
+ }
151
+ export interface WebhookEventViewerProps extends React.HTMLAttributes<HTMLElement> {
152
+ events: WebhookEvent[];
153
+ onRetry?: (id: string) => void;
154
+ }
155
+ export interface GitRepositoryPanelProps extends React.HTMLAttributes<HTMLElement> {
156
+ repo: {
157
+ name: string;
158
+ url: string;
159
+ defaultBranch: string;
160
+ openPrCount?: number;
161
+ commitCount?: number;
162
+ lastCommitAt?: string;
163
+ };
164
+ }
165
+ export interface PullRequestPanelProps extends React.HTMLAttributes<HTMLElement> {
166
+ pr: {
167
+ id: string;
168
+ title: string;
169
+ body?: string;
170
+ state: string;
171
+ author: string;
172
+ reviewers?: string[];
173
+ commits?: number;
174
+ files?: Array<{
175
+ path: string;
176
+ additions: number;
177
+ deletions: number;
178
+ }>;
179
+ };
180
+ onApprove?: () => void;
181
+ onComment?: (comment: string) => void;
182
+ }
183
+ export interface CommitRow extends Record<string, unknown> {
184
+ sha: string;
185
+ message: string;
186
+ author: string;
187
+ date: string;
188
+ }
189
+ export interface CommitListProps extends React.HTMLAttributes<HTMLElement> {
190
+ commits: CommitRow[];
191
+ }
192
+ export interface BranchSelectorProps extends Omit<SelectProps, "children" | "onChange" | "options" | "value"> {
193
+ branches: string[];
194
+ value?: string;
195
+ onChange?: (branch: string) => void;
196
+ }