@uiw/codemirror-extensions-color 4.21.24 → 4.22.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/cjs/index.js +6 -9
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -10,7 +10,6 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
12
|
var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
|
|
13
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
14
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -174,7 +173,6 @@ function colorDecorations(view) {
|
|
|
174
173
|
return _view.Decoration.set(widgets);
|
|
175
174
|
}
|
|
176
175
|
var ColorWidget = /*#__PURE__*/function (_WidgetType) {
|
|
177
|
-
(0, _inherits2["default"])(ColorWidget, _WidgetType);
|
|
178
176
|
function ColorWidget(_ref2) {
|
|
179
177
|
var _this;
|
|
180
178
|
var color = _ref2.color,
|
|
@@ -182,15 +180,16 @@ var ColorWidget = /*#__PURE__*/function (_WidgetType) {
|
|
|
182
180
|
state = (0, _objectWithoutProperties2["default"])(_ref2, _excluded);
|
|
183
181
|
(0, _classCallCheck2["default"])(this, ColorWidget);
|
|
184
182
|
_this = (0, _callSuper2["default"])(this, ColorWidget);
|
|
185
|
-
(0, _defineProperty2["default"])(
|
|
186
|
-
(0, _defineProperty2["default"])(
|
|
187
|
-
(0, _defineProperty2["default"])(
|
|
183
|
+
(0, _defineProperty2["default"])(_this, "state", void 0);
|
|
184
|
+
(0, _defineProperty2["default"])(_this, "color", void 0);
|
|
185
|
+
(0, _defineProperty2["default"])(_this, "colorRaw", void 0);
|
|
188
186
|
_this.state = state;
|
|
189
187
|
_this.color = color;
|
|
190
188
|
_this.colorRaw = colorRaw;
|
|
191
189
|
return _this;
|
|
192
190
|
}
|
|
193
|
-
(0,
|
|
191
|
+
(0, _inherits2["default"])(ColorWidget, _WidgetType);
|
|
192
|
+
return (0, _createClass2["default"])(ColorWidget, [{
|
|
194
193
|
key: "eq",
|
|
195
194
|
value: function eq(other) {
|
|
196
195
|
return other.state.colorType === this.state.colorType && other.color === this.color && other.state.from === this.state.from && other.state.to === this.state.to && other.state.alpha === this.state.alpha;
|
|
@@ -216,7 +215,6 @@ var ColorWidget = /*#__PURE__*/function (_WidgetType) {
|
|
|
216
215
|
return false;
|
|
217
216
|
}
|
|
218
217
|
}]);
|
|
219
|
-
return ColorWidget;
|
|
220
218
|
}(_view.WidgetType);
|
|
221
219
|
var colorView = exports.colorView = function colorView() {
|
|
222
220
|
var showPicker = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
@@ -226,7 +224,7 @@ var colorView = exports.colorView = function colorView() {
|
|
|
226
224
|
(0, _defineProperty2["default"])(this, "decorations", void 0);
|
|
227
225
|
this.decorations = colorDecorations(view);
|
|
228
226
|
}
|
|
229
|
-
(0, _createClass2["default"])(ColorView, [{
|
|
227
|
+
return (0, _createClass2["default"])(ColorView, [{
|
|
230
228
|
key: "update",
|
|
231
229
|
value: function update(_update) {
|
|
232
230
|
if (_update.docChanged || _update.viewportChanged) {
|
|
@@ -250,7 +248,6 @@ var colorView = exports.colorView = function colorView() {
|
|
|
250
248
|
});
|
|
251
249
|
}
|
|
252
250
|
}]);
|
|
253
|
-
return ColorView;
|
|
254
251
|
}(), {
|
|
255
252
|
decorations: function decorations(v) {
|
|
256
253
|
return v.decorations;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uiw/codemirror-extensions-color",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.22.0",
|
|
4
4
|
"description": "Color Extensions for CodeMirror6.",
|
|
5
5
|
"homepage": "https://uiwjs.github.io/react-codemirror/#/extensions/color",
|
|
6
6
|
"funding": "https://jaywcjlove.github.io/#/sponsor",
|