@univerjs/core
TypeScript icon, indicating that this package has built-in type declarations

0.1.8 • Public • Published

@univerjs/core

npm version license

Introduction

@univerjs/core as its name shows, is the core package of Univer, and provides foundational capabilities including:

  • Provision of the Univer type, which serves as the entry point for applications and a mounting point for other plugins, as well as the UniverDoc and UniverSheet types for managing different document types
  • Basic models for each document type
  • Definition or implementation of several fundamental services, such as:
    • Permission control
    • Command system
    • Undo/Redo
    • Configuration system
    • Logging system
    • Context system
    • Lifecycle
    • Local storage
    • Internationalization
    • Resource management

For more information about @univerjs/core's API, please refer to the API documentation.

Usage

Installation

# Using npm
npm install @univerjs/core

# Using pnpm
pnpm add @univerjs/core

Configuration

import { Univer } from '@univerjs/core';

new Univer({
    theme: defaultTheme,
    locale: LocaleType.ZH_CN,
    locales,
    logLevel: LogLevel.VERBOSE,
});

Options

Name Type Default Description
theme Theme - The theme of the application, which is used to control the appearance of the application.
locale LocaleType LocaleType.ZH_CN The locale of the application. The default value is LocaleType.ZH_CN.
locales ILocales - The supported locales of the application. By default, the application supports Chinese.
logLevel LogLevel LogLevel.SILENT The log level of the application.

Readme

Keywords

Package Sidebar

Install

npm i @univerjs/core

Homepage

univer.ai

Weekly Downloads

633

Version

0.1.8

License

Apache-2.0

Unpacked Size

877 kB

Total Files

192

Last publish

Collaborators

  • yuhongz
  • wbfsa
  • jikkai
  • wendellhu95
  • mengshukeji