API Reference
TerminalStory
Models a deterministic, script-free animated terminal presentation.
Inheritance
- Object
- TerminalStory
Usage
Explore 58 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 25
- Property VisualStoryTerminalSurface.Terminal
- Method TerminalStory.Blank
- Method TerminalStory.Command
- Method TerminalStory.Create
- Method TerminalStory.DeclareTab
- Method TerminalStory.OpenTab
- Method TerminalStory.Output
- Method TerminalStory.Pause
- Method TerminalStory.Progress
- Method TerminalStory.SelectTab
- Method TerminalStory.Table
- Method TerminalStory.Transcript
- Method TerminalStory.WithDialect
- Method TerminalStory.WithFinalPrompt
- Method TerminalStory.WithInitialTab
- Method TerminalStory.WithPlaybackSpeed
- Method TerminalStory.WithPngOutputScale
- Method TerminalStory.WithTabHold
- Method TerminalStory.WithTheme
- Method TerminalStory.WithTiming
- Method TerminalStory.WithTitle
- Method TerminalStory.WithTypography
- Method TerminalStory.WithWidth
- Method TerminalStory.WithWindowStyle
- Method TerminalStory.WithWorkingDirectory
Accepted by parameters 33
- Method StoryArtifactExtensions.ToVisualArtifact
- Constructor VisualStoryTerminalSurface.VisualStoryTerminalSurface
- Method HtmlTerminalStoryRenderer.RenderFragment
- Method HtmlTerminalStoryRenderer.RenderPage
- Method PngTerminalStoryRenderer.Render
- Method SvgTerminalStoryRenderer.Render
- Extension method TerminalStory.SaveApng
- Extension method TerminalStory.SaveGif
- Extension method TerminalStory.SaveHtml
- Extension method TerminalStory.SavePng
- Extension method TerminalStory.SaveSvg
- Extension method TerminalStory.SaveTranscript
- Extension method TerminalStory.ToApng
- Extension method TerminalStory.ToGif
- Extension method TerminalStory.ToHtmlFragment
- Extension method TerminalStory.ToHtmlPage
- Extension method TerminalStory.ToPng
- Extension method TerminalStory.ToSvg
- Extension method TerminalStory.ToTranscript
- Extension method TerminalStory.ToVisualArtifact
- Method TerminalStoryExtensions.SaveApng
- Method TerminalStoryExtensions.SaveGif
- Method TerminalStoryExtensions.SaveHtml
- Method TerminalStoryExtensions.SavePng
- Method TerminalStoryExtensions.SaveSvg
- Method TerminalStoryExtensions.SaveTranscript
- Method TerminalStoryExtensions.ToApng
- Method TerminalStoryExtensions.ToGif
- Method TerminalStoryExtensions.ToHtmlFragment
- Method TerminalStoryExtensions.ToHtmlPage
- Method TerminalStoryExtensions.ToPng
- Method TerminalStoryExtensions.ToSvg
- Method TerminalStoryExtensions.ToTranscript
Methods
public TerminalStory Command(String command, Double durationSeconds = 0) #TerminalStoryAdds a typed command.
Parameters
- command System.String
- durationSeconds System.Double = 0
public TerminalStory DeclareTab(String id, String title, TerminalDialect dialect, String workingDirectory, TerminalTheme theme, TerminalTabIcon icon = Terminal, String? customPrompt = null) #TerminalStoryDeclares a persistent terminal tab without changing the active tab.
Parameters
- id System.String
- title System.String
- dialect ChartForgeX.Terminal.TerminalDialect
- workingDirectory System.String
- theme ChartForgeX.Terminal.TerminalTheme
- icon ChartForgeX.Terminal.TerminalTabIcon = Terminal
- customPrompt System.String? = null
public TerminalStory OpenTab(String id, String title, TerminalDialect dialect, String workingDirectory, TerminalTheme theme, TerminalTabIcon icon = Terminal, String? customPrompt = null, Double transitionSeconds = 0.2) #TerminalStoryDeclares and activates a persistent terminal tab.
Parameters
- id System.String
- title System.String
- dialect ChartForgeX.Terminal.TerminalDialect
- workingDirectory System.String
- theme ChartForgeX.Terminal.TerminalTheme
- icon ChartForgeX.Terminal.TerminalTabIcon = Terminal
- customPrompt System.String? = null
- transitionSeconds System.Double = 0.2
public TerminalStory Output(String text, TerminalTextTone tone = Default) #TerminalStoryAdds one or more output lines.
Parameters
- text System.String
- tone ChartForgeX.Terminal.TerminalTextTone = Default
public TerminalStory Pause(Double seconds) #TerminalStoryAdds a silent pause to the animation timeline.
Parameters
- seconds System.Double
public TerminalStory Progress(String label, Double fraction, Int32 width = 22) #TerminalStoryAdds a compact text progress bar.
Parameters
- label System.String
- fraction System.Double
- width System.Int32 = 22
public TerminalStory SelectTab(String id, Double transitionSeconds = 0.2) #TerminalStoryActivates a previously declared terminal tab without clearing its buffer.
Parameters
- id System.String
- transitionSeconds System.Double = 0.2
public TerminalStory Table(TerminalTable table) #TerminalStoryAdds a formatted terminal table.
Parameters
- table ChartForgeX.Terminal.TerminalTable
public TerminalStory Transcript(IEnumerable<String> lines, TerminalTextTone tone = Default) #TerminalStoryAdds captured transcript lines.
Parameters
- lines System.Collections.Generic.IEnumerable<System.String>
- tone ChartForgeX.Terminal.TerminalTextTone = Default
public TerminalStory WithDialect(TerminalDialect dialect, String? customPrompt = null) #TerminalStorySets the prompt dialect and optional custom prompt.
Parameters
- dialect ChartForgeX.Terminal.TerminalDialect
- customPrompt System.String? = null
public TerminalStory WithFinalPrompt(Boolean visible = true) #TerminalStoryConfigures whether the completed story shows a final prompt.
Parameters
- visible System.Boolean = true
public TerminalStory WithInitialTab(String id, String title, TerminalDialect dialect, String workingDirectory, TerminalTheme theme, TerminalTabIcon icon = Terminal, String? customPrompt = null) #TerminalStoryDefines the initial persistent terminal tab before timeline authoring begins.
Parameters
- id System.String
- title System.String
- dialect ChartForgeX.Terminal.TerminalDialect
- workingDirectory System.String
- theme ChartForgeX.Terminal.TerminalTheme
- icon ChartForgeX.Terminal.TerminalTabIcon = Terminal
- customPrompt System.String? = null
public TerminalStory WithPlaybackSpeed(TerminalStoryPlaybackSpeed speed) #TerminalStoryApplies a reusable playback pace for typing, output reveals, and tab reading time.
Parameters
- speed ChartForgeX.Terminal.TerminalStoryPlaybackSpeed
public TerminalStory WithPngOutputScale(Int32 scale) #TerminalStorySets the PNG output density multiplier.
Parameters
- scale System.Int32
public TerminalStory WithTabHold(Double seconds) #TerminalStorySets the minimum reading time after new content appears and before the active tab changes.
Parameters
- seconds System.Double
public TerminalStory WithTheme(TerminalTheme theme) #TerminalStorySets the terminal theme.
Parameters
- theme ChartForgeX.Terminal.TerminalTheme
public TerminalStory WithTiming(Double initialDelaySeconds, Double charactersPerSecond, Double lineDelaySeconds) #TerminalStorySets automatic animation timing.
Parameters
- initialDelaySeconds System.Double
- charactersPerSecond System.Double
- lineDelaySeconds System.Double
public TerminalStory WithTitle(String title) #TerminalStorySets the terminal title.
Parameters
- title System.String
public TerminalStory WithTypography(Double fontSize, Double lineHeight) #TerminalStorySets terminal typography.
Parameters
- fontSize System.Double
- lineHeight System.Double
public TerminalStory WithWidth(Int32 width) #TerminalStorySets the logical SVG width.
Parameters
- width System.Int32
public TerminalStory WithWindowStyle(TerminalWindowStyle style) #TerminalStorySets the visible terminal window chrome independently of colors and command syntax.
Parameters
- style ChartForgeX.Terminal.TerminalWindowStyle
public TerminalStory WithWorkingDirectory(String workingDirectory) #TerminalStorySets the working directory used by shell prompts.
Parameters
- workingDirectory System.String
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public IReadOnlyList<TerminalStoryStep> Steps { get; } #Gets the configured steps.
public IReadOnlyList<TerminalTab> Tabs { get; } #Gets the persistent terminal tabs in display order.
public String ActiveTabId { get; } #Gets the tab that will be active when the completed story is shown.
public TerminalTheme Theme { get; } #Gets the terminal theme.
public TerminalWindowStyle WindowStyle { get; private set; } #Gets the visible terminal window chrome.
public String Title { get; } #Gets the title-bar text.
public String WorkingDirectory { get; } #Gets the working directory shown in prompts.
public TerminalDialect Dialect { get; } #Gets the prompt dialect.
public String CustomPrompt { get; } #Gets the explicit custom prompt, when configured.
public Int32 Width { get; private set; } #Gets the logical SVG width.
public Double FontSize { get; private set; } #Gets the terminal font size.
public Double LineHeight { get; private set; } #Gets the terminal line height.
public Double InitialDelaySeconds { get; private set; } #Gets the initial animation delay.
public Double CharactersPerSecond { get; private set; } #Gets the simulated typing speed.
public Double LineDelaySeconds { get; private set; } #Gets the delay between output lines.
public Double TabHoldSeconds { get; private set; } #Gets the minimum time completed tab content remains visible before the next tab switch.
public Boolean ShowFinalPrompt { get; private set; } #Gets whether a final prompt and cursor are shown.
public Int32 PngOutputScale { get; private set; } #Gets the PNG output scale.
Extension Methods
public static Void SaveApng(TerminalStory story, String path, TerminalStoryAnimationOptions? options = null) #VoidSaves a terminal story as an animated PNG.
Parameters
- story ChartForgeX.Terminal.TerminalStory
- path System.String
- options ChartForgeX.Terminal.TerminalStoryAnimationOptions? = null
public static Void SaveGif(TerminalStory story, String path, TerminalStoryAnimationOptions? options = null) #VoidSaves a terminal story as an animated GIF.
Parameters
- story ChartForgeX.Terminal.TerminalStory
- path System.String
- options ChartForgeX.Terminal.TerminalStoryAnimationOptions? = null
public static Void SaveHtml(TerminalStory story, String path) #VoidSaves a terminal story as a complete HTML document.
Parameters
- story ChartForgeX.Terminal.TerminalStory
- path System.String
public static Void SavePng(TerminalStory story, String path) #VoidSaves the completed state of a terminal story as PNG.
Parameters
- story ChartForgeX.Terminal.TerminalStory
- path System.String
public static Void SaveSvg(TerminalStory story, String path) #VoidSaves a terminal story as SVG.
Parameters
- story ChartForgeX.Terminal.TerminalStory
- path System.String
public static Void SaveTranscript(TerminalStory story, String path) #VoidSaves the exact terminal transcript as UTF-8 text.
Parameters
- story ChartForgeX.Terminal.TerminalStory
- path System.String
public static Byte[] ToApng(TerminalStory story, TerminalStoryAnimationOptions? options = null) #Byte[]Renders a terminal story as an animated PNG.
Parameters
- story ChartForgeX.Terminal.TerminalStory
- options ChartForgeX.Terminal.TerminalStoryAnimationOptions? = null
public static Byte[] ToGif(TerminalStory story, TerminalStoryAnimationOptions? options = null) #Byte[]Renders a terminal story as an animated GIF.
Parameters
- story ChartForgeX.Terminal.TerminalStory
- options ChartForgeX.Terminal.TerminalStoryAnimationOptions? = null
public static String ToHtmlFragment(TerminalStory story) #StringRenders a terminal story as an embeddable HTML fragment.
Parameters
- story ChartForgeX.Terminal.TerminalStory
public static String ToHtmlFragment(TerminalStory story, String idScope) #StringRenders a terminal story as an embeddable HTML fragment with a deterministic ID scope.
Parameters
- story ChartForgeX.Terminal.TerminalStory
- idScope System.String
public static String ToHtmlPage(TerminalStory story) #StringRenders a terminal story as a complete HTML document.
Parameters
- story ChartForgeX.Terminal.TerminalStory
public static Byte[] ToPng(TerminalStory story) #Byte[]Renders the completed state of a terminal story to PNG bytes.
Parameters
- story ChartForgeX.Terminal.TerminalStory
public static String ToSvg(TerminalStory story) #StringRenders a terminal story to SVG markup.
Parameters
- story ChartForgeX.Terminal.TerminalStory
public static String ToSvg(TerminalStory story, String idScope) #StringRenders a terminal story to SVG markup with a deterministic ID scope.
Parameters
- story ChartForgeX.Terminal.TerminalStory
- idScope System.String
public static String ToTranscript(TerminalStory story) #StringExports the exact command, output and table transcript in playback order.
Parameters
- story ChartForgeX.Terminal.TerminalStory
Exceptions
InvalidOperationException– The expanded transcript exceeds 16 Mi UTF-16 characters.
public static VisualArtifact ToVisualArtifact(TerminalStory story, String? id = null, VisualArtifactSourceLanguage sourceLanguage = Native) #VisualArtifactCaptures the completed terminal display and its command/output transcript.
Parameters
- story ChartForgeX.Terminal.TerminalStory
- id System.String? = null
- sourceLanguage ChartForgeX.VisualArtifacts.VisualArtifactSourceLanguage = Native