Documentation
¶
Index ¶
- Constants
- Variables
- func ClassifyPageType(mode ViewMode, view ViewType) string
- func FormatGas(g int64) string
- func FormatRelativeTimeSince(t time.Time) string
- func PathSegments(p string) []string
- func RenderBreadcrumbComponent(w io.Writer, data BreadcrumbData) error
- func SharedPartialsFS() fs.FS
- type AIAction
- type AILink
- type AIMenu
- type AnalyticsData
- type ArticleData
- type BannerData
- type BreadcrumbData
- type BreadcrumbPart
- type CommandData
- type Component
- type DepGraph
- type DirData
- type DirLinkType
- type DocRenderer
- type FileClass
- type FileFetcher
- type FileLink
- type FilesLinks
- type FooterData
- type FooterLink
- type FooterSection
- type FullFileLink
- type FuncEntry
- type HeadData
- type HeaderData
- type HeaderLink
- type HeaderLinks
- type HelpData
- type HelpFunction
- type HelpTocData
- type HelpTocItem
- type ImportLink
- type Importers
- type IndexData
- type IndexerStatus
- type License
- type MapParts
- type OverviewData
- type OverviewInput
- type PackageInfo
- type PackageQuality
- type PackageStats
- type QueryParam
- type RealmData
- type RealmNotice
- type RealmTOCData
- type RedirectData
- type SnippetHighlighter
- type SourceData
- type SourceTocData
- type SourceTocItem
- type StatusData
- type SubpackageLink
- type TemplateComponent
- type TocItem
- type TypeEntry
- type UserContribution
- type UserContributionType
- type UserData
- type UserLink
- type UserLinkType
- type UserRegistration
- type ValueGroup
- type View
- func DirectoryView(pkgPath string, files []string, fileCounter int, linkType DirLinkType, ...) *View
- func ExplorerView(pkgPath string, paths []string, truncated bool, m *MapParts) *View
- func HelpView(data HelpData) *View
- func MarkdownView(content []byte) *View
- func NewTemplateView(typ ViewType, name string, data any) *View
- func OverviewView(data OverviewData) *View
- func RealmView(data RealmData) *View
- func RedirectView(data RedirectData) *View
- func SourceView(data SourceData) *View
- func StatusErrorComponent(message string) *View
- func StatusNoRenderComponent(pkgPath string) *View
- func StatusPendingApprovalComponent(reason string) *View
- func StatusUserNotFoundComponent(name string) *View
- func UserView(data UserData) *View
- type ViewMode
- type ViewType
Constants ¶
const ( OutboundDocs = "docs" OutboundFaucet = "faucet" OutboundStatus = "status" OutboundGitHub = "github" OutboundTwitter = "twitter" OutboundDiscord = "discord" OutboundYouTube = "youtube" OutboundGnoWorld = "gnoworld" OutboundClaude = "claude" OutboundChatGPT = "chatgpt" OutboundGnoMCP = "gnomcp" )
Outbound* labels are emitted as data-outbound on tagged links so the SimpleAnalytics auto-events script fires outbound_<label> events. The set must stay in sync with the enum in frontend/js/analytics.ts and the values documented in SIMPLEANALYTICS.md.
const ( SourceViewType ViewType = "source-view" ReadmeFileName string = "README.md" )
const ( UserContributionTypeRealm = iota UserContributionTypePackage )
const MaxBannerLength = 400
MaxBannerLength is the maximum character length for banner markdown source.
const RedirectViewType = "redirect-view"
Variables ¶
var ReLicenseFileName *regexp.Regexp = regexp.MustCompile(`(?i)^licen[cs]e(.md|.txt)?$`)
Functions ¶
func ClassifyPageType ¶
ClassifyPageType returns the page-type label for a given mode and view. View type takes precedence over mode: a Source view inside a Realm mode is classified as "source", not "realm", so the analytics label matches the rendered surface rather than the containing layout mode.
func FormatGas ¶
FormatGas writes an amount of gas in thousands ("50 k"), millions ("1.9 M", "154 M") or billions ("76.0 bn"), the unit chosen on the rounded value so 999,600 reads 1.0 M, not 1000 k. "bn", not "B", which reads as bytes beside a page's storage sizes.
func FormatRelativeTimeSince ¶
func PathSegments ¶
PathSegments cuts a package path after each slash. A long path then wraps between segments, so an address stays whole on its line where it fits: two lookalike addresses are compared at a glance only when unbroken.
func RenderBreadcrumbComponent ¶
func RenderBreadcrumbComponent(w io.Writer, data BreadcrumbData) error
func SharedPartialsFS ¶
SharedPartialsFS exposes the shared ui/ partials, and only those. Feature packages parse their templates from their own embed and cannot reach this one, so without it they copy the markup: feature/state carried a verbatim mirror of ui/expend_label, pinned by a regression test, for exactly that reason. Narrowed to ui/ so a caller cannot ParseFS views/ and silently redefine renderRealm inside its own set.
Types ¶
type AIAction ¶
AIAction is one prompt, offered to both assistants.
func NewAIFuncAction ¶
NewAIFuncAction returns the "Ask AI" action for one function of the realm or package at pkgPath, or nil when it cannot be linked safely.
type AIMenu ¶
type AIMenu struct {
Context string
Actions []AIAction
// PackageText, on source views, is the same-origin URL of the whole
// package as one text, for pasting into any assistant.
PackageText string
// MCP links to the gnomcp site, which explains how to install it.
MCP AILink
}
AIMenu is the "Ask AI" menu of a realm or package page. Its actions follow the view, so the menu reads differently on the source, the state or the functions of the same package.
type AnalyticsData ¶
type AnalyticsData struct {
Enabled bool
PageType string
// Path is the analytics pageview path (see analyticsPath) rendered as
// data-sa-path; the client reports it to SimpleAnalytics in place of the
// raw pathname.
Path string
ChainId string
AssetsPath string
AssetsVersion string
// Hostname, when non-empty, is rendered as data-hostname on the
// SimpleAnalytics script tag to override the hostname SA reports.
// Set this when the site listens on a host SA would otherwise report
// incorrectly (for example a non-default port in local development).
Hostname string
}
AnalyticsData holds the SimpleAnalytics metadata rendered into the page.
type ArticleData ¶
type BannerData ¶
type BannerData struct {
// contains filtered or unexported fields
}
BannerData holds pre-rendered inline HTML from markdown.
func NewBannerData ¶
func NewBannerData(markdown, globalURL string) (BannerData, error)
NewBannerData parses inline markdown into a BannerData with pre-rendered HTML. Content after the first newline is discarded. Content is truncated to MaxBannerLength runes. If globalURL is non-empty (http/https only), the banner acts as a single clickable link and any inline markdown links are unwrapped to plain text.
func (BannerData) Enabled ¶
func (b BannerData) Enabled() bool
func (BannerData) HasURL ¶
func (b BannerData) HasURL() bool
func (BannerData) URL ¶
func (b BannerData) URL() string
type BreadcrumbData ¶
type BreadcrumbData struct {
Parts []BreadcrumbPart
ArgParts []BreadcrumbPart
Queries []QueryParam
// Namespace is set on /r/<ns>/... and /p/<ns>/... paths, where the first
// segment opens a menu: the listing it used to link, the namespace page,
// and the Counterpart when there is one.
Namespace string
// Counterpart heads that menu with the other side of the project. Nil
// when the other side holds no package.
Counterpart *HeaderLink
}
type BreadcrumbPart ¶
type CommandData ¶
type DepGraph ¶
type DepGraph struct {
// Name is the package's gnoweb path: at the centre of the graph a bare
// "v0" would say nothing.
Name string
Imports []ImportLink
// LookupURL links to the page that computes importers. Set where this
// deployment can compute them but the page does not.
LookupURL string
// Importers is set on the page that computed them.
Importers *Importers
}
DepGraph is the dependency graph around one package (ui/pkg_graph): what it imports, read from the chain, and what imports it, which only an indexer can propose.
type DirData ¶
type DirData struct {
PkgPath string
FileCounter int
FilesLinks FilesLinks
Mode ViewMode
Readme Component
// Truncated is set on a listing that stopped at its cap.
Truncated bool
// Rail is an explorer listing's side rail (ui/listing_rail).
Rail Component
// Map is the listing drawn as a map; nil renders it as a list.
Map Component
}
type DirLinkType ¶
type DirLinkType int
const ( DirLinkTypeSource DirLinkType = iota DirLinkTypeFile )
func (DirLinkType) LinkPrefix ¶
func (d DirLinkType) LinkPrefix(pkgPath string) string
LinkPrefix returns the prefixed link depending on link type
type DocRenderer ¶
type DocRenderer interface {
RenderDocumentation(w io.Writer, src []byte) error
RenderSource(w io.Writer, name string, src []byte) error
}
DocRenderer renders markdown doc strings and source code to HTML. RenderSource applies syntax highlighting based on the file extension in name. Implementations must be safe for concurrent use and HTML-safe by construction.
type FileClass ¶
FileClass holds boolean classification flags for a package file name. IsGno is true for test files too (they end in ".gno").
func ClassifyFile ¶
ClassifyFile categorizes a file name once so callers don't re-implement the suffix checks. ReLicenseFileName is the shared license-name matcher.
type FileFetcher ¶
type FileFetcher interface {
Fetch(ctx context.Context, pkgPath, fileName string, height int64) ([]byte, error)
}
FileFetcher reads a single file from a package. `height = 0` queries the latest block; a positive value pins to that historical height.
type FooterData ¶
type FooterData struct {
}
func EnrichFooterData ¶
func EnrichFooterData(data FooterData) FooterData
type FooterLink ¶
type FooterLink struct {
// data-outbound on the link so SimpleAnalytics fires a named
// outbound_<label> event instead of an anonymous outbound click.
Outbound string
}
type FooterSection ¶
type FooterSection struct {
}
type FullFileLink ¶
FullFileLink represents a package entry in the directory listing.
type FuncEntry ¶
type FuncEntry struct {
Name string
SignatureComponent Component
Doc Component
Receiver string
Crossing bool
IsMethod bool
ActionURL string
AnchorID string
SourceURL string // links to the exact file + line in source view
}
FuncEntry is the view-owned representation of a function or method.
type HeadData ¶
type HeadData struct {
Title string
Description string
Canonical string
// Robots is the content of the robots meta, as the handler decided it.
Robots string
SiteName string
Image string
ImageAlt string
URL string
ChromaPath string
AssetsPath string
AnalyticsHostname string
Remote string
ChainId string
AssetsVersion string
}
type HeaderData ¶
type HeaderData struct {
RealmPath string
// SearchAction is the omnibar form's target. It exists so the bar works
// with JavaScript disabled: the form submits here and the reader gets
// the server-rendered results page. With JavaScript the controller
// intercepts the submit, so this stays the fallback rather than the
// normal path.
SearchAction string
RealmURL weburl.GnoURL
Breadcrumb BreadcrumbData
Links HeaderLinks
ChainId string
Remote string
Mode ViewMode
Static bool
// Origin is the request scheme+host the AI prompts link to.
Origin string
AI *AIMenu
Notice RealmNotice
// Listing is set on a directory listing, whose tabs it carries.
// MapTab is set by a directory listing large enough for a map: it then
// offers its Directory and Map renderings as tabs.
MapTab bool
}
func EnrichHeaderData ¶
func EnrichHeaderData(data HeaderData, mode ViewMode) HeaderData
type HeaderLink ¶
type HeaderLink struct {
Label string
URL string
Icon string
IsActive bool
// Tooltip is shown on hover to explain what the link opens. Empty renders
// no title attribute.
Tooltip string
// Outbound, when set to one of the Outbound* constants, is rendered as
// data-outbound on the link so SimpleAnalytics fires a named
// outbound_<label> event instead of an anonymous outbound click.
Outbound string
// Path is the plain path a menu item shows under its label, where URL
// may carry a tab and an anchor ($source#subpackages).
Path string
}
func StaticHeaderDevLinks ¶
func StaticHeaderDevLinks(u weburl.GnoURL, mode ViewMode, static bool) []HeaderLink
func StaticHeaderGeneralLinks ¶
func StaticHeaderGeneralLinks() []HeaderLink
type HeaderLinks ¶
type HeaderLinks struct {
General []HeaderLink
Dev []HeaderLink
}
type HelpData ¶
type HelpData struct {
// Selected function
SelectedFunc string
SelectedArgs map[string]string
SelectedSend string
RealmName string
Functions []HelpFunction
ChainId string
Remote string
PkgPath string
PkgFullPath string
Doc Component
Domain string
Origin string // request scheme+host; makes help URLs shareable
// Community is set on packages outside the trusted paths, the pages that
// show the realm notice.
Community bool
}
type HelpFunction ¶
HelpFunction pairs a doc.JSONFunc with its documentation already rendered as an HTML Component, so the template can embed it via `{{ render . }}`.
type HelpTocData ¶
type HelpTocData struct {
Icon string
Items []HelpTocItem
}
type HelpTocItem ¶
type ImportLink ¶
type ImportLink struct {
Path string
Kind string // "stdlib" | "package" | "realm" | "external"
Link string
External bool
}
ImportLink is a dependency edge rendered in the Imports section.
func ImportLinks ¶
func ImportLinks(paths []string, domain string) []ImportLink
ImportLinks turns import paths — deduplicated and sorted, as vm/qdoc reports them — into rendered dependency links.
func (ImportLink) PathSegments ¶
func (l ImportLink) PathSegments() []string
PathSegments is Path cut after each slash, for a template to offer a line break there before any inside a segment.
type Importers ¶
type Importers struct {
Links []ImportLink
// Capped says the search stopped at a limit, so there may be more; a
// reload cannot lift it.
Capped bool
// Retry says some candidates could not be read, which a reload may
// complete.
Retry bool
Unavailable string
}
Importers is the "imported by" side of a DepGraph.
type IndexData ¶
type IndexData struct {
HeadData
HeaderData
BodyView *View
Mode ViewMode
Theme string
Banner BannerData
// SearchBase, when set, is the path the reader asked for before an alias
// rewrote it. The header search posts there, as the JavaScript omnibar
// does from window.location: on the home page it searches the chain,
// not the realm the alias renders.
SearchBase string
}
type IndexerStatus ¶
IndexerStatus is the provenance footer of a page showing indexer data (ui/indexer_status). Indexer data is not consensus data, so the reader gets the endpoint and how far it has indexed.
type License ¶
License describes a detected license file. Kind is empty when the file exists but its license type is unknown.
type MapParts ¶
type MapParts struct {
Figure, Key Component
}
MapParts are what a map adds to a listing: the figure in the body, and its key in the rail.
type OverviewData ¶
type OverviewData struct {
PkgPath string
Title string
Synopsis string
PackageDoc Component
Readme Component
Info PackageInfo
Stats PackageStats
Quality PackageQuality
Funcs []FuncEntry
Types []TypeEntry
Consts []ValueGroup
Vars []ValueGroup
Files []FileLink
Subpackages []SubpackageLink
Bugs []string
// SymbolsTruncated is set when funcs/types/values were capped at
// maxOverviewSymbols; the template then shows a "view full source" notice.
SymbolsTruncated bool
// Graph draws the package between what it imports and, when an indexer
// can tell, what imports it.
Graph DepGraph
ComponentTOC Component
}
OverviewData is the full payload passed to the overview template.
func BuildOverview ¶
func BuildOverview(in OverviewInput) OverviewData
BuildOverview is pure: given fetched inputs, it returns the rendered OverviewData.
type OverviewInput ¶
type OverviewInput struct {
URL *weburl.GnoURL
Files []string
Doc *doc.JSONDocumentation
Sources map[string][]byte
Subpaths []string
Readme Component
Domain string
DocRenderer DocRenderer
// DepsURL is the page listing the package's importers, set only when
// this deployment can compute them.
DepsURL string
}
OverviewInput aggregates the data required to build an OverviewData.
type PackageInfo ¶
type PackageInfo struct {
Namespace string
PackagePath string
PackageType string // "realm" | "pure"
License License
GnoVersion string
Creator string // gnomod [addpkg] creator address (on-chain deploys)
Height int // gnomod [addpkg] deploy block height
Draft bool // gnomod draft = not production-ready
Private bool // gnomod private
}
PackageInfo carries identity metadata displayed in the sidebar.
type PackageQuality ¶
PackageQuality exposes boolean presence flags used to render ✓/✗ indicators.
type PackageStats ¶
type PackageStats struct {
FileCount int
GnoFileCount int
TestCount int
FuncCount int
ExportedFunc int
TypeCount int
ConstCount int
VarCount int
ImportCount int
CrossingCount int
}
PackageStats aggregates numeric counters derived from files and qdoc.
type QueryParam ¶
type RealmData ¶
type RealmData struct {
ComponentContent Component
TocItems *RealmTOCData
}
type RealmNotice ¶
type RealmNotice struct {
// Text is shown at every width, unless Short is set.
Text BannerData
// Short, if set, replaces Text below the lg breakpoint.
Short BannerData
}
RealmNotice is the header row shown on pages of community packages.
func NewRealmNotice ¶
func NewRealmNotice(text, short string) (RealmNotice, error)
NewRealmNotice renders text and short as inline markdown, the same way as NewBannerData but without images; short may be empty. Unlike the opt-in banner, a text that shows no visible character is an error, so the notice cannot switch itself off on a typo or be blanked on purpose.
func (RealmNotice) Enabled ¶
func (n RealmNotice) Enabled() bool
Enabled reports whether the page shows the notice: handlers only set a RealmNotice on pages of packages outside the trusted paths.
func (RealmNotice) Lines ¶
func (n RealmNotice) Lines() int
Lines is how many lines the row reserves in the sticky header, 0 when disabled. A notice with a short variant is the default one, whose texts fit one line at every width; any other text is clamped to two.
type RealmTOCData ¶
type RealmTOCData struct {
Items []*TocItem
}
type RedirectData ¶
type RedirectData struct {
To string
Analytics AnalyticsData
}
type SnippetHighlighter ¶
SnippetHighlighter returns template.HTML so the result is treated as already-safe markup by html/template.
type SourceData ¶
type SourceData struct {
PkgPath string
Files []string
FileName string
FileSize string
FileLines int
FileCounter int
FileDownload string
FileSource Component
}
SourceData holds data for rendering a source code view.
func (SourceData) ArticleClasses ¶
func (d SourceData) ArticleClasses() string
ArticleClasses returns the CSS classes based on file type.
func (SourceData) WrappedSource ¶
func (d SourceData) WrappedSource() Component
WrappedSource wraps the rendered file content in an element carrying the copy target. README.md is rendered markdown (not code), so it uses a plain wrapper; every other file uses the code frame. Both expose data-copy-target so the header Copy button has something to read.
type SourceTocData ¶
type SourceTocData struct {
Icon string
ReadmeFile SourceTocItem
LicenseFile SourceTocItem
GnoFiles []SourceTocItem
GnoTestFiles []SourceTocItem
TomlFiles []SourceTocItem
}
type SourceTocItem ¶
SourceTocItem represents an item in the source view table of contents.
type StatusData ¶
StatusData holds the dynamic fields for the "status" template
type SubpackageLink ¶
SubpackageLink is a direct child package rendered in the Subdirectories section.
type TemplateComponent ¶
type TemplateComponent struct {
// contains filtered or unexported fields
}
type TocItem ¶
type TocItem struct {
Title string
ID string
// Icon is an optional sprite id suffix (e.g. "kind-func") rendered as a
// leading kind glyph. Empty means no glyph — realm/action/source TOCs leave
// it unset, so only the package overview surfaces icons.
Icon string
// Link points off the current page, e.g. at a file in the source view. When
// it is empty the item anchors to its own ID.
Link string
Items []*TocItem
}
TocItem represents a table of contents item for the components package.
type TypeEntry ¶
type TypeEntry struct {
Name string
SignatureComponent Component
Doc Component
Kind string
Methods []FuncEntry
AnchorID string
SourceURL string
}
TypeEntry is the view-owned representation of a type declaration.
type UserContribution ¶
type UserContributionType ¶
type UserContributionType int
func (UserContributionType) String ¶
func (typ UserContributionType) String() string
type UserData ¶
type UserData struct {
// Username is the name the page is titled by, empty when the namespace is
// an address with no name behind it: the page is then titled by Address.
Username string
// Namespace is the namespace whose home realm the page links to: the
// name's, the address's when only it has one, or the full address when no
// name resolves. Links use this, never Username, which may be elided.
Namespace string
// HomeLabel is Namespace as the home button prints it, shortened when it
// is an address, so it differs from Username whenever Namespace is one.
HomeLabel string
// Address is the full bech32 address, empty when none could be resolved.
Address string
// CurrentName is the name Username now resolves to, set only when it is
// another one: Username is then an old name, and Address its new owner's.
CurrentName string
// Registration is what the registry answered, which an empty Username
// cannot tell apart: no user, or no answer.
Registration UserRegistration
Bio string
Teams []struct{}
Links []UserLink
Contributions []UserContribution
PackageCount int
RealmCount int
PureCount int
Content Component
}
UserData contains data for the user view
func (UserData) Unregistered ¶
Unregistered reports whether the registry answered that nobody holds Address, the only case the page may say so.
type UserLink ¶
type UserLink struct {
Type UserLinkType
URL string
Title string
}
type UserLinkType ¶
type UserLinkType string
const ( UserLinkTypeGithub UserLinkType = "github" UserLinkTypeTwitter UserLinkType = "twitter" UserLinkTypeDiscord UserLinkType = "discord" UserLinkTypeTelegram UserLinkType = "telegram" UserLinkTypeLink UserLinkType = "link" )
type UserRegistration ¶
type UserRegistration int
UserRegistration is what the user registry answered about the page's address. Only an answer says the address is unregistered: a lookup that failed, or a chain with no registry to ask, knows nothing either way.
const ( // UserRegistrationUnknown is the zero value: the registry gave no answer. UserRegistrationUnknown UserRegistration = iota // UserRegistrationNone is the registry answering that nobody holds it. UserRegistrationNone // UserRegistrationRegistered is the registry naming the user behind it. UserRegistrationRegistered )
type ValueGroup ¶
type ValueGroup struct {
Kind string // "const" | "var"
Names string
SignatureComponent Component
Doc Component
AnchorID string
SourceURL string
}
ValueGroup is a const/var declaration group preserving source order.
type View ¶
type View struct {
Type ViewType
// SkipTargetInBody marks views that render their rail before the content
// and so carry #main-content themselves, past the rail; <main> carries it
// otherwise. Set by the constructor that picks the template.
SkipTargetInBody bool
Component
}
View represents a UI component with a type and underlying component.
func DirectoryView ¶
func DirectoryView(pkgPath string, files []string, fileCounter int, linkType DirLinkType, mode ViewMode, readme ...Component) *View
DirectoryView creates a directory view
func ExplorerView ¶
ExplorerView renders the package paths under pkgPath, as a list, or as a map when m is set: one page, one header and one rail for both renderings. truncated says the node stopped at its cap, which the view then states rather than letting the listing pass for complete.
func MarkdownView ¶
MarkdownView returns a View that renders the given content as-is. The handler layer recognizes this view type and serves it with a text/markdown Content-Type, bypassing IndexLayout. The view reads content without copying it, so the caller must not mutate the slice until the view is rendered.
func NewTemplateView ¶
NewTemplateView creates a new View with a template component and data.
func OverviewView ¶
func OverviewView(data OverviewData) *View
OverviewView constructs a new overview View from pre-built data.
func RedirectView ¶
func RedirectView(data RedirectData) *View
func SourceView ¶
func SourceView(data SourceData) *View
SourceView creates a new View for displaying source code and its table of contents.
func StatusErrorComponent ¶
StatusErrorComponent returns a view for error scenarios with a message.
func StatusNoRenderComponent ¶
func StatusPendingApprovalComponent ¶
StatusNoRenderComponent returns a view for non-error notifications when Render() is not implemented. StatusPendingApprovalComponent is shown for a package that was submitted but has not been approved yet.
Distinct from the not-found status on purpose. Under the "inert" code submission policy those two look identical from every other query -- the package is stored, but nothing that reads the live key space can see it -- and telling a creator who has already paid to submit that their path does not exist is the confusing half of that.
func StatusUserNotFoundComponent ¶
StatusUserNotFoundComponent is the 404 of a /u/ page. It names the user that was asked for when name is one that could be registered; otherwise, as for a segment that is no name at all, it says so without echoing it.
type ViewMode ¶
type ViewMode int
ViewMode represents the current view mode of the application It affects the layout, navigation, and display of content
func (ViewMode) ShouldShowDevTools ¶
ShouldShowDevTools returns whether dev tools should be shown for this mode
func (ViewMode) ShouldShowGeneralLinks ¶
ShouldShowGeneralLinks returns whether general navigation links should be shown
type ViewType ¶
type ViewType string
ViewType represents the type of a view component.
const DepsViewType ViewType = "deps-view"
DepsViewType identifies feature/chainmap's dependencies page, so layout_index.go gives it the dev chrome of the Source pages it extends without importing the feature, which already imports components.
const DirectoryViewType ViewType = "dir-view"
const HelpViewType ViewType = "help-view"
const MarkdownViewType ViewType = "markdown-view"
MarkdownViewType marks a View whose content is raw markdown, to be served verbatim as text/markdown without the HTML page layout.
const OverviewViewType ViewType = "overview-view"
const RealmViewType ViewType = "realm-view"
const StateViewType ViewType = "state-view"
StateViewType identifies the state-explorer body view so layout_index.go can branch on it (is-dev-mode chrome) without importing feature/state, which would create a cycle: feature/state already imports components.
The canonical Kind* constants and OID helpers (TruncOID, ShortenOID) live in feature/state — components is no longer in that path.
const StatusViewType ViewType = "status-view"
const UserViewType ViewType = "user-view"
Source Files
¶
- ai_links.go
- analytics.go
- component.go
- dep_graph.go
- fetchers.go
- gas.go
- indexer_status.go
- layout_footer.go
- layout_header.go
- layout_index.go
- overview_build.go
- overview_files.go
- overview_imports.go
- overview_license.go
- overview_symbols.go
- state_view_type.go
- template.go
- ui_breadcrumb.go
- view.go
- view_action.go
- view_directory.go
- view_markdown.go
- view_overview.go
- view_realm.go
- view_redirect.go
- view_source.go
- view_status.go
- view_user.go