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

@remirror/extension-image

Package Overview
Dependencies
Maintainers
1
Versions
335
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remirror/extension-image - npm Package Compare versions

Comparing version 1.0.0-next.42 to 1.0.0-next.43

11

CHANGELOG.md
# @remirror/extension-image
## 1.0.0-next.43
> 2020-09-28
### Patch Changes
- [`b674f906`](https://github.com/remirror/remirror/commit/b674f906815776d9c07b608a7de8cbaa9554a3a1) [#729](https://github.com/remirror/remirror/pull/729) Thanks [@ifiokjr](https://github.com/ifiokjr)! - Make `insertImage` command chainable.
- Updated dependencies []:
- @remirror/core@1.0.0-next.43
## 1.0.0-next.42

@@ -4,0 +15,0 @@

4

dist/declarations/src/image-extension.d.ts

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

import { ApplySchemaAttributes, CommandFunction, CreatePluginReturn, NodeExtension, NodeExtensionSpec, ProsemirrorAttributes } from '@remirror/core';
import { ApplySchemaAttributes, CommandFunction, CreatePluginReturn, NodeAttributes, NodeExtension, NodeExtensionSpec } from '@remirror/core';
/**

@@ -14,3 +14,3 @@ * The image extension for placing images into your editor.

createCommands(): {
insertImage: (attributes: ProsemirrorAttributes<ImageExtensionAttributes>) => CommandFunction;
insertImage: (attributes: NodeAttributes<ImageExtensionAttributes>) => CommandFunction;
};

@@ -17,0 +17,0 @@ createPlugin(): CreatePluginReturn;

@@ -86,13 +86,8 @@ 'use strict';

insertImage: attributes => (_ref) => {
var state = _ref.state,
var tr = _ref.tr,
dispatch = _ref.dispatch;
var selection = state.selection;
var selection = tr.selection;
var position = hasCursor(selection) ? selection.$cursor.pos : selection.$to.pos;
var node = this.type.create(attributes);
var transaction = state.tr.insert(position, node);
if (dispatch) {
dispatch(transaction);
}
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.insert(position, node));
return true;

@@ -99,0 +94,0 @@ }

@@ -77,13 +77,8 @@ import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';

insertImage: attributes => (_ref) => {
var state = _ref.state,
var tr = _ref.tr,
dispatch = _ref.dispatch;
var selection = state.selection;
var selection = tr.selection;
var position = hasCursor(selection) ? selection.$cursor.pos : selection.$to.pos;
var node = this.type.create(attributes);
var transaction = state.tr.insert(position, node);
if (dispatch) {
dispatch(transaction);
}
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.insert(position, node));
return true;

@@ -90,0 +85,0 @@ }

@@ -86,13 +86,8 @@ 'use strict';

insertImage: attributes => (_ref) => {
var state = _ref.state,
var tr = _ref.tr,
dispatch = _ref.dispatch;
var selection = state.selection;
var selection = tr.selection;
var position = hasCursor(selection) ? selection.$cursor.pos : selection.$to.pos;
var node = this.type.create(attributes);
var transaction = state.tr.insert(position, node);
if (dispatch) {
dispatch(transaction);
}
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.insert(position, node));
return true;

@@ -99,0 +94,0 @@ }

@@ -65,4 +65,4 @@ "use strict";

insertImage: attributes => _ref => {
var state = _ref.state, dispatch = _ref.dispatch, selection = state.selection, position = hasCursor(selection) ? selection.$cursor.pos : selection.$to.pos, node = this.type.create(attributes), transaction = state.tr.insert(position, node);
return dispatch && dispatch(transaction), !0;
var tr = _ref.tr, dispatch = _ref.dispatch, selection = tr.selection, position = hasCursor(selection) ? selection.$cursor.pos : selection.$to.pos, node = this.type.create(attributes);
return null == dispatch || dispatch(tr.insert(position, node)), !0;
}

@@ -69,0 +69,0 @@ };

@@ -77,13 +77,8 @@ import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';

insertImage: attributes => (_ref) => {
var state = _ref.state,
var tr = _ref.tr,
dispatch = _ref.dispatch;
var selection = state.selection;
var selection = tr.selection;
var position = hasCursor(selection) ? selection.$cursor.pos : selection.$to.pos;
var node = this.type.create(attributes);
var transaction = state.tr.insert(position, node);
if (dispatch) {
dispatch(transaction);
}
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.insert(position, node));
return true;

@@ -90,0 +85,0 @@ }

{
"name": "@remirror/extension-image",
"version": "1.0.0-next.42",
"version": "1.0.0-next.43",
"description": "Add images to your editor.",

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

"devDependencies": {
"@remirror/core": "1.0.0-next.42",
"@remirror/core": "1.0.0-next.43",
"@remirror/pm": "1.0.0-next.40"
},
"peerDependencies": {
"@remirror/core": "1.0.0-next.42",
"@remirror/core": "1.0.0-next.43",
"@remirror/pm": "1.0.0-next.40"

@@ -41,0 +41,0 @@ },

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