Skip to content

Commit 3564e7c

Browse files
authored
rename ResizableNodeView class name (#7149)
* rename ResizableNodeView class name * also export fallback for existing class name * add note
1 parent 3bb4ed2 commit 3564e7c

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tiptap/core': patch
3+
---
4+
5+
Use correct `ResizableNodeView` class name

packages/core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export * from './helpers/index.js'
99
export * from './InputRule.js'
1010
export * from './inputRules/index.js'
1111
export { createElement, Fragment, createElement as h } from './jsx-runtime.js'
12-
export { ResizableNodeview } from './lib/index.js'
12+
export * from './lib/index.js'
1313
export * from './Mark.js'
1414
export * from './MarkView.js'
1515
export * from './Node.js'

packages/core/src/lib/ResizableNodeview.ts renamed to packages/core/src/lib/ResizableNodeView.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ export type ResizableNodeDimensions = {
3333
}
3434

3535
/**
36-
* Configuration options for creating a ResizableNodeview
36+
* Configuration options for creating a ResizableNodeView
3737
*
3838
* @example
3939
* ```ts
40-
* new ResizableNodeview({
40+
* new ResizableNodeView({
4141
* element: imgElement,
4242
* node,
4343
* getPos,
@@ -222,7 +222,7 @@ export type ResizableNodeViewOptions = {
222222
* const img = document.createElement('img')
223223
* img.src = node.attrs.src
224224
*
225-
* return new ResizableNodeview({
225+
* return new ResizableNodeView({
226226
* element: img,
227227
* node,
228228
* getPos,
@@ -243,7 +243,7 @@ export type ResizableNodeViewOptions = {
243243
* }
244244
* ```
245245
*/
246-
export class ResizableNodeview {
246+
export class ResizableNodeView {
247247
/** The ProseMirror node instance */
248248
node: PMNode
249249

@@ -325,7 +325,7 @@ export class ResizableNodeview {
325325
private isShiftKeyPressed: boolean = false
326326

327327
/**
328-
* Creates a new ResizableNodeview instance.
328+
* Creates a new ResizableNodeView instance.
329329
*
330330
* The constructor sets up the resize handles, applies initial sizing from
331331
* node attributes, and configures all resize behavior options.
@@ -934,3 +934,9 @@ export class ResizableNodeview {
934934
}
935935
}
936936
}
937+
938+
/**
939+
* Alias for ResizableNodeView to maintain consistent naming.
940+
* @deprecated Use ResizableNodeView instead - will be removed in future versions.
941+
*/
942+
export const ResizableNodeview = ResizableNodeView

packages/extension-image/src/image.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { mergeAttributes, Node, nodeInputRule, ResizableNodeview } from '@tiptap/core'
1+
import { mergeAttributes, Node, nodeInputRule, ResizableNodeView } from '@tiptap/core'
22
import type { ResizableNodeViewDirection } from 'packages/core/src/lib'
33

44
export interface ImageOptions {
@@ -173,7 +173,7 @@ export const Image = Node.create<ImageOptions>({
173173

174174
el.src = HTMLAttributes.src
175175

176-
const nodeView = new ResizableNodeview({
176+
const nodeView = new ResizableNodeView({
177177
element: el,
178178
node,
179179
getPos,

0 commit comments

Comments
 (0)