Function components for the files panel.
Used internally by Omni.UI.FilesComponent to render the file list,
file viewer, and panel header. Not imported by use Omni.UI.
Summary
Functions
Renders the directory listing with name, size, and updated columns.
Renders file content, dispatching on the :view assign.
Header bar for the files panel.
Preview/Code toggle for file types that support both views.
Functions
Renders the directory listing with name, size, and updated columns.
Attributes
files(:map) (required)error(:string) - Defaults tonil.target(:any) - Defaults tonil.
Renders file content, dispatching on the :view assign.
View modes: :iframe (HTML, PDF), :markdown (rendered Markdown),
:source (syntax-highlighted text), :media (images), :download
(fallback download link).
Attributes
file(Omni.Tools.Files.Entry) (required)content(:any) - pre-rendered content for :markdown and :source views. Defaults tonil.view(:atom) (required) - one of :iframe, :markdown, :source, :media, :download.token(:string) (required)target(:any) - Defaults tonil.
Header bar for the files panel.
Shows a back arrow when viewing a file, and slots in the source toggle, download link, and close button on the right.
Attributes
file(Omni.Tools.Files.Entry) - Defaults tonil.view_source(:boolean) - Defaults tofalse.token(:string) (required)target(:any) - Defaults tonil.
Preview/Code toggle for file types that support both views.
Attributes
view_source(:boolean) - Defaults tofalse.target(:any) - Defaults tonil.