Socket
Socket
Sign inDemoInstall

mathlive

Package Overview
Dependencies
0
Maintainers
1
Versions
170
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.55.0 to 0.56.0

2

dist/math-json/domains.d.ts

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

/* 0.55.0 */ export declare const DOMAIN_NONE = 0;
/* 0.56.0 */ export declare const DOMAIN_NONE = 0;
export declare const DOMAIN_ZERO = 1;

@@ -3,0 +3,0 @@ export declare const DOMAIN_PRIME_NUMBER = 256;

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

/* 0.55.0 */ import { Domain } from './domains';
/* 0.56.0 */ import { Domain } from './domains';
export declare type FunctionDefinition = {

@@ -3,0 +3,0 @@ /**

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

/* 0.55.0 */ import type { Keys } from './types-utils';
/* 0.56.0 */ import type { Keys } from './types-utils';
import type { ParseMode, Style } from './core';

@@ -3,0 +3,0 @@ import type { Mathfield, Model } from './mathfield';

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

/* 0.55.0 */ import { ErrorListener, MacroDictionary, ParseMode, ParserErrorCode, MathfieldErrorCode } from './core';
/* 0.56.0 */ import { ErrorListener, MacroDictionary, ParseMode, ParserErrorCode, MathfieldErrorCode } from './core';
import type { Mathfield } from './mathfield';

@@ -95,3 +95,3 @@ import type { Selector } from './commands';

/** The command is a single selector, or a selector with arguments */
command: Selector | any[];
command: Selector | [Selector, ...any[]];
/**

@@ -182,3 +182,3 @@ * If specified, this indicate in which mode this keybinding will apply.

*/
textToSpeechRules?: 'mathlive' | 'sre';
textToSpeechRules: 'mathlive' | 'sre';
/**

@@ -191,3 +191,3 @@ * The markup syntax to use for the output of conversion to spoken text.

*/
textToSpeechMarkup?: '' | 'ssml' | 'ssml_step' | 'mac';
textToSpeechMarkup: '' | 'ssml' | 'ssml_step' | 'mac';
/**

@@ -202,3 +202,3 @@ * A set of key/value pairs that can be used to configure the speech rule

*/
textToSpeechRulesOptions?: {
textToSpeechRulesOptions: {
[key: string]: string;

@@ -217,3 +217,3 @@ };

*/
speechEngine?: 'local' | 'amazon';
speechEngine: 'local' | 'amazon';
/**

@@ -226,3 +226,3 @@ * Indicates the voice to use with the speech engine.

*/
speechEngineVoice?: string;
speechEngineVoice: string;
/**

@@ -237,5 +237,5 @@ * Sets the speed of the selected voice.

*/
speechEngineRate?: string;
speakHook?: (text: string, config: MathfieldConfig) => void;
readAloudHook?: (element: HTMLElement, text: string, config: MathfieldConfig) => void;
speechEngineRate: string;
speakHook: (text: string, config: Partial<MathfieldConfig>) => void;
readAloudHook: (element: HTMLElement, text: string, config: MathfieldConfig) => void;
};

@@ -247,3 +247,3 @@ export declare type VirtualKeyboardOptions = {

*/
virtualKeyboardToggleGlyph?: string;
virtualKeyboardToggleGlyph: string;
/**

@@ -263,3 +263,3 @@ * - `'manual'`: pressing the virtual keyboard toggle button will show or hide

*/
virtualKeyboardMode?: 'auto' | 'manual' | 'onfocus' | 'off';
virtualKeyboardMode: 'auto' | 'manual' | 'onfocus' | 'off';
/**

@@ -272,4 +272,4 @@ * A space separated list of the keyboards that should be available. The

*/
virtualKeyboards?: 'all' | 'numeric' | 'roman' | 'greek' | 'functions' | 'command' | string;
virtualKeyboardLayout?: 'auto' | 'qwerty' | 'azerty' | 'qwertz' | 'dvorak' | 'colemak';
virtualKeyboards: 'all' | 'numeric' | 'roman' | 'greek' | 'functions' | 'command' | string;
virtualKeyboardLayout: 'auto' | 'qwerty' | 'azerty' | 'qwertz' | 'dvorak' | 'colemak';
/**

@@ -287,6 +287,6 @@ * Some additional custom virtual keyboard layers.

*/
customVirtualKeyboardLayers?: {
customVirtualKeyboardLayers: {
[layer: string]: string;
};
customVirtualKeyboards?: {
customVirtualKeyboards: {
[layer: string]: string;

@@ -301,3 +301,3 @@ };

*/
virtualKeyboardTheme?: 'material' | 'apple' | '';
virtualKeyboardTheme: 'material' | 'apple' | '';
/**

@@ -307,3 +307,3 @@ * When a key on the virtual keyboard is pressed, produce a short haptic

*/
keypressVibration?: boolean;
keypressVibration: boolean;
/**

@@ -321,3 +321,3 @@ * When a key on the virtual keyboard is pressed, produce a short audio

*/
keypressSound?: string | HTMLAudioElement | {
keypressSound: string | HTMLAudioElement | {
spacebar?: string | HTMLAudioElement;

@@ -348,3 +348,3 @@ return?: string | HTMLAudioElement;

*/
onKeystroke?: (sender: Mathfield, keystroke: string, ev: KeyboardEvent) => boolean;
onKeystroke: (sender: Mathfield, keystroke: string, ev: KeyboardEvent) => boolean;
/**

@@ -355,3 +355,3 @@ * A hook invoked when keyboard navigation would cause the insertion

* - <var>direction</var> indicates the direction of the navigation, either
* `"forward"` or `"backward"`.
* `"forward"` or `"backward"` or `"upward"` or `"downward"`.
*

@@ -363,3 +363,3 @@ * Return `false` to prevent the move, `true` to wrap around to the

*/
onMoveOutOf?: (sender: Mathfield, direction: 'forward' | 'backward') => boolean;
onMoveOutOf: (sender: Mathfield, direction: 'forward' | 'backward' | 'upward' | 'downward') => boolean;
/**

@@ -376,3 +376,3 @@ * A hook invoked when pressing tab (or shift-tab) would cause the

*/
onTabOutOf?: (sender: Mathfield, direction: 'forward' | 'backward') => boolean;
onTabOutOf: (sender: Mathfield, direction: 'forward' | 'backward') => boolean;
}

@@ -386,17 +386,17 @@ export declare type UndoStateChangeListener = (target: Mathfield, action: 'undo' | 'redo' | 'snapshot') => void;

/** The mathfield has lost keyboard focus */
onBlur?: (sender: Mathfield) => void;
onBlur: (sender: Mathfield) => void;
/** The mathfield has gained keyboard focus */
onFocus?: (sender: Mathfield) => void;
onContentWillChange?: (sender: Mathfield) => void;
onContentDidChange?: (sender: Mathfield) => void;
onSelectionWillChange?: (sender: Mathfield) => void;
onSelectionDidChange?: (sender: Mathfield) => void;
onUndoStateWillChange?: UndoStateChangeListener;
onUndoStateDidChange?: UndoStateChangeListener;
onModeChange?: (sender: Mathfield, mode: ParseMode) => void;
onVirtualKeyboardToggle?: (sender: Mathfield, visible: boolean, keyboardElement: HTMLElement) => void;
onReadAloudStatus?: (sender: Mathfield) => void;
onFocus: (sender: Mathfield) => void;
onContentWillChange: (sender: Mathfield) => void;
onContentDidChange: (sender: Mathfield) => void;
onSelectionWillChange: (sender: Mathfield) => void;
onSelectionDidChange: (sender: Mathfield) => void;
onUndoStateWillChange: UndoStateChangeListener;
onUndoStateDidChange: UndoStateChangeListener;
onModeChange: (sender: Mathfield, mode: ParseMode) => void;
onVirtualKeyboardToggle: (sender: Mathfield, visible: boolean, keyboardElement: HTMLElement) => void;
onReadAloudStatus: (sender: Mathfield) => void;
}
export declare type KeyboardOptions = {
keybindings?: Keybinding[];
keybindings: Keybinding[];
};

@@ -414,3 +414,3 @@ export declare type InlineShortcutsOptions = {

* to add `newShortcuts` to the default ones */
overrideDefaultInlineShortcuts?: boolean;
overrideDefaultInlineShortcuts: boolean;
/**

@@ -422,3 +422,3 @@ * The keys of this object literal indicate the sequence of characters

*/
inlineShortcuts?: {
inlineShortcuts: {
[key: string]: InlineShortcutDefinition;

@@ -448,3 +448,3 @@ };

*/
inlineShortcutTimeout?: number;
inlineShortcutTimeout: number;
};

@@ -458,3 +458,3 @@ export declare type LocalizationOptions = {

*/
locale?: string;
locale: string;
/**

@@ -477,3 +477,3 @@ * An object whose keys are a locale string, and whose values are an object of

*/
strings?: {
strings: {
[locale: string]: {

@@ -486,3 +486,3 @@ [key: string]: string;

/** When true, the user cannot edit the mathfield. */
readOnly?: boolean;
readOnly: boolean;
/**

@@ -522,3 +522,3 @@ * When true, during text input the field will switch automatically between

*/
smartMode?: boolean;
smartMode: boolean;
/**

@@ -531,3 +531,3 @@ * When `true` and an open fence is entered via `typedText()` it will

*/
smartFence?: boolean;
smartFence: boolean;
/**

@@ -545,3 +545,3 @@ * When `true`, when a digit is entered in an empty superscript, the cursor

*/
smartSuperscript?: boolean;
smartSuperscript: boolean;
/**

@@ -562,3 +562,3 @@ * This option controls how many levels of subscript/superscript can be entered. For

*/
scriptDepth?: number | [number, number];
scriptDepth: number | [number, number];
/**

@@ -568,3 +568,3 @@ * If `true`, extra parentheses around a numerator or denominator are

*/
removeExtraneousParentheses?: boolean;
removeExtraneousParentheses: boolean;
/**

@@ -575,6 +575,6 @@ * When `true` and the spacebar is pressed, no space is inserted.

*/
ignoreSpacebarInMathMode?: boolean;
ignoreSpacebarInMathMode: boolean;
};
export declare type LayoutOptions = {
defaultMode?: 'math' | 'text';
defaultMode: 'math' | 'text';
/**

@@ -603,3 +603,3 @@ *A dictionary of LaTeX macros to be used to interpret and render the content.

*/
macros?: MacroDictionary;
macros: MacroDictionary;
/**

@@ -611,3 +611,3 @@ * Scaling factor to be applied to horizontal spacing between elements of

*/
horizontalSpacingScale?: number;
horizontalSpacingScale: number;
/**

@@ -643,3 +643,3 @@ * Control the letter shape style:

*/
letterShapeStyle?: 'auto' | 'tex' | 'iso' | 'french' | 'upright';
letterShapeStyle: 'auto' | 'tex' | 'iso' | 'french' | 'upright';
};

@@ -658,3 +658,3 @@ /**

*/
namespace?: string;
namespace: string;
/**

@@ -672,3 +672,3 @@ * An optional listener function that will be

*/
onError?: ErrorListener<ParserErrorCode | MathfieldErrorCode>;
onError: ErrorListener<ParserErrorCode | MathfieldErrorCode>;
/**

@@ -685,3 +685,3 @@ * This function provides the option of substituting the focusable DOM

*/
substituteTextArea?: string | (() => HTMLElement);
substituteTextArea: string | (() => HTMLElement);
/**

@@ -722,3 +722,3 @@ * A URL fragment pointing to the directory containing the fonts

*/
fontsDirectory?: string;
fontsDirectory: string;
/**

@@ -731,3 +731,3 @@ * Support for [Trusted Type](https://w3c.github.io/webappsec-trusted-types/dist/spec/).

*/
createHTML?: (html: string) => any;
createHTML: (html: string) => any;
};

@@ -734,0 +734,0 @@ /**

@@ -1,7 +0,6 @@

/* 0.55.0 */ /**
/* 0.56.0 */ /**
* The mode that indicates how a portion of content is interpreted
*
* @deprecated The 'command'mode will be dropped in a future release
*/
export declare type ParseMode = 'math' | 'text' | 'command';
export declare type ParseMode = 'math' | 'text' | 'command' | 'chem';
/**

@@ -98,2 +97,3 @@ * Error code passed to the [[`ErrorListener`]] function.

cssClass?: string;
isPhantom?: boolean;
letterShapeStyle?: 'tex' | 'french' | 'iso' | 'upright' | 'auto';

@@ -100,0 +100,0 @@ }

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

/* 0.55.0 */ import { Selector } from './commands';
/* 0.56.0 */ import { Selector } from './commands';
import { MathfieldConfig } from './config';

@@ -16,3 +16,3 @@ import { ParseMode, MacroDictionary, Style } from './core';

*/
export declare type OutputFormat = 'latex' | 'latex-expanded' | 'json' | 'json-2' | 'spoken' | 'spoken-text' | 'spoken-ssml' | 'spoken-ssml-withHighlighting' | 'mathML' | 'ASCIIMath';
export declare type OutputFormat = 'latex' | 'latex-expanded' | 'mathjson' | 'json' | 'json-2' | 'spoken' | 'spoken-text' | 'spoken-ssml' | 'spoken-ssml-withHighlighting' | 'mathML' | 'ASCIIMath';
export declare type InsertOptions = {

@@ -66,6 +66,7 @@ /** If `"auto"` or omitted, the current mode is used */

export interface Mathfield {
getConfig(keys: keyof MathfieldConfig): any;
getConfig(keys: string[]): MathfieldConfig;
getConfig(keys: keyof MathfieldConfig | string[]): any | MathfieldConfig;
$setConfig(config: MathfieldConfig): void;
mode: ParseMode;
getConfig<K extends keyof MathfieldConfig>(keys: K[]): Pick<MathfieldConfig, K>;
getConfig<K extends keyof MathfieldConfig>(key: K): MathfieldConfig[K];
getConfig(): MathfieldConfig;
$setConfig(config: Partial<MathfieldConfig>): void;
/**

@@ -99,3 +100,3 @@ * Reverts this mathfield to its original content.

*/
$perform(command: Selector | any[]): boolean;
$perform(command: Selector | [Selector, ...any[]]): boolean;
/**

@@ -225,2 +226,7 @@ * Returns a textual representation of the mathfield.

$typedText(text: string): void;
getCaretPosition(): {
x: number;
y: number;
} | null;
setCaretPosition(x: number, y: number): boolean;
}

@@ -227,0 +233,0 @@ export interface Model {

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

/* 0.55.0 */ /**
/* 0.56.0 */ /**
*

@@ -16,4 +16,4 @@ * Use MathLive to render and edit mathematical formulas.

*
* @packageDocumentation MathLive SDK Reference 0.55.0
* @version 0.55.0
* @packageDocumentation MathLive SDK Reference 0.56.0
* @version 0.56.0
*

@@ -28,3 +28,3 @@ */

/**
* Current version: `0.55.0`
* Current version: `0.56.0`
*

@@ -31,0 +31,0 @@ * The version string of the SDK using the [semver](https://semver.org/) convention:

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

/* 0.55.0 */ /**
/* 0.56.0 */ /**
* @internal

@@ -3,0 +3,0 @@ */

@@ -0,0 +0,0 @@ Copyright (c) 2017 - present Arno Gourdol. All rights reserved.

{
"name": "mathlive",
"version": "0.55.0",
"version": "0.56.0",
"description": "Render and edit beautifully typeset math",

@@ -86,14 +86,15 @@ "license": "MIT",

"devDependencies": {
"@babel/types": "^7.11.0",
"@babel/types": "^7.11.5",
"@cortex-js/prettier-config": "^1.0.0",
"@types/css-font-loading-module": "0.0.4",
"@types/jest": "^26.0.10",
"@types/node": "^14.6.0",
"@typescript-eslint/eslint-plugin": "^3.9.0",
"@typescript-eslint/parser": "^3.9.0",
"@typescript-eslint/typescript-estree": "^3.9.0",
"@types/jest": "^26.0.14",
"@types/node": "^14.11.2",
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@typescript-eslint/parser": "^4.2.0",
"@typescript-eslint/typescript-estree": "^4.2.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"autoprefixer": "^9.8.6",
"check-node-version": "^4.0.3",
"cssnano": "^4.1.10",
"eslint": "^7.7.0",
"eslint": "^7.9.0",
"eslint-config-prettier": "latest",

@@ -103,19 +104,18 @@ "eslint-plugin-no-unsanitized": "^3.1.2",

"http-server": "^0.12.3",
"husky": "^4.2.5",
"jest": "^26.4.0",
"husky": "^4.3.0",
"jest": "^26.4.2",
"jest-silent-reporter": "^0.2.1",
"less": "^3.12.2",
"lint-staged": "^10.2.11",
"postcss-cli": "^7.1.1",
"prettier": "^2.0.5",
"lint-staged": "^10.4.0",
"postcss-cli": "^7.1.2",
"prettier": "^2.1.2",
"rimraf": "^3.0.2",
"rollup": "^2.26.3",
"rollup": "^2.28.1",
"rollup-plugin-copy": "^3.3.0",
"rollup-plugin-eslint": "^7.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-postcss": "^3.1.5",
"rollup-plugin-terser": "^7.0.0",
"rollup-plugin-postcss": "^3.1.8",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.27.2",
"ts-jest": "^26.2.0",
"typescript": "^3.9.7"
"ts-jest": "^26.4.0",
"typescript": "^4.0.3"
},

@@ -122,0 +122,0 @@ "dependencies": {},

@@ -0,0 +0,0 @@ <img alt="math live" src="assets/logo.png?raw=true">

Sorry, the diff of this file is too big to display

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 too big to display

Sorry, the diff of this file is too big to display

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc