@milkdown/plugin-table
Advanced tools
Comparing version 3.0.0 to 4.0.0
@@ -1,2 +0,35 @@ | ||
export declare const key = "MILKDOWN_PLUGIN_TABLE"; | ||
export declare const table: never[]; | ||
export declare const table: ({ | ||
id: string; | ||
type: import("@milkdown/core").AtomType; | ||
loadAfter: import("@milkdown/core").LoadState; | ||
main(): void; | ||
context: import("@milkdown/core").PluginReadyContext; | ||
updateContext: (next: Partial<import("@milkdown/core").PluginReadyContext>) => void; | ||
readonly options: { | ||
plugins: (ctx: import("@milkdown/core").PluginReadyContext) => import("prosemirror-state").Plugin<any, any>[]; | ||
}; | ||
injectContext(context: import("@milkdown/core").PluginReadyContext, updateContext: (next: Partial<import("@milkdown/core").PluginReadyContext>) => void): void; | ||
} | { | ||
id: string; | ||
type: import("@milkdown/core").AtomType; | ||
loadAfter: import("@milkdown/core").LoadState; | ||
main(): void; | ||
context: import("@milkdown/core").IdleContext; | ||
updateContext: (next: Partial<import("@milkdown/core").IdleContext>) => void; | ||
readonly options: { | ||
plugins: (ctx: import("@milkdown/core").IdleContext) => (import("markdown-it").PluginSimple | [import("markdown-it").PluginWithOptions<any>, any] | [import("markdown-it").PluginWithParams, ...any[]])[]; | ||
}; | ||
injectContext(context: import("@milkdown/core").IdleContext, updateContext: (next: Partial<import("@milkdown/core").IdleContext>) => void): void; | ||
} | { | ||
id: string; | ||
type: import("@milkdown/core").AtomType; | ||
loadAfter: import("@milkdown/core").LoadState; | ||
main(): void; | ||
context: import("@milkdown/core").IdleContext; | ||
updateContext: (next: Partial<import("@milkdown/core").IdleContext>) => void; | ||
readonly options: { | ||
rules: (ctx: import("@milkdown/core").IdleContext) => string[]; | ||
}; | ||
injectContext(context: import("@milkdown/core").IdleContext, updateContext: (next: Partial<import("@milkdown/core").IdleContext>) => void): void; | ||
} | import("./nodes").Table | import("./nodes").TableRow | import("./nodes").TableCell | import("./nodes").TableHeader | import("./nodes").TableInline)[]; | ||
export { createTable } from './utils'; |
@@ -1,3 +0,22 @@ | ||
export const key = 'MILKDOWN_PLUGIN_TABLE'; | ||
export const table = []; | ||
import { createProsemirrorPlugin, createMarkdownItPlugin, createMarkdownItRule } from '@milkdown/core'; | ||
import { columnResizing, goToNextCell, tableEditing } from 'prosemirror-tables'; | ||
import { keymap } from 'prosemirror-keymap'; | ||
import { nodes } from './nodes'; | ||
import { tableOperatorPlugin } from './table-operator-plugin'; | ||
import { markdownItTablePlugin } from './markdown-it-table-plugin'; | ||
import { exitTable } from './command'; | ||
const plugin = createProsemirrorPlugin('milkdown-table', (ctx) => [ | ||
columnResizing({}), | ||
tableEditing(), | ||
tableOperatorPlugin(), | ||
keymap({ | ||
'Mod-]': goToNextCell(1), | ||
'Mod-[': goToNextCell(-1), | ||
'Mod-Enter': exitTable(ctx.schema.nodes.paragraph), | ||
}), | ||
]); | ||
const rule = createMarkdownItRule('milkdown-table-rule', () => ['table']); | ||
const markdownItPlugin = createMarkdownItPlugin('milkdown-table-markdown', () => [markdownItTablePlugin]); | ||
export const table = [...nodes, rule, markdownItPlugin, plugin]; | ||
export { createTable } from './utils'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@milkdown/plugin-table", | ||
"version": "3.0.0", | ||
"main": "lib/index.js", | ||
"module": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"scripts": { | ||
"start": "vite", | ||
"watch": "tsc -w", | ||
"test": "jest", | ||
"tsc": "tsc --noEmit", | ||
"build": "tsc" | ||
}, | ||
"files": [ | ||
"lib" | ||
], | ||
"peerDependencies": { | ||
"@milkdown/core": "*", | ||
"@types/prosemirror-model": "*", | ||
"@types/prosemirror-state": "*", | ||
"@types/prosemirror-view": "*", | ||
"prosemirror-model": "*", | ||
"prosemirror-state": "*", | ||
"prosemirror-view": "*" | ||
}, | ||
"dependencies": { | ||
"tslib": "^2.2.0", | ||
"prosemirror-tables": "*" | ||
}, | ||
"devDependencies": { | ||
"@milkdown/core": "*" | ||
} | ||
"name": "@milkdown/plugin-table", | ||
"version": "4.0.0", | ||
"main": "lib/index.js", | ||
"module": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"files": [ | ||
"lib" | ||
], | ||
"peerDependencies": { | ||
"@milkdown/core": "*", | ||
"@types/prosemirror-inputrules": "*", | ||
"@types/prosemirror-model": "*", | ||
"@types/prosemirror-state": "*", | ||
"@types/prosemirror-view": "*", | ||
"@types/prosemirror-keymap": "*", | ||
"@types/prosemirror-commands": "*", | ||
"prosemirror-inputrules": "*", | ||
"prosemirror-model": "*", | ||
"prosemirror-state": "*", | ||
"prosemirror-view": "*", | ||
"prosemirror-keymap": "*", | ||
"prosemirror-commands": "*" | ||
}, | ||
"dependencies": { | ||
"@milkdown/utils": "4.0.0", | ||
"tslib": "^2.2.0", | ||
"prosemirror-tables": "*" | ||
}, | ||
"devDependencies": { | ||
"@milkdown/core": "*", | ||
"concurrently": "^6.0.2" | ||
}, | ||
"scripts": { | ||
"start": "vite", | ||
"watch": "concurrently -n ts,css \"tsc -w\" \"postcss style/style.css --watch --verbose -o lib/style.css\"", | ||
"test": "jest", | ||
"tsc": "tsc --noEmit", | ||
"build": "tsc && postcss style/style.css --verbose -o lib/style.css" | ||
} | ||
} |
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
61204
22
953
16
2
+ Added@milkdown/utils@4.0.0
+ Added@milkdown/utils@4.0.0(transitive)
+ Added@types/prosemirror-commands@1.3.0(transitive)
+ Added@types/prosemirror-inputrules@1.2.0(transitive)
+ Added@types/prosemirror-keymap@1.2.0(transitive)