New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@udecode/plate-list-ui

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@udecode/plate-list-ui - npm Package Compare versions

Comparing version 5.3.5 to 6.0.0

2

CHANGELOG.md
# @udecode/plate-list-ui
## 6.0.0
## 5.3.5

@@ -4,0 +6,0 @@

86

dist/index.es.js
import { createStyles } from '@udecode/plate-styled-components';
import _styled from 'styled-components';
import 'react';
import * as React from 'react';
import { setNodes, getPreventDefaultHandler } from '@udecode/plate-common';
import { useEditorRef, useStoreEditorState, useEventEditorId } from '@udecode/plate-core';
import { useReadOnly, ReactEditor } from 'slate-react';
import { jsxs, jsx } from 'react/jsx-runtime';
import { ELEMENT_UL, getListItemEntry, toggleList } from '@udecode/plate-list';

@@ -50,2 +49,20 @@ import { ToolbarElement } from '@udecode/plate-toolbar';

function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function toVal(mix) {

@@ -113,34 +130,30 @@ var k, y, str='';

});
return /*#__PURE__*/jsxs(_StyledDiv, { ...attributes,
...rootProps,
return /*#__PURE__*/React.createElement(_StyledDiv, _extends({}, attributes, rootProps, {
className: clsx(styles.root.className, (_styles$rootChecked = styles.rootChecked) === null || _styles$rootChecked === void 0 ? void 0 : _styles$rootChecked.className, rootProps === null || rootProps === void 0 ? void 0 : rootProps.className),
$_css: styles.root.css,
children: [/*#__PURE__*/jsx(_StyledDiv2, {
contentEditable: false,
className: (_styles$checkboxWrapp = styles.checkboxWrapper) === null || _styles$checkboxWrapp === void 0 ? void 0 : _styles$checkboxWrapp.className,
$_css2: (_styles$checkboxWrapp2 = styles.checkboxWrapper) === null || _styles$checkboxWrapp2 === void 0 ? void 0 : _styles$checkboxWrapp2.css,
children: /*#__PURE__*/jsx(_StyledInput, {
"data-testid": "TodoListElementCheckbox",
className: (_styles$checkbox = styles.checkbox) === null || _styles$checkbox === void 0 ? void 0 : _styles$checkbox.className,
type: "checkbox",
checked: !!checked,
onChange: e => {
const path = ReactEditor.findPath(editor, element);
setNodes(editor, {
checked: e.target.checked
}, {
at: path
});
},
...nodeProps,
$_css3: (_styles$checkbox2 = styles.checkbox) === null || _styles$checkbox2 === void 0 ? void 0 : _styles$checkbox2.css
})
}), /*#__PURE__*/jsx(_StyledSpan, {
className: (_styles$text = styles.text) === null || _styles$text === void 0 ? void 0 : _styles$text.className,
contentEditable: !readOnly,
suppressContentEditableWarning: true,
$_css4: (_styles$text2 = styles.text) === null || _styles$text2 === void 0 ? void 0 : _styles$text2.css,
children: children
})]
});
$_css: styles.root.css
}), /*#__PURE__*/React.createElement(_StyledDiv2, {
contentEditable: false,
className: (_styles$checkboxWrapp = styles.checkboxWrapper) === null || _styles$checkboxWrapp === void 0 ? void 0 : _styles$checkboxWrapp.className,
$_css2: (_styles$checkboxWrapp2 = styles.checkboxWrapper) === null || _styles$checkboxWrapp2 === void 0 ? void 0 : _styles$checkboxWrapp2.css
}, /*#__PURE__*/React.createElement(_StyledInput, _extends({
"data-testid": "TodoListElementCheckbox",
className: (_styles$checkbox = styles.checkbox) === null || _styles$checkbox === void 0 ? void 0 : _styles$checkbox.className,
type: "checkbox",
checked: !!checked,
onChange: e => {
const path = ReactEditor.findPath(editor, element);
setNodes(editor, {
checked: e.target.checked
}, {
at: path
});
}
}, nodeProps, {
$_css3: (_styles$checkbox2 = styles.checkbox) === null || _styles$checkbox2 === void 0 ? void 0 : _styles$checkbox2.css
}))), /*#__PURE__*/React.createElement(_StyledSpan, {
className: (_styles$text = styles.text) === null || _styles$text === void 0 ? void 0 : _styles$text.className,
contentEditable: !readOnly,
suppressContentEditableWarning: true,
$_css4: (_styles$text2 = styles.text) === null || _styles$text2 === void 0 ? void 0 : _styles$text2.css
}, children));
};

@@ -174,3 +187,3 @@

const res = !!(editor !== null && editor !== void 0 && editor.selection) && getListItemEntry(editor);
return /*#__PURE__*/jsx(ToolbarElement, {
return /*#__PURE__*/React.createElement(ToolbarElement, _extends({
active: !!res && res.list[0].type === type,

@@ -180,5 +193,4 @@ type: type,

type
}),
...props
});
})
}, props));
};

@@ -185,0 +197,0 @@

@@ -7,7 +7,6 @@ 'use strict';

var _styled = require('styled-components');
require('react');
var React = require('react');
var plateCommon = require('@udecode/plate-common');
var plateCore = require('@udecode/plate-core');
var slateReact = require('slate-react');
var jsxRuntime = require('react/jsx-runtime');
var plateList = require('@udecode/plate-list');

@@ -18,3 +17,24 @@ var plateToolbar = require('@udecode/plate-toolbar');

function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () {
return e[k];
}
});
}
});
}
n['default'] = e;
return Object.freeze(n);
}
var _styled__default = /*#__PURE__*/_interopDefaultLegacy(_styled);
var React__namespace = /*#__PURE__*/_interopNamespace(React);

@@ -60,2 +80,20 @@ const getTodoListElementStyles = props => {

function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function toVal(mix) {

@@ -123,34 +161,30 @@ var k, y, str='';

});
return /*#__PURE__*/jsxRuntime.jsxs(_StyledDiv, { ...attributes,
...rootProps,
return /*#__PURE__*/React__namespace.createElement(_StyledDiv, _extends({}, attributes, rootProps, {
className: clsx(styles.root.className, (_styles$rootChecked = styles.rootChecked) === null || _styles$rootChecked === void 0 ? void 0 : _styles$rootChecked.className, rootProps === null || rootProps === void 0 ? void 0 : rootProps.className),
$_css: styles.root.css,
children: [/*#__PURE__*/jsxRuntime.jsx(_StyledDiv2, {
contentEditable: false,
className: (_styles$checkboxWrapp = styles.checkboxWrapper) === null || _styles$checkboxWrapp === void 0 ? void 0 : _styles$checkboxWrapp.className,
$_css2: (_styles$checkboxWrapp2 = styles.checkboxWrapper) === null || _styles$checkboxWrapp2 === void 0 ? void 0 : _styles$checkboxWrapp2.css,
children: /*#__PURE__*/jsxRuntime.jsx(_StyledInput, {
"data-testid": "TodoListElementCheckbox",
className: (_styles$checkbox = styles.checkbox) === null || _styles$checkbox === void 0 ? void 0 : _styles$checkbox.className,
type: "checkbox",
checked: !!checked,
onChange: e => {
const path = slateReact.ReactEditor.findPath(editor, element);
plateCommon.setNodes(editor, {
checked: e.target.checked
}, {
at: path
});
},
...nodeProps,
$_css3: (_styles$checkbox2 = styles.checkbox) === null || _styles$checkbox2 === void 0 ? void 0 : _styles$checkbox2.css
})
}), /*#__PURE__*/jsxRuntime.jsx(_StyledSpan, {
className: (_styles$text = styles.text) === null || _styles$text === void 0 ? void 0 : _styles$text.className,
contentEditable: !readOnly,
suppressContentEditableWarning: true,
$_css4: (_styles$text2 = styles.text) === null || _styles$text2 === void 0 ? void 0 : _styles$text2.css,
children: children
})]
});
$_css: styles.root.css
}), /*#__PURE__*/React__namespace.createElement(_StyledDiv2, {
contentEditable: false,
className: (_styles$checkboxWrapp = styles.checkboxWrapper) === null || _styles$checkboxWrapp === void 0 ? void 0 : _styles$checkboxWrapp.className,
$_css2: (_styles$checkboxWrapp2 = styles.checkboxWrapper) === null || _styles$checkboxWrapp2 === void 0 ? void 0 : _styles$checkboxWrapp2.css
}, /*#__PURE__*/React__namespace.createElement(_StyledInput, _extends({
"data-testid": "TodoListElementCheckbox",
className: (_styles$checkbox = styles.checkbox) === null || _styles$checkbox === void 0 ? void 0 : _styles$checkbox.className,
type: "checkbox",
checked: !!checked,
onChange: e => {
const path = slateReact.ReactEditor.findPath(editor, element);
plateCommon.setNodes(editor, {
checked: e.target.checked
}, {
at: path
});
}
}, nodeProps, {
$_css3: (_styles$checkbox2 = styles.checkbox) === null || _styles$checkbox2 === void 0 ? void 0 : _styles$checkbox2.css
}))), /*#__PURE__*/React__namespace.createElement(_StyledSpan, {
className: (_styles$text = styles.text) === null || _styles$text === void 0 ? void 0 : _styles$text.className,
contentEditable: !readOnly,
suppressContentEditableWarning: true,
$_css4: (_styles$text2 = styles.text) === null || _styles$text2 === void 0 ? void 0 : _styles$text2.css
}, children));
};

@@ -184,3 +218,3 @@

const res = !!(editor !== null && editor !== void 0 && editor.selection) && plateList.getListItemEntry(editor);
return /*#__PURE__*/jsxRuntime.jsx(plateToolbar.ToolbarElement, {
return /*#__PURE__*/React__namespace.createElement(plateToolbar.ToolbarElement, _extends({
active: !!res && res.list[0].type === type,

@@ -190,5 +224,4 @@ type: type,

type
}),
...props
});
})
}, props));
};

@@ -195,0 +228,0 @@

{
"name": "@udecode/plate-list-ui",
"version": "5.3.5",
"version": "6.0.0",
"description": "List UI for Plate",

@@ -35,7 +35,7 @@ "keywords": [

"dependencies": {
"@udecode/plate-common": "5.3.5",
"@udecode/plate-core": "5.3.1",
"@udecode/plate-list": "5.3.5",
"@udecode/plate-styled-components": "5.3.5",
"@udecode/plate-toolbar": "5.3.5"
"@udecode/plate-common": "6.0.0",
"@udecode/plate-core": "6.0.0",
"@udecode/plate-list": "6.0.0",
"@udecode/plate-styled-components": "6.0.0",
"@udecode/plate-toolbar": "6.0.0"
},

@@ -42,0 +42,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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