Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nteract/mathjax

Package Overview
Dependencies
Maintainers
17
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nteract/mathjax - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

__tests__/node.spec.tsx

33

lib/node.d.ts
import * as React from "react";
import { MathJaxContextValue } from "./context";
interface Props {

@@ -7,2 +8,34 @@ inline: boolean;

}
export declare class MathJaxNode_ extends React.Component<Props & MathJaxContextValue> {
script?: HTMLScriptElement;
nodeRef: React.RefObject<HTMLSpanElement>;
constructor(props: Props & MathJaxContextValue);
/**
* Render the math once the node is mounted
*/
componentDidMount(): void;
/**
* Update the jax, force update if the display mode changed
*/
componentDidUpdate(prevProps: Props & MathJaxContextValue): void;
/**
* Clear the math when unmounting the node
*/
componentWillUnmount(): void;
/**
* Clear the jax
*/
clear(): void;
/**
* Update math in the node
* @param { Boolean } forceUpdate
*/
typeset(forceUpdate?: boolean): void;
/**
* Create a script
* @param { String } text
*/
setScriptText(text: string): void;
render(): JSX.Element;
}
export default class MathJaxNode extends React.PureComponent<Props> {

@@ -9,0 +42,0 @@ static defaultProps: {

5

lib/node.js

@@ -24,2 +24,4 @@ "use strict";

this.nodeRef = React.createRef();
this.typeset = this.typeset.bind(this);
this.clear = this.clear.bind(this);
}

@@ -111,2 +113,3 @@ /**

}
exports.MathJaxNode_ = MathJaxNode_;
class MathJaxNode extends React.PureComponent {

@@ -127,2 +130,3 @@ render() {

}
exports.default = MathJaxNode;
MathJaxNode.defaultProps = {

@@ -132,2 +136,1 @@ inline: false,

};
exports.default = MathJaxNode;

6

lib/provider.js

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

const React = __importStar(require("react"));
const load_script_1 = __importDefault(require("load-script"));
const context_1 = __importDefault(require("./context"));
const load_script_1 = __importDefault(require("./load-script"));
/**

@@ -62,3 +62,3 @@ * MathJax Provider

if (state.input !== props.input) {
return Object.assign({}, state, { input: props.input });
return Object.assign(Object.assign({}, state), { input: props.input });
}

@@ -81,2 +81,3 @@ return null;

}
exports.default = Provider;
Provider.defaultProps = {

@@ -95,2 +96,1 @@ src: "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML",

};
exports.default = Provider;
import * as React from "react";
import { MathJaxContextValue } from "./context";
interface Props {

@@ -6,2 +7,10 @@ children: string;

}
export declare class MathJaxText_ extends React.Component<Props & MathJaxContextValue> {
nodeRef: React.RefObject<HTMLDivElement>;
constructor(props: Props & MathJaxContextValue);
componentDidMount(): void;
componentDidUpdate(): void;
typeset(): void;
render(): JSX.Element;
}
declare class MathJaxText extends React.PureComponent<Props> {

@@ -8,0 +17,0 @@ static defaultProps: {

@@ -44,2 +44,3 @@ "use strict";

}
exports.MathJaxText_ = MathJaxText_;
class MathJaxText extends React.PureComponent {

@@ -46,0 +47,0 @@ render() {

{
"name": "@nteract/mathjax",
"version": "4.0.1",
"version": "4.0.2",
"description": "React components for MathJax",

@@ -18,3 +18,6 @@ "main": "lib/index.js",

"license": "BSD-3-Clause",
"gitHead": "3054fe966bd280c9b5d3ec40e0767f756a2a0cc1"
"dependencies": {
"load-script": "^1.0.0"
},
"gitHead": "f595c033d4a8d70706d10197393110bb45dbf152"
}

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

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