@plait/mind 0.12.1 → 0.13.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/mind",
3
- "version": "0.12.1",
3
+ "version": "0.13.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.2.2",
6
6
  "@angular/core": "^15.2.2"
@@ -1,3 +1,6 @@
1
1
  import { PlaitBoard } from '@plait/core';
2
2
  export declare const withMindHotkey: (board: PlaitBoard) => PlaitBoard;
3
- export declare const isExpandHotkey: (keyboardEvent: KeyboardEvent) => boolean;
3
+ export declare const isExpandHotkey: (event: KeyboardEvent) => boolean;
4
+ export declare const isTabHotkey: (event: KeyboardEvent) => boolean;
5
+ export declare const isEnterHotkey: (event: KeyboardEvent) => boolean;
6
+ export declare const isSpaceHotkey: (event: KeyboardEvent) => boolean;
@@ -2,44 +2,46 @@
2
2
 
3
3
  $primary: #4e8afa;
4
4
 
5
- g[plait-mindmap='true'] {
6
- .root {
7
- .text {
8
- font-family: PingFangSC-Medium, 'PingFang SC';
9
- font-weight: 400;
5
+ .plait-board-container {
6
+ // The font family under SAFARI affects the measurement of the text size,
7
+ // so specify the default font family to avoid unexpected text breaks in different scene
8
+ font-family: PingFangSC-Regular, 'PingFang SC';
9
+ g[plait-mindmap='true'] {
10
+ .root {
11
+ .text {
12
+ font-family: PingFangSC-Medium, 'PingFang SC';
13
+ font-weight: 400;
14
+ }
10
15
  }
11
- }
12
- .branch {
13
- .text {
14
- font-family: PingFangSC-Medium, 'PingFang SC';
16
+ .branch {
17
+ .text {
18
+ font-family: PingFangSC-Medium, 'PingFang SC';
19
+ }
15
20
  }
16
- }
17
- .slate-editable-container {
18
- cursor: default;
19
- min-width: 5px;
20
- &[contenteditable='true'] {
21
- cursor: text;
22
- max-width: 34em;
21
+ .slate-editable-container {
22
+ cursor: default;
23
+ min-width: 5px;
24
+ &.editing {
25
+ cursor: text;
26
+ max-width: 34em;
27
+ }
23
28
  }
24
- }
25
-
26
- .extend {
27
- opacity: 0;
28
- cursor: default;
29
- }
30
29
 
31
- .collapsed {
32
30
  .extend {
33
- opacity: 1;
31
+ opacity: 0;
32
+ cursor: default;
34
33
  }
35
- }
36
34
 
37
- .dragging-node {
38
- opacity: 0.6;
39
- }
40
- }
35
+ .collapsed {
36
+ .extend {
37
+ opacity: 1;
38
+ }
39
+ }
41
40
 
42
- .plait-board-container {
41
+ .dragging-node {
42
+ opacity: 0.6;
43
+ }
44
+ }
43
45
  &.focused:not(.selection-moving):not(.element-moving):not(.abstract-resizing-horizontal):not(.abstract-resizing-vertical):not(.pointer-mind):not(.mind-node-dragging) {
44
46
  .extend {
45
47
  cursor: pointer;
@@ -110,9 +112,11 @@ g[plait-mindmap='true'] {
110
112
  &.dragging {
111
113
  cursor: pointer;
112
114
  opacity: 0.6;
113
- .plait-richtext-container {
114
- opacity: 0.6;
115
- }
115
+ // Compact: Safari
116
+ // Opacity property will cause text position warning
117
+ // .plait-richtext-container {
118
+ // opacity: 0.6;
119
+ // }
116
120
  }
117
121
  }
118
122