@pillar-ai/sdk 0.1.22 → 0.1.24
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 +1 -1
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/types.d.ts +89 -0
- package/dist/api/client.d.ts +4 -0
- package/dist/cli/sync.js +34 -4
- package/dist/components/PagePilot/styles.d.ts +1 -1
- package/dist/components/Panel/styles.d.ts +1 -1
- package/dist/core/Pillar.d.ts +7 -13
- package/dist/core/config.d.ts +29 -29
- package/dist/pillar.esm.js +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/types.d.ts +54 -7
- package/dist/utils/tracing.d.ts +43 -0
- package/package.json +6 -3
- package/dist/actions/definitions/analytics.d.ts +0 -18
- package/dist/actions/definitions/content.d.ts +0 -40
- package/dist/actions/definitions/index.d.ts +0 -26
- package/dist/actions/definitions/navigation.d.ts +0 -65
- package/dist/actions/definitions/settings.d.ts +0 -162
- package/dist/actions/definitions/sources.d.ts +0 -44
- package/dist/actions/definitions/support.d.ts +0 -15
- package/dist/actions/definitions/team.d.ts +0 -120
- package/dist/api/ag-ui-adapter.d.ts +0 -76
- package/dist/api/ag-ui-bridge.d.ts +0 -49
- package/dist/api/ag-ui-client.d.ts +0 -102
- package/dist/api/ag-ui-handler.d.ts +0 -89
- package/dist/components/Button/FloatingButton.d.ts +0 -46
- package/dist/components/Panel/TabNavigation.d.ts +0 -16
- package/dist/components/Progress/AGUIProgress.d.ts +0 -15
- package/dist/components/Tooltips/Tooltip.d.ts +0 -46
- package/dist/components/Tooltips/TooltipManager.d.ts +0 -41
- package/dist/components/Tooltips/index.d.ts +0 -6
- package/dist/components/Tooltips/styles.d.ts +0 -5
- package/dist/components/Views/ArticleChatView.d.ts +0 -10
- package/dist/components/Views/ArticleView.d.ts +0 -10
- package/dist/components/Views/CategoryView.d.ts +0 -11
- package/dist/components/Views/HelpCenterArticles.d.ts +0 -17
- package/dist/components/Views/SearchView.d.ts +0 -10
- package/dist/components/Views/SupportView.d.ts +0 -15
- package/dist/components/shared/ArticleCard.d.ts +0 -17
- package/dist/components/shared/CategoryCard.d.ts +0 -17
- package/dist/content/extensions/AccordionNode.d.ts +0 -10
- package/dist/content/extensions/CalloutNode.d.ts +0 -11
- package/dist/content/extensions/index.d.ts +0 -5
- package/dist/content/index.d.ts +0 -5
- package/dist/content/renderer.d.ts +0 -24
- package/dist/store/tooltips.d.ts +0 -21
- package/dist/utils/helpdesk.d.ts +0 -33
- package/dist/utils/markdown.d.ts +0 -9
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AG-UI Client Adapter for Pillar SDK
|
|
3
|
-
*
|
|
4
|
-
* Bridges the new AGUIClient to existing chat store patterns.
|
|
5
|
-
* Allows gradual migration without changing all components at once.
|
|
6
|
-
*
|
|
7
|
-
* Copyright (C) 2025 Pillar Team
|
|
8
|
-
*/
|
|
9
|
-
import type { ResolvedConfig } from '../core/config';
|
|
10
|
-
import type { ExecutionPlan } from '../core/plan';
|
|
11
|
-
import type { TaskButtonData } from '../components/Panel/TaskButton';
|
|
12
|
-
import type { UserContextItem } from '../types/user-context';
|
|
13
|
-
import type { ArticleSummary, ChatMessage, ChatResponse, ProgressEvent } from './client';
|
|
14
|
-
import type { QueryRequest, ChatImage } from './mcp-client';
|
|
15
|
-
import { type ClientTool } from './ag-ui-client';
|
|
16
|
-
export interface LegacyStreamCallbacks {
|
|
17
|
-
/** Called for each text token */
|
|
18
|
-
onToken?: (token: string) => void;
|
|
19
|
-
/** Called when sources are available */
|
|
20
|
-
onSources?: (sources: ArticleSummary[]) => void;
|
|
21
|
-
/** Called when actions are available */
|
|
22
|
-
onActions?: (actions: TaskButtonData[]) => void;
|
|
23
|
-
/** Called when a plan is created */
|
|
24
|
-
onPlan?: (plan: ExecutionPlan) => void;
|
|
25
|
-
/** Called for progress updates */
|
|
26
|
-
onProgress?: (progress: ProgressEvent) => void;
|
|
27
|
-
/** Called when conversation starts (early conversation_id) */
|
|
28
|
-
onConversationStarted?: (conversationId: string, messageId?: string) => void;
|
|
29
|
-
/** Called when agent requests data from host app */
|
|
30
|
-
onQueryRequest?: (request: QueryRequest) => Promise<void>;
|
|
31
|
-
/** Called on error */
|
|
32
|
-
onError?: (error: string) => void;
|
|
33
|
-
/** Called when stream is complete */
|
|
34
|
-
onComplete?: (conversationId?: string, queryLogId?: string) => void;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Wraps AGUIClient to provide the same interface as the legacy MCPClient.
|
|
38
|
-
* Used during migration to minimize component changes.
|
|
39
|
-
*/
|
|
40
|
-
export declare class AGUIClientAdapter {
|
|
41
|
-
private client;
|
|
42
|
-
private currentStep;
|
|
43
|
-
constructor(config: ResolvedConfig);
|
|
44
|
-
/**
|
|
45
|
-
* Register a client-side tool (query action).
|
|
46
|
-
*/
|
|
47
|
-
registerTool(tool: ClientTool): void;
|
|
48
|
-
/**
|
|
49
|
-
* Unregister a client-side tool.
|
|
50
|
-
*/
|
|
51
|
-
unregisterTool(toolName: string): void;
|
|
52
|
-
/**
|
|
53
|
-
* Chat with streaming, using legacy callback patterns.
|
|
54
|
-
*/
|
|
55
|
-
chat(message: string, callbacks: LegacyStreamCallbacks, options?: {
|
|
56
|
-
history?: ChatMessage[];
|
|
57
|
-
userContext?: UserContextItem[];
|
|
58
|
-
images?: ChatImage[];
|
|
59
|
-
signal?: AbortSignal;
|
|
60
|
-
}): Promise<ChatResponse>;
|
|
61
|
-
/**
|
|
62
|
-
* Get current thread ID.
|
|
63
|
-
*/
|
|
64
|
-
get threadId(): string;
|
|
65
|
-
/**
|
|
66
|
-
* Start a new conversation.
|
|
67
|
-
*/
|
|
68
|
-
newThread(): string;
|
|
69
|
-
/**
|
|
70
|
-
* Send action result back to the agent (for query actions).
|
|
71
|
-
*
|
|
72
|
-
* @param actionName - The name of the action that was executed
|
|
73
|
-
* @param result - The result data to send back to the agent
|
|
74
|
-
*/
|
|
75
|
-
sendActionResult(actionName: string, result: unknown): Promise<void>;
|
|
76
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AG-UI Bridge
|
|
3
|
-
*
|
|
4
|
-
* Temporary bridge that converts Phase 1's JSON-RPC wrapped AG-UI events
|
|
5
|
-
* to native AG-UI events. This allows the SDK to use AG-UI patterns while
|
|
6
|
-
* the backend still uses JSON-RPC transport.
|
|
7
|
-
*
|
|
8
|
-
* Will be removed after Phase 3 (pure AG-UI transport).
|
|
9
|
-
*/
|
|
10
|
-
import type { AGUIEvent } from '@ag-ui/core';
|
|
11
|
-
/**
|
|
12
|
-
* Unwrap an AG-UI event from a JSON-RPC notification.
|
|
13
|
-
*
|
|
14
|
-
* Phase 1 backend wraps AG-UI events like this:
|
|
15
|
-
* {
|
|
16
|
-
* "jsonrpc": "2.0",
|
|
17
|
-
* "method": "notifications/progress",
|
|
18
|
-
* "params": {
|
|
19
|
-
* "ag_ui_event": { "type": "RUN_STARTED", ... }
|
|
20
|
-
* }
|
|
21
|
-
* }
|
|
22
|
-
*
|
|
23
|
-
* @param jsonRpcEvent - The JSON-RPC notification from the backend
|
|
24
|
-
* @returns The unwrapped AG-UI event, or null if not an AG-UI event
|
|
25
|
-
*/
|
|
26
|
-
export declare function unwrapAGUIEvent(jsonRpcEvent: unknown): AGUIEvent | null;
|
|
27
|
-
/**
|
|
28
|
-
* Check if a JSON-RPC event contains an AG-UI event.
|
|
29
|
-
*/
|
|
30
|
-
export declare function isAGUIWrappedEvent(jsonRpcEvent: unknown): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Convert legacy MCP progress events to AG-UI events.
|
|
33
|
-
*
|
|
34
|
-
* This is for backwards compatibility during the transition.
|
|
35
|
-
* Converts old-style progress events to AG-UI events.
|
|
36
|
-
*
|
|
37
|
-
* @param legacyEvent - The legacy MCP progress event
|
|
38
|
-
* @returns An array of AG-UI events (may be multiple for some conversions)
|
|
39
|
-
*/
|
|
40
|
-
export declare function convertLegacyProgressToAGUI(legacyEvent: Record<string, unknown>): AGUIEvent[];
|
|
41
|
-
/**
|
|
42
|
-
* Process a raw SSE event and extract AG-UI events.
|
|
43
|
-
*
|
|
44
|
-
* Handles both new AG-UI wrapped events and legacy progress events.
|
|
45
|
-
*
|
|
46
|
-
* @param rawEvent - The parsed JSON from an SSE data line
|
|
47
|
-
* @returns An array of AG-UI events
|
|
48
|
-
*/
|
|
49
|
-
export declare function processSSEEvent(rawEvent: unknown): AGUIEvent[];
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AG-UI Protocol Client for Pillar SDK
|
|
3
|
-
*
|
|
4
|
-
* Implements the AG-UI specification for streaming agent interactions.
|
|
5
|
-
* Uses the @ag-ui/client HttpAgent for transport.
|
|
6
|
-
*
|
|
7
|
-
* Copyright (C) 2025 Pillar Team
|
|
8
|
-
*/
|
|
9
|
-
import type { ResolvedConfig } from '../core/config';
|
|
10
|
-
export interface AGUIStreamCallbacks {
|
|
11
|
-
/** Called when run starts */
|
|
12
|
-
onRunStarted?: (runId: string) => void;
|
|
13
|
-
/** Called when run completes successfully */
|
|
14
|
-
onRunFinished?: () => void;
|
|
15
|
-
/** Called on error */
|
|
16
|
-
onError?: (error: Error) => void;
|
|
17
|
-
/** Called when a step starts */
|
|
18
|
-
onStepStarted?: (stepName: string) => void;
|
|
19
|
-
/** Called when a step finishes */
|
|
20
|
-
onStepFinished?: (stepName: string) => void;
|
|
21
|
-
/** Called for text message streaming */
|
|
22
|
-
onTextContent?: (messageId: string, delta: string) => void;
|
|
23
|
-
/** Called when text message completes */
|
|
24
|
-
onTextComplete?: (messageId: string, fullContent: string) => void;
|
|
25
|
-
/** Called when tool call starts (for UI display) */
|
|
26
|
-
onToolCallStart?: (toolCallId: string, toolName: string) => void;
|
|
27
|
-
/** Called with tool call arguments */
|
|
28
|
-
onToolCallArgs?: (toolCallId: string, argsJson: string) => void;
|
|
29
|
-
/** Called when tool call completes */
|
|
30
|
-
onToolCallEnd?: (toolCallId: string) => void;
|
|
31
|
-
/** Called when tool result is available */
|
|
32
|
-
onToolCallResult?: (toolCallId: string, result: string) => void;
|
|
33
|
-
/** Called for state delta events (sources, actions, plan) */
|
|
34
|
-
onStateDelta?: (delta: unknown[]) => void;
|
|
35
|
-
/** Called for state snapshots */
|
|
36
|
-
onStateSnapshot?: (state: unknown) => void;
|
|
37
|
-
}
|
|
38
|
-
export interface ClientTool {
|
|
39
|
-
name: string;
|
|
40
|
-
description: string;
|
|
41
|
-
parameters: Record<string, unknown>;
|
|
42
|
-
/** Handler function - called when agent requests this tool */
|
|
43
|
-
handler?: (args: Record<string, unknown>) => Promise<unknown>;
|
|
44
|
-
}
|
|
45
|
-
export declare class AGUIClient {
|
|
46
|
-
private config;
|
|
47
|
-
private agent;
|
|
48
|
-
private currentRunId;
|
|
49
|
-
private currentThreadId;
|
|
50
|
-
private messageAccumulators;
|
|
51
|
-
private toolArgAccumulators;
|
|
52
|
-
private toolCallNames;
|
|
53
|
-
private registeredTools;
|
|
54
|
-
constructor(config: ResolvedConfig);
|
|
55
|
-
/**
|
|
56
|
-
* Get or create a persistent thread ID for this session.
|
|
57
|
-
*/
|
|
58
|
-
private getOrCreateThreadId;
|
|
59
|
-
private getBrowserLanguage;
|
|
60
|
-
/**
|
|
61
|
-
* Register a client-side tool that can be called by the agent.
|
|
62
|
-
*/
|
|
63
|
-
registerTool(tool: ClientTool): void;
|
|
64
|
-
/**
|
|
65
|
-
* Unregister a client-side tool.
|
|
66
|
-
*/
|
|
67
|
-
unregisterTool(toolName: string): void;
|
|
68
|
-
/**
|
|
69
|
-
* Send a message and stream the agent's response.
|
|
70
|
-
*/
|
|
71
|
-
chat(message: string, callbacks: AGUIStreamCallbacks, options?: {
|
|
72
|
-
history?: Array<{
|
|
73
|
-
role: 'user' | 'assistant';
|
|
74
|
-
content: string;
|
|
75
|
-
}>;
|
|
76
|
-
userContext?: Array<{
|
|
77
|
-
type: string;
|
|
78
|
-
[key: string]: unknown;
|
|
79
|
-
}>;
|
|
80
|
-
signal?: AbortSignal;
|
|
81
|
-
}): Promise<void>;
|
|
82
|
-
/**
|
|
83
|
-
* Execute a client-side tool if registered.
|
|
84
|
-
*/
|
|
85
|
-
private maybeExecuteClientTool;
|
|
86
|
-
/**
|
|
87
|
-
* Send tool execution result back to the server.
|
|
88
|
-
*/
|
|
89
|
-
sendToolResult(toolCallId: string, result: unknown, error?: string): Promise<void>;
|
|
90
|
-
/**
|
|
91
|
-
* Start a new conversation thread.
|
|
92
|
-
*/
|
|
93
|
-
newThread(): string;
|
|
94
|
-
/**
|
|
95
|
-
* Get current thread ID.
|
|
96
|
-
*/
|
|
97
|
-
get threadId(): string;
|
|
98
|
-
/**
|
|
99
|
-
* Get current run ID.
|
|
100
|
-
*/
|
|
101
|
-
get runId(): string | null;
|
|
102
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AG-UI Event Handler
|
|
3
|
-
*
|
|
4
|
-
* Processes AG-UI protocol events and maintains UI state.
|
|
5
|
-
* Replaces the complex JSON-RPC parsing in mcp-client.ts.
|
|
6
|
-
*/
|
|
7
|
-
import type { AGUIEvent } from '@ag-ui/core';
|
|
8
|
-
/** A streaming text message being accumulated */
|
|
9
|
-
export interface StreamingMessage {
|
|
10
|
-
id: string;
|
|
11
|
-
role: 'user' | 'assistant';
|
|
12
|
-
content: string;
|
|
13
|
-
complete: boolean;
|
|
14
|
-
/** Which step this message belongs to (for thinking vs response) */
|
|
15
|
-
stepName?: string;
|
|
16
|
-
}
|
|
17
|
-
/** A tool call being tracked */
|
|
18
|
-
export interface ToolCallState {
|
|
19
|
-
id: string;
|
|
20
|
-
name: string;
|
|
21
|
-
args: string;
|
|
22
|
-
result?: unknown;
|
|
23
|
-
complete: boolean;
|
|
24
|
-
/** True if this tool executes on the client (query action) */
|
|
25
|
-
isClientSide?: boolean;
|
|
26
|
-
}
|
|
27
|
-
/** State delta data (sources, actions, plan, etc.) */
|
|
28
|
-
export interface StateDeltaData {
|
|
29
|
-
type: string;
|
|
30
|
-
data: unknown;
|
|
31
|
-
timestamp: number;
|
|
32
|
-
}
|
|
33
|
-
/** Complete AG-UI state */
|
|
34
|
-
export interface AGUIState {
|
|
35
|
-
/** Current run ID */
|
|
36
|
-
runId: string | null;
|
|
37
|
-
/** Thread ID (replaces conversation_id) */
|
|
38
|
-
threadId: string | null;
|
|
39
|
-
/** Current step name (e.g., "reasoning", "tool_execution") */
|
|
40
|
-
currentStep: string | null;
|
|
41
|
-
/** Streaming messages keyed by message ID */
|
|
42
|
-
messages: Map<string, StreamingMessage>;
|
|
43
|
-
/** Tool calls keyed by tool call ID */
|
|
44
|
-
toolCalls: Map<string, ToolCallState>;
|
|
45
|
-
/** State deltas received (sources, actions, plans) */
|
|
46
|
-
stateDeltas: StateDeltaData[];
|
|
47
|
-
/** Whether the run is complete */
|
|
48
|
-
isComplete: boolean;
|
|
49
|
-
/** Error if run failed */
|
|
50
|
-
error: Error | null;
|
|
51
|
-
}
|
|
52
|
-
export interface AGUIHandlerCallbacks {
|
|
53
|
-
/** Called whenever state changes */
|
|
54
|
-
onStateChange: (state: AGUIState) => void;
|
|
55
|
-
/** Called when an error occurs */
|
|
56
|
-
onError: (error: Error) => void;
|
|
57
|
-
/** Called when run completes successfully */
|
|
58
|
-
onComplete: () => void;
|
|
59
|
-
/** Called when a client-side tool needs execution */
|
|
60
|
-
onClientToolCall?: (toolCall: ToolCallState) => Promise<unknown>;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Create an AG-UI event handler.
|
|
64
|
-
*
|
|
65
|
-
* Returns an object with a handleEvent method that processes
|
|
66
|
-
* AG-UI events and updates internal state.
|
|
67
|
-
*/
|
|
68
|
-
export declare function createAGUIHandler(callbacks: AGUIHandlerCallbacks): {
|
|
69
|
-
handleEvent: (event: AGUIEvent) => Promise<void>;
|
|
70
|
-
reset: () => void;
|
|
71
|
-
getState: () => AGUIState;
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Register a tool as client-side.
|
|
75
|
-
* Called when the SDK registers an action with returns: true.
|
|
76
|
-
*/
|
|
77
|
-
export declare function registerClientSideTool(toolName: string): void;
|
|
78
|
-
/**
|
|
79
|
-
* Unregister a client-side tool.
|
|
80
|
-
*/
|
|
81
|
-
export declare function unregisterClientSideTool(toolName: string): void;
|
|
82
|
-
/**
|
|
83
|
-
* Check if a tool executes on the client side.
|
|
84
|
-
*/
|
|
85
|
-
export declare function isClientSideTool(toolName: string): boolean;
|
|
86
|
-
/**
|
|
87
|
-
* Get all registered client-side tools.
|
|
88
|
-
*/
|
|
89
|
-
export declare function getClientSideTools(): string[];
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Floating Help Button Component
|
|
3
|
-
* A floating action button that opens the help panel
|
|
4
|
-
*/
|
|
5
|
-
import type { ResolvedConfig, FloatingButtonPosition } from '../../core/config';
|
|
6
|
-
/**
|
|
7
|
-
* FloatingButton class that manages the button lifecycle
|
|
8
|
-
* Uses Preact for rendering but maintains imperative control
|
|
9
|
-
*/
|
|
10
|
-
export declare class FloatingButton {
|
|
11
|
-
private config;
|
|
12
|
-
private onClick;
|
|
13
|
-
private container;
|
|
14
|
-
private stylesInjected;
|
|
15
|
-
private _isHidden;
|
|
16
|
-
constructor(config: ResolvedConfig, onClick: () => void);
|
|
17
|
-
/**
|
|
18
|
-
* Initialize the floating button
|
|
19
|
-
*/
|
|
20
|
-
init(): void;
|
|
21
|
-
/**
|
|
22
|
-
* Set the open state (to update icon when panel opens)
|
|
23
|
-
*/
|
|
24
|
-
setOpen(_isOpen: boolean): void;
|
|
25
|
-
/**
|
|
26
|
-
* Show the button
|
|
27
|
-
*/
|
|
28
|
-
show(): void;
|
|
29
|
-
/**
|
|
30
|
-
* Hide the button
|
|
31
|
-
*/
|
|
32
|
-
hide(): void;
|
|
33
|
-
/**
|
|
34
|
-
* Update button position
|
|
35
|
-
*/
|
|
36
|
-
setPosition(position: FloatingButtonPosition): void;
|
|
37
|
-
/**
|
|
38
|
-
* Update button label
|
|
39
|
-
*/
|
|
40
|
-
setLabel(label: string): void;
|
|
41
|
-
/**
|
|
42
|
-
* Destroy the button
|
|
43
|
-
*/
|
|
44
|
-
destroy(): void;
|
|
45
|
-
private render;
|
|
46
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tab Navigation Component
|
|
3
|
-
* Vertical tabs on the right edge of the panel for switching between Assistant and Support
|
|
4
|
-
*/
|
|
5
|
-
import { h } from 'preact';
|
|
6
|
-
import type { ResolvedSupportConfig } from '../../core/config';
|
|
7
|
-
interface TabNavigationProps {
|
|
8
|
-
supportConfig: ResolvedSupportConfig;
|
|
9
|
-
}
|
|
10
|
-
export declare function TabNavigation({ supportConfig }: TabNavigationProps): h.JSX.Element;
|
|
11
|
-
/**
|
|
12
|
-
* CSS Styles for Tab Navigation
|
|
13
|
-
* Should be appended to PANEL_STYLES
|
|
14
|
-
*/
|
|
15
|
-
export declare const TAB_NAVIGATION_STYLES = "\n/* ============================================================================\n Panel Wrapper (for tab layout)\n Horizontal flex container with main content + tab nav\n ============================================================================ */\n\n._pillar-panel-wrapper {\n display: flex;\n flex-direction: row;\n height: 100%;\n overflow: hidden;\n}\n\n._pillar-panel-wrapper > ._pillar-panel-ui {\n flex: 1;\n min-width: 0;\n}\n\n.pillar-panel-wrapper {}\n\n/* ============================================================================\n Tab Navigation\n Vertical tabs on the right edge of the panel\n ============================================================================ */\n\n._pillar-tab-nav {\n display: flex;\n flex-direction: column;\n width: 48px;\n min-width: 48px;\n background: var(--pillar-bg-secondary);\n border-left: 1px solid var(--pillar-border);\n padding: var(--pillar-spacing-sm) 0;\n gap: var(--pillar-spacing-xs);\n}\n\n._pillar-tab {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 2px;\n padding: var(--pillar-spacing-sm) var(--pillar-spacing-xs);\n margin: 0 var(--pillar-spacing-xs);\n border: none;\n border-radius: var(--pillar-radius-md);\n background: transparent;\n color: var(--pillar-text-muted);\n cursor: pointer;\n transition: all var(--pillar-transition-fast);\n position: relative;\n}\n\n._pillar-tab:hover {\n background: var(--pillar-bg-tertiary);\n color: var(--pillar-text);\n}\n\n._pillar-tab--active {\n background: var(--pillar-primary-light);\n color: var(--pillar-primary);\n}\n\n._pillar-tab--active:hover {\n background: var(--pillar-primary-light-hover);\n color: var(--pillar-primary);\n}\n\n._pillar-tab-icon {\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n._pillar-tab-icon svg {\n width: 100%;\n height: 100%;\n}\n\n._pillar-tab-label {\n font-size: 9px;\n font-weight: 500;\n text-align: center;\n line-height: 1.2;\n max-width: 40px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Public override classes */\n.pillar-tab-nav {}\n.pillar-tab {}\n.pillar-tab-icon {}\n.pillar-tab-label {}\n";
|
|
16
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AG-UI Progress Component
|
|
3
|
-
*
|
|
4
|
-
* Displays real-time progress based on AG-UI state signals.
|
|
5
|
-
* Renders step indicators, thinking content, and tool call status.
|
|
6
|
-
*
|
|
7
|
-
* This component replaces the old markdown-based ProgressRow for live
|
|
8
|
-
* streaming. ProgressRow is still used for rendering stored history.
|
|
9
|
-
*/
|
|
10
|
-
import { VNode } from 'preact';
|
|
11
|
-
/**
|
|
12
|
-
* Render AG-UI progress state.
|
|
13
|
-
* Shows current step, streaming thinking messages, and active tool calls.
|
|
14
|
-
*/
|
|
15
|
-
export declare function AGUIProgress(): VNode | null;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tooltip Component
|
|
3
|
-
* Individual tooltip rendered to document body
|
|
4
|
-
*/
|
|
5
|
-
import type { TooltipData } from '../../api/client';
|
|
6
|
-
import type { TooltipTrigger, TooltipPosition } from '../../core/config';
|
|
7
|
-
export interface TooltipOptions {
|
|
8
|
-
trigger: TooltipTrigger;
|
|
9
|
-
position: TooltipPosition;
|
|
10
|
-
onLearnMore?: (articleSlug: string) => void;
|
|
11
|
-
onShow?: () => void;
|
|
12
|
-
onHide?: () => void;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Tooltip class that manages a single tooltip instance
|
|
16
|
-
* Uses Preact for rendering but maintains imperative control
|
|
17
|
-
*/
|
|
18
|
-
export declare class Tooltip {
|
|
19
|
-
private id;
|
|
20
|
-
private data;
|
|
21
|
-
private anchor;
|
|
22
|
-
private options;
|
|
23
|
-
private container;
|
|
24
|
-
private iconElement;
|
|
25
|
-
private isVisible;
|
|
26
|
-
private hideTimeout;
|
|
27
|
-
constructor(data: TooltipData, anchor: HTMLElement, options: TooltipOptions);
|
|
28
|
-
init(): void;
|
|
29
|
-
show(): void;
|
|
30
|
-
hide(): void;
|
|
31
|
-
toggle(): void;
|
|
32
|
-
destroy(): void;
|
|
33
|
-
private renderTooltip;
|
|
34
|
-
private createIcon;
|
|
35
|
-
private bindEvents;
|
|
36
|
-
private unbindEvents;
|
|
37
|
-
private handleMouseEnter;
|
|
38
|
-
private handleMouseLeave;
|
|
39
|
-
private handleTooltipMouseEnter;
|
|
40
|
-
private handleTooltipMouseLeave;
|
|
41
|
-
private handleClick;
|
|
42
|
-
private handleDocumentClick;
|
|
43
|
-
private handleFocus;
|
|
44
|
-
private handleBlur;
|
|
45
|
-
private handleKeyDown;
|
|
46
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tooltip Manager
|
|
3
|
-
* Scans DOM for tooltip elements and manages their lifecycle
|
|
4
|
-
*/
|
|
5
|
-
import type { EventEmitter } from '../../core/events';
|
|
6
|
-
import type { ResolvedConfig } from '../../core/config';
|
|
7
|
-
import type { APIClient } from '../../api/client';
|
|
8
|
-
export declare class TooltipManager {
|
|
9
|
-
private config;
|
|
10
|
-
private api;
|
|
11
|
-
private events;
|
|
12
|
-
private tooltips;
|
|
13
|
-
private tooltipData;
|
|
14
|
-
private observer;
|
|
15
|
-
private stylesInjected;
|
|
16
|
-
constructor(config: ResolvedConfig, api: APIClient, events: EventEmitter);
|
|
17
|
-
/**
|
|
18
|
-
* Initialize the tooltip manager
|
|
19
|
-
*/
|
|
20
|
-
init(): Promise<void>;
|
|
21
|
-
/**
|
|
22
|
-
* Scan DOM for tooltip elements and initialize them
|
|
23
|
-
*/
|
|
24
|
-
scan(): Promise<void>;
|
|
25
|
-
/**
|
|
26
|
-
* Show a specific tooltip
|
|
27
|
-
*/
|
|
28
|
-
show(tooltipId: string): void;
|
|
29
|
-
/**
|
|
30
|
-
* Hide a specific tooltip
|
|
31
|
-
*/
|
|
32
|
-
hide(tooltipId: string): void;
|
|
33
|
-
/**
|
|
34
|
-
* Destroy the tooltip manager
|
|
35
|
-
*/
|
|
36
|
-
destroy(): void;
|
|
37
|
-
private createTooltip;
|
|
38
|
-
private setupObserver;
|
|
39
|
-
private handleRemovedElement;
|
|
40
|
-
private getElementKey;
|
|
41
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tooltip CSS Styles
|
|
3
|
-
* Injected into the document head
|
|
4
|
-
*/
|
|
5
|
-
export declare const TOOLTIP_STYLES = "\n/* Pillar Tooltip Styles */\n.pillar-tooltip {\n position: absolute;\n z-index: 99999;\n max-width: 320px;\n padding: 12px 16px;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #1a1a1a;\n background: #ffffff;\n border-radius: 8px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);\n pointer-events: auto;\n opacity: 0;\n transform: scale(0.95);\n transition: opacity 0.15s ease, transform 0.15s ease;\n}\n\n.pillar-tooltip.pillar-tooltip--visible {\n opacity: 1;\n transform: scale(1);\n}\n\n.pillar-tooltip__content {\n margin: 0;\n}\n\n.pillar-tooltip__content p {\n margin: 0 0 8px;\n}\n\n.pillar-tooltip__content p:last-child {\n margin-bottom: 0;\n}\n\n.pillar-tooltip__content a {\n color: #2563eb;\n text-decoration: none;\n}\n\n.pillar-tooltip__content a:hover {\n text-decoration: underline;\n}\n\n.pillar-tooltip__learn-more {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n margin-top: 12px;\n padding: 6px 12px;\n font-size: 13px;\n font-weight: 500;\n color: #2563eb;\n background: #eff6ff;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n transition: background 0.15s ease;\n}\n\n.pillar-tooltip__learn-more:hover {\n background: #dbeafe;\n}\n\n.pillar-tooltip__learn-more svg {\n width: 14px;\n height: 14px;\n}\n\n/* Arrow */\n.pillar-tooltip__arrow {\n position: absolute;\n width: 12px;\n height: 12px;\n background: #ffffff;\n transform: rotate(45deg);\n box-shadow: -1px -1px 0 0 rgba(0, 0, 0, 0.05);\n}\n\n.pillar-tooltip--top .pillar-tooltip__arrow {\n bottom: -6px;\n box-shadow: 1px 1px 0 0 rgba(0, 0, 0, 0.05);\n}\n\n.pillar-tooltip--bottom .pillar-tooltip__arrow {\n top: -6px;\n}\n\n.pillar-tooltip--left .pillar-tooltip__arrow {\n right: -6px;\n box-shadow: 1px -1px 0 0 rgba(0, 0, 0, 0.05);\n}\n\n.pillar-tooltip--right .pillar-tooltip__arrow {\n left: -6px;\n box-shadow: -1px 1px 0 0 rgba(0, 0, 0, 0.05);\n}\n\n/* Tooltip Icon (for icon trigger) */\n.pillar-tooltip-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n margin-left: 4px;\n vertical-align: middle;\n color: #6b7280;\n cursor: help;\n transition: color 0.15s ease;\n}\n\n.pillar-tooltip-icon:hover {\n color: #2563eb;\n}\n\n.pillar-tooltip-icon svg {\n width: 100%;\n height: 100%;\n}\n\n/* Close button */\n.pillar-tooltip__close {\n position: absolute;\n top: 8px;\n right: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n padding: 0;\n color: #9ca3af;\n background: none;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n transition: color 0.15s ease, background 0.15s ease;\n}\n\n.pillar-tooltip__close:hover {\n color: #1a1a1a;\n background: #f3f4f6;\n}\n\n.pillar-tooltip__close svg {\n width: 12px;\n height: 12px;\n}\n";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Article Chat View Component
|
|
3
|
-
* Combined view with full article content at top and chat messages below
|
|
4
|
-
*/
|
|
5
|
-
import { h } from 'preact';
|
|
6
|
-
interface ArticleChatViewProps {
|
|
7
|
-
slug: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function ArticleChatView({ slug }: ArticleChatViewProps): h.JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Article View Component
|
|
3
|
-
* Displays article content using TipTap for rendering
|
|
4
|
-
*/
|
|
5
|
-
import { h } from 'preact';
|
|
6
|
-
interface ArticleViewProps {
|
|
7
|
-
slug: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function ArticleView({ slug }: ArticleViewProps): h.JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Category View Component
|
|
3
|
-
* Displays articles within a category
|
|
4
|
-
*/
|
|
5
|
-
import { h } from 'preact';
|
|
6
|
-
import type { CategoryData } from '../../api/client';
|
|
7
|
-
interface CategoryViewProps {
|
|
8
|
-
category: CategoryData;
|
|
9
|
-
}
|
|
10
|
-
export declare function CategoryView({ category }: CategoryViewProps): h.JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Help Center Articles Component
|
|
3
|
-
* Shows contextual articles based on current page + browse option
|
|
4
|
-
*/
|
|
5
|
-
import { h } from 'preact';
|
|
6
|
-
interface HelpCenterArticlesProps {
|
|
7
|
-
/** Current page path/URL for contextual search */
|
|
8
|
-
currentPage?: string;
|
|
9
|
-
/** Maximum number of articles to show */
|
|
10
|
-
maxArticles?: number;
|
|
11
|
-
}
|
|
12
|
-
export declare function HelpCenterArticles({ currentPage, maxArticles }: HelpCenterArticlesProps): h.JSX.Element;
|
|
13
|
-
/**
|
|
14
|
-
* CSS Styles for Help Center Articles
|
|
15
|
-
*/
|
|
16
|
-
export declare const HELP_CENTER_ARTICLES_STYLES = "\n/* ============================================================================\n Help Center Articles\n ============================================================================ */\n\n._pillar-hc-articles {\n display: flex;\n flex-direction: column;\n gap: var(--pillar-spacing-md);\n}\n\n._pillar-hc-articles-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--pillar-spacing-md);\n}\n\n._pillar-hc-articles-title {\n font-size: var(--pillar-font-size-sm);\n font-weight: 600;\n color: var(--pillar-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n\n._pillar-hc-articles-browse {\n display: flex;\n align-items: center;\n gap: var(--pillar-spacing-xs);\n padding: var(--pillar-spacing-xs) var(--pillar-spacing-sm);\n background: transparent;\n border: 1px solid var(--pillar-border);\n border-radius: var(--pillar-radius-md);\n font-size: var(--pillar-font-size-sm);\n color: var(--pillar-text-muted);\n cursor: pointer;\n transition: all var(--pillar-transition-fast);\n}\n\n._pillar-hc-articles-browse:hover {\n background: var(--pillar-bg-secondary);\n color: var(--pillar-text);\n border-color: var(--pillar-primary);\n}\n\n._pillar-hc-articles-browse svg {\n width: 14px;\n height: 14px;\n}\n\n._pillar-hc-articles-list {\n display: flex;\n flex-direction: column;\n gap: var(--pillar-spacing-sm);\n}\n\n._pillar-hc-articles-empty {\n padding: var(--pillar-spacing-lg);\n text-align: center;\n color: var(--pillar-text-muted);\n font-size: var(--pillar-font-size-sm);\n}\n\n._pillar-hc-articles-browse-btn {\n margin-top: var(--pillar-spacing-md);\n padding: var(--pillar-spacing-sm) var(--pillar-spacing-lg);\n background: var(--pillar-primary);\n color: white;\n border: none;\n border-radius: var(--pillar-radius-md);\n font-size: var(--pillar-font-size-sm);\n font-weight: 500;\n cursor: pointer;\n transition: all var(--pillar-transition-fast);\n}\n\n._pillar-hc-articles-browse-btn:hover {\n background: var(--pillar-primary-hover);\n}\n\n/* Public override classes */\n.pillar-hc-articles {}\n.pillar-hc-articles-header {}\n.pillar-hc-articles-title {}\n.pillar-hc-articles-browse {}\n.pillar-hc-articles-list {}\n.pillar-hc-articles-empty {}\n.pillar-hc-articles-browse-btn {}\n";
|
|
17
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Search View Component
|
|
3
|
-
* Displays search input and results
|
|
4
|
-
*/
|
|
5
|
-
import { h } from 'preact';
|
|
6
|
-
interface SearchViewProps {
|
|
7
|
-
initialQuery?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function SearchView({ initialQuery }: SearchViewProps): h.JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Support View Component
|
|
3
|
-
* Displays configurable support channels and help center articles
|
|
4
|
-
*/
|
|
5
|
-
import { h } from 'preact';
|
|
6
|
-
import type { ResolvedSupportConfig } from '../../core/config';
|
|
7
|
-
interface SupportViewProps {
|
|
8
|
-
supportConfig: ResolvedSupportConfig;
|
|
9
|
-
}
|
|
10
|
-
export declare function SupportView({ supportConfig }: SupportViewProps): h.JSX.Element;
|
|
11
|
-
/**
|
|
12
|
-
* CSS Styles for Support View
|
|
13
|
-
*/
|
|
14
|
-
export declare const SUPPORT_VIEW_STYLES = "\n/* ============================================================================\n Support View\n ============================================================================ */\n\n._pillar-support-view {\n display: flex;\n flex-direction: column;\n gap: var(--pillar-spacing-md);\n padding: var(--pillar-spacing-lg);\n overflow-y: auto;\n}\n\n._pillar-support-card {\n display: flex;\n align-items: center;\n gap: var(--pillar-spacing-md);\n padding: var(--pillar-spacing-md) var(--pillar-spacing-lg);\n background: var(--pillar-bg-secondary);\n border: 1px solid var(--pillar-border);\n border-radius: var(--pillar-radius-lg);\n cursor: pointer;\n transition: all var(--pillar-transition-fast);\n text-align: left;\n width: 100%;\n}\n\n._pillar-support-card:hover {\n background: var(--pillar-bg-tertiary);\n border-color: var(--pillar-primary);\n}\n\n._pillar-support-card-icon {\n width: 24px;\n height: 24px;\n color: var(--pillar-primary);\n flex-shrink: 0;\n}\n\n._pillar-support-card-icon svg {\n width: 100%;\n height: 100%;\n}\n\n._pillar-support-card-content {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n}\n\n._pillar-support-card-title {\n font-size: var(--pillar-font-size-base);\n font-weight: 500;\n color: var(--pillar-text);\n}\n\n._pillar-support-card-desc {\n font-size: var(--pillar-font-size-sm);\n color: var(--pillar-text-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._pillar-support-card-external {\n width: 16px;\n height: 16px;\n color: var(--pillar-text-muted);\n flex-shrink: 0;\n}\n\n._pillar-support-card-external svg {\n width: 100%;\n height: 100%;\n}\n\n._pillar-support-articles {\n margin-top: var(--pillar-spacing-lg);\n padding-top: var(--pillar-spacing-lg);\n border-top: 1px solid var(--pillar-border);\n}\n\n._pillar-support-section-title {\n font-size: var(--pillar-font-size-sm);\n font-weight: 600;\n color: var(--pillar-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n margin-bottom: var(--pillar-spacing-md);\n}\n\n/* Public override classes */\n.pillar-support-view {}\n.pillar-support-card {}\n.pillar-support-card-icon {}\n.pillar-support-card-content {}\n.pillar-support-card-title {}\n.pillar-support-card-desc {}\n.pillar-support-card-external {}\n.pillar-support-articles {}\n.pillar-support-section-title {}\n";
|
|
15
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Article Card Component
|
|
3
|
-
* Displays an article list item
|
|
4
|
-
*/
|
|
5
|
-
import { h } from 'preact';
|
|
6
|
-
import type { ArticleSummary } from '../../api/client';
|
|
7
|
-
interface ArticleCardProps {
|
|
8
|
-
article: ArticleSummary;
|
|
9
|
-
onClick: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare function ArticleCard({ article, onClick }: ArticleCardProps): h.JSX.Element;
|
|
12
|
-
interface ArticleListProps {
|
|
13
|
-
articles: ArticleSummary[];
|
|
14
|
-
onArticleClick: (article: ArticleSummary) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare function ArticleList({ articles, onArticleClick }: ArticleListProps): h.JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Category Card Component
|
|
3
|
-
* Displays a category list item
|
|
4
|
-
*/
|
|
5
|
-
import { h } from 'preact';
|
|
6
|
-
import type { CategoryData } from '../../api/client';
|
|
7
|
-
interface CategoryCardProps {
|
|
8
|
-
category: CategoryData;
|
|
9
|
-
onClick: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare function CategoryCard({ category, onClick }: CategoryCardProps): h.JSX.Element;
|
|
12
|
-
interface CategoryListProps {
|
|
13
|
-
categories: CategoryData[];
|
|
14
|
-
onCategoryClick: (category: CategoryData) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare function CategoryList({ categories, onCategoryClick }: CategoryListProps): h.JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Accordion Node Extension for TipTap (vanilla - HTML rendering only)
|
|
3
|
-
* Used to render collapsible accordion blocks in article content
|
|
4
|
-
*/
|
|
5
|
-
import { Node } from '@tiptap/core';
|
|
6
|
-
/**
|
|
7
|
-
* TipTap Accordion Node Extension (vanilla, no React)
|
|
8
|
-
* Renders accordion blocks using HTML details/summary elements
|
|
9
|
-
*/
|
|
10
|
-
export declare const AccordionNode: Node<any, any>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Callout Node Extension for TipTap (vanilla - HTML rendering only)
|
|
3
|
-
* Used to render callout blocks in article content
|
|
4
|
-
*/
|
|
5
|
-
import { Node } from '@tiptap/core';
|
|
6
|
-
export type CalloutType = 'info' | 'warning' | 'tip' | 'error' | 'success';
|
|
7
|
-
/**
|
|
8
|
-
* TipTap Callout Node Extension (vanilla, no React)
|
|
9
|
-
* Renders callout blocks with type-specific styling classes
|
|
10
|
-
*/
|
|
11
|
-
export declare const CalloutNode: Node<any, any>;
|