Socket
Socket
Sign inDemoInstall

@tiptap/extension-bold

Package Overview
Dependencies
Maintainers
5
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-bold - npm Package Compare versions

Comparing version 2.6.6 to 2.7.0-pre.0

dist/packages/core/src/plugins/DropPlugin.d.ts

2

dist/packages/core/src/index.d.ts

@@ -14,2 +14,4 @@ export * from './CommandManager.js';

export * from './pasteRules/index.js';
export * from './plugins/DropPlugin.js';
export * from './plugins/PastePlugin.js';
export * from './Tracker.js';

@@ -16,0 +18,0 @@ export * from './types.js';

28

dist/packages/core/src/NodeView.d.ts

@@ -1,6 +0,4 @@

import { Node as ProseMirrorNode } from '@tiptap/pm/model';
import { NodeView as ProseMirrorNodeView } from '@tiptap/pm/view';
import { Editor as CoreEditor } from './Editor.js';
import { Node } from './Node.js';
import { DecorationWithType, NodeViewRendererOptions, NodeViewRendererProps } from './types.js';
import { NodeViewRendererOptions, NodeViewRendererProps } from './types.js';
/**

@@ -14,6 +12,9 @@ * Node views are used to customize the rendered DOM structure of a node.

options: Options;
extension: Node;
node: ProseMirrorNode;
decorations: DecorationWithType[];
getPos: any;
extension: NodeViewRendererProps['extension'];
node: NodeViewRendererProps['node'];
decorations: NodeViewRendererProps['decorations'];
innerDecorations: NodeViewRendererProps['innerDecorations'];
view: NodeViewRendererProps['view'];
getPos: NodeViewRendererProps['getPos'];
HTMLAttributes: NodeViewRendererProps['HTMLAttributes'];
isDragging: boolean;

@@ -26,2 +27,7 @@ constructor(component: Component, props: NodeViewRendererProps, options?: Partial<Options>);

stopEvent(event: Event): boolean;
/**
* Called when a DOM [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) or a selection change happens within the view.
* @return `false` if the editor should re-read the selection or re-parse the range around the mutation
* @return `true` if it can safely be ignored.
*/
ignoreMutation(mutation: MutationRecord | {

@@ -31,4 +37,10 @@ type: 'selection';

}): boolean;
updateAttributes(attributes: {}): void;
/**
* Update the attributes of the prosemirror node.
*/
updateAttributes(attributes: Record<string, any>): void;
/**
* Delete the node.
*/
deleteNode(): void;
}

@@ -1,4 +0,4 @@

import { Mark as ProseMirrorMark, Node as ProseMirrorNode, NodeType, ParseOptions } from '@tiptap/pm/model';
import { Mark as ProseMirrorMark, Node as ProseMirrorNode, NodeType, ParseOptions, Slice } from '@tiptap/pm/model';
import { EditorState, Transaction } from '@tiptap/pm/state';
import { Decoration, EditorProps, EditorView, NodeView } from '@tiptap/pm/view';
import { Decoration, EditorProps, EditorView, NodeView, NodeViewConstructor } from '@tiptap/pm/view';
import { Editor } from './Editor.js';

@@ -82,4 +82,21 @@ import { Extension } from './Extension.js';

enablePasteRules: EnableRules;
enableCoreExtensions: boolean;
/**
* Determines whether core extensions are enabled.
*
* If set to `false`, all core extensions will be disabled.
* To disable specific core extensions, provide an object where the keys are the extension names and the values are `false`.
* Extensions not listed in the object will remain enabled.
*
* @example
* // Disable all core extensions
* enabledCoreExtensions: false
*
* @example
* // Disable only the keymap core extension
* enabledCoreExtensions: { keymap: false }
*
* @default true
*/
enableCoreExtensions?: boolean | Partial<Record<'editable' | 'clipboardTextSerializer' | 'commands' | 'focusEvents' | 'keymap' | 'tabindex', false>>;
/**
* If `true`, the editor will check the content for errors on initialization.

@@ -104,2 +121,4 @@ * Emitting the `contentError` event if the content is invalid.

onDestroy: (props: EditorEvents['destroy']) => void;
onPaste: (e: ClipboardEvent, slice: Slice) => void;
onDrop: (e: DragEvent, slice: Slice, moved: boolean) => void;
}

@@ -175,15 +194,14 @@ export type HTMLContent = string;

}[keyof T];
export type Simplify<T> = {
[KeyType in keyof T]: T[KeyType];
} & {};
export type DecorationWithType = Decoration & {
type: NodeType;
};
export type NodeViewProps = {
editor: Editor;
node: ProseMirrorNode;
decorations: DecorationWithType[];
export type NodeViewProps = Simplify<Omit<NodeViewRendererProps, 'decorations'> & {
decorations: readonly DecorationWithType[];
selected: boolean;
extension: Node;
getPos: () => number;
updateAttributes: (attributes: Record<string, any>) => void;
deleteNode: () => void;
};
}>;
export interface NodeViewRendererOptions {

@@ -202,10 +220,12 @@ stopEvent: ((props: {

export type NodeViewRendererProps = {
node: Parameters<NodeViewConstructor>[0];
view: Parameters<NodeViewConstructor>[1];
getPos: () => number;
decorations: Parameters<NodeViewConstructor>[3];
innerDecorations: Parameters<NodeViewConstructor>[4];
editor: Editor;
node: ProseMirrorNode;
getPos: (() => number) | boolean;
extension: Node;
HTMLAttributes: Record<string, any>;
decorations: Decoration[];
extension: Node;
};
export type NodeViewRenderer = (props: NodeViewRendererProps) => NodeView | {};
export type NodeViewRenderer = (props: NodeViewRendererProps) => NodeView;
export type AnyCommands = Record<string, (...args: any[]) => Command>;

@@ -212,0 +232,0 @@ export type UnionCommands<T = Command> = UnionToIntersection<ValuesOf<Pick<Commands<T>, KeysWithTypeOf<Commands<T>, {}>>>>;

{
"name": "@tiptap/extension-bold",
"description": "bold extension for tiptap",
"version": "2.6.6",
"version": "2.7.0-pre.0",
"homepage": "https://tiptap.dev",

@@ -32,6 +32,6 @@ "keywords": [

"devDependencies": {
"@tiptap/core": "^2.6.6"
"@tiptap/core": "^2.7.0-pre.0"
},
"peerDependencies": {
"@tiptap/core": "^2.6.6"
"@tiptap/core": "^2.7.0-pre.0"
},

@@ -38,0 +38,0 @@ "repository": {

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