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

mobx-keystone

Package Overview
Dependencies
Maintainers
1
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobx-keystone - npm Package Compare versions

Comparing version 0.51.1 to 0.52.0

64

dist/actionMiddlewares/undoMiddleware.d.ts

@@ -7,4 +7,19 @@ import { ActionMiddlewareDisposer } from "../action/middleware";

*/
export interface UndoEvent {
export declare type UndoEvent = UndoSingleEvent | UndoEventGroup;
/**
* Undo event type.
*/
export declare enum UndoEventType {
Single = "single",
Group = "group"
}
/**
* An undo/redo single event.
*/
export interface UndoSingleEvent {
/**
* Expresses this is a single event.
*/
readonly type: UndoEventType.Single;
/**
* Path to the object that invoked the action from its root.

@@ -28,2 +43,19 @@ */

}
/**
* An undo/redo event group.
*/
export interface UndoEventGroup {
/**
* Expresses this is an event group.
*/
readonly type: UndoEventType.Group;
/**
* Name of the group (if any).
*/
readonly groupName?: string;
/**
* Events that conform this group (might be single events or other nested groups).
*/
readonly events: ReadonlyArray<UndoEvent>;
}
declare const UndoStore_base: import("../model/Model")._Model<unknown, {

@@ -60,2 +92,15 @@ undoEvents: import("..").OptionalModelProp<UndoEvent[], UndoEvent[]>;

_addUndo(event: UndoEvent): void;
private _groupStack;
/**
* @ignore
*/
_addUndoToCurrentGroup(event: UndoEvent): void;
/**
* @ignore
*/
_startGroup(groupName: string | undefined): void;
/**
* @ignore
*/
_endGroup(): void;
}

@@ -134,2 +179,19 @@ /**

/**
* Runs a synchronous code block as an undo group.
* Note that nested groups are allowed.
*
* @param groupName Group name.
* @param fn Code block.
* @returns Code block return value.
*/
withGroup<T>(groupName: string, fn: () => T): T;
/**
* Runs a synchronous code block as an undo group.
* Note that nested groups are allowed.
*
* @param fn Code block.
* @returns Code block return value.
*/
withGroup<T>(fn: () => T): T;
/**
* Creates an instance of `UndoManager`.

@@ -136,0 +198,0 @@ * Do not use directly, use `undoMiddleware` instead.

2

package.json
{
"name": "mobx-keystone",
"version": "0.51.1",
"version": "0.52.0",
"description": "A MobX powered state management solution based on data trees with first class support for Typescript, snapshots, patches and much more",

@@ -5,0 +5,0 @@ "keywords": [

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

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 not supported yet

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

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