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

@prosekit/core

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prosekit/core - npm Package Compare versions

Comparing version 0.0.0-next-20240519080336 to 0.0.0-next-20240531032056

175

dist/_tsup-dts-rollup.d.ts

@@ -5,3 +5,2 @@ import { AllSelection } from '@prosekit/pm/state';

import { Command } from '@prosekit/pm/state';
import type { ConditionalExcept } from 'type-fest';
import type { ContentMatch } from '@prosekit/pm/model';

@@ -15,3 +14,2 @@ import type { DirectEditorProps } from '@prosekit/pm/view';

import { EditorView } from '@prosekit/pm/view';
import type { EmptyObject } from 'type-fest';
import type { IsEqual } from 'type-fest';

@@ -188,11 +186,2 @@ import { Mark } from '@prosekit/pm/model';

/**
* @internal
*/
declare interface CommandArgs {
[name: string]: any[];
}
export { CommandArgs }
export { CommandArgs as CommandArgs_alias_1 }
export declare type CommandCreator<Args extends any[] = any[]> = (...arg: Args) => Command;

@@ -209,2 +198,11 @@

/**
* @internal
*/
declare interface CommandTyping {
[name: string]: any[];
}
export { CommandTyping }
export { CommandTyping as CommandTyping_alias_1 }
/**
* @public

@@ -263,3 +261,3 @@ */

declare function defineBaseCommands(): Extension<{
COMMAND_ARGS: {
Commands: {
insertText: [{

@@ -310,2 +308,4 @@ text: string;

};
Nodes: never;
Marks: never;
}>;

@@ -327,3 +327,3 @@ export { defineBaseCommands }

priority?: Priority;
}): Extension<ExtensionTyping<string, string, CommandArgs>>;
}): Extension<any>;
export { defineBaseKeymap }

@@ -337,3 +337,3 @@ export { defineBaseKeymap as defineBaseKeymap_alias_1 }

*/
declare function defineClickHandler(handler: ClickHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineClickHandler(handler: ClickHandler): Extension<any>;
export { defineClickHandler }

@@ -347,3 +347,3 @@ export { defineClickHandler as defineClickHandler_alias_1 }

*/
declare function defineClickOnHandler(handler: ClickOnHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineClickOnHandler(handler: ClickOnHandler): Extension<any>;
export { defineClickOnHandler }

@@ -353,5 +353,7 @@ export { defineClickOnHandler as defineClickOnHandler_alias_1 }

declare function defineCommands<T extends Record<string, CommandCreator> = Record<string, CommandCreator>>(commands: T): Extension<{
COMMAND_ARGS: {
Commands: {
[K in keyof T]: Parameters<T[K]>;
};
Nodes: never;
Marks: never;
}>;

@@ -369,3 +371,5 @@ export { defineCommands }

declare function defineDoc(): Extension< {
NODES: "doc";
Nodes: "doc";
Marks: never;
Commands: never;
}>;

@@ -380,3 +384,3 @@ export { defineDoc }

*/
declare function defineDocChangeHandler(handler: DocChangeHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineDocChangeHandler(handler: DocChangeHandler): Extension<any>;
export { defineDocChangeHandler }

@@ -390,3 +394,3 @@ export { defineDocChangeHandler as defineDocChangeHandler_alias_1 }

*/
declare function defineDOMEventHandler<Event extends keyof DOMEventMap = string>(event: Event, handler: DOMEventHandler<Event>): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineDOMEventHandler<Event extends keyof DOMEventMap = string>(event: Event, handler: DOMEventHandler<Event>): Extension<any>;
export { defineDOMEventHandler }

@@ -400,3 +404,3 @@ export { defineDOMEventHandler as defineDOMEventHandler_alias_1 }

*/
declare function defineDoubleClickHandler(handler: DoubleClickHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineDoubleClickHandler(handler: DoubleClickHandler): Extension<any>;
export { defineDoubleClickHandler }

@@ -410,3 +414,3 @@ export { defineDoubleClickHandler as defineDoubleClickHandler_alias_1 }

*/
declare function defineDoubleClickOnHandler(handler: DoubleClickOnHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineDoubleClickOnHandler(handler: DoubleClickOnHandler): Extension<any>;
export { defineDoubleClickOnHandler }

@@ -420,3 +424,3 @@ export { defineDoubleClickOnHandler as defineDoubleClickOnHandler_alias_1 }

*/
declare function defineDropHandler(handler: DropHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineDropHandler(handler: DropHandler): Extension<any>;
export { defineDropHandler }

@@ -464,3 +468,3 @@ export { defineDropHandler as defineDropHandler_alias_1 }

*/
declare function defineFocusChangeHandler(handler: FocusChangeHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineFocusChangeHandler(handler: FocusChangeHandler): Extension<any>;
export { defineFocusChangeHandler }

@@ -473,5 +477,6 @@ export { defineFocusChangeHandler as defineFocusChangeHandler_alias_1 }

declare function defineHistory(): Extension< {
COMMAND_ARGS: {
undo: [];
redo: [];
Nodes: any;
Marks: any;
Commands: {
[x: string]: any;
};

@@ -487,3 +492,3 @@ }>;

*/
declare function defineKeyDownHandler(handler: KeyDownHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineKeyDownHandler(handler: KeyDownHandler): Extension<any>;
export { defineKeyDownHandler }

@@ -504,3 +509,3 @@ export { defineKeyDownHandler as defineKeyDownHandler_alias_1 }

*/
declare function defineKeyPressHandler(handler: KeyPressHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineKeyPressHandler(handler: KeyPressHandler): Extension<any>;
export { defineKeyPressHandler }

@@ -520,3 +525,5 @@ export { defineKeyPressHandler as defineKeyPressHandler_alias_1 }

declare function defineMarkSpec<Mark extends string>(options: MarkSpecOptions<Mark>): Extension<{
MARKS: Mark;
Marks: Mark;
Nodes: never;
Commands: never;
}>;

@@ -531,3 +538,3 @@ export { defineMarkSpec }

*/
declare function defineMountHandler(handler: MountHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineMountHandler(handler: MountHandler): Extension<any>;
export { defineMountHandler }

@@ -550,4 +557,6 @@ export { defineMountHandler as defineMountHandler_alias_1 }

*/
declare function defineNodeSpec<NodeName extends string>(options: NodeSpecOptions<NodeName>): Extension<{
NODES: NodeName;
declare function defineNodeSpec<Node extends string>(options: NodeSpecOptions<Node>): Extension<{
Nodes: Node;
Marks: never;
Commands: never;
}>;

@@ -574,3 +583,5 @@ export { defineNodeSpec }

declare function defineParagraph(): Extension< {
NODES: "paragraph";
Nodes: "paragraph";
Marks: never;
Commands: never;
}>;

@@ -586,3 +597,5 @@ export { defineParagraph }

export declare function defineParagraphSpec(): Extension< {
NODES: "paragraph";
Nodes: "paragraph";
Marks: never;
Commands: never;
}>;

@@ -595,3 +608,3 @@

*/
declare function definePasteHandler(handler: PasteHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function definePasteHandler(handler: PasteHandler): Extension<any>;
export { definePasteHandler }

@@ -619,3 +632,3 @@ export { definePasteHandler as definePasteHandler_alias_1 }

*/
declare function defineScrollToSelectionHandler(handler: ScrollToSelectionHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineScrollToSelectionHandler(handler: ScrollToSelectionHandler): Extension<any>;
export { defineScrollToSelectionHandler }

@@ -628,3 +641,5 @@ export { defineScrollToSelectionHandler as defineScrollToSelectionHandler_alias_1 }

declare function defineText(): Extension< {
NODES: "text";
Nodes: "text";
Marks: never;
Commands: never;
}>;

@@ -639,3 +654,3 @@ export { defineText }

*/
declare function defineTextInputHandler(handler: TextInputHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineTextInputHandler(handler: TextInputHandler): Extension<any>;
export { defineTextInputHandler }

@@ -649,3 +664,3 @@ export { defineTextInputHandler as defineTextInputHandler_alias_1 }

*/
declare function defineTripleClickHandler(handler: TripleClickHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineTripleClickHandler(handler: TripleClickHandler): Extension<any>;
export { defineTripleClickHandler }

@@ -659,3 +674,3 @@ export { defineTripleClickHandler as defineTripleClickHandler_alias_1 }

*/
declare function defineTripleClickOnHandler(handler: TripleClickOnHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineTripleClickOnHandler(handler: TripleClickOnHandler): Extension<any>;
export { defineTripleClickOnHandler }

@@ -669,3 +684,3 @@ export { defineTripleClickOnHandler as defineTripleClickOnHandler_alias_1 }

*/
declare function defineUnmountHandler(handler: UnmountHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineUnmountHandler(handler: UnmountHandler): Extension<any>;
export { defineUnmountHandler }

@@ -679,3 +694,3 @@ export { defineUnmountHandler as defineUnmountHandler_alias_1 }

*/
declare function defineUpdateHandler(handler: UpdateHandler): Extension<ExtensionTyping<string, string, CommandArgs>>;
declare function defineUpdateHandler(handler: UpdateHandler): Extension<any>;
export { defineUpdateHandler }

@@ -874,6 +889,2 @@ export { defineUpdateHandler as defineUpdateHandler_alias_1 }

declare type EmptyValue = undefined | null | EmptyObject;
export declare type ExceptEmptyValue<T> = ConditionalExcept<T, EmptyValue>;
/**

@@ -896,3 +907,3 @@ * Expands the selection to include the entire mark at the current position.

*/
declare interface Extension<T extends ExtensionTyping = ExtensionTyping> {
declare interface Extension<T extends ExtensionTyping<any, any, any> = any> {
extension: Extension | Extension[];

@@ -914,6 +925,6 @@ priority?: Priority;

*/
declare interface ExtensionTyping<Node extends string = string, Mark extends string = string, Commands extends CommandArgs = CommandArgs> {
NODES?: Node;
MARKS?: Mark;
COMMAND_ARGS?: Commands;
declare interface ExtensionTyping<N extends string | never = never, M extends string | never = never, C extends CommandTyping | never = never> {
Nodes: N;
Marks: M;
Commands: C;
}

@@ -926,3 +937,3 @@ export { ExtensionTyping }

*/
declare type ExtractCommandAppliers<E extends Extension> = ToCommandApplier<ExtractCommandArgs<E>>;
declare type ExtractCommandAppliers<E extends Extension> = ToCommandApplier<ExtractCommands<E>>;
export { ExtractCommandAppliers }

@@ -932,12 +943,5 @@ export { ExtractCommandAppliers as ExtractCommandAppliers_alias_1 }

/**
* @internal
*/
export declare type ExtractCommandArgs<E extends Extension> = ExtractCommandArgsFromTyping<ExtractTyping<E>>;
export declare type ExtractCommandArgsFromTyping<T extends ExtensionTyping> = ExtractKey<T, 'COMMAND_ARGS'>;
/**
* @public
*/
declare type ExtractCommandCreators<E extends Extension> = ToCommandCreators<ExtractCommandArgs<E>>;
declare type ExtractCommandCreators<E extends Extension> = ToCommandCreators<ExtractCommands<E>>;
export { ExtractCommandCreators }

@@ -947,5 +951,5 @@ export { ExtractCommandCreators as ExtractCommandCreators_alias_1 }

/**
* @intneral
* @internal
*/
export declare type ExtractKey<T, K extends string> = Extract<T, Record<K, any>>[K];
export declare type ExtractCommands<E extends Extension> = SimplifyUnion<ExtractTyping<E>['Commands']>;

@@ -955,17 +959,13 @@ /**

*/
declare type ExtractMarks<E extends Extension> = ExtractMarksFromTyping<ExtractTyping<E>>;
declare type ExtractMarks<E extends Extension> = ExtractTyping<E>['Marks'];
export { ExtractMarks }
export { ExtractMarks as ExtractMarks_alias_1 }
export declare type ExtractMarksFromTyping<T extends ExtensionTyping> = ExtractKey<T, 'MARKS'>;
/**
* @public
*/
declare type ExtractNodes<E extends Extension> = ExtractNodesFromTyping<ExtractTyping<E>>;
declare type ExtractNodes<E extends Extension> = ExtractTyping<E>['Nodes'];
export { ExtractNodes }
export { ExtractNodes as ExtractNodes_alias_1 }
export declare type ExtractNodesFromTyping<T extends ExtensionTyping> = ExtractKey<T, 'NODES'>;
/**

@@ -1695,13 +1695,2 @@ * @internal

/**
* @internal
*/
declare type SimplifyExtension<E extends Extension | Extension[]> = E extends Extension[] ? Extension<ExceptEmptyValue<{
NODES: ExtractNodes<E[number]>;
MARKS: ExtractMarks<E[number]>;
COMMAND_ARGS: SimplifyUnion<ExtractCommandArgs<E[number]>>;
}>> : E;
export { SimplifyExtension }
export { SimplifyExtension as SimplifyExtension_alias_1 }
/**
* @intneral

@@ -1713,9 +1702,2 @@ */

export declare function splitBlockAs(splitNode?: (node: ProseMirrorNode, deflt: NodeType | null, atEnd: boolean) => {
type: NodeType;
attrs?: Attrs;
} | null): Command;
export declare const splitBlockEnter: Command;
export declare const stateFacet: Facet<StatePayload, RootPayload>;

@@ -1760,11 +1742,7 @@

export declare type ToCommandApplier<T extends CommandArgs> = {
export declare type ToCommandApplier<T extends CommandTyping> = {
[K in keyof T]: CommandApplier<T[K]>;
};
export declare type ToCommandArgs<T extends CommandCreators> = {
[K in keyof T]: Parameters<T[K]>;
};
export declare type ToCommandCreators<T extends CommandArgs> = {
export declare type ToCommandCreators<T extends CommandTyping> = {
[K in keyof T]: CommandCreator<T[K]>;

@@ -1818,6 +1796,17 @@ };

*/
declare function union<E extends Extension | Extension[]>(extension: E): SimplifyExtension<E>;
declare function union<E extends Extension | Extension[]>(extension: E): UnionExtension<E>;
export { union }
export { union as union_alias_1 }
/**
* @internal
*/
declare type UnionExtension<E extends Extension | Extension[]> = E extends Extension[] ? Extension<{
Nodes: ExtractNodes<E[number]>;
Marks: ExtractMarks<E[number]>;
Commands: ExtractCommands<E[number]>;
}> : E;
export { UnionExtension }
export { UnionExtension as UnionExtension_alias_1 }
export declare class UnionExtensionImpl<T extends ExtensionTyping = ExtensionTyping> extends BaseExtension<T> implements Extension<T> {

@@ -1824,0 +1813,0 @@ extension: BaseExtension[];

@@ -84,4 +84,5 @@ export { addMark } from './_tsup-dts-rollup';

export { BaseNodeViewOptions } from './_tsup-dts-rollup';
export { CommandArgs } from './_tsup-dts-rollup';
export { CommandTyping } from './_tsup-dts-rollup';
export { Extension } from './_tsup-dts-rollup';
export { ExtensionTyping } from './_tsup-dts-rollup';
export { ExtractCommandAppliers } from './_tsup-dts-rollup';

@@ -91,4 +92,3 @@ export { ExtractCommandCreators } from './_tsup-dts-rollup';

export { ExtractNodes } from './_tsup-dts-rollup';
export { SimplifyExtension } from './_tsup-dts-rollup';
export { ExtensionTyping } from './_tsup-dts-rollup';
export { UnionExtension } from './_tsup-dts-rollup';
export { NodeJSON } from './_tsup-dts-rollup';

@@ -95,0 +95,0 @@ export { SelectionJSON } from './_tsup-dts-rollup';

{
"name": "@prosekit/core",
"type": "module",
"version": "0.0.0-next-20240519080336",
"version": "0.0.0-next-20240531032056",
"private": false,

@@ -38,6 +38,7 @@ "author": {

"dependencies": {
"@prosekit/pm": "0.0.0-next-20240519080336",
"@prosekit/pm": "0.0.0-next-20240531032056",
"clsx": "^2.1.1",
"orderedmap": "^2.1.1",
"type-fest": "^4.18.2"
"prosemirror-splittable": "^0.1.1",
"type-fest": "^4.18.3"
},

@@ -44,0 +45,0 @@ "devDependencies": {

Sorry, the diff of this file is too big to display

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