@univerjs/ui 1.4.0 → 1.5.1

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 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
- ## Format painter
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
- The icon-only clear-formatting button below the format painter resets the active domain's
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.156.0/helpers/esm/typeof.js
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.156.0/helpers/esm/toPrimitive.js
17
- function toPrimitive(t, r) {
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 e = t[Symbol.toPrimitive];
20
- if (void 0 !== e) {
21
- var i = e.call(t, r || "default");
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" === r ? String : Number)(t);
25
+ return ("string" === e ? String : Number)(t);
26
26
  }
27
27
 
28
- // \0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js
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.156.0/helpers/esm/defineProperty.js
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.156.0/helpers/esm/decorateParam.js
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.156.0/helpers/esm/decorate.js
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);