Comparing version 0.78.2 to 0.79.0
@@ -1,2 +0,2 @@ | ||
/* 0.78.2 */ import type { Keys } from './types-utils'; | ||
/* 0.79.0 */ import type { Keys } from './types-utils'; | ||
import type { ParseMode, Style } from './core'; | ||
@@ -3,0 +3,0 @@ import type { InsertOptions, Mathfield, Model, VirtualKeyboardInterface } from './mathfield'; |
@@ -1,2 +0,2 @@ | ||
/* 0.78.2 */ /** | ||
/* 0.79.0 */ /** | ||
* The mode that indicates how a portion of content is interpreted | ||
@@ -3,0 +3,0 @@ * |
@@ -1,2 +0,2 @@ | ||
/* 0.78.2 */ import { Selector } from './commands'; | ||
/* 0.79.0 */ import { Selector } from './commands'; | ||
import { LatexSyntaxError, ParseMode, Style } from './core'; | ||
@@ -727,2 +727,3 @@ import { Mathfield, InsertOptions, OutputFormat, Offset, Range, Selection } from './mathfield'; | ||
set selection(sel: Selection | Offset); | ||
get selectionIsCollapsed(): boolean; | ||
/** | ||
@@ -729,0 +730,0 @@ * The position of the caret/insertion point, from 0 to `lastOffset`. |
@@ -1,2 +0,2 @@ | ||
/* 0.78.2 */ import { Selector } from './commands'; | ||
/* 0.79.0 */ import { Selector } from './commands'; | ||
import { CombinedVirtualKeyboardOptions, MathfieldOptions } from './options'; | ||
@@ -3,0 +3,0 @@ import { ParseMode, Style } from './core'; |
@@ -1,2 +0,2 @@ | ||
/* 0.78.2 */ /** | ||
/* 0.79.0 */ /** | ||
* | ||
@@ -16,4 +16,4 @@ * Use MathLive to render and edit mathematical formulas. | ||
* | ||
* @packageDocumentation MathLive SDK Reference 0.78.2 | ||
* @version 0.78.2 | ||
* @packageDocumentation MathLive SDK Reference 0.79.0 | ||
* @version 0.79.0 | ||
* | ||
@@ -20,0 +20,0 @@ */ |
@@ -1,2 +0,2 @@ | ||
/* 0.78.2 */ import { MacroDictionary, ParseMode, Registers } from './core'; | ||
/* 0.79.0 */ import { MacroDictionary, ParseMode, Registers } from './core'; | ||
import type { Mathfield, Range } from './mathfield'; | ||
@@ -107,3 +107,3 @@ import { VirtualKeyboardMode } from './mathfield-element'; | ||
/** The command is a single selector, or a selector with arguments */ | ||
command: Selector | [Selector, ...any[]]; | ||
command: Selector | string[] | [string, any] | [string, any, any] | [string, any, any, any]; | ||
/** | ||
@@ -252,3 +252,3 @@ * If specified, this indicates in which mode this keybinding will apply. | ||
*/ | ||
command: Selector | [Selector, ...any[]]; | ||
command: Selector | string[] | [string, any] | [string, any, any] | [string, any, any, any]; | ||
/** | ||
@@ -457,53 +457,12 @@ * LaTeX fragment to insert when the keycap is pressed | ||
/** | ||
* A hook invoked when a keystroke is about to be processed. | ||
* | ||
* - <var>keystroke</var>: a string describing the keystroke | ||
* - <var>ev</var>: the native keyboard event | ||
* | ||
* Return `false` to stop the handling of the event. | ||
* | ||
* @deprecated Use corresponding events of `MathfieldElement` instead | ||
* | ||
*/ | ||
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. | ||
* interpreted as shortcut has been typed. | ||
* | ||
* If not a multichar symbol, return the empty string `""`. | ||
* If not a special shortcut, return the empty string `""`. | ||
* | ||
* If a multichar symbol, return the symbol wrapped appropriately, | ||
* Use this handler to detect multi character symbols, and return them wrapped appropriately, | ||
* for example `\mathrm{${symbol}}`. | ||
*/ | ||
onMulticharSymbol: (sender: Mathfield, symbol: string) => string; | ||
onInlineShortcut: (sender: Mathfield, symbol: string) => string; | ||
/** | ||
* A hook invoked when keyboard navigation would cause the insertion | ||
* point to leave the mathfield. | ||
* | ||
* - <var>direction</var> indicates the direction of the navigation, either | ||
* `"forward"` or `"backward"` or `"upward"` or `"downward"`. | ||
* | ||
* Return `false` if the move has been handled by the hook. | ||
* | ||
* Return `true` for the default behavior, which is playing a "plonk" sound. | ||
* | ||
* @deprecated Use corresponding events of `MathfieldElement` instead | ||
* | ||
*/ | ||
onMoveOutOf: (sender: Mathfield, direction: 'forward' | 'backward' | 'upward' | 'downward') => boolean; | ||
/** | ||
* This hook is invoked when pressing tab (or shift-tab) would cause the | ||
* insertion point to leave the mathfield. | ||
* | ||
* <var>direction</var> indicates the direction of the navigation. | ||
* | ||
* By default, the insertion point jumps to the next/previous focussable | ||
* element. | ||
* | ||
* @deprecated Use corresponding events of `MathfieldElement` instead | ||
* | ||
* | ||
*/ | ||
onTabOutOf: (sender: Mathfield, direction: 'forward' | 'backward') => boolean; | ||
/** | ||
* This hooks is invoked when the user has requested to export the content | ||
@@ -546,3 +505,2 @@ * of the mathfield, for example when pressing ctrl/command+C. | ||
}; | ||
export declare type UndoStateChangeListener = (target: Mathfield, action: 'undo' | 'redo' | 'snapshot') => void; | ||
export declare type ContentChangeType = 'insertText' | 'insertLineBreak' | 'insertFromPaste' | 'historyUndo' | 'historyRedo' | 'deleteByCut' | 'deleteContent' | 'deleteContentBackward' | 'deleteContentForward' | 'deleteWordBackward' | 'deleteWordForward' | 'deleteSoftLineBackward' | 'deleteSoftLineForward' | 'deleteHardLineBackward' | 'deleteHardLineForward'; | ||
@@ -555,31 +513,2 @@ export declare type ContentChangeOptions = { | ||
}; | ||
/** | ||
* The methods provide a notification that an event is about to occur or has | ||
* occurred. | ||
* | ||
* In general instead of using this interface you should be listening to the | ||
* corresponding event on `MathfieldElement`, i.e. | ||
* ```javascript | ||
mfe.addEventListener('input', (ev) => { | ||
console.log(ev.target.value); | ||
}); | ||
* ``` | ||
* @deprecated Use corresponding events of `MathfieldElement` instead | ||
*/ | ||
export interface MathfieldListeners { | ||
/** The mathfield has lost keyboard focus */ | ||
onBlur: (sender: Mathfield) => void; | ||
/** The mathfield has gained keyboard focus */ | ||
onFocus: (sender: Mathfield) => void; | ||
onContentWillChange: (sender: Mathfield, options: ContentChangeOptions) => boolean; | ||
onContentDidChange: (sender: Mathfield, options: ContentChangeOptions) => void; | ||
onSelectionWillChange: (sender: Mathfield) => void; | ||
onSelectionDidChange: (sender: Mathfield) => void; | ||
onUndoStateWillChange: UndoStateChangeListener; | ||
onUndoStateDidChange: UndoStateChangeListener; | ||
onCommit: (sender: Mathfield) => void; | ||
onModeChange: (sender: Mathfield, mode: ParseMode) => void; | ||
onReadAloudStatus: (sender: Mathfield) => void; | ||
onPlaceholderDidChange: (sender: Mathfield, placeholderId: string) => void; | ||
} | ||
export declare type KeyboardOptions = { | ||
@@ -937,3 +866,3 @@ keybindings: Keybinding[]; | ||
*/ | ||
export declare type MathfieldOptions = LayoutOptions & EditingOptions & LocalizationOptions & InlineShortcutsOptions & KeyboardOptions & VirtualKeyboardOptions & TextToSpeechOptions & CoreOptions & MathfieldHooks & MathfieldListeners & { | ||
export declare type MathfieldOptions = LayoutOptions & EditingOptions & LocalizationOptions & InlineShortcutsOptions & KeyboardOptions & VirtualKeyboardOptions & TextToSpeechOptions & CoreOptions & MathfieldHooks & { | ||
/** | ||
@@ -940,0 +869,0 @@ * When `true`, use a shared virtual keyboard for all the mathfield |
@@ -1,2 +0,2 @@ | ||
/* 0.78.2 */ /** | ||
/* 0.79.0 */ /** | ||
* @internal | ||
@@ -3,0 +3,0 @@ */ |
{ | ||
"name": "mathlive", | ||
"version": "0.78.2", | ||
"version": "0.79.0", | ||
"description": "Render and edit beautifully typeset math", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
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
6293828
91065