| 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 | |
| banksean | 1ee0bc6 | 2025-07-22 23:24:18 +0000 | [diff] [blame] | 45 | // Ensure dark mode CSS variables are available |
| 46 | if ( |
| 47 | typeof document !== "undefined" && |
| 48 | !document.getElementById("demo-fixtures-dark-mode-styles") |
| 49 | ) { |
| 50 | const style = document.createElement("style"); |
| 51 | style.id = "demo-fixtures-dark-mode-styles"; |
| 52 | style.textContent = ` |
| 53 | :root { |
| 54 | --demo-fixture-section-border: #e1e5e9; |
| 55 | --demo-fixture-section-bg: #f8f9fa; |
| 56 | --demo-fixture-header-color: #24292f; |
| 57 | --demo-fixture-text-color: #656d76; |
| 58 | --demo-fixture-button-bg: #0969da; |
| 59 | --demo-fixture-button-hover-bg: #0860ca; |
| 60 | --demo-label-color: #24292f; |
| 61 | --demo-secondary-text: #666; |
| 62 | --demo-light-bg: #f6f8fa; |
| 63 | --demo-card-bg: #ffffff; |
| 64 | --demo-border: #d1d9e0; |
| 65 | --demo-instruction-bg: #e3f2fd; |
| 66 | --demo-control-bg: #f0f0f0; |
| 67 | } |
| 68 | |
| 69 | .dark { |
| 70 | --demo-fixture-section-border: #30363d; |
| 71 | --demo-fixture-section-bg: #21262d; |
| 72 | --demo-fixture-header-color: #e6edf3; |
| 73 | --demo-fixture-text-color: #8b949e; |
| 74 | --demo-fixture-button-bg: #4493f8; |
| 75 | --demo-fixture-button-hover-bg: #539bf5; |
| 76 | --demo-label-color: #e6edf3; |
| 77 | --demo-secondary-text: #8b949e; |
| 78 | --demo-light-bg: #21262d; |
| 79 | --demo-card-bg: #0d1117; |
| 80 | --demo-border: #30363d; |
| 81 | --demo-instruction-bg: #1c2128; |
| 82 | --demo-control-bg: #21262d; |
| 83 | } |
| 84 | `; |
| 85 | document.head.appendChild(style); |
| 86 | } |
| 87 | |
| Sean McCullough | 618bfb2 | 2025-06-25 20:52:30 +0000 | [diff] [blame] | 88 | // Common demo utilities |
| 89 | export const demoStyles = { |
| 90 | container: ` |
| 91 | max-width: 1200px; |
| 92 | margin: 20px auto; |
| 93 | padding: 20px; |
| 94 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; |
| 95 | `, |
| 96 | |
| 97 | demoSection: ` |
| 98 | margin: 20px 0; |
| 99 | padding: 15px; |
| banksean | 1ee0bc6 | 2025-07-22 23:24:18 +0000 | [diff] [blame] | 100 | border: 1px solid var(--demo-fixture-section-border); |
| Sean McCullough | 618bfb2 | 2025-06-25 20:52:30 +0000 | [diff] [blame] | 101 | border-radius: 8px; |
| banksean | 1ee0bc6 | 2025-07-22 23:24:18 +0000 | [diff] [blame] | 102 | background: var(--demo-fixture-section-bg); |
| 103 | transition: background-color 0.2s, border-color 0.2s; |
| Sean McCullough | 618bfb2 | 2025-06-25 20:52:30 +0000 | [diff] [blame] | 104 | `, |
| 105 | |
| 106 | demoHeader: ` |
| 107 | font-size: 18px; |
| 108 | font-weight: 600; |
| 109 | margin-bottom: 10px; |
| banksean | 1ee0bc6 | 2025-07-22 23:24:18 +0000 | [diff] [blame] | 110 | color: var(--demo-fixture-header-color); |
| 111 | transition: color 0.2s; |
| Sean McCullough | 618bfb2 | 2025-06-25 20:52:30 +0000 | [diff] [blame] | 112 | `, |
| 113 | }; |
| 114 | |
| 115 | /** |
| 116 | * Common demo setup utilities |
| 117 | */ |
| 118 | export const demoUtils = { |
| 119 | /** |
| 120 | * Create a labeled demo section |
| 121 | */ |
| 122 | createDemoSection(title: string, description?: string): HTMLElement { |
| 123 | const section = document.createElement("div"); |
| 124 | section.style.cssText = demoStyles.demoSection; |
| 125 | |
| 126 | const header = document.createElement("h3"); |
| 127 | header.style.cssText = demoStyles.demoHeader; |
| 128 | header.textContent = title; |
| 129 | section.appendChild(header); |
| 130 | |
| 131 | if (description) { |
| 132 | const desc = document.createElement("p"); |
| 133 | desc.textContent = description; |
| banksean | 1ee0bc6 | 2025-07-22 23:24:18 +0000 | [diff] [blame] | 134 | desc.style.cssText = |
| 135 | "color: var(--demo-fixture-text-color); margin-bottom: 15px; transition: color 0.2s;"; |
| Sean McCullough | 618bfb2 | 2025-06-25 20:52:30 +0000 | [diff] [blame] | 136 | section.appendChild(desc); |
| 137 | } |
| 138 | |
| 139 | return section; |
| 140 | }, |
| 141 | |
| 142 | /** |
| 143 | * Wait for a specified number of milliseconds |
| 144 | */ |
| 145 | delay(ms: number): Promise<void> { |
| 146 | return new Promise((resolve) => setTimeout(resolve, ms)); |
| 147 | }, |
| 148 | |
| 149 | /** |
| 150 | * Create a simple button for demo interactions |
| 151 | */ |
| 152 | createButton(text: string, onClick: () => void): HTMLButtonElement { |
| 153 | const button = document.createElement("button"); |
| 154 | button.textContent = text; |
| 155 | button.style.cssText = ` |
| 156 | padding: 8px 16px; |
| 157 | margin: 5px; |
| banksean | 1ee0bc6 | 2025-07-22 23:24:18 +0000 | [diff] [blame] | 158 | background: var(--demo-fixture-button-bg); |
| Sean McCullough | 618bfb2 | 2025-06-25 20:52:30 +0000 | [diff] [blame] | 159 | color: white; |
| 160 | border: none; |
| 161 | border-radius: 6px; |
| 162 | cursor: pointer; |
| 163 | font-size: 14px; |
| banksean | 1ee0bc6 | 2025-07-22 23:24:18 +0000 | [diff] [blame] | 164 | transition: background-color 0.2s; |
| Sean McCullough | 618bfb2 | 2025-06-25 20:52:30 +0000 | [diff] [blame] | 165 | `; |
| banksean | 1ee0bc6 | 2025-07-22 23:24:18 +0000 | [diff] [blame] | 166 | button.addEventListener("mouseenter", () => { |
| 167 | button.style.background = "var(--demo-fixture-button-hover-bg)"; |
| 168 | }); |
| 169 | button.addEventListener("mouseleave", () => { |
| 170 | button.style.background = "var(--demo-fixture-button-bg)"; |
| 171 | }); |
| Sean McCullough | 618bfb2 | 2025-06-25 20:52:30 +0000 | [diff] [blame] | 172 | button.addEventListener("click", onClick); |
| 173 | return button; |
| 174 | }, |
| 175 | }; |