@milkdown/core
Advanced tools
Comparing version 4.4.0 to 4.5.0
# @milkdown/core | ||
## 4.5.0 | ||
### Minor Changes | ||
- f0b957a: Make some improvements and add history plugin. | ||
## 4.4.0 | ||
@@ -4,0 +10,0 @@ |
@@ -1,6 +0,34 @@ | ||
import { IdleContext, LoadPluginContext, CompleteContext, SchemaReadyContext } from '../editor'; | ||
import { LoadState } from '../constant'; | ||
import { AnyRecord } from '../utility'; | ||
import type { InputRule } from 'prosemirror-inputrules'; | ||
import type { Node as ProsemirrorNode, Schema } from 'prosemirror-model'; | ||
import type { Plugin as ProsemirrorPlugin } from 'prosemirror-state'; | ||
import type { EditorView, NodeView } from 'prosemirror-view'; | ||
import type { RemarkOptions } from 'remark'; | ||
import type { Processor } from 'unified'; | ||
import type { Mark, Node } from '../abstract'; | ||
import type { LoadState } from '../constant'; | ||
import type { Editor } from '../editor'; | ||
import type { AnyRecord, MarkViewParams, NodeViewParams } from '../utility'; | ||
export declare type GetCurrentContextByState<T extends LoadState> = T extends LoadState.Idle ? IdleContext : T extends LoadState.LoadSchema ? IdleContext : T extends LoadState.SchemaReady ? SchemaReadyContext : T extends LoadState.LoadPlugin ? LoadPluginContext : T extends LoadState.Complete ? CompleteContext : AnyRecord; | ||
export declare type GetNextContextByState<T extends LoadState> = T extends LoadState.Idle ? IdleContext : T extends LoadState.LoadSchema ? SchemaReadyContext : T extends LoadState.SchemaReady ? LoadPluginContext : T extends LoadState.LoadPlugin ? CompleteContext : T extends LoadState.Complete ? CompleteContext : AnyRecord; | ||
export interface IdleContext { | ||
remark: Processor<RemarkOptions>; | ||
loadState: LoadState; | ||
nodes: Node[]; | ||
marks: Mark[]; | ||
editor: Editor; | ||
} | ||
export interface SchemaReadyContext extends Readonly<IdleContext> { | ||
schema: Schema; | ||
parser: (text: string) => ProsemirrorNode | null; | ||
serializer: (node: ProsemirrorNode) => string; | ||
keymap: ProsemirrorPlugin[]; | ||
inputRules: InputRule[]; | ||
nodeViews: Record<string, (...args: NodeViewParams | MarkViewParams) => NodeView>; | ||
} | ||
export interface LoadPluginContext extends Readonly<SchemaReadyContext> { | ||
prosemirrorPlugins: ProsemirrorPlugin[]; | ||
} | ||
export interface CompleteContext extends Readonly<LoadPluginContext> { | ||
editorView: EditorView; | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,3 +0,2 @@ | ||
export * from './context'; | ||
export * from './editor'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,3 +0,2 @@ | ||
export * from './context'; | ||
export * from './editor'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,10 +0,10 @@ | ||
export * from './schema-loader'; | ||
export * from './parser-loader'; | ||
export * from './serializer-loader'; | ||
export * from './input-rules-loader'; | ||
export * from './keymap-loader'; | ||
export * from './node-views-loader'; | ||
export * from './view-loader'; | ||
export * from './parser-loader'; | ||
export * from './prosemirror-plugin-loader'; | ||
export * from './remark-plugin-loader'; | ||
export * from './schema-loader'; | ||
export * from './serializer-loader'; | ||
export * from './view-loader'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,10 +0,10 @@ | ||
export * from './schema-loader'; | ||
export * from './parser-loader'; | ||
export * from './serializer-loader'; | ||
export * from './input-rules-loader'; | ||
export * from './keymap-loader'; | ||
export * from './node-views-loader'; | ||
export * from './view-loader'; | ||
export * from './parser-loader'; | ||
export * from './prosemirror-plugin-loader'; | ||
export * from './remark-plugin-loader'; | ||
export * from './schema-loader'; | ||
export * from './serializer-loader'; | ||
export * from './view-loader'; | ||
//# sourceMappingURL=index.js.map |
import { Plugin } from 'prosemirror-state'; | ||
import { Atom } from '../abstract'; | ||
import { LoadPluginContext } from '../editor'; | ||
import { LoadPluginContext } from '../context'; | ||
export declare const createProsemirrorPlugin: (id: string, plugins: (ctx: LoadPluginContext) => Plugin[]) => Atom; | ||
//# sourceMappingURL=prosemirror-plugin-loader.d.ts.map |
import type { Plugin } from 'unified'; | ||
import { Atom } from '../abstract'; | ||
import type { IdleContext } from '../editor'; | ||
import type { IdleContext } from '../context'; | ||
export declare const createRemarkPlugin: (id: string, plugins: (ctx: IdleContext) => Plugin[]) => Atom; | ||
//# sourceMappingURL=remark-plugin-loader.d.ts.map |
@@ -7,3 +7,2 @@ var _ViewLoader_instances, _ViewLoader_createState, _ViewLoader_createViewContainer, _ViewLoader_prepareViewDom; | ||
import { keymap as createKeymap } from 'prosemirror-keymap'; | ||
import { history, redo, undo } from 'prosemirror-history'; | ||
import { EditorView } from 'prosemirror-view'; | ||
@@ -66,7 +65,2 @@ import { Atom } from '../abstract'; | ||
plugins: [ | ||
history(), | ||
createKeymap({ | ||
'Mod-z': undo, | ||
'Shift-Mod-z': redo, | ||
}), | ||
...keymap, | ||
@@ -73,0 +67,0 @@ ...prosemirrorPlugins, |
{ | ||
"name": "@milkdown/core", | ||
"version": "4.4.0", | ||
"version": "4.5.0", | ||
"main": "lib/index.js", | ||
@@ -19,3 +19,2 @@ "module": "lib/index.js", | ||
"@types/prosemirror-commands": "^1.0.4", | ||
"@types/prosemirror-history": "^1.0.2", | ||
"@types/prosemirror-inputrules": "^1.0.4", | ||
@@ -27,3 +26,2 @@ "@types/prosemirror-keymap": "^1.0.4", | ||
"prosemirror-commands": "^1.1.7", | ||
"prosemirror-history": "^1.1.3", | ||
"prosemirror-inputrules": "^1.1.3", | ||
@@ -30,0 +28,0 @@ "prosemirror-keymap": "^1.1.4", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
15
0
97761
140
1092
- Removed@types/prosemirror-history@^1.0.2
- Removedprosemirror-history@^1.1.3
- Removed@types/prosemirror-history@1.3.0(transitive)
- Removedprosemirror-history@1.4.1(transitive)
- Removedrope-sequence@1.3.4(transitive)