Comparing version 0.72.3 to 0.73.0
@@ -1,4 +0,5 @@ | ||
/* 0.72.3 */ import type { Keys } from './types-utils'; | ||
/* 0.73.0 */ import type { Keys } from './types-utils'; | ||
import type { ParseMode, Style } from './core'; | ||
import type { InsertOptions, Mathfield, Model, VirtualKeyboardInterface } from './mathfield'; | ||
import { VirtualKeyboardTheme } from '../editor/virtual-keyboard-utils'; | ||
/** | ||
@@ -83,2 +84,3 @@ * How much of the formula should be spoken: | ||
insert: (mathfield: Mathfield, s: string, options: InsertOptions) => boolean; | ||
insertDecimalSeparator: (mathfield: Mathfield) => boolean; | ||
typedText: (text: string, options: { | ||
@@ -283,3 +285,3 @@ /** If true, the mathfield will be focused */ | ||
*/ | ||
toggleVirtualKeyboard: (keyboard: VirtualKeyboardInterface, theme: 'apple' | 'material' | '') => boolean; | ||
toggleVirtualKeyboard: (keyboard: VirtualKeyboardInterface, theme: VirtualKeyboardTheme) => boolean; | ||
/** | ||
@@ -292,4 +294,4 @@ * @category Virtual Keyboard | ||
*/ | ||
showVirtualKeyboard: (keyboard: VirtualKeyboardInterface, theme: 'apple' | 'material' | '') => boolean; | ||
showVirtualKeyboard: (keyboard: VirtualKeyboardInterface, theme: VirtualKeyboardTheme) => boolean; | ||
} | ||
export declare type Selector = Keys<Commands>; |
@@ -1,2 +0,2 @@ | ||
/* 0.72.3 */ /** | ||
/* 0.73.0 */ /** | ||
* The mode that indicates how a portion of content is interpreted | ||
@@ -3,0 +3,0 @@ * |
@@ -1,2 +0,2 @@ | ||
/* 0.72.3 */ import { MathfieldOptions } from './options'; | ||
/* 0.73.0 */ import { MathfieldOptions } from './options'; | ||
import { Selector } from './commands'; | ||
@@ -83,2 +83,6 @@ import { Mathfield, InsertOptions, OutputFormat, Offset, Range, Selection } from './mathfield'; | ||
}; | ||
/** | ||
* See documentation for the `virtual-keyboard-mode` option. | ||
*/ | ||
export declare type VirtualKeyboardMode = 'auto' | 'manual' | 'onfocus' | 'off'; | ||
declare global { | ||
@@ -237,16 +241,16 @@ /** | ||
/** | ||
* - `'manual'`: pressing the virtual keyboard toggle button will show or hide | ||
* - `"manual"`: pressing the virtual keyboard toggle button will show or hide | ||
* the virtual keyboard. If hidden, the virtual keyboard is not shown when | ||
* the field is focused until the toggle button is pressed. | ||
* - `'onfocus'`: the virtual keyboard will be displayed whenever the field is | ||
* - `"onfocus"`: the virtual keyboard will be displayed whenever the field is | ||
* focused and hidden when the field loses focus. In that case, the virtual | ||
* keyboard toggle button is not displayed. | ||
* - `'off'`: the virtual keyboard toggle button is not displayed, and the | ||
* - `"off"`: the virtual keyboard toggle button is not displayed, and the | ||
* virtual keyboard is never triggered. | ||
* | ||
* If the setting is empty, it will default to `'onfocus'` on touch-capable | ||
* devices and to `'off'` otherwise. | ||
* If the setting is `"auto"`, it will default to `"onfocus"` on touch-capable | ||
* devices and to `"off"` otherwise. | ||
* | ||
*/ | ||
'virtual-keyboard-mode': 'auto' | 'manual' | 'onfocus' | 'off'; | ||
'virtual-keyboard-mode': VirtualKeyboardMode; | ||
/** | ||
@@ -474,3 +478,3 @@ * The visual theme used for the virtual keyboard. | ||
*/ | ||
static get optionsAttributes(): Record<string, 'number' | 'boolean' | 'string'>; | ||
static get optionsAttributes(): Record<string, 'number' | 'boolean' | 'string' | 'on/off'>; | ||
/** | ||
@@ -697,4 +701,4 @@ * Custom elements lifecycle hooks | ||
set virtualKeyboardLayout(value: 'auto' | 'qwerty' | 'azerty' | 'qwertz' | 'dvorak' | 'colemak'); | ||
get virtualKeyboardMode(): 'auto' | 'manual' | 'onfocus' | 'off'; | ||
set virtualKeyboardMode(value: 'auto' | 'manual' | 'onfocus' | 'off'); | ||
get virtualKeyboardMode(): VirtualKeyboardMode; | ||
set virtualKeyboardMode(value: VirtualKeyboardMode); | ||
get virtualKeyboardTheme(): 'material' | 'apple' | ''; | ||
@@ -701,0 +705,0 @@ set virtualKeyboardTheme(value: 'material' | 'apple' | ''); |
@@ -1,4 +0,5 @@ | ||
/* 0.72.3 */ import { Selector } from './commands'; | ||
import { CoreOptions, MathfieldOptions, VirtualKeyboardOptions } from './options'; | ||
/* 0.73.0 */ import { Selector } from './commands'; | ||
import { MathfieldOptions } from './options'; | ||
import { ParseMode, MacroDictionary, Style, Registers } from './core'; | ||
import { CombinedVirtualKeyboardOptions } from '../editor/virtual-keyboard-utils.js'; | ||
/** | ||
@@ -47,4 +48,3 @@ * | ||
/** | ||
* If true, promote plain fences, e.g. `(`, | ||
* as `\left...\right` or `\mleft...\mright` | ||
* If `true`, promote plain fences, e.g. `(...)`, as `\left()...\right)` | ||
*/ | ||
@@ -54,13 +54,13 @@ smartFence?: boolean; | ||
registers?: Registers; | ||
/** If true, the mathfield will be focused after | ||
/** If `true`, the mathfield will be focused after | ||
* the insertion | ||
*/ | ||
focus?: boolean; | ||
/** If true, provide audio and haptic feedback | ||
/** If `true`, provide audio and haptic feedback | ||
*/ | ||
feedback?: boolean; | ||
/** If true, scroll the caret into view after insertion | ||
/** If `true`, scroll the caret into view after insertion | ||
*/ | ||
scrollIntoView?: boolean; | ||
/** If true, the style after the insertion | ||
/** If `true`, the style after the insertion | ||
* is the same as the style before. If false, the style after the | ||
@@ -142,3 +142,3 @@ * insertion is the style of the last inserted atom. | ||
stateChanged(): void; | ||
setOptions(options: VirtualKeyboardOptions & CoreOptions): void; | ||
setOptions(options: CombinedVirtualKeyboardOptions): void; | ||
} | ||
@@ -145,0 +145,0 @@ export interface Mathfield { |
@@ -1,2 +0,2 @@ | ||
/* 0.72.3 */ /** | ||
/* 0.73.0 */ /** | ||
* | ||
@@ -16,4 +16,4 @@ * Use MathLive to render and edit mathematical formulas. | ||
* | ||
* @packageDocumentation MathLive SDK Reference 0.72.3 | ||
* @version 0.72.3 | ||
* @packageDocumentation MathLive SDK Reference 0.73.0 | ||
* @version 0.73.0 | ||
* | ||
@@ -20,0 +20,0 @@ */ |
@@ -1,3 +0,4 @@ | ||
/* 0.72.3 */ import { ErrorListener, MacroDictionary, ParseMode, ParserErrorCode, MathfieldErrorCode, Registers } from './core'; | ||
/* 0.73.0 */ import { ErrorListener, MacroDictionary, ParseMode, ParserErrorCode, MathfieldErrorCode, Registers } from './core'; | ||
import type { Mathfield, Range } from './mathfield'; | ||
import { VirtualKeyboardMode } from './mathfield-element'; | ||
import type { Selector } from './commands'; | ||
@@ -437,3 +438,3 @@ import type { ErrorCode as MathJsonErrorCode } from '@cortex-js/compute-engine/dist/math-json.min.esm.js'; | ||
*/ | ||
virtualKeyboardMode: 'auto' | 'manual' | 'onfocus' | 'off'; | ||
virtualKeyboardMode: VirtualKeyboardMode; | ||
/** | ||
@@ -470,4 +471,14 @@ * Element the virtual keyboard element gets appended to. The `position` | ||
*/ | ||
onKeystroke: (sender: Mathfield, keystroke: string, ev?: KeyboardEvent) => boolean; | ||
onKeystroke: (sender: Mathfield, keystroke: string, ev: KeyboardEvent) => boolean; | ||
/** | ||
* A hook invoked when a string of characters that could be | ||
* interpreted as a multichar symbol has been typed. | ||
* | ||
* If not a multichar symbol, return the empty string `""`. | ||
* | ||
* If a multichar symbol, return the symbol wrapped appropriately, | ||
* for example `\mathrm{${symbol}}`. | ||
*/ | ||
onMulticharSymbol: (sender: Mathfield, symbol: string) => string; | ||
/** | ||
* A hook invoked when keyboard navigation would cause the insertion | ||
@@ -630,3 +641,7 @@ * point to leave the mathfield. | ||
export declare type EditingOptions = { | ||
/** When true, the user cannot edit the mathfield. */ | ||
/** When `true`, the user cannot edit the mathfield. The mathfield can still | ||
* be modified programatically. | ||
* | ||
* **Default**: `false` | ||
*/ | ||
readOnly: boolean; | ||
@@ -643,9 +658,9 @@ /** | ||
* |---:|:---| | ||
* | "i" | math mode, imaginary unit | | ||
* | "if" | text mode, english word "if" | | ||
* | "if x" | all in text mode, maybe the next word is xylophone? | | ||
* | "if x >" | "if" stays in text mode, but now "x >" is in math mode | | ||
* | "if x > 0" | "if" in text mode, "x > 0" in math mode | | ||
* | `i` | math mode, imaginary unit | | ||
* | `if` | text mode, english word "if" | | ||
* | `if x` | all in text mode, maybe the next word is xylophone? | | ||
* | `if x >` | "if" stays in text mode, but now "x >" is in math mode | | ||
* | `if x > 0` | "if" in text mode, "x > 0" in math mode | | ||
* | ||
* Smart Mode is off by default. | ||
* **Default**: `false` | ||
* | ||
@@ -658,12 +673,12 @@ * Manually switching mode (by typing `alt/option+=`) will temporarily turn | ||
* | ||
* - slope = rise/run | ||
* - If x > 0, then f(x) = sin(x) | ||
* - x^2 + sin (x) when x > 0 | ||
* - When x<0, x^{2n+1}<0 | ||
* - Graph x^2 -x+3 =0 for 0<=x<=5 | ||
* - Divide by x-3 and then add x^2-1 to both sides | ||
* - Given g(x) = 4x – 3, when does g(x)=0? | ||
* - Let D be the set {(x,y)|0<=x<=1 and 0<=y<=x} | ||
* - \int\_{the unit square} f(x,y) dx dy | ||
* - For all n in NN | ||
* - `slope = rise/run` | ||
* - `If x > 0, then f(x) = sin(x)` | ||
* - `x^2 + sin (x) when x > 0` | ||
* - `When x<0, x^{2n+1}<0` | ||
* - `Graph x^2 -x+3 =0 for 0<=x<=5` | ||
* - `Divide by x-3 and then add x^2-1 to both sides` | ||
* - `Given g(x) = 4x – 3, when does g(x)=0?` | ||
* - `Let D be the set {(x,y)|0<=x<=1 and 0<=y<=x}` | ||
* - `\int\_{the unit square} f(x,y) dx dy` | ||
* - `For all n in NN` | ||
* | ||
@@ -712,2 +727,4 @@ */ | ||
* removed automatically. | ||
* | ||
* **Default**: `true` | ||
*/ | ||
@@ -717,6 +734,28 @@ removeExtraneousParentheses: boolean; | ||
* The Latex string to insert when the spacebar is pressed (on the physical or | ||
* virtual keyboard). Empty by default. Use `\;` for a thick space, `\:` for | ||
* a medium space, `\,` for a thin space. | ||
* virtual keyboard). | ||
* | ||
* Use `\;` for a thick space, `\:` for a medium space, `\,` for a thin space. | ||
* | ||
* Do not use ` ` (a regular space), as whitespace is skipped by LaTeX so this | ||
* will do nothing. | ||
* | ||
* **Default**: `""` (empty string) | ||
*/ | ||
mathModeSpace: string; | ||
/** | ||
* The symbol used to separate the integer part from the fractional part of a | ||
* number. | ||
* | ||
* When `","` is used, the corresponding LaTeX string is `{,}`, in order | ||
* to ensure proper spacing (otherwise an extra gap is displayed after the | ||
* comma). | ||
* | ||
* This affects: | ||
* - what happens when the `,` key is pressed (if `decimalSeparator` is | ||
* `","`, the `{,}` LaTeX string is inserted when following some digits) | ||
* - the label and behavior of the "." key in the default virtual keyboard | ||
* | ||
* **Default**: `"."` | ||
*/ | ||
decimalSeparator: ',' | '.'; | ||
}; | ||
@@ -723,0 +762,0 @@ export declare type LayoutOptions = { |
@@ -1,2 +0,2 @@ | ||
/* 0.72.3 */ /** | ||
/* 0.73.0 */ /** | ||
* @internal | ||
@@ -3,0 +3,0 @@ */ |
{ | ||
"name": "mathlive", | ||
"version": "0.72.3", | ||
"version": "0.73.0", | ||
"description": "Render and edit beautifully typeset math", | ||
@@ -8,3 +8,3 @@ "license": "MIT", | ||
"type": "individual", | ||
"url": "paypal.me/arnogourdol" | ||
"url": "https://paypal.me/arnogourdol" | ||
}, | ||
@@ -21,3 +21,3 @@ "repository": { | ||
"lint": "eslint --fix src/", | ||
"prepare": "bash ./scripts/build.sh production && husky install", | ||
"prepare": "bash ./scripts/build.sh production", | ||
"start": "bash ./scripts/start.sh", | ||
@@ -34,16 +34,3 @@ "test": "bash ./scripts/test.sh", | ||
], | ||
"prettier": { | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"endOfLine": "lf", | ||
"jsxSingleQuote": false, | ||
"proseWrap": "always", | ||
"quoteProps": "consistent", | ||
"semi": true, | ||
"singleQuote": true, | ||
"indentSize": 2, | ||
"tabWidth": 2, | ||
"trailingComma": "es5", | ||
"useTabs": false | ||
}, | ||
"prettier": "@cortex-js/prettier-config", | ||
"engines": { | ||
@@ -83,13 +70,14 @@ "npm": ">=8.5.0", | ||
"@arnog/esbuild-plugin-less": "^1.1.0", | ||
"@cortex-js/compute-engine": "^0.6.0", | ||
"@cortex-js/prettier-config": "^1.1.1", | ||
"@cortex-js/compute-engine": "^0.6.0", | ||
"@rollup/plugin-node-resolve": "^13.2.1", | ||
"@rollup/plugin-node-resolve": "^13.3.0", | ||
"@types/css-font-loading-module": "0.0.7", | ||
"@typescript-eslint/eslint-plugin": "^5.20.0", | ||
"@typescript-eslint/parser": "^5.20.0", | ||
"autoprefixer": "10.4.4", | ||
"@types/jest": "^27.5.1", | ||
"@typescript-eslint/eslint-plugin": "^5.25.0", | ||
"@typescript-eslint/parser": "^5.25.0", | ||
"autoprefixer": "^10.4.7", | ||
"check-node-version": "^4.2.1", | ||
"cssnano": "^5.1.7", | ||
"esbuild": "^0.14.38", | ||
"eslint": "^8.14.0", | ||
"cssnano": "^5.1.8", | ||
"esbuild": "^0.14.39", | ||
"eslint": "^8.15.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
@@ -101,18 +89,17 @@ "eslint-plugin-import": "^2.26.0", | ||
"http-server": "^14.1.0", | ||
"husky": "^7.0.4", | ||
"jest": "^27.5.1", | ||
"jest": "^28.1.0", | ||
"jest-environment-jsdom": "^28.1.0", | ||
"jest-silent-reporter": "^0.5.0", | ||
"less": "^4.1.2", | ||
"open": "^8.4.0", | ||
"postcss": "^8.4.12", | ||
"postcss": "^8.4.14", | ||
"postcss-cli": "^9.1.0", | ||
"prettier": "^2.6.2", | ||
"rollup": "^2.70.2", | ||
"rollup": "^2.73.0", | ||
"rollup-plugin-copy": "^3.4.0", | ||
"rollup-plugin-eslint": "^7.0.0", | ||
"rollup-plugin-postcss": "^4.0.2", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-typescript2": "^0.31.2", | ||
"ts-jest": "^27.1.4", | ||
"typescript": "^4.6.3" | ||
"ts-jest": "^28.0.2", | ||
"typescript": "^4.6.4" | ||
}, | ||
@@ -124,2 +111,5 @@ "keywords": [ | ||
"math-editing", | ||
"cortex", | ||
"compute engine", | ||
"virtual keyboard", | ||
"latex", | ||
@@ -126,0 +116,0 @@ "tex", |
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
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
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
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 3 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 10 instances in 1 package
6259224
11
90702