@univerjs/ui 0.21.1 → 0.22.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.
- package/README.md +29 -32
- package/lib/cjs/facade.js +6 -6
- package/lib/cjs/index.js +207 -203
- package/lib/es/facade.js +6 -6
- package/lib/es/index.js +207 -203
- package/lib/facade.js +6 -6
- package/lib/index.js +207 -203
- package/lib/umd/index.js +22 -22
- package/package.json +16 -12
package/README.md
CHANGED
|
@@ -1,50 +1,47 @@
|
|
|
1
1
|
# @univerjs/ui
|
|
2
2
|
|
|
3
|
+
[](https://npmjs.com/package/@univerjs/ui)
|
|
4
|
+
[](https://npmjs.com/package/@univerjs/ui)
|
|
5
|
+
[](https://npmjs.com/package/@univerjs/ui)
|
|
6
|
+
|
|
7
|
+
`@univerjs/ui` provides Univer's shared application UI framework, workbench services, menu infrastructure, dialogs, clipboard services, and Facade UI APIs.
|
|
8
|
+
|
|
3
9
|
## Package Overview
|
|
4
10
|
|
|
5
|
-
| Package
|
|
6
|
-
| --- | --- |
|
|
7
|
-
| `@univerjs/ui` | `
|
|
11
|
+
| Package | UMD global | CSS | Locales | Facade entry |
|
|
12
|
+
| --- | --- | :---: | :---: | :---: |
|
|
13
|
+
| `@univerjs/ui` | `UniverUi` | Yes | Yes | Yes |
|
|
8
14
|
|
|
9
|
-
##
|
|
15
|
+
## Installation
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
```sh
|
|
18
|
+
pnpm add @univerjs/ui
|
|
19
|
+
# or
|
|
20
|
+
npm install @univerjs/ui
|
|
21
|
+
```
|
|
12
22
|
|
|
13
|
-
|
|
14
|
-
into a rich text document, or a mind node, you should implement a new UI plugin for that. Refer to our uniui
|
|
15
|
-
plugin for an example.
|
|
23
|
+
Keep all `@univerjs/*` packages on the same version.
|
|
16
24
|
|
|
17
25
|
## Usage
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
```ts
|
|
28
|
+
import '@univerjs/ui/lib/index.css';
|
|
29
|
+
import EnUS from '@univerjs/ui/locale/en-US';
|
|
30
|
+
import { UniverUIPlugin } from '@univerjs/ui';
|
|
20
31
|
|
|
21
|
-
|
|
22
|
-
# Using npm
|
|
23
|
-
npm install @univerjs/ui
|
|
32
|
+
univer.registerPlugin(UniverUIPlugin);
|
|
24
33
|
|
|
25
|
-
|
|
26
|
-
pnpm add @univerjs/ui
|
|
34
|
+
// Merge EnUS into your Univer locale map when this package contributes UI text.
|
|
27
35
|
```
|
|
28
36
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### UI service
|
|
32
|
-
|
|
33
|
-
UI services define a set of user interface services that run on the client side but are agnostic to the specific host environment (such as desktop browsers, mobile webviews, etc.). By injecting these services, business functionalities can invoke the same interfaces across different hosts without worrying about host disparities.
|
|
34
|
-
|
|
35
|
-
These UI services include:
|
|
37
|
+
Exported plugin classes:
|
|
36
38
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
- Clipboard service, to read from or write to the clipboard.
|
|
40
|
-
- Popup service, which includes confirmations, dialogs, and more.
|
|
39
|
+
- `UniverUIPlugin`
|
|
40
|
+
- `UniverMobileUIPlugin`
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
## Resources
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
- [Documentation](https://docs.univer.ai)
|
|
45
|
+
- [NPM package](https://npmjs.com/package/@univerjs/ui)
|
|
46
|
+
- [GitHub repository](https://github.com/dream-num/univer)
|
|
45
47
|
|
|
46
|
-
<!-- Links -->
|
|
47
|
-
[npm-version-shield]: https://img.shields.io/npm/v/@univerjs/ui?style=flat-square
|
|
48
|
-
[npm-version-link]: https://npmjs.com/package/@univerjs/ui
|
|
49
|
-
[npm-license-shield]: https://img.shields.io/npm/l/@univerjs/ui?style=flat-square
|
|
50
|
-
[npm-downloads-shield]: https://img.shields.io/npm/dm/@univerjs/ui?style=flat-square
|
package/lib/cjs/facade.js
CHANGED
|
@@ -3,7 +3,7 @@ let _univerjs_engine_render = require("@univerjs/engine-render");
|
|
|
3
3
|
let _univerjs_ui = require("@univerjs/ui");
|
|
4
4
|
let _univerjs_core = require("@univerjs/core");
|
|
5
5
|
|
|
6
|
-
//#region \0@oxc-project+runtime@0.
|
|
6
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
|
|
7
7
|
function _typeof(o) {
|
|
8
8
|
"@babel/helpers - typeof";
|
|
9
9
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -14,7 +14,7 @@ function _typeof(o) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
//#endregion
|
|
17
|
-
//#region \0@oxc-project+runtime@0.
|
|
17
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
|
|
18
18
|
function toPrimitive(t, r) {
|
|
19
19
|
if ("object" != _typeof(t) || !t) return t;
|
|
20
20
|
var e = t[Symbol.toPrimitive];
|
|
@@ -27,14 +27,14 @@ function toPrimitive(t, r) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
//#endregion
|
|
30
|
-
//#region \0@oxc-project+runtime@0.
|
|
30
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
|
|
31
31
|
function toPropertyKey(t) {
|
|
32
32
|
var i = toPrimitive(t, "string");
|
|
33
33
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
|
-
//#region \0@oxc-project+runtime@0.
|
|
37
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
|
|
38
38
|
function _defineProperty(e, r, t) {
|
|
39
39
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
40
40
|
value: t,
|
|
@@ -45,7 +45,7 @@ function _defineProperty(e, r, t) {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
|
-
//#region \0@oxc-project+runtime@0.
|
|
48
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/decorateParam.js
|
|
49
49
|
function __decorateParam(paramIndex, decorator) {
|
|
50
50
|
return function(target, key) {
|
|
51
51
|
decorator(target, key, paramIndex);
|
|
@@ -53,7 +53,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
//#endregion
|
|
56
|
-
//#region \0@oxc-project+runtime@0.
|
|
56
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/decorate.js
|
|
57
57
|
function __decorate(decorators, target, key, desc) {
|
|
58
58
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
59
59
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|