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

slate-react-placeholder

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slate-react-placeholder - npm Package Compare versions

Comparing version 0.1.17 to 0.1.18

9

dist/slate-react-placeholder.js

@@ -128,7 +128,12 @@ (function (global, factory) {

var others = next();
var document = editor.value.document;
var first = node.getFirstText();
var last = node.getLastText();
var decoration = {
anchor: { key: first.key, offset: 0 },
focus: { key: last.key, offset: last.text.length },
anchor: { key: first.key, offset: 0, path: document.getPath(first.key) },
focus: {
key: last.key,
offset: last.text.length,
path: document.getPath(last.key)
},
mark: placeholderMark

@@ -135,0 +140,0 @@ };

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t(e.SlateReactPlaceholder={},e.React)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var r=function(e,t){if(!e)throw new Error("Invariant failed")},n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},o=0;e.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=o++,l={type:"placeholder",data:{key:i}},c=e.placeholder,f=e.when,u=e.style,d=void 0===u?{}:u;return r(c,"You must pass `SlateReactPlaceholder` an `options.placeholder` string."),r(f,"You must pass `SlateReactPlaceholder` an `options.when` query."),{decorateNode:function(e,t,r){if(!t.query(f,e))return r();var n=r(),o=e.getFirstText(),i=e.getLastText(),c={anchor:{key:o.key,offset:0},focus:{key:i.key,offset:i.text.length},mark:l};return[].concat(a(n),[c])},renderMark:function(e,r,a){var o=e.children,l=e.mark;if("placeholder"===l.type&&l.data.get("key")===i){var f=n({pointerEvents:"none",display:"inline-block",width:"0",maxWidth:"100%",whiteSpace:"nowrap",opacity:"0.333"},d);return t.createElement("span",null,t.createElement("span",{contentEditable:!1,style:f},c),o)}return a()}}},Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t(e.SlateReactPlaceholder={},e.React)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var r=function(e,t){if(!e)throw new Error("Invariant failed")},a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},n=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},o=0;e.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=o++,i={type:"placeholder",data:{key:l}},c=e.placeholder,u=e.when,f=e.style,d=void 0===f?{}:f;return r(c,"You must pass `SlateReactPlaceholder` an `options.placeholder` string."),r(u,"You must pass `SlateReactPlaceholder` an `options.when` query."),{decorateNode:function(e,t,r){if(!t.query(u,e))return r();var a=r(),o=t.value.document,l=e.getFirstText(),c=e.getLastText(),f={anchor:{key:l.key,offset:0,path:o.getPath(l.key)},focus:{key:c.key,offset:c.text.length,path:o.getPath(c.key)},mark:i};return[].concat(n(a),[f])},renderMark:function(e,r,n){var o=e.children,i=e.mark;if("placeholder"===i.type&&i.data.get("key")===l){var u=a({pointerEvents:"none",display:"inline-block",width:"0",maxWidth:"100%",whiteSpace:"nowrap",opacity:"0.333"},d);return t.createElement("span",null,t.createElement("span",{contentEditable:!1,style:u},c),o)}return n()}}},Object.defineProperty(e,"__esModule",{value:!0})});

@@ -122,7 +122,12 @@ import React from 'react';

var others = next();
var document = editor.value.document;
var first = node.getFirstText();
var last = node.getLastText();
var decoration = {
anchor: { key: first.key, offset: 0 },
focus: { key: last.key, offset: last.text.length },
anchor: { key: first.key, offset: 0, path: document.getPath(first.key) },
focus: {
key: last.key,
offset: last.text.length,
path: document.getPath(last.key)
},
mark: placeholderMark

@@ -129,0 +134,0 @@ };

@@ -128,7 +128,12 @@ 'use strict';

var others = next();
var document = editor.value.document;
var first = node.getFirstText();
var last = node.getLastText();
var decoration = {
anchor: { key: first.key, offset: 0 },
focus: { key: last.key, offset: last.text.length },
anchor: { key: first.key, offset: 0, path: document.getPath(first.key) },
focus: {
key: last.key,
offset: last.text.length,
path: document.getPath(last.key)
},
mark: placeholderMark

@@ -135,0 +140,0 @@ };

{
"name": "slate-react-placeholder",
"description": "A Slate plugin to render a placeholder with React.",
"version": "0.1.17",
"version": "0.1.18",
"license": "MIT",

@@ -21,3 +21,3 @@ "repository": "git://github.com/ianstormtaylor/slate.git",

"mocha": "^2.5.3",
"slate": "^0.45.0",
"slate": "^0.45.1",
"tiny-invariant": "^1.0.1"

@@ -24,0 +24,0 @@ },

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