Socket
Socket
Sign inDemoInstall

@slate-editor/font-size-plugin

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slate-editor/font-size-plugin - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

<a name="5.1.0"></a>
# [5.1.0](https://github.com/nossas/slate-editor/compare/v5.0.0...v5.1.0) (2018-10-25)
### Bug Fixes
* **font-size-plugin:** change strategy to pick up selected font size ([6d47d8a](https://github.com/nossas/slate-editor/commit/6d47d8a))
* **plugins:** change deprecation methods for Selection ([e7166e3](https://github.com/nossas/slate-editor/commit/e7166e3))
<a name="5.0.0"></a>

@@ -8,0 +20,0 @@ # [5.0.0](https://github.com/nossas/slate-editor/compare/v4.0.1...v5.0.0) (2018-05-08)

10

dist/FontSizeInput.js

@@ -36,6 +36,8 @@ 'use strict';

changeState = _ref.changeState,
initialFontSize = _ref.initialFontSize,
fontSizeState = _ref.outerState.fontSize;
initialFontSize = _ref.initialFontSize;
if (!fontSizeState) changeState({ value: value, fontSize: initialFontSize });
var fontSizeDefault = initialFontSize;
if ((0, _FontSizeUtils.hasMark)(value)) {
fontSizeDefault = (0, _FontSizeUtils.getMark)(value).data.get('fontSize');
}

@@ -61,3 +63,3 @@ return _react2.default.createElement('input', {

type: 'number',
value: fontSizeState || initialFontSize,
value: fontSizeDefault,
min: '1'

@@ -64,0 +66,0 @@ });

6

dist/FontSizeUtils.js

@@ -37,5 +37,7 @@ 'use strict';

var value = change.value;
var selection = value.selection;
if (hasMark(value)) {
if (value.isExpanded) {
if (selection.isExpanded) {
// Change outerState to update the input font size number.

@@ -46,3 +48,3 @@ changeState({ fontSize: fontSize });

} else {
if (value.isExpanded) {
if (selection.isExpanded) {
// Change outerState to update the input font size number.

@@ -49,0 +51,0 @@ changeState({ fontSize: fontSize });

@@ -28,6 +28,2 @@ 'use strict';

var _SelectionUpdateInputValue = require('./SelectionUpdateInputValue');
var _SelectionUpdateInputValue2 = _interopRequireDefault(_SelectionUpdateInputValue);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

@@ -49,5 +45,2 @@

// Selection
var FontSizePlugin = function FontSizePlugin(options) {

@@ -64,9 +57,2 @@

return _FontSizeKeyboardShortcut2.default.apply(undefined, _toConsumableArray(args).concat([options]));
},
onSelect: function onSelect() {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
_SelectionUpdateInputValue2.default.apply(undefined, _toConsumableArray(args).concat([options]));
}

@@ -73,0 +59,0 @@ };

{
"name": "@slate-editor/font-size-plugin",
"version": "5.0.0",
"version": "5.1.0",
"description": "SlateJS font size mark plugin.",

@@ -31,3 +31,3 @@ "main": "dist/index.js",

"dependencies": {
"@slate-editor/utils": "^5.0.0",
"@slate-editor/utils": "^5.1.0",
"classnames": "^2.2.5",

@@ -34,0 +34,0 @@ "exenv": "^1.2.1",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc