🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@tiptap/react

Package Overview
Dependencies
Maintainers
6
Versions
405
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/react - npm Package Compare versions

Comparing version
3.27.1
to
3.27.2
+2
-2
dist/index.cjs

@@ -1193,4 +1193,4 @@ "use strict";

}
function TiptapWrapper({ editor, instance, children }) {
const resolvedEditor = editor != null ? editor : instance;
function TiptapWrapper({ children, ...props }) {
const resolvedEditor = "editor" in props ? props.editor : props.instance;
if (!resolvedEditor) {

@@ -1197,0 +1197,0 @@ throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");

@@ -393,6 +393,3 @@ import * as react_jsx_runtime from 'react/jsx-runtime';

declare function useTiptapState<TSelectorResult>(selector: (context: EditorStateSnapshot<Editor>) => TSelectorResult, equalityFn?: (a: TSelectorResult, b: TSelectorResult | null) => boolean): TSelectorResult;
/**
* Props for the `Tiptap` root/provider component.
*/
type TiptapWrapperProps = {
type TiptapWrapperEditorInstanceProps = {
/**

@@ -402,7 +399,13 @@ * The editor instance to provide to child components.

*/
editor?: Editor;
editor: Editor;
} | {
/**
* @deprecated Use `editor` instead. Will be removed in the next major version.
*/
instance?: Editor;
instance: Editor;
};
/**
* Props for the `Tiptap` root/provider component.
*/
type TiptapWrapperProps = TiptapWrapperEditorInstanceProps & {
children: ReactNode;

@@ -437,3 +440,3 @@ };

*/
declare function TiptapWrapper({ editor, instance, children }: TiptapWrapperProps): react_jsx_runtime.JSX.Element;
declare function TiptapWrapper({ children, ...props }: TiptapWrapperProps): react_jsx_runtime.JSX.Element;
declare namespace TiptapWrapper {

@@ -559,2 +562,2 @@ var displayName: string;

export { EditorConsumer, EditorContent, type EditorContentProps, EditorContext, type EditorContextValue, EditorProvider, type EditorProviderProps, type EditorStateSnapshot, MarkViewContent, type MarkViewContentProps, type MarkViewContextProps, NodeViewContent, type NodeViewContentProps, NodeViewWrapper, type NodeViewWrapperProps, PureEditorContent, ReactMarkView, ReactMarkViewContext, ReactMarkViewRenderer, type ReactMarkViewRendererOptions, ReactNodeView, ReactNodeViewContentProvider, ReactNodeViewContext, type ReactNodeViewContextProps, type ReactNodeViewProps, ReactNodeViewRenderer, type ReactNodeViewRendererOptions, ReactRenderer, type ReactRendererOptions, Tiptap, TiptapContent, TiptapContext, type TiptapContextType, TiptapWrapper, type TiptapWrapperProps, type UseEditorOptions, type UseEditorStateOptions, useCurrentEditor, useEditor, useEditorState, useReactNodeView, useTiptap, useTiptapState };
export { EditorConsumer, EditorContent, type EditorContentProps, EditorContext, type EditorContextValue, EditorProvider, type EditorProviderProps, type EditorStateSnapshot, MarkViewContent, type MarkViewContentProps, type MarkViewContextProps, NodeViewContent, type NodeViewContentProps, NodeViewWrapper, type NodeViewWrapperProps, PureEditorContent, ReactMarkView, ReactMarkViewContext, ReactMarkViewRenderer, type ReactMarkViewRendererOptions, ReactNodeView, ReactNodeViewContentProvider, ReactNodeViewContext, type ReactNodeViewContextProps, type ReactNodeViewProps, ReactNodeViewRenderer, type ReactNodeViewRendererOptions, ReactRenderer, type ReactRendererOptions, Tiptap, TiptapContent, TiptapContext, type TiptapContextType, TiptapWrapper, type TiptapWrapperEditorInstanceProps, type TiptapWrapperProps, type UseEditorOptions, type UseEditorStateOptions, useCurrentEditor, useEditor, useEditorState, useReactNodeView, useTiptap, useTiptapState };

@@ -393,6 +393,3 @@ import * as react_jsx_runtime from 'react/jsx-runtime';

declare function useTiptapState<TSelectorResult>(selector: (context: EditorStateSnapshot<Editor>) => TSelectorResult, equalityFn?: (a: TSelectorResult, b: TSelectorResult | null) => boolean): TSelectorResult;
/**
* Props for the `Tiptap` root/provider component.
*/
type TiptapWrapperProps = {
type TiptapWrapperEditorInstanceProps = {
/**

@@ -402,7 +399,13 @@ * The editor instance to provide to child components.

*/
editor?: Editor;
editor: Editor;
} | {
/**
* @deprecated Use `editor` instead. Will be removed in the next major version.
*/
instance?: Editor;
instance: Editor;
};
/**
* Props for the `Tiptap` root/provider component.
*/
type TiptapWrapperProps = TiptapWrapperEditorInstanceProps & {
children: ReactNode;

@@ -437,3 +440,3 @@ };

*/
declare function TiptapWrapper({ editor, instance, children }: TiptapWrapperProps): react_jsx_runtime.JSX.Element;
declare function TiptapWrapper({ children, ...props }: TiptapWrapperProps): react_jsx_runtime.JSX.Element;
declare namespace TiptapWrapper {

@@ -559,2 +562,2 @@ var displayName: string;

export { EditorConsumer, EditorContent, type EditorContentProps, EditorContext, type EditorContextValue, EditorProvider, type EditorProviderProps, type EditorStateSnapshot, MarkViewContent, type MarkViewContentProps, type MarkViewContextProps, NodeViewContent, type NodeViewContentProps, NodeViewWrapper, type NodeViewWrapperProps, PureEditorContent, ReactMarkView, ReactMarkViewContext, ReactMarkViewRenderer, type ReactMarkViewRendererOptions, ReactNodeView, ReactNodeViewContentProvider, ReactNodeViewContext, type ReactNodeViewContextProps, type ReactNodeViewProps, ReactNodeViewRenderer, type ReactNodeViewRendererOptions, ReactRenderer, type ReactRendererOptions, Tiptap, TiptapContent, TiptapContext, type TiptapContextType, TiptapWrapper, type TiptapWrapperProps, type UseEditorOptions, type UseEditorStateOptions, useCurrentEditor, useEditor, useEditorState, useReactNodeView, useTiptap, useTiptapState };
export { EditorConsumer, EditorContent, type EditorContentProps, EditorContext, type EditorContextValue, EditorProvider, type EditorProviderProps, type EditorStateSnapshot, MarkViewContent, type MarkViewContentProps, type MarkViewContextProps, NodeViewContent, type NodeViewContentProps, NodeViewWrapper, type NodeViewWrapperProps, PureEditorContent, ReactMarkView, ReactMarkViewContext, ReactMarkViewRenderer, type ReactMarkViewRendererOptions, ReactNodeView, ReactNodeViewContentProvider, ReactNodeViewContext, type ReactNodeViewContextProps, type ReactNodeViewProps, ReactNodeViewRenderer, type ReactNodeViewRendererOptions, ReactRenderer, type ReactRendererOptions, Tiptap, TiptapContent, TiptapContext, type TiptapContextType, TiptapWrapper, type TiptapWrapperEditorInstanceProps, type TiptapWrapperProps, type UseEditorOptions, type UseEditorStateOptions, useCurrentEditor, useEditor, useEditorState, useReactNodeView, useTiptap, useTiptapState };

@@ -1131,4 +1131,4 @@ // src/Context.tsx

}
function TiptapWrapper({ editor, instance, children }) {
const resolvedEditor = editor != null ? editor : instance;
function TiptapWrapper({ children, ...props }) {
const resolvedEditor = "editor" in props ? props.editor : props.instance;
if (!resolvedEditor) {

@@ -1135,0 +1135,0 @@ throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");

{
"name": "@tiptap/react",
"version": "3.27.1",
"version": "3.27.2",
"description": "React components for tiptap",

@@ -10,2 +10,5 @@ "keywords": [

"homepage": "https://tiptap.dev",
"bugs": {
"url": "https://github.com/ueberdosis/tiptap/issues"
},
"license": "MIT",

@@ -17,5 +20,2 @@ "repository": {

},
"bugs": {
"url": "https://github.com/ueberdosis/tiptap/issues"
},
"funding": {

@@ -62,4 +62,4 @@ "type": "github",

"react-dom": "^19.0.0",
"@tiptap/core": "^3.27.1",
"@tiptap/pm": "^3.27.1"
"@tiptap/core": "^3.27.2",
"@tiptap/pm": "^3.27.2"
},

@@ -71,8 +71,8 @@ "peerDependencies": {

"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
"@tiptap/core": "3.27.1",
"@tiptap/pm": "3.27.1"
"@tiptap/core": "3.27.2",
"@tiptap/pm": "3.27.2"
},
"optionalDependencies": {
"@tiptap/extension-floating-menu": "^3.27.1",
"@tiptap/extension-bubble-menu": "^3.27.1"
"@tiptap/extension-bubble-menu": "^3.27.2",
"@tiptap/extension-floating-menu": "^3.27.2"
},

@@ -79,0 +79,0 @@ "scripts": {

@@ -96,17 +96,21 @@ import type { ReactNode } from 'react'

export type TiptapWrapperEditorInstanceProps =
| {
/**
* The editor instance to provide to child components.
* Use `useEditor()` to create this instance.
*/
editor: Editor
}
| {
/**
* @deprecated Use `editor` instead. Will be removed in the next major version.
*/
instance: Editor
}
/**
* Props for the `Tiptap` root/provider component.
*/
export type TiptapWrapperProps = {
/**
* The editor instance to provide to child components.
* Use `useEditor()` to create this instance.
*/
editor?: Editor
/**
* @deprecated Use `editor` instead. Will be removed in the next major version.
*/
instance?: Editor
export type TiptapWrapperProps = TiptapWrapperEditorInstanceProps & {
children: ReactNode

@@ -142,4 +146,4 @@ }

*/
export function TiptapWrapper({ editor, instance, children }: TiptapWrapperProps) {
const resolvedEditor = editor ?? instance
export function TiptapWrapper({ children, ...props }: TiptapWrapperProps) {
const resolvedEditor = 'editor' in props ? props.editor : props.instance

@@ -146,0 +150,0 @@ if (!resolvedEditor) {

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

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