@togo-framework/ui 0.1.6 → 0.1.8

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.
package/dist/index.d.ts CHANGED
@@ -4104,14 +4104,60 @@ interface TypingTerminalProps {
4104
4104
  typeMs?: number;
4105
4105
  /** ms between streamed output lines. */
4106
4106
  lineMs?: number;
4107
- /** Loop the playback (default true). */
4107
+ /** Loop the playback. Default false — plays once, then offers Replay. */
4108
4108
  loop?: boolean;
4109
+ /** Fixed body height (px). The window never grows/jumps while typing. */
4110
+ height?: number;
4111
+ /** Fired once when the playback (or the static frame) completes. */
4112
+ onComplete?: () => void;
4109
4113
  }
4110
- declare function TypingTerminal({ steps, endSlot, title, className, typeMs, lineMs, loop }: TypingTerminalProps): React$1.JSX.Element;
4114
+ declare function TypingTerminal({ steps, endSlot, title, className, typeMs, lineMs, loop, height, onComplete }: TypingTerminalProps): React$1.JSX.Element;
4111
4115
  declare namespace TypingTerminal {
4112
4116
  var displayName: string;
4113
4117
  }
4114
4118
 
4119
+ type ClaudeStep = {
4120
+ kind: "user";
4121
+ text: string;
4122
+ } | {
4123
+ kind: "assistant";
4124
+ text: string;
4125
+ } | {
4126
+ kind: "tool";
4127
+ tool: string;
4128
+ arg: string;
4129
+ result?: string;
4130
+ };
4131
+ interface ClaudeSessionProps {
4132
+ steps: ClaudeStep[];
4133
+ /** Revealed after the last step finishes (e.g. a BrowserFrame with the running app). */
4134
+ endSlot?: React$1.ReactNode;
4135
+ title?: string;
4136
+ className?: string;
4137
+ typeMs?: number;
4138
+ lineMs?: number;
4139
+ loop?: boolean;
4140
+ /** Fixed body height (px). The window never grows/jumps while playing. */
4141
+ height?: number;
4142
+ /** Fired once when the playback (or the static frame) completes. */
4143
+ onComplete?: () => void;
4144
+ }
4145
+ declare function ClaudeSession({ steps, endSlot, title, className, typeMs, lineMs, loop, height, onComplete }: ClaudeSessionProps): React$1.JSX.Element;
4146
+ declare namespace ClaudeSession {
4147
+ var displayName: string;
4148
+ }
4149
+
4150
+ interface BrowserFrameProps {
4151
+ /** URL shown in the address bar. */
4152
+ url?: string;
4153
+ children: React$1.ReactNode;
4154
+ className?: string;
4155
+ }
4156
+ declare function BrowserFrame({ url, children, className }: BrowserFrameProps): React$1.JSX.Element;
4157
+ declare namespace BrowserFrame {
4158
+ var displayName: string;
4159
+ }
4160
+
4115
4161
  interface MascotMarkProps {
4116
4162
  /** Source of the head mark SVG (defaults to /togo-mark.svg). */
4117
4163
  src?: string;
@@ -4123,4 +4169,4 @@ declare namespace MascotMark {
4123
4169
  var displayName: string;
4124
4170
  }
4125
4171
 
4126
- export { type A2UIActionItem, type A2UIActionsData, type A2UIArtifact$1 as A2UIArtifact, type A2UICardData, type A2UICardField, type A2UIChartData, type A2UIChartSeries, type A2UIClientCandidate, type A2UIClientCandidatesData, type A2UIClientDiffConfirmData, type A2UIClientDiffRow, type A2UIClientField, type A2UIClientFieldPickerData, type A2UIKind, type A2UIMarkdownData, type A2UIPersonaStarter, type A2UIPersonaStartersData, type A2UITableColumn, type A2UITableData, type ActivityBucket, AdminLayout, type AdminLayoutProps, type AdminSubNavItem, AgentSteps, type AlertMapItem, type AlertSeverity, type AppBrand, AppHeader, type AppHeaderProps, AppLayout, type AppLayoutProps, type AppNavGroup, type AppNavItem, AppPageShell, type AppPageShellProps, AppSidebar, type AppSidebarProps, type AppearanceMode, ArtifactActions, type ArtifactActionsProps, ArtifactCard, type ArtifactCardProps, ArtifactChart, type ArtifactChartProps, ArtifactClientCandidates, type ArtifactClientCandidatesProps, ArtifactClientDiffConfirm, type ArtifactClientDiffConfirmProps, ArtifactClientFieldPicker, type ArtifactClientFieldPickerProps, type ArtifactInteraction, ArtifactMarkdown, type ArtifactMarkdownProps, ArtifactPersonaStarters, type ArtifactPersonaStartersProps, ArtifactRenderer, type ArtifactRendererProps, ArtifactTable, type ArtifactTableProps, ArtifactViewer, AuroraBackground, type AuroraBackgroundProps, AuthCard, type AuthCardBrand, type AuthClient, AuthErrorAlert, AuthFlow, type AuthLayout, AuthStepHeader, type BarPoint, Callout, type CardFilter, CardGrid, type CardGridLabels, ChatThread, CodeBlock, CodeShowcase, type CodeShowcaseProps, type CodeShowcaseTab, ColorPicker, type ColorPickerProps, CommandPalette, ContextualSkeleton, type CopilotClient, type CopilotEvent, CopilotLauncher, CopilotProvider, type CopilotQuickAction, type CopilotRequest, CopilotSelectionTrigger, type CopilotSelectionTriggerProps, DEFAULT_LAYERS, DEFAULT_LEGEND_GROUPS, DEFAULT_REGION_PRESETS, DataState, type DataStateLabels, type DataStateProps, DataTable, type DataTableBulkAction, type DataTableColumnFilter, type DataTableColumnMeta, type DataTableDensity, type DataTableFilterType, type DataTableLanguage, type DataTableProps, type DataTableSelectOption, type DataTableServerCallbacks, type DataTableServerState, type DockPosition, DocsLayout, type DocsLayoutProps, type DocsNavGroup, type DocsNavItem, DocsSidebar, DocsTOC, DynamicIcon, DynamicSection, type DynamicSectionProps, EmptyState, type EmptyStateProps, EntityNetworkGraph, type EntityNetworkGraphProps, type ErrorFilter, ErrorTrackingPage, type ErrorTrackingPageProps, EventMapPanel, type EventMapPanelProps, Eyebrow, type EyebrowProps, FeatureCard, type FeatureCardProps, type FeedbackAttachment, FeedbackButton, type FeedbackButtonProps, FeedbackHub, type FeedbackHubProps, type FeedbackItem, type FeedbackKind, FeedbackWidget, type FeedbackWidgetProps, FilterBar, type FilterBarProps, type FilterChip, ForgotForm, GlassCard, type GlassCardProps, type GraphLink, type GraphNode, IconPicker, type IconPickerProps, type Issue$1 as Issue, type IssueAssignee, type IssueBreadcrumb, IssueDetail, type IssueDetailProps, type IssueLevel, type IssueSort, type IssueTag, IssuesList, type IssuesListProps, LANG_COOKIE_NAME, type LanguageContextValue, LanguageProvider, type LanguageProviderProps, type LegendGroup, type LegendItem, type LegendShapeType, LockScreen, type LockScreenProps, type LockScreenUser, type LogLevel, LoginForm, type LoginResult, Logo, type LogoProps, type LogoTone, type LogoVariant, type LogsFilter, LogsView, type LogsViewProps, MARKER_COLORS, MARKER_LABELS, type MapLayer, MapLayersPanel, type MapLayersPanelProps, MapLegend, type MapLegendProps, type MapMarker$1 as MapMarker, type MapMarkerType, MapPanel, type MapPanelProps, type MapRegionPreset, MapView, type MapViewProps, MarkdownContent, MarkdownEditor, type MarkdownEditorProps, MarkdownRenderer, type MarkdownRendererProps, MarkdownTable, type MarkdownView, MarketplaceCard, type MarketplaceCardProps, MascotMark, type MascotMarkProps, MiniBarChart, MockupWindow, type MockupWindowProps, type ModelOption, MotorFeedbackLauncher, type MotorFeedbackLauncherProps, NestedStepsEditor, type NestedStepsEditorProps, NetworkGraph, type NetworkGraphProps, type NewFeedback, OTPBoxGroup, type OtpResult, PIPELINE_STAGES, PageHeader, type PageHeaderProps, Pager, type PaletteItem, PasswordInput, PasswordLockScreen, type PasswordLockScreenProps, type PasswordLockScreenUser, type PasswordRule, PasswordStrengthMeter, type PickedLocation, PillButton, type PillButtonProps, type PipelineCard, type PipelineLane, type PipelineModel, type PluginActivitySummary, type PluginAppearanceFields, PluginAppearanceSection, type PluginAppearanceSectionProps, PluginCard, type PluginCatalogEntry, type PluginDetailIdentity, PluginDetailLayout, type PluginDetailLayoutProps, type PluginDetailTab, PluginHero, PluginHeroSkeleton, PluginPageHeader, PluginSectionCard, PluginSparkline, type ProfileSession, ProfileView, type ProfileViewProps, type RenderMapContext, ResetForm, type ResolvedIcon, Reveal, type RevealProps, RouteProgress, type RouteProgressProps, STEP_FIELD_REGISTRY, SectionBoard, type SectionBoardProps, SectionHeading, type SectionHeadingProps, type SectionModel, SectionSkeleton, SentraLoading, type ServiceLogRow, ServiceUnavailable, type ServiceUnavailableProps, SessionExpired, type SessionExpiredProps, SeverityChip, type SidebarConversation, type SidebarUser, SourceBadge, type SparklinePoint, type StackFrame, type StackFrameContextLine, StatCard, type StatCardProps, type StatTile, StatsRow, StatusBadge, type StatusBadgeProps, type StatusBadgeTone, type Step, type StepFieldDef, type StepFieldType, type StepMetrics7d, StepOptionsDialog, type StepOptionsDialogProps, StreamingMessage, type TerminalStep, type TestRunCallbacks, type TestRunCompletePayload, TestRunPanel, type TestRunPanelProps, type TestRunSavedItem, type TestRunStep, type TocItem, TwoFAForm, TypingTerminal, type TypingTerminalProps, UnifiedCopilotDock, type UnlockCredentials, type Verify2FAResult, type View, ViewToggle, type ViewToggleProps, Wordmark, type WordmarkProps, Workflow, WorkflowEditor, type WorkflowEditorProps, type WorkflowPalette, WorkflowPipeline, type WorkflowPipelineProps, type WorkflowProps, type WorkflowSource, type WorkflowStep, type WorkflowStepLike, WorkflowStepNode, type WorkflowStepNodeProps, type WorkflowView, cn, computeRules, computeScore, feedbackButtonVariants, levelTone, resolveIcon, statValueVariants, statusBadgeVariants, useCopilot, useLanguage, useT };
4172
+ export { type A2UIActionItem, type A2UIActionsData, type A2UIArtifact$1 as A2UIArtifact, type A2UICardData, type A2UICardField, type A2UIChartData, type A2UIChartSeries, type A2UIClientCandidate, type A2UIClientCandidatesData, type A2UIClientDiffConfirmData, type A2UIClientDiffRow, type A2UIClientField, type A2UIClientFieldPickerData, type A2UIKind, type A2UIMarkdownData, type A2UIPersonaStarter, type A2UIPersonaStartersData, type A2UITableColumn, type A2UITableData, type ActivityBucket, AdminLayout, type AdminLayoutProps, type AdminSubNavItem, AgentSteps, type AlertMapItem, type AlertSeverity, type AppBrand, AppHeader, type AppHeaderProps, AppLayout, type AppLayoutProps, type AppNavGroup, type AppNavItem, AppPageShell, type AppPageShellProps, AppSidebar, type AppSidebarProps, type AppearanceMode, ArtifactActions, type ArtifactActionsProps, ArtifactCard, type ArtifactCardProps, ArtifactChart, type ArtifactChartProps, ArtifactClientCandidates, type ArtifactClientCandidatesProps, ArtifactClientDiffConfirm, type ArtifactClientDiffConfirmProps, ArtifactClientFieldPicker, type ArtifactClientFieldPickerProps, type ArtifactInteraction, ArtifactMarkdown, type ArtifactMarkdownProps, ArtifactPersonaStarters, type ArtifactPersonaStartersProps, ArtifactRenderer, type ArtifactRendererProps, ArtifactTable, type ArtifactTableProps, ArtifactViewer, AuroraBackground, type AuroraBackgroundProps, AuthCard, type AuthCardBrand, type AuthClient, AuthErrorAlert, AuthFlow, type AuthLayout, AuthStepHeader, type BarPoint, BrowserFrame, type BrowserFrameProps, Callout, type CardFilter, CardGrid, type CardGridLabels, ChatThread, ClaudeSession, type ClaudeSessionProps, type ClaudeStep, CodeBlock, CodeShowcase, type CodeShowcaseProps, type CodeShowcaseTab, ColorPicker, type ColorPickerProps, CommandPalette, ContextualSkeleton, type CopilotClient, type CopilotEvent, CopilotLauncher, CopilotProvider, type CopilotQuickAction, type CopilotRequest, CopilotSelectionTrigger, type CopilotSelectionTriggerProps, DEFAULT_LAYERS, DEFAULT_LEGEND_GROUPS, DEFAULT_REGION_PRESETS, DataState, type DataStateLabels, type DataStateProps, DataTable, type DataTableBulkAction, type DataTableColumnFilter, type DataTableColumnMeta, type DataTableDensity, type DataTableFilterType, type DataTableLanguage, type DataTableProps, type DataTableSelectOption, type DataTableServerCallbacks, type DataTableServerState, type DockPosition, DocsLayout, type DocsLayoutProps, type DocsNavGroup, type DocsNavItem, DocsSidebar, DocsTOC, DynamicIcon, DynamicSection, type DynamicSectionProps, EmptyState, type EmptyStateProps, EntityNetworkGraph, type EntityNetworkGraphProps, type ErrorFilter, ErrorTrackingPage, type ErrorTrackingPageProps, EventMapPanel, type EventMapPanelProps, Eyebrow, type EyebrowProps, FeatureCard, type FeatureCardProps, type FeedbackAttachment, FeedbackButton, type FeedbackButtonProps, FeedbackHub, type FeedbackHubProps, type FeedbackItem, type FeedbackKind, FeedbackWidget, type FeedbackWidgetProps, FilterBar, type FilterBarProps, type FilterChip, ForgotForm, GlassCard, type GlassCardProps, type GraphLink, type GraphNode, IconPicker, type IconPickerProps, type Issue$1 as Issue, type IssueAssignee, type IssueBreadcrumb, IssueDetail, type IssueDetailProps, type IssueLevel, type IssueSort, type IssueTag, IssuesList, type IssuesListProps, LANG_COOKIE_NAME, type LanguageContextValue, LanguageProvider, type LanguageProviderProps, type LegendGroup, type LegendItem, type LegendShapeType, LockScreen, type LockScreenProps, type LockScreenUser, type LogLevel, LoginForm, type LoginResult, Logo, type LogoProps, type LogoTone, type LogoVariant, type LogsFilter, LogsView, type LogsViewProps, MARKER_COLORS, MARKER_LABELS, type MapLayer, MapLayersPanel, type MapLayersPanelProps, MapLegend, type MapLegendProps, type MapMarker$1 as MapMarker, type MapMarkerType, MapPanel, type MapPanelProps, type MapRegionPreset, MapView, type MapViewProps, MarkdownContent, MarkdownEditor, type MarkdownEditorProps, MarkdownRenderer, type MarkdownRendererProps, MarkdownTable, type MarkdownView, MarketplaceCard, type MarketplaceCardProps, MascotMark, type MascotMarkProps, MiniBarChart, MockupWindow, type MockupWindowProps, type ModelOption, MotorFeedbackLauncher, type MotorFeedbackLauncherProps, NestedStepsEditor, type NestedStepsEditorProps, NetworkGraph, type NetworkGraphProps, type NewFeedback, OTPBoxGroup, type OtpResult, PIPELINE_STAGES, PageHeader, type PageHeaderProps, Pager, type PaletteItem, PasswordInput, PasswordLockScreen, type PasswordLockScreenProps, type PasswordLockScreenUser, type PasswordRule, PasswordStrengthMeter, type PickedLocation, PillButton, type PillButtonProps, type PipelineCard, type PipelineLane, type PipelineModel, type PluginActivitySummary, type PluginAppearanceFields, PluginAppearanceSection, type PluginAppearanceSectionProps, PluginCard, type PluginCatalogEntry, type PluginDetailIdentity, PluginDetailLayout, type PluginDetailLayoutProps, type PluginDetailTab, PluginHero, PluginHeroSkeleton, PluginPageHeader, PluginSectionCard, PluginSparkline, type ProfileSession, ProfileView, type ProfileViewProps, type RenderMapContext, ResetForm, type ResolvedIcon, Reveal, type RevealProps, RouteProgress, type RouteProgressProps, STEP_FIELD_REGISTRY, SectionBoard, type SectionBoardProps, SectionHeading, type SectionHeadingProps, type SectionModel, SectionSkeleton, SentraLoading, type ServiceLogRow, ServiceUnavailable, type ServiceUnavailableProps, SessionExpired, type SessionExpiredProps, SeverityChip, type SidebarConversation, type SidebarUser, SourceBadge, type SparklinePoint, type StackFrame, type StackFrameContextLine, StatCard, type StatCardProps, type StatTile, StatsRow, StatusBadge, type StatusBadgeProps, type StatusBadgeTone, type Step, type StepFieldDef, type StepFieldType, type StepMetrics7d, StepOptionsDialog, type StepOptionsDialogProps, StreamingMessage, type TerminalStep, type TestRunCallbacks, type TestRunCompletePayload, TestRunPanel, type TestRunPanelProps, type TestRunSavedItem, type TestRunStep, type TocItem, TwoFAForm, TypingTerminal, type TypingTerminalProps, UnifiedCopilotDock, type UnlockCredentials, type Verify2FAResult, type View, ViewToggle, type ViewToggleProps, Wordmark, type WordmarkProps, Workflow, WorkflowEditor, type WorkflowEditorProps, type WorkflowPalette, WorkflowPipeline, type WorkflowPipelineProps, type WorkflowProps, type WorkflowSource, type WorkflowStep, type WorkflowStepLike, WorkflowStepNode, type WorkflowStepNodeProps, type WorkflowView, cn, computeRules, computeScore, feedbackButtonVariants, levelTone, resolveIcon, statValueVariants, statusBadgeVariants, useCopilot, useLanguage, useT };
package/dist/index.js CHANGED
@@ -16269,6 +16269,7 @@ CommandPalette.displayName = "CommandPalette";
16269
16269
 
16270
16270
  // src/components/marketing/Terminal.tsx
16271
16271
  import * as React32 from "react";
16272
+ import { RotateCcw as RotateCcw3 } from "lucide-react";
16272
16273
  import { jsx as jsx101, jsxs as jsxs89 } from "react/jsx-runtime";
16273
16274
  function fullFrame(steps) {
16274
16275
  const lines = [];
@@ -16284,16 +16285,28 @@ function fullFrame(steps) {
16284
16285
  return { lines, showEnd: true };
16285
16286
  }
16286
16287
  var keepStaticFrame = () => typeof window !== "undefined" && (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches || navigator?.webdriver === true);
16287
- function TypingTerminal({ steps, endSlot, title = "~/myapp \u2014 togo", className, typeMs = 26, lineMs = 110, loop = true }) {
16288
+ function TypingTerminal({ steps, endSlot, title = "~/myapp \u2014 togo", className, typeMs = 26, lineMs = 110, loop = false, height = 360, onComplete }) {
16288
16289
  const [frame, setFrame] = React32.useState(() => fullFrame(steps));
16290
+ const [done, setDone] = React32.useState(false);
16291
+ const [runId, setRunId] = React32.useState(0);
16289
16292
  const scrollRef = React32.useRef(null);
16293
+ const onDone = React32.useRef(onComplete);
16294
+ onDone.current = onComplete;
16290
16295
  React32.useEffect(() => {
16291
- if (keepStaticFrame()) return;
16296
+ if (keepStaticFrame()) {
16297
+ setDone(true);
16298
+ onDone.current?.();
16299
+ return;
16300
+ }
16292
16301
  let alive = true;
16293
16302
  const timers = [];
16294
16303
  const wait = (ms) => new Promise((res) => timers.push(setTimeout(res, ms)));
16304
+ const toBottom = () => {
16305
+ if (scrollRef.current) scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
16306
+ };
16295
16307
  async function run() {
16296
- while (alive) {
16308
+ setDone(false);
16309
+ do {
16297
16310
  const lines = [];
16298
16311
  setFrame({ lines: [], showEnd: false });
16299
16312
  for (let i = 0; i < steps.length && alive; i++) {
@@ -16308,6 +16321,7 @@ function TypingTerminal({ steps, endSlot, title = "~/myapp \u2014 togo", classNa
16308
16321
  ] }, `c${i}`)],
16309
16322
  showEnd: false
16310
16323
  });
16324
+ toBottom();
16311
16325
  await wait(typeMs);
16312
16326
  }
16313
16327
  lines.push(/* @__PURE__ */ jsxs89("div", { className: "whitespace-pre-wrap break-words", children: [
@@ -16318,31 +16332,48 @@ function TypingTerminal({ steps, endSlot, title = "~/myapp \u2014 togo", classNa
16318
16332
  for (let j = 0; j < (s.out?.length || 0) && alive; j++) {
16319
16333
  lines.push(/* @__PURE__ */ jsx101("div", { className: "whitespace-pre-wrap break-words text-muted-foreground", children: s.out[j] }, `o${i}-${j}`));
16320
16334
  setFrame({ lines: [...lines], showEnd: false });
16321
- if (scrollRef.current) scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
16335
+ toBottom();
16322
16336
  await wait(lineMs);
16323
16337
  }
16324
16338
  }
16325
16339
  if (!alive) return;
16326
16340
  setFrame({ lines: [...lines], showEnd: true });
16327
- if (scrollRef.current) scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
16328
- if (!loop) return;
16341
+ toBottom();
16342
+ if (!loop) {
16343
+ setDone(true);
16344
+ onDone.current?.();
16345
+ return;
16346
+ }
16329
16347
  await wait(4200);
16330
- }
16348
+ } while (alive);
16331
16349
  }
16332
16350
  run();
16333
16351
  return () => {
16334
16352
  alive = false;
16335
16353
  timers.forEach(clearTimeout);
16336
16354
  };
16337
- }, [steps, typeMs, lineMs, loop]);
16355
+ }, [steps, typeMs, lineMs, loop, runId]);
16338
16356
  return /* @__PURE__ */ jsxs89("div", { className: cn("rounded-2xl border border-border overflow-hidden bg-[#080b0f] shadow-2xl", className), children: [
16339
16357
  /* @__PURE__ */ jsxs89("div", { className: "flex items-center gap-2 px-4 py-3 border-b border-border", children: [
16340
16358
  /* @__PURE__ */ jsx101("span", { className: "w-3 h-3 rounded-full bg-[#ff5f57]" }),
16341
16359
  /* @__PURE__ */ jsx101("span", { className: "w-3 h-3 rounded-full bg-[#febc2e]" }),
16342
16360
  /* @__PURE__ */ jsx101("span", { className: "w-3 h-3 rounded-full bg-[#28c840]" }),
16343
- /* @__PURE__ */ jsx101("span", { className: "ms-2 font-mono text-xs text-muted-foreground", children: title })
16361
+ /* @__PURE__ */ jsx101("span", { className: "ms-2 font-mono text-xs text-muted-foreground", children: title }),
16362
+ done && !loop && /* @__PURE__ */ jsxs89(
16363
+ "button",
16364
+ {
16365
+ type: "button",
16366
+ onClick: () => setRunId((n) => n + 1),
16367
+ className: "ms-auto inline-flex items-center gap-1.5 rounded-md border border-white/12 bg-white/[0.04] px-2.5 py-1 font-mono text-[11px] text-muted-foreground hover:text-foreground hover:bg-white/[0.08] transition-colors",
16368
+ "aria-label": "Replay the terminal demo",
16369
+ children: [
16370
+ /* @__PURE__ */ jsx101(RotateCcw3, { size: 12 }),
16371
+ " Replay"
16372
+ ]
16373
+ }
16374
+ )
16344
16375
  ] }),
16345
- /* @__PURE__ */ jsxs89("div", { ref: scrollRef, className: "p-5 font-mono text-[12.5px] sm:text-[13px] leading-[1.9] max-h-[340px] overflow-auto", children: [
16376
+ /* @__PURE__ */ jsxs89("div", { ref: scrollRef, className: "p-5 font-mono text-[12.5px] sm:text-[13px] leading-[1.9] overflow-auto", style: { height }, children: [
16346
16377
  frame.lines,
16347
16378
  frame.showEnd && endSlot ? /* @__PURE__ */ jsx101("div", { className: "mt-4 pt-4 border-t border-white/10", children: endSlot }) : null
16348
16379
  ] })
@@ -16350,27 +16381,261 @@ function TypingTerminal({ steps, endSlot, title = "~/myapp \u2014 togo", classNa
16350
16381
  }
16351
16382
  TypingTerminal.displayName = "TypingTerminal";
16352
16383
 
16353
- // src/components/marketing/MascotMark.tsx
16384
+ // src/components/marketing/ClaudeSession.tsx
16385
+ import * as React33 from "react";
16386
+ import { RotateCcw as RotateCcw4, Sparkles as Sparkles13 } from "lucide-react";
16354
16387
  import { jsx as jsx102, jsxs as jsxs90 } from "react/jsx-runtime";
16388
+ var Tool = ({ tool, arg }) => /* @__PURE__ */ jsxs90("div", { className: "whitespace-pre-wrap break-words", children: [
16389
+ /* @__PURE__ */ jsx102("span", { className: "text-[#28c840]", children: "\u23FA " }),
16390
+ /* @__PURE__ */ jsx102("span", { className: "text-foreground font-semibold", children: tool }),
16391
+ /* @__PURE__ */ jsxs90("span", { className: "text-muted-foreground", children: [
16392
+ "(",
16393
+ arg,
16394
+ ")"
16395
+ ] })
16396
+ ] });
16397
+ var Result = ({ text }) => /* @__PURE__ */ jsxs90("div", { className: "whitespace-pre-wrap break-words text-muted-foreground ps-3", children: [
16398
+ /* @__PURE__ */ jsx102("span", { className: "text-muted-foreground/60", children: "\u23BF " }),
16399
+ text
16400
+ ] });
16401
+ var User4 = ({ text }) => /* @__PURE__ */ jsxs90("div", { className: "whitespace-pre-wrap break-words", children: [
16402
+ /* @__PURE__ */ jsx102("span", { className: "text-[#5CDDEC]", children: "> " }),
16403
+ /* @__PURE__ */ jsx102("span", { className: "text-foreground", children: text })
16404
+ ] });
16405
+ var Assistant = ({ text }) => /* @__PURE__ */ jsxs90("div", { className: "whitespace-pre-wrap break-words text-foreground/80", children: [
16406
+ /* @__PURE__ */ jsx102("span", { className: "text-[var(--togo-cyan,#5CDDEC)]", children: "\u273B " }),
16407
+ text
16408
+ ] });
16409
+ function fullFrame2(steps) {
16410
+ const out = [];
16411
+ steps.forEach((s, i) => {
16412
+ if (s.kind === "user") out.push(/* @__PURE__ */ jsx102(User4, { text: s.text }, `u${i}`));
16413
+ else if (s.kind === "assistant") out.push(/* @__PURE__ */ jsx102(Assistant, { text: s.text }, `a${i}`));
16414
+ else {
16415
+ out.push(/* @__PURE__ */ jsx102(Tool, { tool: s.tool, arg: s.arg }, `t${i}`));
16416
+ if (s.result) out.push(/* @__PURE__ */ jsx102(Result, { text: s.result }, `r${i}`));
16417
+ }
16418
+ });
16419
+ return out;
16420
+ }
16421
+ var keepStaticFrame2 = () => typeof window !== "undefined" && (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches || navigator?.webdriver === true);
16422
+ function ClaudeSession({ steps, endSlot, title = "\u273B Claude Code \u2014 togo", className, typeMs = 22, lineMs = 320, loop = false, height = 360, onComplete }) {
16423
+ const [lines, setLines] = React33.useState(() => fullFrame2(steps));
16424
+ const [showEnd, setShowEnd] = React33.useState(true);
16425
+ const [done, setDone] = React33.useState(false);
16426
+ const [runId, setRunId] = React33.useState(0);
16427
+ const scrollRef = React33.useRef(null);
16428
+ const onDone = React33.useRef(onComplete);
16429
+ onDone.current = onComplete;
16430
+ React33.useEffect(() => {
16431
+ if (keepStaticFrame2()) {
16432
+ setDone(true);
16433
+ onDone.current?.();
16434
+ return;
16435
+ }
16436
+ let alive = true;
16437
+ const timers = [];
16438
+ const wait = (ms) => new Promise((res) => timers.push(setTimeout(res, ms)));
16439
+ const toBottom = () => {
16440
+ if (scrollRef.current) scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
16441
+ };
16442
+ async function run() {
16443
+ setDone(false);
16444
+ setShowEnd(false);
16445
+ do {
16446
+ const acc = [];
16447
+ setLines([]);
16448
+ for (let i = 0; i < steps.length && alive; i++) {
16449
+ const s = steps[i];
16450
+ if (s.kind === "user") {
16451
+ for (let c = 1; c <= s.text.length && alive; c++) {
16452
+ setLines([...acc, /* @__PURE__ */ jsxs90("div", { className: "whitespace-pre-wrap break-words", children: [
16453
+ /* @__PURE__ */ jsx102("span", { className: "text-[#5CDDEC]", children: "> " }),
16454
+ /* @__PURE__ */ jsx102("span", { className: "text-foreground", children: s.text.slice(0, c) }),
16455
+ /* @__PURE__ */ jsx102("span", { className: "ml-0.5 inline-block w-2 -mb-0.5 h-4 bg-[#5CDDEC] animate-pulse" })
16456
+ ] }, `u${i}`)]);
16457
+ toBottom();
16458
+ await wait(typeMs);
16459
+ }
16460
+ acc.push(/* @__PURE__ */ jsx102(User4, { text: s.text }, `u${i}`));
16461
+ await wait(420);
16462
+ } else if (s.kind === "assistant") {
16463
+ acc.push(/* @__PURE__ */ jsx102(Assistant, { text: s.text }, `a${i}`));
16464
+ setLines([...acc]);
16465
+ toBottom();
16466
+ await wait(lineMs);
16467
+ } else {
16468
+ acc.push(/* @__PURE__ */ jsx102(Tool, { tool: s.tool, arg: s.arg }, `t${i}`));
16469
+ setLines([...acc]);
16470
+ toBottom();
16471
+ await wait(Math.round(lineMs * 0.7));
16472
+ if (s.result) {
16473
+ acc.push(/* @__PURE__ */ jsx102(Result, { text: s.result }, `r${i}`));
16474
+ setLines([...acc]);
16475
+ toBottom();
16476
+ await wait(lineMs);
16477
+ }
16478
+ }
16479
+ }
16480
+ if (!alive) return;
16481
+ setLines([...acc]);
16482
+ setShowEnd(true);
16483
+ setDone(true);
16484
+ toBottom();
16485
+ onDone.current?.();
16486
+ if (!loop) return;
16487
+ await wait(4200);
16488
+ } while (alive);
16489
+ }
16490
+ run();
16491
+ return () => {
16492
+ alive = false;
16493
+ timers.forEach(clearTimeout);
16494
+ };
16495
+ }, [steps, typeMs, lineMs, loop, runId]);
16496
+ return /* @__PURE__ */ jsxs90("div", { className: cn("rounded-2xl border border-border overflow-hidden bg-[#080b0f] shadow-2xl", className), children: [
16497
+ /* @__PURE__ */ jsxs90("div", { className: "flex items-center gap-2 px-4 py-3 border-b border-border", children: [
16498
+ /* @__PURE__ */ jsx102(Sparkles13, { size: 13, className: "text-[var(--togo-cyan,#5CDDEC)]" }),
16499
+ /* @__PURE__ */ jsx102("span", { className: "font-mono text-xs text-muted-foreground", children: title }),
16500
+ done && !loop && /* @__PURE__ */ jsxs90(
16501
+ "button",
16502
+ {
16503
+ type: "button",
16504
+ onClick: () => setRunId((n) => n + 1),
16505
+ className: "ms-auto inline-flex items-center gap-1.5 rounded-md border border-white/12 bg-white/[0.04] px-2.5 py-1 font-mono text-[11px] text-muted-foreground hover:text-foreground hover:bg-white/[0.08] transition-colors",
16506
+ "aria-label": "Replay the Claude Code session",
16507
+ children: [
16508
+ /* @__PURE__ */ jsx102(RotateCcw4, { size: 12 }),
16509
+ " Replay"
16510
+ ]
16511
+ }
16512
+ )
16513
+ ] }),
16514
+ /* @__PURE__ */ jsxs90("div", { ref: scrollRef, className: "p-5 font-mono text-[12.5px] sm:text-[13px] leading-[1.9] overflow-auto", style: { height }, children: [
16515
+ lines,
16516
+ showEnd && endSlot ? /* @__PURE__ */ jsx102("div", { className: "mt-4 pt-4 border-t border-white/10", children: endSlot }) : null
16517
+ ] })
16518
+ ] });
16519
+ }
16520
+ ClaudeSession.displayName = "ClaudeSession";
16521
+
16522
+ // src/components/marketing/BrowserFrame.tsx
16523
+ import { Lock as Lock4 } from "lucide-react";
16524
+ import { jsx as jsx103, jsxs as jsxs91 } from "react/jsx-runtime";
16525
+ function BrowserFrame({ url = "localhost:8080", children, className }) {
16526
+ return /* @__PURE__ */ jsxs91("div", { className: cn("rounded-2xl border border-border overflow-hidden bg-[#0b0f13] shadow-2xl", className), children: [
16527
+ /* @__PURE__ */ jsxs91("div", { className: "flex items-center gap-2 px-3 py-2.5 border-b border-border bg-white/[0.03]", children: [
16528
+ /* @__PURE__ */ jsx103("span", { className: "w-3 h-3 rounded-full bg-[#ff5f57]" }),
16529
+ /* @__PURE__ */ jsx103("span", { className: "w-3 h-3 rounded-full bg-[#febc2e]" }),
16530
+ /* @__PURE__ */ jsx103("span", { className: "w-3 h-3 rounded-full bg-[#28c840]" }),
16531
+ /* @__PURE__ */ jsxs91("div", { className: "ms-2 flex flex-1 items-center gap-1.5 rounded-md bg-black/30 px-2.5 py-1 min-w-0", children: [
16532
+ /* @__PURE__ */ jsx103(Lock4, { size: 11, className: "text-muted-foreground shrink-0" }),
16533
+ /* @__PURE__ */ jsx103("span", { className: "truncate font-mono text-[11px] text-muted-foreground", children: url })
16534
+ ] })
16535
+ ] }),
16536
+ /* @__PURE__ */ jsx103("div", { children })
16537
+ ] });
16538
+ }
16539
+ BrowserFrame.displayName = "BrowserFrame";
16540
+
16541
+ // src/components/marketing/MascotMark.tsx
16542
+ import * as React34 from "react";
16543
+ import { jsx as jsx104, jsxs as jsxs92 } from "react/jsx-runtime";
16544
+ var EYES = [
16545
+ { x: 0.405, y: 0.45 },
16546
+ { x: 0.595, y: 0.45 }
16547
+ ];
16548
+ var EYE_W = 0.085;
16549
+ var PUPIL_RATIO = 0.52;
16550
+ var MAX_OFF = (1 - PUPIL_RATIO) / 2 * 100;
16355
16551
  var KEYFRAMES = `
16356
16552
  @keyframes tgMascotFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
16357
- @keyframes tgMascotChar {
16358
- 0%,100% { transform: rotate(0deg) scaleX(1) scaleY(1); }
16359
- 44% { transform: rotate(0deg) scaleX(1) scaleY(1); }
16360
- 48% { transform: rotate(-3deg) scaleX(1.04) scaleY(0.92); } /* squash nod */
16361
- 52% { transform: rotate(-3deg) scaleX(0.98) scaleY(1.05); } /* stretch */
16362
- 60% { transform: rotate(3deg) scaleX(1) scaleY(1); }
16363
- 72% { transform: rotate(0deg) scaleX(1) scaleY(1); }
16364
- }
16365
16553
  .tg-mascot { will-change: transform; animation: tgMascotFloat 6s ease-in-out infinite; }
16366
- .tg-mascot > img { display:block; width:100%; height:100%; transform-origin: 50% 70%; animation: tgMascotChar 5.5s ease-in-out infinite; }
16367
- @media (prefers-reduced-motion: reduce) {
16368
- .tg-mascot, .tg-mascot > img { animation: none !important; }
16369
- }`;
16554
+ @media (prefers-reduced-motion: reduce) { .tg-mascot { animation: none !important; } }`;
16370
16555
  function MascotMark({ src = "/togo-mark.svg", alt = "ToGO", className }) {
16371
- return /* @__PURE__ */ jsxs90("div", { className: cn("tg-mascot", className), children: [
16372
- /* @__PURE__ */ jsx102("style", { children: KEYFRAMES }),
16373
- /* @__PURE__ */ jsx102("img", { src, alt, draggable: false })
16556
+ const ref = React34.useRef(null);
16557
+ const [active, setActive] = React34.useState(false);
16558
+ const [look, setLook] = React34.useState({ dx: 0, dy: 0 });
16559
+ React34.useEffect(() => {
16560
+ if (typeof window === "undefined" || !window.matchMedia) return;
16561
+ if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
16562
+ if (!window.matchMedia("(hover: hover) and (pointer: fine)").matches) return;
16563
+ setActive(true);
16564
+ let raf = 0;
16565
+ const onMove = (e) => {
16566
+ const el = ref.current;
16567
+ if (!el) return;
16568
+ const r = el.getBoundingClientRect();
16569
+ const cx = r.left + r.width / 2;
16570
+ const cy = r.top + r.height * 0.45;
16571
+ const dx = Math.max(-1, Math.min(1, (e.clientX - cx) / (r.width * 0.85)));
16572
+ const dy = Math.max(-1, Math.min(1, (e.clientY - cy) / (r.height * 0.85)));
16573
+ cancelAnimationFrame(raf);
16574
+ raf = requestAnimationFrame(() => setLook({ dx, dy }));
16575
+ };
16576
+ const recenter = () => setLook({ dx: 0, dy: 0 });
16577
+ window.addEventListener("pointermove", onMove, { passive: true });
16578
+ window.addEventListener("pointerleave", recenter);
16579
+ document.addEventListener("mouseleave", recenter);
16580
+ return () => {
16581
+ window.removeEventListener("pointermove", onMove);
16582
+ window.removeEventListener("pointerleave", recenter);
16583
+ document.removeEventListener("mouseleave", recenter);
16584
+ cancelAnimationFrame(raf);
16585
+ };
16586
+ }, []);
16587
+ const tilt = active ? look.dx * 4 : 0;
16588
+ return /* @__PURE__ */ jsxs92("div", { ref, className: cn("tg-mascot", className), style: { position: "relative", display: "inline-block" }, children: [
16589
+ /* @__PURE__ */ jsx104("style", { children: KEYFRAMES }),
16590
+ /* @__PURE__ */ jsxs92(
16591
+ "div",
16592
+ {
16593
+ style: {
16594
+ position: "relative",
16595
+ transform: active ? `rotate(${tilt}deg)` : void 0,
16596
+ transformOrigin: "50% 75%",
16597
+ transition: "transform .25s ease-out"
16598
+ },
16599
+ children: [
16600
+ /* @__PURE__ */ jsx104("img", { src, alt, draggable: false, style: { display: "block", width: "100%", height: "100%" } }),
16601
+ active && EYES.map((eye, i) => /* @__PURE__ */ jsx104(
16602
+ "span",
16603
+ {
16604
+ "aria-hidden": "true",
16605
+ style: {
16606
+ position: "absolute",
16607
+ left: `${eye.x * 100}%`,
16608
+ top: `${eye.y * 100}%`,
16609
+ width: `${EYE_W * 100}%`,
16610
+ aspectRatio: "1",
16611
+ transform: "translate(-50%,-50%)",
16612
+ borderRadius: "9999px",
16613
+ background: "rgba(255,255,255,.94)",
16614
+ boxShadow: "inset 0 2px 4px rgba(8,16,40,.28)"
16615
+ },
16616
+ children: /* @__PURE__ */ jsx104(
16617
+ "span",
16618
+ {
16619
+ style: {
16620
+ position: "absolute",
16621
+ left: `${50 + look.dx * MAX_OFF}%`,
16622
+ top: `${50 + look.dy * MAX_OFF}%`,
16623
+ width: `${PUPIL_RATIO * 100}%`,
16624
+ aspectRatio: "1",
16625
+ transform: "translate(-50%,-50%)",
16626
+ borderRadius: "9999px",
16627
+ background: "#0a1733",
16628
+ boxShadow: "inset 1.5px -1.5px 2px rgba(255,255,255,.35)",
16629
+ transition: "left .12s ease-out, top .12s ease-out"
16630
+ }
16631
+ }
16632
+ )
16633
+ },
16634
+ i
16635
+ ))
16636
+ ]
16637
+ }
16638
+ )
16374
16639
  ] });
16375
16640
  }
16376
16641
  MascotMark.displayName = "MascotMark";
@@ -16428,6 +16693,7 @@ export {
16428
16693
  BreadcrumbList,
16429
16694
  BreadcrumbPage,
16430
16695
  BreadcrumbSeparator,
16696
+ BrowserFrame,
16431
16697
  Button,
16432
16698
  Calendar,
16433
16699
  Callout,
@@ -16451,6 +16717,7 @@ export {
16451
16717
  ChartTooltipContent,
16452
16718
  ChatThread_default as ChatThread,
16453
16719
  Checkbox,
16720
+ ClaudeSession,
16454
16721
  CodeBlock,
16455
16722
  CodeShowcase,
16456
16723
  Collapsible,