blob: 627b257b3f326e055f7d165cabaa7deb0a527f42 [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
bankseand5c849d2025-06-26 15:48:31 +000027// View mode select
28export {
29 sampleViewModeConfigs,
30 viewModeScenarios,
31 applyViewModeConfig,
32 createViewModeTestButtons,
33} from "./view-mode-select";
34
Sean McCullough618bfb22025-06-25 20:52:30 +000035// Common demo utilities
36export const demoStyles = {
37 container: `
38 max-width: 1200px;
39 margin: 20px auto;
40 padding: 20px;
41 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
42 `,
43
44 demoSection: `
45 margin: 20px 0;
46 padding: 15px;
47 border: 1px solid #e1e5e9;
48 border-radius: 8px;
49 background: #f8f9fa;
50 `,
51
52 demoHeader: `
53 font-size: 18px;
54 font-weight: 600;
55 margin-bottom: 10px;
56 color: #24292f;
57 `,
58};
59
60/**
61 * Common demo setup utilities
62 */
63export const demoUtils = {
64 /**
65 * Create a labeled demo section
66 */
67 createDemoSection(title: string, description?: string): HTMLElement {
68 const section = document.createElement("div");
69 section.style.cssText = demoStyles.demoSection;
70
71 const header = document.createElement("h3");
72 header.style.cssText = demoStyles.demoHeader;
73 header.textContent = title;
74 section.appendChild(header);
75
76 if (description) {
77 const desc = document.createElement("p");
78 desc.textContent = description;
79 desc.style.cssText = "color: #656d76; margin-bottom: 15px;";
80 section.appendChild(desc);
81 }
82
83 return section;
84 },
85
86 /**
87 * Wait for a specified number of milliseconds
88 */
89 delay(ms: number): Promise<void> {
90 return new Promise((resolve) => setTimeout(resolve, ms));
91 },
92
93 /**
94 * Create a simple button for demo interactions
95 */
96 createButton(text: string, onClick: () => void): HTMLButtonElement {
97 const button = document.createElement("button");
98 button.textContent = text;
99 button.style.cssText = `
100 padding: 8px 16px;
101 margin: 5px;
102 background: #0969da;
103 color: white;
104 border: none;
105 border-radius: 6px;
106 cursor: pointer;
107 font-size: 14px;
108 `;
109 button.addEventListener("click", onClick);
110 return button;
111 },
112};