@univerjs/core

GitHubEdit on GitHub

Core runtime, data models, command system, dependency injection, and Facade APIs for Univer.

import { Univer } from '@univerjs/core'

const univer = new Univer(IUniverConfig)

IUniverConfig

import type { Theme } from '@univerjs/themes'
import type { Dependency, IDisposable } from './common/di'
import type { UnitModel } from './common/unit'
import type { LogLevel } from './services/log/log.service'
import type { DependencyOverride } from './services/plugin/plugin-override'
import type { Plugin, PluginCtor } from './services/plugin/plugin.service'
import type { ILocales } from './shared'
import type { LocaleType } from './types/enum/locale-type'

export interface IUniverConfig {
  /**
   * The theme of the Univer instance, default using the default theme.
   */
  theme?: Theme

  /**
   * Whether to use dark mode.
   * @default false
   */
  darkMode?: boolean

  /**
   * The locale of the Univer instance.
   */
  locale?: LocaleType

  /**
   * The direction of the Univer instance.
   * @default 'ltr'
   */
  direction?: 'ltr' | 'rtl'

  /**
   * The locales to be used
   */
  locales?: ILocales

  /**
   * The log level of the Univer instance.
   */
  logLevel?: LogLevel

  /**
   * Whether to enable logging for command execution.
   * @default false
   */
  logCommandExecution?: boolean

  /**
   * The override dependencies of the Univer instance.
   */
  override?: DependencyOverride
}

Table of Contents

Capalyze