Socket
Socket
Sign inDemoInstall

mathlive

Package Overview
Dependencies
3
Maintainers
1
Versions
168
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.92.1 to 0.93.0

2

dist/types/commands.d.ts

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

/* 0.92.1 */ import type { Keys } from './types-utils';
/* 0.93.0 */ import type { Keys } from './types-utils';
import type { ParseMode, Style, TabularEnvironment } from './core-types';

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

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

/* 0.92.1 */ export type MathstyleName = 'displaystyle' | 'textstyle' | 'scriptstyle' | 'scriptscriptstyle';
/* 0.93.0 */ export type MathstyleName = 'displaystyle' | 'textstyle' | 'scriptstyle' | 'scriptscriptstyle';
export type NormalizedMacroDictionary = Record<string, MacroDefinition>;
export type ArgumentType = ParseMode | ('bbox' | 'colspec' | 'delim' | 'dimen' | 'number' | 'rest' | 'glue' | 'string' | 'balanced-string' | 'expression' | 'auto');
export type ArgumentType = ParseMode | ('bbox' | 'colspec' | 'delim' | 'value' | 'rest' | 'string' | 'balanced-string' | 'expression' | 'auto');
export type Token = string;

@@ -45,5 +45,6 @@ /**

*
* Typically, those are controlled with explicit commands, such as `\mathbb{}` or
* `\mathfrak{}`. This type is used with the [[`applyStyle`]] method to change
* the styling of a range of selected characters.
* Typically, those are controlled with explicit commands, such as
* `\mathbb{}` or `\mathfrak{}`. This type is used with the
* [[`applyStyle`]] method to change the styling of a range of
* selected characters.
*

@@ -53,10 +54,13 @@ * In mathematical notation these variants are used not only for visual

*
* For example, the set ℂ should not be confused with the physical unit 𝖢 (Coulomb).
* For example,
* - the set ℂ should not be confused with
* - the physical unit 𝖢 (Coulomb).
*
* When rendered, these variants can map to some built-in fonts.
*
* LaTeX supports a limited set of characters. However, MathLive will
* map characters not supported by LaTeX fonts(double-stuck variant for digits
* map characters not supported by LaTeX fonts (double-stuck variant for digits
* for example) to a Unicode character (see [Mathematical Alphanumeric Symbols on Wikipedia](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols) ).
*
* `normal` is a synthetic variant that maps either to `main` (roman) or
* `normal` is a synthetic variant that maps either to `main` (upright) or
* `math` (italic) depending on the symbol and the `letterShapeStyle`.

@@ -66,4 +70,3 @@ *

* letter shape and spacing (a bit more space after the "f" for example), so
* it's not completely equivalent to a `main` variant with `italic` variant style
* applied.
* it's not equivalent to a `main` variant with `italic` variant style applied.
*

@@ -80,10 +83,10 @@ * **See Also**

*
| variant | `up` | `bold` | `italic` | `bolditalic` |
| ------------------ | --- | --- | --- | --- |
| `normal` | ABCabc012 | 𝐀𝐁𝐂𝐚𝐛𝐜𝟎𝟏𝟐 | 𝐴𝐵𝐶𝑎𝑏𝑐 | 𝑨𝑩𝑪𝒂𝒃𝒄 |
| `double-struck` | 𝔸𝔹ℂ𝕒𝕓𝕔𝟘𝟙𝟚 | n/a | n/a | n/a |
| `calligraphic` | 𝒜ℬ𝒞𝒶𝒷𝒸 | 𝓐𝓑𝓒𝓪𝓫𝓬 | n/a | n/a |
| `fraktur` | 𝔄𝔅ℭ𝔞𝔟𝔠 | 𝕬𝕭𝕮𝖆𝖇𝖈 | n/a | n/a |
| `sans-serif` | 𝖠𝖡𝖢𝖺𝖻𝖼𝟢𝟣𝟤 | 𝗔𝗕𝗖𝗮𝗯𝗰𝟬𝟭𝟮 | 𝘈𝘉𝘊𝘢𝘣𝘤 | 𝘼𝘽𝘾𝙖𝙗𝙘 |
| `monospace` | 𝙰𝙱𝙲𝚊𝚋𝚌 | n/a | n/a | n/a |
| variant | `up` | `bold` | `italic` | `bolditalic` |
| ------------------ | --- | --- | --- | --- |
| `normal` | ABCabc012 | 𝐀𝐁𝐂𝐚𝐛𝐜𝟎𝟏𝟐 | 𝐴𝐵𝐶𝑎𝑏𝑐 |𝑨𝑩𝑪𝒂𝒃𝒄 |
| `double-struck` | 𝔸𝔹ℂ𝕒𝕓𝕔𝟘𝟙𝟚 | n/a | n/a | n/a |
| `calligraphic` | 𝒜ℬ𝒞𝒶𝒷𝒸 | 𝓐𝓑𝓒𝓪𝓫𝓬 | n/a | n/a |
| `fraktur` | 𝔄𝔅ℭ𝔞𝔟𝔠 | 𝕬𝕭𝕮𝖆𝖇𝖈 | n/a | n/a |
| `sans-serif`| 𝖠𝖡𝖢𝖺𝖻𝖼𝟢𝟣𝟤 | 𝗔𝗕𝗖𝗮𝗯𝗰𝟬𝟭𝟮 | 𝘈𝘉𝘊𝘢𝘣𝘤 | 𝘼𝘽𝘾𝙖𝙗𝙘 |
| `monospace` | 𝙰𝙱𝙲𝚊𝚋𝚌 | n/a | n/a | n/a |

@@ -94,2 +97,3 @@ */

export type FontSeries = 'auto' | 'm' | 'b' | 'l' | '';
export type FontFamily = 'none' | 'roman' | 'monospace' | 'sans-serif';
export type FontSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;

@@ -110,9 +114,8 @@ /**

backgroundColor?: string;
fontSize?: FontSize | 'auto';
variant?: Variant;
variantStyle?: VariantStyle;
fontFamily?: string;
fontFamily?: FontFamily;
fontShape?: FontShape;
fontSeries?: FontSeries;
fontSize?: FontSize | 'auto';
letterShapeStyle?: 'tex' | 'french' | 'iso' | 'upright' | 'auto';
}

@@ -129,4 +132,4 @@ /**

args?: number;
captureSelection?: boolean;
expand?: boolean;
captureSelection?: boolean;
};

@@ -159,4 +162,19 @@ export type MacroPackageDefinition = {

};
export type RegisterValue = Dimension | Glue | number | string;
/**
* A LaTeX expression represent a sequence of tokens that can be evaluated to
* a value, such as a dimension.
*/
export type LatexValue = {
relax?: boolean;
} & (Dimension | Glue | {
string: string;
} | {
number: number;
base?: 'decimal' | 'octal' | 'hexadecimal' | 'alpha';
} | {
register: string;
factor?: number;
global?: boolean;
});
/**
* TeX registers represent 'variables' and 'constants'.

@@ -176,3 +194,3 @@ *

*/
export type Registers = Record<string, RegisterValue>;
export type Registers = Record<string, number | string | LatexValue>;
/**

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

export type MacroDictionary = Record<string, string | Partial<MacroDefinition> | MacroPackageDefinition>;
export type BoxCSSProperties = 'background-color' | 'border' | 'border-bottom' | 'border-color' | 'border-left' | 'border-radius' | 'border-right' | 'border-right-width' | 'border-top' | 'border-top-width' | 'box-sizing' | 'color' | 'display' | 'font-family' | 'left' | 'font-size' | 'height' | 'line-height' | 'margin' | 'margin-top' | 'margin-left' | 'margin-right' | 'opacity' | 'padding' | 'position' | 'top' | 'vertical-align' | 'width' | 'z-index';
export type BoxCSSProperties = 'background-color' | 'border' | 'border-bottom' | 'border-color' | 'border-left' | 'border-radius' | 'border-right' | 'border-right-width' | 'border-top' | 'border-top-width' | 'box-sizing' | 'color' | 'display' | 'font-family' | 'left' | 'font-size' | 'height' | 'line-height' | 'margin' | 'margin-top' | 'margin-left' | 'margin-right' | 'opacity' | 'padding' | 'position' | 'top' | 'bottom' | 'vertical-align' | 'width' | 'z-index';
export type MatrixEnvironment = 'matrix' | 'matrix*' | 'pmatrix' | 'pmatrix*' | 'bmatrix' | 'bmatrix*' | 'Bmatrix' | 'Bmatrix*' | 'vmatrix' | 'vmatrix*' | 'Vmatrix' | 'Vmatrix*';

@@ -196,0 +214,0 @@ export type CasesEnvironment = 'cases' | 'dcases' | 'rcases';

@@ -1,6 +0,5 @@

/* 0.92.1 */ /// <reference types="./cortex-compute-engine" />
import { Selector } from './commands';
/* 0.93.0 */ import type { Selector } from './commands';
import type { LatexSyntaxError, MacroDictionary, ParseMode, Registers, Style } from './core-types';
import { InsertOptions, OutputFormat, Offset, Range, Selection, Mathfield } from './mathfield';
import { InlineShortcutDefinitions, Keybinding, MathfieldOptions } from './options';
import type { InsertOptions, OutputFormat, Offset, Range, Selection, Mathfield } from './mathfield';
import type { InlineShortcutDefinitions, Keybinding, MathfieldOptions } from './options';
import type { ComputeEngine } from '@cortex-js/compute-engine';

@@ -86,2 +85,3 @@ export declare type Expression = number | string | {

'letter-shape-style': string;
'min-font-scale': number;
'popover-policy': string;

@@ -316,2 +316,3 @@ /**

* | `letter-shape-style` | `mf.letterShapeStyle` |
* | `min-font-scale` | `mf.minFontScale` |
* | `popover-policy` | `mf.popoverPolicy` |

@@ -379,3 +380,4 @@ * | `math-mode-space` | `mf.mathModeSpace` |

/**
* Private lifecycle hooks
* Private lifecycle hooks.
* If adding a 'boolean' attribute, add its default value to getOptionsFromAttributes
* @internal

@@ -698,4 +700,2 @@ */

}): string[];
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: MathfieldElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: MathfieldElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
get form(): HTMLFormElement | null;

@@ -855,2 +855,3 @@ get name(): string;

canRedo(): boolean;
handleEvent(evt: Event): void;
/**

@@ -904,2 +905,4 @@ * Custom elements lifecycle hooks

set letterShapeStyle(value: 'auto' | 'tex' | 'iso' | 'french' | 'upright');
get minFontScale(): number;
set minFontScale(value: number);
get smartMode(): boolean;

@@ -906,0 +909,0 @@ set smartMode(value: boolean);

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

/* 0.92.1 */ import type { ParseMode, Style } from './core-types';
/* 0.93.0 */ import type { ParseMode, Style } from './core-types';
import { Selector } from './commands';

@@ -51,3 +51,3 @@ /**

selectionMode?: 'placeholder' | 'after' | 'before' | 'item';
suppressChangeNotifications?: boolean;
silenceNotifications?: boolean;
style?: Style;

@@ -74,3 +74,3 @@ /** If `true`, the mathfield will be focused after

operation?: 'set' | 'toggle';
suppressChangeNotifications?: boolean;
silenceNotifications?: boolean;
};

@@ -122,3 +122,2 @@ /**

export interface Mathfield {
mode: ParseMode;
/**

@@ -125,0 +124,0 @@ * Execute a [[`Commands`|command]] defined by a selector.

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

/* 0.92.1 */ /// <reference types="./cortex-compute-engine" />
/* 0.93.0 */ /**
* Server-side rendering exports.
*
* These functions do not require a DOM environment and can
* be used from a server-side environment.
*
*/
import '../core-definitions/definitions';
import { Expression } from './mathfield-element';

@@ -44,2 +51,3 @@ import type { LatexSyntaxError, ParseMode } from './core-types';

format?: string;
letterShapeStyle?: 'tex' | 'french' | 'iso' | 'upright';
}): string;

@@ -78,3 +86,3 @@ export declare function validateLatex(s: string): LatexSyntaxError[];

export declare function serializeMathJsonToLatex(json: Expression): string;
export declare function convertLatexToAsciiMath(latex: string, mode?: ParseMode): string;
export declare function convertLatexToAsciiMath(latex: string, parseMode?: ParseMode): string;
export declare function convertAsciiMathToLatex(ascii: string): string;

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

/* 0.92.1 */ /**
/* 0.93.0 */ /**
*

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

*
* @packageDocumentation MathLive SDK Reference 0.92.1
* @version 0.92.1
* @packageDocumentation MathLive SDK Reference 0.93.0
* @version 0.93.0
*

@@ -18,0 +18,0 @@ */

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

/* 0.92.1 */ import type { Mathfield, Range } from './mathfield';
/* 0.93.0 */ import type { Mathfield, Range } from './mathfield';
import type { Selector } from './commands';

@@ -460,2 +460,11 @@ import type { ParseMode, MacroDictionary, Registers } from './core-types';

letterShapeStyle: 'auto' | 'tex' | 'iso' | 'french' | 'upright';
/**
* Set the minimum relative font size for nested superscripts and fractions. The value
* should be a number between `0` and `1`. The size is in releative `em` units relative to the
* font size of the `math-field` element. Specifying a value of `0` allows the `math-field`
* to use its default sizing logic.
*
* **Default**: `0`
*/
minFontScale: number;
};

@@ -462,0 +471,0 @@ /**

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

/* 0.92.1 */ /**
/* 0.93.0 */ /**
* @internal

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

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

/* 0.92.1 */ import type { Selector } from './commands';
/* 0.93.0 */ import type { Selector } from './commands';
import type { ParseMode, Style } from './core-types';

@@ -143,3 +143,3 @@ import type { OriginValidator } from './options';

*/
set layouts(value: 'default' | (string | VirtualKeyboardLayout)[]);
set layouts(value: 'default' | VirtualKeyboardLayout | (string | VirtualKeyboardLayout)[]);
/**

@@ -191,4 +191,2 @@ * Configuration of the action toolbar, displayed on the right-hand side.

readonly style: Style;
readonly array?: unknown;
readonly boundingRect?: DOMRect;
}

@@ -214,3 +212,2 @@ /**

updateToolbar(mf: MathfieldProxy): void;
updateEnvironmemtPopover(mf: MathfieldProxy): void;
update(mf: MathfieldProxy): void;

@@ -217,0 +214,0 @@ connect(): void;

{
"name": "mathlive",
"version": "0.92.1",
"version": "0.93.0",
"description": "A web component for math input",

@@ -127,5 +127,7 @@ "license": "MIT",

"prettier": "@cortex-js/prettier-config",
"dependencies": {
"@cortex-js/compute-engine": "^0.12.2"
},
"devDependencies": {
"@arnog/esbuild-plugin-less": "^1.1.0",
"@cortex-js/compute-engine": "^0.12.2",
"@cortex-js/prettier-config": "^1.1.1",

@@ -132,0 +134,0 @@ "@playwright/test": "^1.32.3",

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 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc