@pillar-ai/sdk 0.1.32 → 0.1.33

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 (59) hide show
  1. package/dist/actions/definitions/analytics.d.ts +18 -0
  2. package/dist/actions/definitions/content.d.ts +40 -0
  3. package/dist/actions/definitions/index.d.ts +26 -0
  4. package/dist/actions/definitions/navigation.d.ts +65 -0
  5. package/dist/actions/definitions/settings.d.ts +162 -0
  6. package/dist/actions/definitions/sources.d.ts +44 -0
  7. package/dist/actions/definitions/support.d.ts +15 -0
  8. package/dist/actions/definitions/team.d.ts +120 -0
  9. package/dist/api/ag-ui-adapter.d.ts +76 -0
  10. package/dist/api/ag-ui-bridge.d.ts +49 -0
  11. package/dist/api/ag-ui-client.d.ts +102 -0
  12. package/dist/api/ag-ui-handler.d.ts +89 -0
  13. package/dist/button/FloatingButton.d.ts +44 -0
  14. package/dist/cli/sync.js +29 -10
  15. package/dist/components/Button/FloatingButton.d.ts +46 -0
  16. package/dist/components/DevTools/DOMScannerPreview.d.ts +21 -0
  17. package/dist/components/Progress/AGUIProgress.d.ts +15 -0
  18. package/dist/components/Tooltips/Tooltip.d.ts +46 -0
  19. package/dist/components/Tooltips/TooltipManager.d.ts +41 -0
  20. package/dist/components/Tooltips/index.d.ts +6 -0
  21. package/dist/components/Tooltips/styles.d.ts +5 -0
  22. package/dist/components/Views/ArticleChatView.d.ts +9 -0
  23. package/dist/components/Views/ArticleView.d.ts +10 -0
  24. package/dist/components/Views/CategoryView.d.ts +11 -0
  25. package/dist/components/Views/DeveloperView.d.ts +6 -0
  26. package/dist/components/Views/SearchView.d.ts +10 -0
  27. package/dist/components/shared/ArticleCard.d.ts +17 -0
  28. package/dist/components/shared/CategoryCard.d.ts +17 -0
  29. package/dist/content/extensions/AccordionNode.d.ts +10 -0
  30. package/dist/content/extensions/CalloutNode.d.ts +11 -0
  31. package/dist/content/extensions/index.d.ts +5 -0
  32. package/dist/content/index.d.ts +5 -0
  33. package/dist/content/renderer.d.ts +24 -0
  34. package/dist/panel/Panel.d.ts +53 -0
  35. package/dist/panel/PanelUI.d.ts +43 -0
  36. package/dist/panel/components/ArticleCard.d.ts +10 -0
  37. package/dist/panel/components/CategoryCard.d.ts +10 -0
  38. package/dist/panel/components/ChatInput.d.ts +36 -0
  39. package/dist/panel/components/Header.d.ts +16 -0
  40. package/dist/panel/components/SearchInput.d.ts +11 -0
  41. package/dist/panel/styles.d.ts +5 -0
  42. package/dist/panel/views/ArticleView.d.ts +21 -0
  43. package/dist/panel/views/CategoryView.d.ts +20 -0
  44. package/dist/panel/views/ChatView.d.ts +30 -0
  45. package/dist/panel/views/HomeView.d.ts +18 -0
  46. package/dist/panel/views/SearchView.d.ts +22 -0
  47. package/dist/pillar.esm.js +1 -1
  48. package/dist/store/developer.d.ts +19 -0
  49. package/dist/store/tooltips.d.ts +21 -0
  50. package/dist/tooltips/Tooltip.d.ts +63 -0
  51. package/dist/tooltips/TooltipManager.d.ts +42 -0
  52. package/dist/tooltips/styles.d.ts +5 -0
  53. package/dist/ui/config.d.ts +96 -0
  54. package/dist/ui/executor.d.ts +75 -0
  55. package/dist/ui/index.d.ts +11 -0
  56. package/dist/ui/scanner.d.ts +105 -0
  57. package/dist/ui/types.d.ts +293 -0
  58. package/dist/utils/markdown.d.ts +9 -0
  59. package/package.json +2 -1
@@ -0,0 +1,102 @@
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
+ }
@@ -0,0 +1,89 @@
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[];
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Floating Help Button
3
+ * A floating action button that opens the help panel
4
+ */
5
+ import type { ResolvedConfig, FloatingButtonPosition } from '../core/config';
6
+ export declare class FloatingButton {
7
+ private config;
8
+ private onClick;
9
+ private element;
10
+ private stylesInjected;
11
+ private _isOpen;
12
+ constructor(config: ResolvedConfig, onClick: () => void);
13
+ /**
14
+ * Initialize the floating button
15
+ */
16
+ init(): void;
17
+ /**
18
+ * Set the open state (to show/hide when panel opens)
19
+ */
20
+ setOpen(isOpen: boolean): void;
21
+ /**
22
+ * Show the button
23
+ */
24
+ show(): void;
25
+ /**
26
+ * Hide the button
27
+ */
28
+ hide(): void;
29
+ /**
30
+ * Update button position
31
+ */
32
+ setPosition(position: FloatingButtonPosition): void;
33
+ /**
34
+ * Update button label
35
+ */
36
+ setLabel(label: string): void;
37
+ /**
38
+ * Destroy the button
39
+ */
40
+ destroy(): void;
41
+ private createElement;
42
+ private updateIcon;
43
+ private handleClick;
44
+ }
package/dist/cli/sync.js CHANGED
@@ -141,8 +141,14 @@ function globFiles(dir, extensions) {
141
141
  }
142
142
  return results;
143
143
  }
144
- function evaluateNode(node, ts) {
144
+ function evaluateNode(node, ts, scope) {
145
145
  const n = node;
146
+ if (ts.isIdentifier(n) && scope) {
147
+ const name = n.text;
148
+ if (scope.has(name)) {
149
+ return scope.get(name);
150
+ }
151
+ }
146
152
  if (ts.isStringLiteral(n)) {
147
153
  return n.text;
148
154
  }
@@ -161,7 +167,7 @@ function evaluateNode(node, ts) {
161
167
  if (ts.isPrefixUnaryExpression(n)) {
162
168
  const expr = n;
163
169
  if (expr.operator === ts.SyntaxKind.MinusToken) {
164
- const operand = evaluateNode(expr.operand, ts);
170
+ const operand = evaluateNode(expr.operand, ts, scope);
165
171
  if (typeof operand === "number")
166
172
  return -operand;
167
173
  }
@@ -170,7 +176,7 @@ function evaluateNode(node, ts) {
170
176
  const arr = n;
171
177
  const result = [];
172
178
  for (const elem of arr.elements) {
173
- const val = evaluateNode(elem, ts);
179
+ const val = evaluateNode(elem, ts, scope);
174
180
  if (val === void 0)
175
181
  return void 0;
176
182
  result.push(val);
@@ -185,7 +191,7 @@ function evaluateNode(node, ts) {
185
191
  const key = prop.name ? ts.isIdentifier(prop.name) ? prop.name.text : ts.isStringLiteral(prop.name) ? prop.name.text : void 0 : void 0;
186
192
  if (!key)
187
193
  continue;
188
- const val = evaluateNode(prop.initializer, ts);
194
+ const val = evaluateNode(prop.initializer, ts, scope);
189
195
  if (val !== void 0) {
190
196
  result[key] = val;
191
197
  }
@@ -197,16 +203,16 @@ function evaluateNode(node, ts) {
197
203
  return result;
198
204
  }
199
205
  if (ts.isAsExpression(n)) {
200
- return evaluateNode(n.expression, ts);
206
+ return evaluateNode(n.expression, ts, scope);
201
207
  }
202
208
  if (ts.isParenthesizedExpression(n)) {
203
- return evaluateNode(n.expression, ts);
209
+ return evaluateNode(n.expression, ts, scope);
204
210
  }
205
211
  if (ts.isBinaryExpression(n)) {
206
212
  const bin = n;
207
213
  if (bin.operatorToken.kind === ts.SyntaxKind.PlusToken) {
208
- const left = evaluateNode(bin.left, ts);
209
- const right = evaluateNode(bin.right, ts);
214
+ const left = evaluateNode(bin.left, ts, scope);
215
+ const right = evaluateNode(bin.right, ts, scope);
210
216
  if (typeof left === "string" && typeof right === "string") {
211
217
  return left + right;
212
218
  }
@@ -300,13 +306,13 @@ async function scanTools(scanDir) {
300
306
  }
301
307
  };
302
308
  if (ts.isObjectLiteralExpression(arg)) {
303
- const obj = evaluateNode(arg, ts);
309
+ const obj = evaluateNode(arg, ts, fileScope);
304
310
  processToolObject(obj, lineNumber, arg);
305
311
  } else if (ts.isArrayLiteralExpression(arg)) {
306
312
  for (const element of arg.elements) {
307
313
  if (ts.isObjectLiteralExpression(element)) {
308
314
  const elementLine = sourceFile.getLineAndCharacterOfPosition(element.getStart()).line + 1;
309
- const obj = evaluateNode(element, ts);
315
+ const obj = evaluateNode(element, ts, fileScope);
310
316
  processToolObject(obj, elementLine, element);
311
317
  } else {
312
318
  const elementLine = sourceFile.getLineAndCharacterOfPosition(element.getStart()).line + 1;
@@ -334,6 +340,19 @@ async function scanTools(scanDir) {
334
340
  // setParentNodes
335
341
  filePath.endsWith(".tsx") ? ts.ScriptKind.TSX : filePath.endsWith(".jsx") ? ts.ScriptKind.JSX : /\.m?js$/.test(filePath) ? ts.ScriptKind.JS : ts.ScriptKind.TS
336
342
  );
343
+ const fileScope = /* @__PURE__ */ new Map();
344
+ for (const stmt of sourceFile.statements) {
345
+ if (ts.isVariableStatement(stmt) && stmt.declarationList.flags & ts.NodeFlags.Const) {
346
+ for (const decl of stmt.declarationList.declarations) {
347
+ if (ts.isIdentifier(decl.name) && decl.initializer) {
348
+ const val = evaluateNode(decl.initializer, ts, fileScope);
349
+ if (val !== void 0) {
350
+ fileScope.set(decl.name.text, val);
351
+ }
352
+ }
353
+ }
354
+ }
355
+ }
337
356
  visit2(sourceFile);
338
357
  }
339
358
  const toolsByName = /* @__PURE__ */ new Map();
@@ -0,0 +1,46 @@
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
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * DOM Scanner Preview Component
3
+ * Displays a tree visualization of the scanned DOM AST
4
+ * Used in dev mode to preview what will be sent to the LLM
5
+ */
6
+ import { h } from 'preact';
7
+ import type { ScanResult } from '../../types/dom-scanner';
8
+ interface DOMScannerPreviewProps {
9
+ /** The scan result to display */
10
+ result: ScanResult;
11
+ /** Called when user confirms and wants to send the message */
12
+ onConfirm: () => void;
13
+ /** Called when user cancels */
14
+ onCancel: () => void;
15
+ }
16
+ /**
17
+ * DOM Scanner Preview Panel
18
+ * Shows a modal with the scanned DOM tree and statistics
19
+ */
20
+ export declare function DOMScannerPreview({ result, onConfirm, onCancel }: DOMScannerPreviewProps): h.JSX.Element;
21
+ export default DOMScannerPreview;
@@ -0,0 +1,15 @@
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;
@@ -0,0 +1,46 @@
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
+ }
@@ -0,0 +1,41 @@
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
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Tooltips Index
3
+ */
4
+ export { Tooltip } from './Tooltip';
5
+ export { TooltipManager } from './TooltipManager';
6
+ export { TOOLTIP_STYLES } from './styles';
@@ -0,0 +1,5 @@
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";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Article Chat View Component
3
+ * Combined view with full article content at top and chat messages below
4
+ */
5
+ interface ArticleChatViewProps {
6
+ slug: string;
7
+ }
8
+ export declare function ArticleChatView({ slug }: ArticleChatViewProps): import("preact").JSX.Element;
9
+ export {};
@@ -0,0 +1,10 @@
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 {};
@@ -0,0 +1,11 @@
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 {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Developer View Component
3
+ * Dev mode view for testing action handlers
4
+ */
5
+ import { h } from 'preact';
6
+ export declare function DeveloperView(): h.JSX.Element;
@@ -0,0 +1,10 @@
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 {};
@@ -0,0 +1,17 @@
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 {};
@@ -0,0 +1,17 @@
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 {};
@@ -0,0 +1,10 @@
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>;
@@ -0,0 +1,11 @@
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>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * TipTap Extensions for SDK content rendering
3
+ */
4
+ export { CalloutNode, type CalloutType } from './CalloutNode';
5
+ export { AccordionNode } from './AccordionNode';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Content rendering utilities for the SDK
3
+ */
4
+ export { renderArticleContent, renderTipTapContent, isJSONContent, } from './renderer';
5
+ export type { CalloutType } from './extensions';