@univerjs/presets 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +52 -0
  2. package/package.json +12 -12
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # @univerjs/presets
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@univerjs/presets?style=flat-square)](https://npmjs.com/package/@univerjs/presets)
4
+ [![license](https://img.shields.io/npm/l/@univerjs/presets?style=flat-square)](https://npmjs.com/package/@univerjs/presets)
5
+ [![downloads](https://img.shields.io/npm/dm/@univerjs/presets?style=flat-square)](https://npmjs.com/package/@univerjs/presets)
6
+
7
+ `@univerjs/presets` provides `createUniver` to compose plugin presets and return a Univer instance with its Facade API.
8
+
9
+ ## Package Overview
10
+
11
+ | Package | UMD global | CSS | Locales | Facade entry | Worker entry |
12
+ | --- | --- | :---: | :---: | :---: | :---: |
13
+ | `@univerjs/presets` | — | No | No | No | No |
14
+
15
+ ## Installation
16
+
17
+ ```sh
18
+ pnpm add @univerjs/presets
19
+ # or
20
+ npm install @univerjs/presets
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ Install `@univerjs/preset-sheets-core` for this example and provide an HTML element with the ID `app`.
26
+
27
+ ```ts
28
+ import { UniverSheetsCorePreset } from '@univerjs/preset-sheets-core';
29
+ import SheetsCoreEnUS from '@univerjs/preset-sheets-core/locales/en-US';
30
+ import { createUniver, LocaleType } from '@univerjs/presets';
31
+ import '@univerjs/preset-sheets-core/lib/index.css';
32
+
33
+ const { univerAPI } = createUniver({
34
+ locale: LocaleType.EN_US,
35
+ locales: { [LocaleType.EN_US]: SheetsCoreEnUS },
36
+ presets: [UniverSheetsCorePreset({ container: 'app' })],
37
+ });
38
+
39
+ univerAPI.createWorkbook({ name: 'Workbook' });
40
+ ```
41
+
42
+ ## Integration Notes
43
+
44
+ - Install the presets needed by your document type and merge their locale resources for each enabled language.
45
+ - Import styles from the selected presets. This composition package has no stylesheet or independent Facade/Worker subpath.
46
+ - Register each plugin through either a preset or the `plugins` option; do not register the same plugin through both.
47
+
48
+ ## Resources
49
+
50
+ - [Documentation](https://docs.univer.ai/guides/sheets/getting-started/installation)
51
+ - [NPM package](https://npmjs.com/package/@univerjs/presets)
52
+ - [GitHub repository](https://github.com/dream-num/univer)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/presets",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "private": false,
5
5
  "description": "Build Univer apps faster and easier with pre-configured plugin collections.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "lib"
46
46
  ],
47
47
  "dependencies": {
48
- "@univerjs/core": "1.4.0",
49
- "@univerjs/drawing": "1.4.0",
50
- "@univerjs/engine-formula": "1.4.0",
51
- "@univerjs/engine-render": "1.4.0",
52
- "@univerjs/network": "1.4.0",
53
- "@univerjs/protocol": "1.4.0",
54
- "@univerjs/rpc": "1.4.0",
55
- "@univerjs/telemetry": "1.4.0",
56
- "@univerjs/themes": "1.4.0"
48
+ "@univerjs/core": "1.5.0",
49
+ "@univerjs/drawing": "1.5.0",
50
+ "@univerjs/engine-formula": "1.5.0",
51
+ "@univerjs/engine-render": "1.5.0",
52
+ "@univerjs/network": "1.5.0",
53
+ "@univerjs/protocol": "1.5.0",
54
+ "@univerjs/rpc": "1.5.0",
55
+ "@univerjs/telemetry": "1.5.0",
56
+ "@univerjs/themes": "1.5.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@univerjs-infra/shared": "1.4.0",
59
+ "@univerjs-infra/shared": "1.5.0",
60
60
  "@wendellhu/redi": "1.1.3",
61
- "tsrs": "0.20.1-ts7.1.0-beta"
61
+ "tsrs": "0.23.0-ts7.1.0-beta"
62
62
  },
63
63
  "scripts": {
64
64
  "typecheck": "tsrs --noEmit",