The artifact version to display
OptionalcssOptional: Additional CSS classes to apply
Click-to-toggle display mode. 'fit' = contained in the panel, 'actual' = 1:1 with scroll.
User-facing error message; non-empty hides the image and shows the error block.
OptionalheightOptional: Custom height for the viewer (defaults to auto)
Current resolved URL to bind to the <img src> — either a data URI (inline) or a pre-auth URL (file).
Set while the download is in flight, to drive the toolbar spinner.
True from ngOnInit until the <img> (load) event fires (or an error happens).
Native image dimensions, populated by the (load) event. Null until then.
OptionalnavigationOptional: Emitted when the plugin wants to navigate to a different app/nav item. Plugins that need app-level navigation (e.g., "Open Query" navigating to the Data Explorer's Queries nav item) should instantiate this emitter and emit a NavigationRequest. The event bubbles up through the artifact viewer chain to the host application where NavigationService handles the actual navigation.
If specified, this provider will be used for communication and for all metadata purposes. By default, if not provided, the Metadata and RunView classes are used for this and the default GraphQLDataProvider is used which is connected to the same back-end MJAPI instance as the Metadata and RunView classes. If you want to have this component connect to a different MJAPI back-end, create an instance of a ProviderBase sub-class like GraphQLDataProvider/etc, and configure it as appropriate to connect to the MJAPI back-end you want to use, and then pass it in here.
Optional: Whether the viewer is in readonly mode
OptionaltabsOptional: Emitted when the plugin's additional tabs change after async loading. Plugins that load data asynchronously (e.g., from a component registry) should emit this when loading completes and new tabs become available. The parent panel listens for this to re-run change detection and render the updated tab list.
StaticɵdirStaticɵfacStatic ReadonlyPreviewInline-preview component for image artifacts (IArtifactViewerPluginPreviewStatics).
STATIC so the resolver can read it off the registered constructor WITHOUT instantiating this
Angular component. Surfaces a contained thumbnail inside conversation message cards; the full
viewer (this class) remains the required componentType.
Opt in to the wrapper's "Display" tab — without this the panel only shows Details/JSON.
Accessible alt text — prefers a descriptive name over a raw filename.
Whether this plugin is showing an "elevated" display (e.g., extracted markdown/HTML) vs raw content. When true and content type is JSON, the wrapper will show a JSON tab.
Subclasses should override this getter to return the appropriate value based on their current display state. For example, JSON plugin returns true when showing displayMarkdown or displayHtml, false when showing raw JSON editor.
Default: false (showing raw content)
Whether the parent wrapper should show a raw content tab (e.g., JSON tab for JSON content). This gives plugins fine-grained control over the parent's tab display.
Use cases:
Subclasses can override this to control parent behavior. Default: true (parent should show raw content tab if applicable)
Returns either the default Metadata provider or the one specified in the Provider property, if it was specified
Returns either the default RunQuery provider or the one specified in the Provider property, if it was specified
Returns either the default RunReport provider or the one specified in the Provider property, if it was specified
Returns either the default RunView provider or the one specified in the Provider property, if it was specified
Whether this plugin supports user feedback. Plugins that return true will get a feedback button in the artifact viewer header. Override this getter to return true when feedback is available.
Default: false
Filename surfaced by the toolbar in the center of the bar.
Ask the user for feedback on the current artifact. Called by the artifact viewer panel when the user clicks the feedback button in the header. Each plugin implements its own feedback UX (dialog, panel, inline form, etc.).
Default: no-op. Subclasses should override to implement artifact-type-specific feedback.
OptionalGetGet additional tabs that this plugin wants to provide to the artifact viewer. Override this method to provide custom tabs for viewing metadata, code, etc.
Array of tab definitions, or undefined if no additional tabs
ProtectedgetGet the content from the artifact version. Handles both string content and JSON objects.
Required by the base class. Returns a structured summary of the artifact in its current display state — used by snapshot-consuming features (e.g. agent context capture, share / export flows).
ProtectedgetGet the description
ProtectedgetGet a safe display name for the artifact version
ProtectedgetGet a display-friendly title for the artifact. Returns null if no name is available.
ProtectedgetGet the raw text content from the artifact version. Returns null if no content is available.
OptionalGetGet list of standard tabs that this plugin wants to hide/remove. Use this when the plugin provides custom alternatives to standard tabs.
Example: Component viewer provides custom "Resolved JSON" tab, so removes standard "JSON" tab
Array of standard tab names to remove (case-insensitive) Valid values: 'JSON', 'Details', 'Links' Note: 'Display' cannot be removed (it's the main view)
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.
Download the image to disk. Uses the inherited triggerBrowserDownload
helper so the fetch → blob → object-URL → anchor pattern is shared across
every file-backed viewer (PDF, XLSX, DOCX, and now Image).
Open the image in a new browser tab so the user can use the browser's
native print dialog. We deliberately don't manage a print pipeline
ourselves — same approach as PdfArtifactViewerComponent.onPrint().
ProtectedparseProtectedtriggerTrigger a browser file download from a URL. Shared by all file-backed viewer plugins (PDF, XLSX, DOCX) so the fetch → blob → object-URL → anchor pattern lives in exactly one place.
StaticCanMatches raster image artifacts by type name or image/* MIME. STATIC — drives preview resolution.
OptionalcontentType: string
Viewer plugin for raster image artifact versions (
image/png,image/jpeg,image/webp, etc.). Vector SVG is handled bySvgArtifactViewerPlugin.Storage modes both supported (same contract as
PdfArtifactViewerPlugin):ContentMode === 'Text'—artifactVersion.Contentis adata:image/<mime>;base64,…URI. We bind it directly to<img [src]>; the browser decodes inline.ContentMode === 'File'— bytes live in MJStorage. We fetch a pre-authenticated URL viaArtifactFileService.getDownloadUrl()and bind that to<img [src]>.UX highlights:
object-fit: containinside the panel) ↔ actual size (1:1 pixels, scrolls within the panel body).triggerBrowserDownload) and Print (opens in a new tab so the browser's native print dialog handles it).naturalWidth × naturalHeight).Design tokens are used for every color so the plugin adapts to light / dark themes — see root
CLAUDE.md"Design Token System".See