@univerjs/ui 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.
- package/README.md +7 -19
- package/lib/cjs/facade.js +11 -11
- package/lib/cjs/index.js +425 -201
- package/lib/es/facade.js +11 -11
- package/lib/es/index.js +419 -200
- package/lib/facade.js +11 -11
- package/lib/index.css +8 -28
- package/lib/index.js +419 -200
- package/lib/types/mobile-plugin.d.ts +1 -1
- package/lib/types/plugin.d.ts +1 -1
- package/lib/types/services/contextmenu/contextmenu-host.service.d.ts +15 -2
- package/lib/types/services/dialog/desktop-dialog.service.d.ts +5 -3
- package/lib/types/services/dialog/mobile-dialog.service.d.ts +2 -1
- package/lib/types/services/dom/canvas-dom-layer.service.d.ts +4 -0
- package/lib/types/services/sidebar/desktop-sidebar.service.d.ts +5 -2
- package/lib/types/utils/use-menu-host.d.ts +17 -0
- package/lib/types/views/object-permission/ObjectPermissionPanel.d.ts +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +19 -19
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
## Package Overview
|
|
10
10
|
|
|
11
|
-
| Package | UMD global | CSS | Locales | Facade entry |
|
|
12
|
-
| --- | --- | :---: | :---: | :---: |
|
|
13
|
-
| `@univerjs/ui` | `UniverUi` | Yes | Yes | Yes |
|
|
11
|
+
| Package | UMD global | CSS | Locales | Facade entry | Worker entry |
|
|
12
|
+
| --- | --- | :---: | :---: | :---: | :---: |
|
|
13
|
+
| `@univerjs/ui` | `UniverUi` | Yes | Yes | Yes | No |
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
|
@@ -20,10 +20,10 @@ pnpm add @univerjs/ui
|
|
|
20
20
|
npm install @univerjs/ui
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Keep all `@univerjs/*` packages on the same version.
|
|
24
|
-
|
|
25
23
|
## Usage
|
|
26
24
|
|
|
25
|
+
Start with the [integration setup](https://docs.univer.ai/) for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.
|
|
26
|
+
|
|
27
27
|
```ts
|
|
28
28
|
import '@univerjs/ui/lib/index.css';
|
|
29
29
|
import EnUS from '@univerjs/ui/locale/en-US';
|
|
@@ -39,21 +39,9 @@ Exported plugin classes:
|
|
|
39
39
|
- `UniverUIPlugin`
|
|
40
40
|
- `UniverMobileUIPlugin`
|
|
41
41
|
|
|
42
|
-
##
|
|
43
|
-
|
|
44
|
-
The desktop Start ribbon has one format painter entry. A single click captures a detached
|
|
45
|
-
format snapshot for one application; a double click keeps it active until Escape or another
|
|
46
|
-
click on the entry. Unsupported targets do not consume the snapshot. The canvas displays a
|
|
47
|
-
brush cursor on supported targets and an unavailable cursor elsewhere.
|
|
48
|
-
|
|
49
|
-
`FormatPainterSessionService` coordinates the local session. Host adapters claim the active
|
|
50
|
-
editing context and apply formatting through their domain commands. A higher-priority shape
|
|
51
|
-
selection prevents a stale cell selection from becoming the source. Changing the focused
|
|
52
|
-
Unit or disposing the source Unit cancels the session. The session itself is not persisted.
|
|
42
|
+
## Integration Notes
|
|
53
43
|
|
|
54
|
-
|
|
55
|
-
formatting without removing content. Clearing cancels an active brush; each domain applies
|
|
56
|
-
the change through its undoable commands.
|
|
44
|
+
- Import `@univerjs/ui/facade` when using this package through Univer Facade APIs.
|
|
57
45
|
|
|
58
46
|
## Resources
|
|
59
47
|
|
package/lib/cjs/facade.js
CHANGED
|
@@ -3,7 +3,7 @@ let _univerjs_core_facade = require("@univerjs/core/facade");
|
|
|
3
3
|
let _univerjs_engine_render = require("@univerjs/engine-render");
|
|
4
4
|
let _univerjs_ui = require("@univerjs/ui");
|
|
5
5
|
|
|
6
|
-
// \0@oxc-project+runtime@0.
|
|
6
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/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) {
|
|
@@ -13,25 +13,25 @@ function _typeof(o) {
|
|
|
13
13
|
}, _typeof(o);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
// \0@oxc-project+runtime@0.
|
|
17
|
-
function toPrimitive(t,
|
|
16
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/toPrimitive.js
|
|
17
|
+
function toPrimitive(t, e) {
|
|
18
18
|
if ("object" != _typeof(t) || !t) return t;
|
|
19
|
-
var
|
|
20
|
-
if (void 0 !==
|
|
21
|
-
var i =
|
|
19
|
+
var r;
|
|
20
|
+
if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) {
|
|
21
|
+
var i = r.call(t, e || "default");
|
|
22
22
|
if ("object" != _typeof(i)) return i;
|
|
23
23
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
24
24
|
}
|
|
25
|
-
return ("string" ===
|
|
25
|
+
return ("string" === e ? String : Number)(t);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
// \0@oxc-project+runtime@0.
|
|
28
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/toPropertyKey.js
|
|
29
29
|
function toPropertyKey(t) {
|
|
30
30
|
var i = toPrimitive(t, "string");
|
|
31
31
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
// \0@oxc-project+runtime@0.
|
|
34
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/defineProperty.js
|
|
35
35
|
function _defineProperty(e, r, t) {
|
|
36
36
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
37
37
|
value: t,
|
|
@@ -41,14 +41,14 @@ function _defineProperty(e, r, t) {
|
|
|
41
41
|
}) : e[r] = t, e;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
// \0@oxc-project+runtime@0.
|
|
44
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/decorateParam.js
|
|
45
45
|
function __decorateParam(paramIndex, decorator) {
|
|
46
46
|
return function(target, key) {
|
|
47
47
|
decorator(target, key, paramIndex);
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
// \0@oxc-project+runtime@0.
|
|
51
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/decorate.js
|
|
52
52
|
function __decorate(decorators, target, key, desc) {
|
|
53
53
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
54
54
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|