@remirror/renderer-react
Advanced tools
Comparing version 0.4.2-ci.8 to 0.4.2-ci.1564567834.5
@@ -7,3 +7,2 @@ 'use strict'; | ||
var _extends = _interopDefault(require('@babel/runtime/helpers/extends')); | ||
var _classCallCheck = _interopDefault(require('@babel/runtime/helpers/classCallCheck')); | ||
@@ -15,2 +14,3 @@ var _createClass = _interopDefault(require('@babel/runtime/helpers/createClass')); | ||
var core$1 = require('@remirror/core'); | ||
var _extends = _interopDefault(require('@babel/runtime/helpers/extends')); | ||
var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty')); | ||
@@ -602,6 +602,6 @@ var _objectWithoutProperties = _interopDefault(require('@babel/runtime/helpers/objectWithoutProperties')); | ||
return Component ? core.jsx(Component, _extends({}, node.attrs, { | ||
return Component ? core.jsx(Component, { | ||
options: options, | ||
node: node | ||
}), children) : toDOM && ReactSerializer.renderSpec(toDOM(node), children); | ||
}, children) : toDOM && ReactSerializer.renderSpec(toDOM(node), children); | ||
} | ||
@@ -622,5 +622,6 @@ /** | ||
var options = this.options[mark.type.name]; | ||
return Component ? core.jsx(Component, _extends({}, mark.attrs, { | ||
options: options | ||
}), wrappedElement) : toDOM && ReactSerializer.renderSpec(toDOM(mark, inline), wrappedElement); | ||
return Component ? core.jsx(Component, { | ||
options: options, | ||
mark: mark | ||
}, wrappedElement) : toDOM && ReactSerializer.renderSpec(toDOM(mark, inline), wrappedElement); | ||
} | ||
@@ -627,0 +628,0 @@ /** |
@@ -1,2 +0,1 @@ | ||
import _extends from '@babel/runtime/helpers/extends'; | ||
import _classCallCheck from '@babel/runtime/helpers/classCallCheck'; | ||
@@ -7,2 +6,3 @@ import _createClass from '@babel/runtime/helpers/createClass'; | ||
import { isString, isPlainObject, isArray } from '@remirror/core'; | ||
import _extends from '@babel/runtime/helpers/extends'; | ||
import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
@@ -594,6 +594,6 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties'; | ||
return Component ? jsx(Component, _extends({}, node.attrs, { | ||
return Component ? jsx(Component, { | ||
options: options, | ||
node: node | ||
}), children) : toDOM && ReactSerializer.renderSpec(toDOM(node), children); | ||
}, children) : toDOM && ReactSerializer.renderSpec(toDOM(node), children); | ||
} | ||
@@ -614,5 +614,6 @@ /** | ||
var options = this.options[mark.type.name]; | ||
return Component ? jsx(Component, _extends({}, mark.attrs, { | ||
options: options | ||
}), wrappedElement) : toDOM && ReactSerializer.renderSpec(toDOM(mark, inline), wrappedElement); | ||
return Component ? jsx(Component, { | ||
options: options, | ||
mark: mark | ||
}, wrappedElement) : toDOM && ReactSerializer.renderSpec(toDOM(mark, inline), wrappedElement); | ||
} | ||
@@ -619,0 +620,0 @@ /** |
import { ReactNode } from 'react'; | ||
import { DOMOutputSpec, ExtensionManager, Fragment as ProsemirrorFragment, Mark, MarkExtensionSpec, NodeExtensionSpec, ProsemirrorNode } from '@remirror/core'; | ||
import { AnyExtension, DOMOutputSpec, ExtensionManager, Fragment as ProsemirrorFragment, Mark, MarkExtensionSpec, NodeExtensionSpec, ProsemirrorNode } from '@remirror/core'; | ||
declare type NodeToDOM = NodeExtensionSpec['toDOM']; | ||
@@ -8,3 +8,3 @@ declare type MarkToDOM = MarkExtensionSpec['toDOM']; | ||
*/ | ||
export declare class ReactSerializer { | ||
export declare class ReactSerializer<GExtensions extends AnyExtension[] = AnyExtension[]> { | ||
nodes: Record<string, NodeToDOM>; | ||
@@ -14,3 +14,3 @@ marks: Record<string, MarkToDOM>; | ||
private options; | ||
constructor(nodes: Record<string, NodeToDOM>, marks: Record<string, MarkToDOM>, manager: ExtensionManager); | ||
constructor(nodes: Record<string, NodeToDOM>, marks: Record<string, MarkToDOM>, manager: ExtensionManager<GExtensions>); | ||
/** | ||
@@ -53,3 +53,3 @@ * The main entry method on this class for traversing through a schema tree and creating JSx. | ||
*/ | ||
static fromExtensionManager(manager: ExtensionManager): ReactSerializer; | ||
static fromExtensionManager<GExtensions extends AnyExtension[] = AnyExtension[]>(manager: ExtensionManager<GExtensions>): ReactSerializer<GExtensions>; | ||
/** | ||
@@ -56,0 +56,0 @@ * Pluck nodes from the extension manager |
@@ -14,4 +14,2 @@ "use strict"; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
@@ -89,6 +87,6 @@ | ||
return Component ? (0, _core.jsx)(Component, (0, _extends2.default)({}, node.attrs, { | ||
return Component ? (0, _core.jsx)(Component, { | ||
options: options, | ||
node: node | ||
}), children) : toDOM && ReactSerializer.renderSpec(toDOM(node), children); | ||
}, children) : toDOM && ReactSerializer.renderSpec(toDOM(node), children); | ||
} | ||
@@ -109,5 +107,6 @@ /** | ||
var options = this.options[mark.type.name]; | ||
return Component ? (0, _core.jsx)(Component, (0, _extends2.default)({}, mark.attrs, { | ||
options: options | ||
}), wrappedElement) : toDOM && ReactSerializer.renderSpec(toDOM(mark, inline), wrappedElement); | ||
return Component ? (0, _core.jsx)(Component, { | ||
options: options, | ||
mark: mark | ||
}, wrappedElement) : toDOM && ReactSerializer.renderSpec(toDOM(mark, inline), wrappedElement); | ||
} | ||
@@ -114,0 +113,0 @@ /** |
@@ -12,3 +12,3 @@ { | ||
}, | ||
"version": "0.4.2-ci.8+d5a5936b", | ||
"version": "0.4.2-ci.1564567834.5+b9897ce", | ||
"main": "lib/index.js", | ||
@@ -34,4 +34,4 @@ "module": "lib/dist/renderer-react.esm.js", | ||
"@emotion/core": "^10.0.14", | ||
"@remirror/core": "^0.4.2-canary.0", | ||
"@remirror/react-utils": "^0.4.2-ci.8+d5a5936b" | ||
"@remirror/core": "^0.4.2-ci.1564567834.5+b9897ce", | ||
"@remirror/react-utils": "^0.4.2-ci.1564567834.5+b9897ce" | ||
}, | ||
@@ -45,3 +45,3 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@remirror/core-extensions": "^0.4.2-ci.8+d5a5936b", | ||
"@remirror/core-extensions": "^0.4.2-ci.1564567834.5+b9897ce", | ||
"prosemirror-model": "^1.7.1" | ||
@@ -54,3 +54,3 @@ }, | ||
"sideEffects": false, | ||
"gitHead": "d5a5936bf28d46bb2d144108aef29e029f553f4a" | ||
"gitHead": "b9897ce1f2a1100a37978bde453f7bba645e8139" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
265440
33
3594