@uiw/react-md-editor 4.2.0 → 4.2.2

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.
@@ -13,6 +13,8 @@ export var fullscreen = {
13
13
  width: "12",
14
14
  height: "12",
15
15
  viewBox: "0 0 520 520",
16
+ "aria-hidden": "true",
17
+ focusable: "false",
16
18
  children: /*#__PURE__*/_jsx("path", {
17
19
  fill: "currentColor",
18
20
  d: "M118 171.133334L118 342.200271C118 353.766938 126.675 365.333605 141.133333 365.333605L382.634614 365.333605C394.201281 365.333605 405.767948 356.658605 405.767948 342.200271L405.767948 171.133334C405.767948 159.566667 397.092948 148 382.634614 148L141.133333 148C126.674999 148 117.999999 156.675 118 171.133334zM465.353591 413.444444L370 413.444444 370 471.222222 474.0221 471.222222C500.027624 471.222222 520.254143 451 520.254143 425L520.254143 321 462.464089 321 462.464089 413.444444 465.353591 413.444444zM471.0221 43L367 43 367 100.777778 462.353591 100.777778 462.353591 196.111111 520.143647 196.111111 520.143647 89.2222219C517.254144 63.2222219 497.027624 43 471.0221 43zM57.7900547 100.777778L153.143646 100.777778 153.143646 43 46.2320439 43C20.2265191 43 0 63.2222219 0 89.2222219L0 193.222222 57.7900547 193.222222 57.7900547 100.777778zM57.7900547 321L0 321 0 425C0 451 20.2265191 471.222222 46.2320439 471.222223L150.254143 471.222223 150.254143 413.444445 57.7900547 413.444445 57.7900547 321z"
@@ -89,6 +89,7 @@ export function ToolbarItems(props) {
89
89
  disabled,
90
90
  'data-name': item.name
91
91
  }, item.buttonProps, {
92
+ 'aria-pressed': item.keyCommand === 'fullscreen' ? !!fullscreen : undefined,
92
93
  onClick: evn => {
93
94
  evn.stopPropagation();
94
95
  handleClick(item, item.groupName);
package/esm/index.css CHANGED
@@ -74,6 +74,7 @@
74
74
  .w-md-editor-show-preview .w-md-editor-preview {
75
75
  width: 100%;
76
76
  box-shadow: inset 0 0 0 0;
77
+ position: relative;
77
78
  }
78
79
  .w-md-editor-show-edit .w-md-editor-input {
79
80
  width: 100%;
package/esm/index.less CHANGED
@@ -78,6 +78,8 @@
78
78
  &-show-preview &-preview {
79
79
  width: 100%;
80
80
  box-shadow: inset 0 0 0 0;
81
+ // Keep the preview in the layout when it is the only pane.
82
+ position: relative;
81
83
  }
82
84
  &-show-edit &-input {
83
85
  width: 100%;
@@ -20,6 +20,8 @@ var fullscreen = exports.fullscreen = {
20
20
  width: "12",
21
21
  height: "12",
22
22
  viewBox: "0 0 520 520",
23
+ "aria-hidden": "true",
24
+ focusable: "false",
23
25
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
24
26
  fill: "currentColor",
25
27
  d: "M118 171.133334L118 342.200271C118 353.766938 126.675 365.333605 141.133333 365.333605L382.634614 365.333605C394.201281 365.333605 405.767948 356.658605 405.767948 342.200271L405.767948 171.133334C405.767948 159.566667 397.092948 148 382.634614 148L141.133333 148C126.674999 148 117.999999 156.675 118 171.133334zM465.353591 413.444444L370 413.444444 370 471.222222 474.0221 471.222222C500.027624 471.222222 520.254143 451 520.254143 425L520.254143 321 462.464089 321 462.464089 413.444444 465.353591 413.444444zM471.0221 43L367 43 367 100.777778 462.353591 100.777778 462.353591 196.111111 520.143647 196.111111 520.143647 89.2222219C517.254144 63.2222219 497.027624 43 471.0221 43zM57.7900547 100.777778L153.143646 100.777778 153.143646 43 46.2320439 43C20.2265191 43 0 63.2222219 0 89.2222219L0 193.222222 57.7900547 193.222222 57.7900547 100.777778zM57.7900547 321L0 321 0 425C0 451 20.2265191 471.222222 46.2320439 471.222223L150.254143 471.222223 150.254143 413.444445 57.7900547 413.444445 57.7900547 321z"
@@ -104,6 +104,7 @@ function ToolbarItems(props) {
104
104
  disabled: disabled,
105
105
  'data-name': item.name
106
106
  }, item.buttonProps), {}, {
107
+ 'aria-pressed': item.keyCommand === 'fullscreen' ? !!fullscreen : undefined,
107
108
  onClick: function onClick(evn) {
108
109
  evn.stopPropagation();
109
110
  handleClick(item, item.groupName);
package/lib/index.less CHANGED
@@ -78,6 +78,8 @@
78
78
  &-show-preview &-preview {
79
79
  width: 100%;
80
80
  box-shadow: inset 0 0 0 0;
81
+ // Keep the preview in the layout when it is the only pane.
82
+ position: relative;
81
83
  }
82
84
  &-show-edit &-input {
83
85
  width: 100%;
@@ -326,6 +326,7 @@
326
326
  .w-md-editor-show-preview .w-md-editor-preview {
327
327
  width: 100%;
328
328
  box-shadow: inset 0 0 0 0;
329
+ position: relative;
329
330
  }
330
331
  .w-md-editor-show-edit .w-md-editor-input {
331
332
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uiw/react-md-editor",
3
- "version": "4.2.0",
3
+ "version": "4.2.2",
4
4
  "description": "A markdown editor with preview, implemented with React.js and TypeScript.",
5
5
  "homepage": "https://uiwjs.github.io/react-md-editor/",
6
6
  "funding": "https://jaywcjlove.github.io/#/sponsor",
@@ -9,7 +9,7 @@ export const fullscreen: ICommand = {
9
9
  value: 'fullscreen',
10
10
  buttonProps: { 'aria-label': 'Toggle fullscreen (ctrl + 0)', title: 'Toggle fullscreen (ctrl+ 0)' },
11
11
  icon: (
12
- <svg width="12" height="12" viewBox="0 0 520 520">
12
+ <svg width="12" height="12" viewBox="0 0 520 520" aria-hidden="true" focusable="false">
13
13
  <path
14
14
  fill="currentColor"
15
15
  d="M118 171.133334L118 342.200271C118 353.766938 126.675 365.333605 141.133333 365.333605L382.634614 365.333605C394.201281 365.333605 405.767948 356.658605 405.767948 342.200271L405.767948 171.133334C405.767948 159.566667 397.092948 148 382.634614 148L141.133333 148C126.674999 148 117.999999 156.675 118 171.133334zM465.353591 413.444444L370 413.444444 370 471.222222 474.0221 471.222222C500.027624 471.222222 520.254143 451 520.254143 425L520.254143 321 462.464089 321 462.464089 413.444444 465.353591 413.444444zM471.0221 43L367 43 367 100.777778 462.353591 100.777778 462.353591 196.111111 520.143647 196.111111 520.143647 89.2222219C517.254144 63.2222219 497.027624 43 471.0221 43zM57.7900547 100.777778L153.143646 100.777778 153.143646 43 46.2320439 43C20.2265191 43 0 63.2222219 0 89.2222219L0 193.222222 57.7900547 193.222222 57.7900547 100.777778zM57.7900547 321L0 321 0 425C0 451 20.2265191 471.222222 46.2320439 471.222223L150.254143 471.222223 150.254143 413.444445 57.7900547 413.444445 57.7900547 321z"
@@ -100,6 +100,7 @@ export function ToolbarItems(props: IToolbarProps) {
100
100
  disabled,
101
101
  'data-name': item.name,
102
102
  ...item.buttonProps,
103
+ 'aria-pressed': item.keyCommand === 'fullscreen' ? !!fullscreen : undefined,
103
104
  onClick: (evn: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
104
105
  evn.stopPropagation();
105
106
  handleClick(item, item.groupName);
package/src/index.less CHANGED
@@ -78,6 +78,8 @@
78
78
  &-show-preview &-preview {
79
79
  width: 100%;
80
80
  box-shadow: inset 0 0 0 0;
81
+ // Keep the preview in the layout when it is the only pane.
82
+ position: relative;
81
83
  }
82
84
  &-show-edit &-input {
83
85
  width: 100%;