@univerjs/ui 0.1.1 → 0.1.3
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 +21 -2
- package/lib/cjs/index.js +29 -12
- package/lib/es/index.js +4039 -6500
- package/lib/index.css +1 -1
- package/lib/types/common/component-manager.d.ts +25 -7
- package/lib/types/components/editor/TextEditor.d.ts +15 -3
- package/lib/types/components/hooks/observable.d.ts +3 -0
- package/lib/types/components/range-selector/RangeSelector.d.ts +32 -0
- package/lib/types/controllers/shared-shortcut.controller.d.ts +5 -4
- package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts +2 -2
- package/lib/types/controllers/ui/ui-desktop.controller.d.ts +2 -2
- package/lib/types/index.d.ts +6 -2
- package/lib/types/locale/zh-CN.d.ts +14 -0
- package/lib/types/services/editor/editor.service.d.ts +77 -18
- package/lib/types/services/range-selector/range-selector.service.d.ts +42 -0
- package/lib/types/services/shortcut/keycode.d.ts +9 -6
- package/lib/types/views/hooks/active.d.ts +24 -0
- package/lib/umd/index.js +29 -12
- package/package.json +20 -17
package/README.md
CHANGED
|
@@ -5,12 +5,31 @@
|
|
|
5
5
|
|
|
6
6
|
## Introduction
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
`@univerjs/ui` defines basic UI services and provides a set of desktop Workbench implementations based on React.
|
|
9
9
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
12
|
### Installation
|
|
13
13
|
|
|
14
14
|
```shell
|
|
15
|
-
|
|
15
|
+
# Using npm
|
|
16
|
+
npm install @univerjs/ui
|
|
17
|
+
|
|
18
|
+
# Using pnpm
|
|
19
|
+
pnpm add @univerjs/ui
|
|
16
20
|
```
|
|
21
|
+
|
|
22
|
+
### UI service
|
|
23
|
+
|
|
24
|
+
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.
|
|
25
|
+
|
|
26
|
+
These UI services include:
|
|
27
|
+
|
|
28
|
+
- Menu service, used to register menu items and their associated commands.
|
|
29
|
+
- Shortcut service, for registering keyboard shortcuts and their corresponding commands.
|
|
30
|
+
- Clipboard service, to read from or write to the clipboard.
|
|
31
|
+
- Popup service, which includes confirmations, dialogs, and more.
|
|
32
|
+
|
|
33
|
+
### Workbench
|
|
34
|
+
|
|
35
|
+
In addition to UI services, `@univerjs/ui` also implements a workspace based on React, which includes elements such as the title bar, toolbar, main content area, context menu, sidebar, and more. Businesses can customize the rendered content using the APIs provided by the Workbench.
|