contracts/types.ts

file-viewer · packages/core/src/contracts/types.ts · typescript · Apache-2.0
files

Defines core types and i18n keys for the file viewer package.

// Source: https://github.com/flyfish-dev/file-viewer | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works that You
// Provided via justclaw.it.com; keep this notice with the code.
// Shared contracts for the whole core package.
//
// Keep this layer declarative: no DOM reads, renderer imports, or async loading
// should be introduced here. Higher layers depend on these contracts, never the
// other way around.
import type { FileViewerXmlOptions } from './xml'

export type FileViewerSourceKind = 'file' | 'url' | 'buffer' | 'empty'

export type FileViewerThemeMode = 'light' | 'dark' | 'system'

export type FileViewerResolvedThemeMode = Exclude<FileViewerThemeMode, 'system'>

export type FileViewerLocale = 'auto' | 'zh-CN' | 'en-US' | 'ja-JP' | 'de-DE

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key