orquesta-embed 0.1.1 → 0.1.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/README.md CHANGED
File without changes
@@ -0,0 +1,9 @@
1
+ import type { Author } from '../core/config';
2
+ interface AuthorAvatarProps {
3
+ author: Author | null | undefined;
4
+ size?: 'sm' | 'md' | 'lg';
5
+ showName?: boolean;
6
+ className?: string;
7
+ }
8
+ export declare function AuthorAvatar({ author, size, showName, className }: AuthorAvatarProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ interface CommentInputProps {
2
+ onSubmit: (content: string) => Promise<void>;
3
+ placeholder?: string;
4
+ disabled?: boolean;
5
+ className?: string;
6
+ }
7
+ export declare function CommentInput({ onSubmit, placeholder, disabled, className }: CommentInputProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { Comment } from '../core/config';
2
+ interface CommentListProps {
3
+ comments: Comment[];
4
+ isLoading?: boolean;
5
+ className?: string;
6
+ }
7
+ export declare function CommentList({ comments, isLoading, className }: CommentListProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
File without changes
File without changes
@@ -0,0 +1,7 @@
1
+ import type { ElementMarker } from '../core/config';
2
+ interface ElementMarkersProps {
3
+ markers: ElementMarker[];
4
+ onMarkerClick?: (promptId: string) => void;
5
+ }
6
+ export declare function ElementMarkers({ markers, onMarkerClick }: ElementMarkersProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { EmbedState } from '../core/state';
2
- import type { Position } from '../core/config';
2
+ import type { Position, Prompt, OverlayMode } from '../core/config';
3
3
  interface EmbedPanelProps {
4
4
  state: EmbedState;
5
5
  position: Position;
@@ -11,6 +11,11 @@ interface EmbedPanelProps {
11
11
  onToggleConsole: () => void;
12
12
  onToggleNetwork: () => void;
13
13
  onTabChange: (tab: EmbedState['activeTab']) => void;
14
+ onExpandPrompt?: (promptId: string | null) => void;
15
+ onHighlightElement?: (prompt: Prompt) => void;
16
+ onLoadComments?: (promptId: string) => Promise<void>;
17
+ onAddComment?: (promptId: string, content: string) => Promise<void>;
18
+ onOverlayModeChange?: (mode: OverlayMode) => void;
14
19
  }
15
- export declare function EmbedPanel({ state, position, onClose, onMinimize, onSubmitPrompt, onSelectElement, onClearElement, onToggleConsole, onToggleNetwork, onTabChange }: EmbedPanelProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function EmbedPanel({ state, position, onClose, onMinimize, onSubmitPrompt, onSelectElement, onClearElement, onToggleConsole, onToggleNetwork, onTabChange, onExpandPrompt, onHighlightElement, onLoadComments, onAddComment, onOverlayModeChange }: EmbedPanelProps): import("react/jsx-runtime").JSX.Element;
16
21
  export {};
@@ -0,0 +1,8 @@
1
+ interface GitCommitLinkProps {
2
+ sha: string | undefined | null;
3
+ url?: string | null;
4
+ branch?: string | null;
5
+ className?: string;
6
+ }
7
+ export declare function GitCommitLink({ sha, url, branch, className }: GitCommitLinkProps): import("react/jsx-runtime").JSX.Element | null;
8
+ export {};
File without changes
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { OrquestaEmbedConfig } from '../core/config';
3
3
  interface OrquestaEmbedProps extends OrquestaEmbedConfig {
4
4
  children?: React.ReactNode;
5
+ enableGlobalRightClick?: boolean;
5
6
  }
6
7
  export declare function OrquestaEmbed(props: OrquestaEmbedProps): import("react/jsx-runtime").JSX.Element;
7
8
  export {};
File without changes
@@ -1,8 +1,15 @@
1
- import type { Prompt } from '../core/config';
1
+ import type { Prompt, Comment } from '../core/config';
2
2
  interface TimelineProps {
3
3
  prompts: Prompt[];
4
4
  currentPromptId?: string;
5
+ expandedPromptId?: string | null;
6
+ comments?: Record<string, Comment[]>;
7
+ isLoadingComments?: boolean;
5
8
  onSelectPrompt?: (prompt: Prompt) => void;
9
+ onExpandPrompt?: (promptId: string | null) => void;
10
+ onHighlightElement?: (prompt: Prompt) => void;
11
+ onLoadComments?: (promptId: string) => Promise<void>;
12
+ onAddComment?: (promptId: string, content: string) => Promise<void>;
6
13
  }
7
- export declare function Timeline({ prompts, currentPromptId, onSelectPrompt }: TimelineProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function Timeline({ prompts, currentPromptId, expandedPromptId, comments, isLoadingComments, onSelectPrompt, onExpandPrompt, onHighlightElement, onLoadComments, onAddComment }: TimelineProps): import("react/jsx-runtime").JSX.Element;
8
15
  export {};
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,4 +1,4 @@
1
- import type { OrquestaEmbedConfig, ElementContext } from './config';
1
+ import type { OrquestaEmbedConfig, Prompt, ElementContext, OverlayMode } from './config';
2
2
  import { StateManager } from './state';
3
3
  import { ConsoleCapture } from './console-capture';
4
4
  import { NetworkCapture } from './network-capture';
@@ -27,7 +27,6 @@ export declare class OrquestaEmbedClient {
27
27
  elementContext?: ElementContext;
28
28
  }): Promise<string>;
29
29
  private loadTimeline;
30
- private loadDeployments;
31
30
  open(): void;
32
31
  close(): void;
33
32
  toggle(): void;
@@ -37,4 +36,9 @@ export declare class OrquestaEmbedClient {
37
36
  getConsoleCapture(): ConsoleCapture;
38
37
  getNetworkCapture(): NetworkCapture;
39
38
  getElementSelector(): ElementSelector;
39
+ loadComments(promptId: string): Promise<void>;
40
+ addComment(promptId: string, content: string): Promise<void>;
41
+ setOverlayMode(mode: OverlayMode): void;
42
+ highlightPromptElement(prompt: Prompt): void;
43
+ setupGlobalRightClick(onSelect: (context: ElementContext) => void): () => void;
40
44
  }
@@ -54,6 +54,11 @@ export interface NetworkEntry {
54
54
  requestBody?: unknown;
55
55
  responseBody?: unknown;
56
56
  }
57
+ export interface Author {
58
+ id: string;
59
+ full_name: string | null;
60
+ avatar_url: string | null;
61
+ }
57
62
  export interface Prompt {
58
63
  id: string;
59
64
  content: string;
@@ -62,8 +67,32 @@ export interface Prompt {
62
67
  completed_at?: string;
63
68
  user_id: string;
64
69
  source: string;
65
- element_context?: ElementContext;
70
+ element_context?: ElementContext & {
71
+ rect?: unknown;
72
+ };
73
+ author?: Author | null;
74
+ git_branch?: string;
75
+ git_commit_sha?: string;
76
+ git_commit_url?: string;
77
+ comment_count?: number;
78
+ }
79
+ export interface Comment {
80
+ id: string;
81
+ content: string;
82
+ created_at: string;
83
+ parent_comment_id?: string | null;
84
+ author: Author | null;
85
+ }
86
+ export interface ElementMarker {
87
+ promptId: string;
88
+ selector: string;
89
+ rect: DOMRect | null;
90
+ content: string;
91
+ author: Author | null;
92
+ gitCommitSha: string | null;
93
+ commentCount: number;
66
94
  }
95
+ export type OverlayMode = 'off' | 'single' | 'all';
67
96
  export interface Deployment {
68
97
  id: string;
69
98
  status: string;
File without changes
@@ -2,22 +2,26 @@ import type { ElementContext } from './config';
2
2
  export declare class ElementSelector {
3
3
  private overlay;
4
4
  private highlight;
5
- private contextMenu;
6
5
  private selectedElement;
7
6
  private isActive;
8
7
  private onSelect;
9
8
  private onCancel;
9
+ private globalRightClickHandler;
10
+ private globalRightClickCallback;
11
+ setupGlobalRightClick(onSelect: (context: ElementContext) => void): () => void;
10
12
  activate(onSelect: (context: ElementContext) => void, onCancel?: () => void): void;
11
13
  deactivate(): void;
14
+ isSelecting(): boolean;
12
15
  private createOverlay;
13
16
  private removeOverlay;
14
17
  private addListeners;
15
18
  private removeListeners;
16
19
  private handleMouseMove;
17
20
  private handleClick;
18
- private handleContextMenu;
19
21
  private handleKeyDown;
20
- private showContextMenu;
22
+ highlightElement(selector: string): HTMLElement | null;
23
+ removeHighlight(): void;
24
+ findElement(selector: string, fallbackId?: string): HTMLElement | null;
21
25
  getElementContext(el: HTMLElement): ElementContext;
22
26
  private generateSelector;
23
27
  }
File without changes
@@ -1,4 +1,4 @@
1
- import type { Prompt, Deployment, ElementContext, ConsoleEntry, NetworkEntry } from './config';
1
+ import type { Prompt, ElementContext, ConsoleEntry, NetworkEntry, Comment, ElementMarker, OverlayMode } from './config';
2
2
  export interface EmbedState {
3
3
  isConnected: boolean;
4
4
  isConnecting: boolean;
@@ -7,15 +7,19 @@ export interface EmbedState {
7
7
  projectName: string | null;
8
8
  agentOnline: boolean;
9
9
  isOpen: boolean;
10
- activeTab: 'prompts' | 'timeline' | 'deployments';
10
+ activeTab: 'prompts' | 'timeline';
11
11
  isSelectingElement: boolean;
12
12
  selectedElement: ElementContext | null;
13
13
  currentPrompt: Prompt | null;
14
14
  promptHistory: Prompt[];
15
15
  isSubmitting: boolean;
16
16
  outputLines: OutputLine[];
17
- deployments: Deployment[];
18
- currentDeployment: Deployment | null;
17
+ overlayMode: OverlayMode;
18
+ highlightedPromptId: string | null;
19
+ elementMarkers: ElementMarker[];
20
+ comments: Record<string, Comment[]>;
21
+ isLoadingComments: boolean;
22
+ expandedPromptId: string | null;
19
23
  consoleLogs: ConsoleEntry[];
20
24
  networkLogs: NetworkEntry[];
21
25
  includeConsole: boolean;
@@ -50,7 +54,13 @@ export declare class StateManager {
50
54
  setSelectedElement(element: ElementContext | null): void;
51
55
  startElementSelection(): void;
52
56
  cancelElementSelection(): void;
53
- setDeployments(deployments: Deployment[]): void;
57
+ setOverlayMode(mode: OverlayMode): void;
58
+ setHighlightedPromptId(id: string | null): void;
59
+ setElementMarkers(markers: ElementMarker[]): void;
60
+ setCommentsForPrompt(promptId: string, comments: Comment[]): void;
61
+ addComment(promptId: string, comment: Comment): void;
62
+ setExpandedPromptId(id: string | null): void;
63
+ setLoadingComments(loading: boolean): void;
54
64
  addConsoleLogs(logs: ConsoleEntry[]): void;
55
65
  addNetworkLogs(logs: NetworkEntry[]): void;
56
66
  toggleIncludeConsole(): void;
File without changes
package/dist/embed.css CHANGED
File without changes