x-star-editor 0.3.2 → 0.3.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.
@@ -34,7 +34,7 @@ import { redoHandler, toggleHandler, undoHandler } from "../utils/handler";
34
34
  import { toHTML, toMarkdown } from "../utils/markdown";
35
35
  import Fade from "./Fade";
36
36
  import FileInput from "./FileInput";
37
- var Button = function Button(_ref) {
37
+ var Item = function Item(_ref) {
38
38
  var _classNames;
39
39
  var children = _ref.children,
40
40
  toolbarRef = _ref.toolbarRef,
@@ -81,9 +81,9 @@ var Button = function Button(_ref) {
81
81
  }
82
82
  }, [popoverMount]);
83
83
  return /*#__PURE__*/React.createElement("div", {
84
- className: classNames("".concat(prefix, "button-container"))
84
+ className: classNames("".concat(prefix, "item-container"))
85
85
  }, /*#__PURE__*/React.createElement("div", {
86
- className: classNames("".concat(prefix, "button"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "disabled"), disabled), _defineProperty(_classNames, "".concat(prefix, "active"), tooltipOpen || popoverMount), _classNames)),
86
+ className: classNames("".concat(prefix, "item"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "disabled"), disabled), _defineProperty(_classNames, "".concat(prefix, "active"), tooltipOpen || popoverMount), _classNames)),
87
87
  onClick: function onClick() {
88
88
  if (!disabled) {
89
89
  setPopoverOpen(true);
@@ -564,7 +564,7 @@ var Toolbar = function Toolbar(_ref9) {
564
564
  tooltip = _ref10.tooltip,
565
565
  _popoverRender = _ref10.popoverRender,
566
566
  _onClick2 = _ref10.onClick;
567
- return /*#__PURE__*/React.createElement(Button, {
567
+ return /*#__PURE__*/React.createElement(Item, {
568
568
  key: index,
569
569
  toolbarRef: toolbarRef,
570
570
  disabled: disabled,
@@ -86,10 +86,10 @@
86
86
  position: relative;
87
87
  color: rgba(0, 0, 0, 0.88);
88
88
  }
89
- .x-star-editor-toolbar .x-star-editor-button-container {
89
+ .x-star-editor-toolbar .x-star-editor-item-container {
90
90
  position: relative;
91
91
  }
92
- .x-star-editor-toolbar .x-star-editor-button-container > .x-star-editor-button {
92
+ .x-star-editor-toolbar .x-star-editor-item-container .x-star-editor-item {
93
93
  width: 2em;
94
94
  height: 2em;
95
95
  display: flex;
@@ -99,20 +99,20 @@
99
99
  cursor: pointer;
100
100
  user-select: none;
101
101
  }
102
- .x-star-editor-toolbar .x-star-editor-button-container > .x-star-editor-button.x-star-editor-disabled::before {
102
+ .x-star-editor-toolbar .x-star-editor-item-container .x-star-editor-item.x-star-editor-disabled::before {
103
103
  content: "";
104
104
  position: absolute;
105
105
  inset: 0;
106
106
  background-color: rgba(230, 247, 255, 0.7);
107
107
  cursor: not-allowed;
108
108
  }
109
- .x-star-editor-toolbar .x-star-editor-button-container > .x-star-editor-button.x-star-editor-active {
109
+ .x-star-editor-toolbar .x-star-editor-item-container .x-star-editor-item.x-star-editor-active {
110
110
  background-color: #cbedfd;
111
111
  }
112
- .x-star-editor-toolbar .x-star-editor-button-container > .x-star-editor-button .x-star-editor-icon {
112
+ .x-star-editor-toolbar .x-star-editor-item-container .x-star-editor-item .x-star-editor-icon {
113
113
  font-size: 1.75em;
114
114
  }
115
- .x-star-editor-toolbar .x-star-editor-button-container .x-star-editor-tooltip {
115
+ .x-star-editor-toolbar .x-star-editor-item-container .x-star-editor-tooltip {
116
116
  position: absolute;
117
117
  top: 3em;
118
118
  width: max-content;
@@ -127,7 +127,7 @@
127
127
  transform: translate(calc(1.25em - 50%));
128
128
  transition: opacity 0.3s;
129
129
  }
130
- .x-star-editor-toolbar .x-star-editor-button-container .x-star-editor-tooltip::before {
130
+ .x-star-editor-toolbar .x-star-editor-item-container .x-star-editor-tooltip::before {
131
131
  content: "";
132
132
  position: absolute;
133
133
  top: -0.3em;
@@ -137,7 +137,7 @@
137
137
  transform-origin: 0 0;
138
138
  transform: rotate(45deg);
139
139
  }
140
- .x-star-editor-toolbar .x-star-editor-button-container .x-star-editor-popover {
140
+ .x-star-editor-toolbar .x-star-editor-item-container .x-star-editor-popover {
141
141
  position: absolute;
142
142
  width: max-content;
143
143
  background-color: #fff;
@@ -148,12 +148,12 @@
148
148
  z-index: 1;
149
149
  transition: opacity 0.3s;
150
150
  }
151
- .x-star-editor-toolbar .x-star-editor-button-container .x-star-editor-popover .x-star-editor-option {
151
+ .x-star-editor-toolbar .x-star-editor-item-container .x-star-editor-popover .x-star-editor-option {
152
152
  padding: 6px 12px;
153
153
  cursor: pointer;
154
154
  user-select: none;
155
155
  }
156
- .x-star-editor-toolbar .x-star-editor-button-container .x-star-editor-popover .x-star-editor-option:hover {
156
+ .x-star-editor-toolbar .x-star-editor-item-container .x-star-editor-popover .x-star-editor-option:hover {
157
157
  background-color: #e6f7ff;
158
158
  }
159
159
  .x-star-editor-toolbar .x-star-editor-divider {
@@ -173,15 +173,15 @@
173
173
  display: flex;
174
174
  flex-wrap: wrap;
175
175
  }
176
- .x-star-editor-editor .x-star-editor-toolbar {
176
+ .x-star-editor-editor > .x-star-editor-toolbar {
177
177
  width: 100%;
178
178
  }
179
- .x-star-editor-editor .x-star-editor-md-editor {
179
+ .x-star-editor-editor > .x-star-editor-md-editor {
180
180
  flex: 1;
181
181
  border-right: none;
182
182
  border-bottom-right-radius: 0;
183
183
  }
184
- .x-star-editor-editor .x-star-editor-md-viewer {
184
+ .x-star-editor-editor > .x-star-editor-md-viewer {
185
185
  padding: 0 1em;
186
186
  flex: 1;
187
187
  background-color: #fff;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-star-editor",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "An editor developed by turingstar",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",