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