@prosekit/extensions
Advanced tools
Comparing version 0.0.18 to 0.0.19
import { CommandArgs } from '@prosekit/core'; | ||
import { DedentListOptions } from 'prosemirror-flat-list'; | ||
import { EditorState } from '@prosekit/pm/state'; | ||
@@ -6,6 +7,11 @@ import { Extension } from '@prosekit/core'; | ||
import type { HLJSApi } from 'highlight.js'; | ||
import { IndentListOptions } from 'prosemirror-flat-list'; | ||
import { ListAttributes } from 'prosemirror-flat-list'; | ||
import { NodeRange } from 'prosemirror-model'; | ||
import { Options } from 'tsup'; | ||
import { Plugin as Plugin_2 } from '@prosekit/pm/state'; | ||
import { PluginKey } from '@prosekit/pm/state'; | ||
import { ToggleCollapsedOptions } from 'prosemirror-flat-list'; | ||
import { Transaction } from '@prosekit/pm/state'; | ||
import { UnwrapListOptions } from 'prosemirror-flat-list'; | ||
import { UserProjectConfigExport } from 'vitest/dist/config.js'; | ||
@@ -58,3 +64,5 @@ | ||
/** @public */ | ||
/** | ||
* @public | ||
*/ | ||
export declare function defineBlockquote(): Extension< { | ||
@@ -68,3 +76,5 @@ NODES: "blockquote"; | ||
/** @public */ | ||
/** | ||
* @public | ||
*/ | ||
export declare function defineBold(): Extension< { | ||
@@ -96,3 +106,5 @@ MARKS: "bold"; | ||
/** @public */ | ||
/** | ||
* @public | ||
*/ | ||
export declare function defineCodeBlock(options?: { | ||
@@ -130,3 +142,5 @@ hljs?: HLJSApi; | ||
/** @public */ | ||
/** | ||
* @public | ||
*/ | ||
export declare function defineHeading(): Extension< { | ||
@@ -157,3 +171,5 @@ NODES: "heading"; | ||
/** @public */ | ||
/** | ||
* @public | ||
*/ | ||
export declare function defineImage(): Extension< { | ||
@@ -176,3 +192,5 @@ NODES: "image"; | ||
/** @public */ | ||
/** | ||
* @public | ||
*/ | ||
export declare function defineItalic(): Extension< { | ||
@@ -185,3 +203,5 @@ MARKS: "italic"; | ||
/** @public */ | ||
/** | ||
* @public | ||
*/ | ||
export declare function defineItalic_alias_1(): Extension< { | ||
@@ -218,9 +238,39 @@ MARKS: "link"; | ||
/** @public */ | ||
/** | ||
* @public | ||
*/ | ||
export declare function defineList(): Extension< { | ||
NODES: "list"; | ||
COMMAND_ARGS: { | ||
dedentList: [options?: DedentListOptions | undefined]; | ||
indentList: [options?: IndentListOptions | undefined]; | ||
moveList: [direction: "up" | "down"]; | ||
splitList: []; | ||
toggleCollapsed: [(ToggleCollapsedOptions | undefined)?]; | ||
toggleList: [attrs: ListAttributes]; | ||
unwrapList: [options?: UnwrapListOptions | undefined]; | ||
wrapInList: [getAttrs: ListAttributes | ((range: NodeRange) => ListAttributes | null)]; | ||
}; | ||
}>; | ||
export declare function defineListCommands(): Extension< { | ||
COMMAND_ARGS: { | ||
dedentList: [options?: DedentListOptions | undefined]; | ||
indentList: [options?: IndentListOptions | undefined]; | ||
moveList: [direction: "up" | "down"]; | ||
splitList: []; | ||
toggleCollapsed: [(ToggleCollapsedOptions | undefined)?]; | ||
toggleList: [attrs: ListAttributes]; | ||
unwrapList: [options?: UnwrapListOptions | undefined]; | ||
wrapInList: [getAttrs: ListAttributes | ((range: NodeRange) => ListAttributes | null)]; | ||
}; | ||
}>; | ||
export declare function defineListInputRules(): Extension<ExtensionTyping<string, string, CommandArgs>>; | ||
/** | ||
* Returns a extension that adds key bindings for list. | ||
* | ||
* @public | ||
*/ | ||
export declare function defineListKeymap(): Extension<ExtensionTyping<string, string, CommandArgs>>; | ||
@@ -268,3 +318,5 @@ | ||
/** @public */ | ||
/** | ||
* @public | ||
*/ | ||
export declare interface LinkAttrs { | ||
@@ -271,0 +323,0 @@ href: string; |
@@ -5,2 +5,3 @@ export { defineListSpec } from './_tsup-dts-rollup'; | ||
export { defineListInputRules } from './_tsup-dts-rollup'; | ||
export { defineListCommands } from './_tsup-dts-rollup'; | ||
export { defineList } from './_tsup-dts-rollup'; |
// src/list/index.ts | ||
import { | ||
Priority, | ||
defineCommands, | ||
defineInputRule, | ||
@@ -7,7 +9,16 @@ defineKeymap, | ||
definePlugin, | ||
union | ||
union, | ||
withPriority | ||
} from "@prosekit/core"; | ||
import { | ||
createDedentListCommand, | ||
createIndentListCommand, | ||
createListPlugins, | ||
createListSpec, | ||
createMoveListCommand, | ||
createSplitListCommand, | ||
createToggleCollapsedCommand, | ||
createToggleListCommand, | ||
createUnwrapListCommand, | ||
createWrapInListCommand, | ||
listInputRules, | ||
@@ -28,2 +39,14 @@ listKeymap | ||
} | ||
function defineListCommands() { | ||
return defineCommands({ | ||
dedentList: createDedentListCommand, | ||
indentList: createIndentListCommand, | ||
moveList: createMoveListCommand, | ||
splitList: createSplitListCommand, | ||
toggleCollapsed: createToggleCollapsedCommand, | ||
toggleList: createToggleListCommand, | ||
unwrapList: createUnwrapListCommand, | ||
wrapInList: createWrapInListCommand | ||
}); | ||
} | ||
function defineList() { | ||
@@ -33,4 +56,6 @@ return union([ | ||
defineListPlugins(), | ||
defineListKeymap(), | ||
defineListInputRules() | ||
// Use a high priority to override the default key bindings. | ||
withPriority(defineListKeymap(), Priority.high), | ||
defineListInputRules(), | ||
defineListCommands() | ||
]); | ||
@@ -40,2 +65,3 @@ } | ||
defineList, | ||
defineListCommands, | ||
defineListInputRules, | ||
@@ -42,0 +68,0 @@ defineListKeymap, |
{ | ||
"name": "@prosekit/extensions", | ||
"type": "module", | ||
"version": "0.0.18", | ||
"version": "0.0.19", | ||
"private": false, | ||
@@ -109,4 +109,4 @@ "author": { | ||
"dependencies": { | ||
"@prosekit/core": "^0.0.16", | ||
"@prosekit/pm": "^0.0.6", | ||
"@prosekit/core": "^0.0.17", | ||
"@prosekit/pm": "^0.0.7", | ||
"highlight.js": "^11.9.0", | ||
@@ -113,0 +113,0 @@ "prosemirror-flat-list": "^0.4.3", |
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
47317
1415
34
+ Added@prosekit/core@0.0.17(transitive)
+ Added@prosekit/pm@0.0.7(transitive)
- Removed@prosekit/core@0.0.16(transitive)
- Removed@prosekit/pm@0.0.6(transitive)
Updated@prosekit/core@^0.0.17
Updated@prosekit/pm@^0.0.7