blob: 9a47f8e1136415dc83e6f32cdd483e592adf9078 [file] [log] [blame]
Sean McCullough618bfb22025-06-25 20:52:30 +00001/**
2 * Centralized exports for all demo fixtures
3 */
4
5// Tool calls
6export {
7 sampleToolCalls,
8 longBashCommand,
9 multipleToolCallGroups,
10} from "./tool-calls";
11
12// Timeline messages
13export {
14 sampleTimelineMessages,
15 longTimelineMessage,
16 mixedTimelineMessages,
17} from "./timeline-messages";
18
19// Container status
20export {
21 sampleUsage,
22 sampleContainerState,
23 lightUsageState,
24 heavyUsageState,
25} from "./container-status";
26
27// Common demo utilities
28export const demoStyles = {
29 container: `
30 max-width: 1200px;
31 margin: 20px auto;
32 padding: 20px;
33 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
34 `,
35
36 demoSection: `
37 margin: 20px 0;
38 padding: 15px;
39 border: 1px solid #e1e5e9;
40 border-radius: 8px;
41 background: #f8f9fa;
42 `,
43
44 demoHeader: `
45 font-size: 18px;
46 font-weight: 600;
47 margin-bottom: 10px;
48 color: #24292f;
49 `,
50};
51
52/**
53 * Common demo setup utilities
54 */
55export const demoUtils = {
56 /**
57 * Create a labeled demo section
58 */
59 createDemoSection(title: string, description?: string): HTMLElement {
60 const section = document.createElement("div");
61 section.style.cssText = demoStyles.demoSection;
62
63 const header = document.createElement("h3");
64 header.style.cssText = demoStyles.demoHeader;
65 header.textContent = title;
66 section.appendChild(header);
67
68 if (description) {
69 const desc = document.createElement("p");
70 desc.textContent = description;
71 desc.style.cssText = "color: #656d76; margin-bottom: 15px;";
72 section.appendChild(desc);
73 }
74
75 return section;
76 },
77
78 /**
79 * Wait for a specified number of milliseconds
80 */
81 delay(ms: number): Promise<void> {
82 return new Promise((resolve) => setTimeout(resolve, ms));
83 },
84
85 /**
86 * Create a simple button for demo interactions
87 */
88 createButton(text: string, onClick: () => void): HTMLButtonElement {
89 const button = document.createElement("button");
90 button.textContent = text;
91 button.style.cssText = `
92 padding: 8px 16px;
93 margin: 5px;
94 background: #0969da;
95 color: white;
96 border: none;
97 border-radius: 6px;
98 cursor: pointer;
99 font-size: 14px;
100 `;
101 button.addEventListener("click", onClick);
102 return button;
103 },
104};