Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate @tiptap/extension-utils -> @tiptap/extensions #6003

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chilly-lemons-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tiptap/extensions': major
---

Adds the new `@tiptap/extensions` package which holds utility extensions
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,8 @@
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
2 changes: 1 addition & 1 deletion demos/src/Examples/Images/React/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import './styles.scss'

import Document from '@tiptap/extension-document'
import Dropcursor from '@tiptap/extension-dropcursor'
import Image from '@tiptap/extension-image'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import { Dropcursor } from '@tiptap/extensions'
import { EditorContent, useEditor } from '@tiptap/react'
import React from 'react'

Expand Down
2 changes: 1 addition & 1 deletion demos/src/Examples/Images/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

<script>
import Document from '@tiptap/extension-document'
import Dropcursor from '@tiptap/extension-dropcursor'
import Image from '@tiptap/extension-image'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import { Dropcursor } from '@tiptap/extensions'
import { Editor, EditorContent } from '@tiptap/vue-3'

export default {
Expand Down
3 changes: 1 addition & 2 deletions demos/src/Experiments/All/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ import BulletList from '@tiptap/extension-bullet-list'
import Code from '@tiptap/extension-code'
import CodeBlockLowlight from '@tiptap/extension-code-block-lowlight'
import Document from '@tiptap/extension-document'
import Dropcursor from '@tiptap/extension-dropcursor'
import Gapcursor from '@tiptap/extension-gapcursor'
import HardBreak from '@tiptap/extension-hard-break'
import Heading from '@tiptap/extension-heading'
import Highlight from '@tiptap/extension-highlight'
Expand All @@ -130,6 +128,7 @@ import Text from '@tiptap/extension-text'
import TextAlign from '@tiptap/extension-text-align'
import { Color, TextStyle } from '@tiptap/extension-text-style'
import Underline from '@tiptap/extension-underline'
import { Dropcursor, Gapcursor } from '@tiptap/extensions'
import { Editor, EditorContent } from '@tiptap/vue-3'
import { all, createLowlight } from 'lowlight'

Expand Down
8 changes: 4 additions & 4 deletions demos/src/Experiments/MultipleEditors/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
import Bold from '@tiptap/extension-bold'
import Collaboration from '@tiptap/extension-collaboration'
import Document from '@tiptap/extension-document'
import DropCursor from '@tiptap/extension-dropcursor'
import Heading from '@tiptap/extension-heading'
import Paragraph from '@tiptap/extension-paragraph'
import TaskItem from '@tiptap/extension-task-item'
import TaskList from '@tiptap/extension-task-list'
import Text from '@tiptap/extension-text'
import { Dropcursor } from '@tiptap/extensions'
import { Editor, EditorContent } from '@tiptap/vue-3'
import { yDocToProsemirrorJSON } from 'y-prosemirror'
import * as Y from 'yjs'
Expand Down Expand Up @@ -77,7 +77,7 @@ export default {
}),
Text,
Bold,
DropCursor,
Dropcursor,
Collaboration.configure({
document: this.ydoc,
field: 'title',
Expand All @@ -92,7 +92,7 @@ export default {
Paragraph,
Text,
Bold,
DropCursor,
Dropcursor,
TaskList,
CustomTaskItem,
Collaboration.configure({
Expand All @@ -115,7 +115,7 @@ export default {
Paragraph,
Text,
Bold,
DropCursor,
Dropcursor,
Collaboration.configure({
document: this.ydoc,
field: 'description',
Expand Down
2 changes: 1 addition & 1 deletion demos/src/Extensions/Dropcursor/React/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import './styles.scss'

import Document from '@tiptap/extension-document'
import Dropcursor from '@tiptap/extension-dropcursor'
import Image from '@tiptap/extension-image'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import { Dropcursor } from '@tiptap/extensions'
import { EditorContent, useEditor } from '@tiptap/react'
import React from 'react'

Expand Down
2 changes: 1 addition & 1 deletion demos/src/Extensions/Dropcursor/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

<script>
import Document from '@tiptap/extension-document'
import Dropcursor from '@tiptap/extension-dropcursor'
import Image from '@tiptap/extension-image'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import { Dropcursor } from '@tiptap/extensions'
import { Editor, EditorContent } from '@tiptap/vue-3'

export default {
Expand Down
2 changes: 1 addition & 1 deletion demos/src/Extensions/Focus/React/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import './styles.scss'
import BulletList from '@tiptap/extension-bullet-list'
import Code from '@tiptap/extension-code'
import Document from '@tiptap/extension-document'
import Focus from '@tiptap/extension-focus'
import ListItem from '@tiptap/extension-list-item'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import { Focus } from '@tiptap/extensions'
import { EditorContent, useEditor } from '@tiptap/react'
import React from 'react'

Expand Down
2 changes: 1 addition & 1 deletion demos/src/Extensions/Focus/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import BulletList from '@tiptap/extension-bullet-list'
import Code from '@tiptap/extension-code'
import Document from '@tiptap/extension-document'
import Focus from '@tiptap/extension-focus'
import ListItem from '@tiptap/extension-list-item'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import { Focus } from '@tiptap/extensions'
import { Editor, EditorContent } from '@tiptap/vue-3'

export default {
Expand Down
2 changes: 1 addition & 1 deletion demos/src/Extensions/Gapcursor/React/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import './styles.scss'

import Document from '@tiptap/extension-document'
import Gapcursor from '@tiptap/extension-gapcursor'
import Image from '@tiptap/extension-image'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import { Gapcursor } from '@tiptap/extensions'
import { EditorContent, useEditor } from '@tiptap/react'
import React from 'react'

Expand Down
2 changes: 1 addition & 1 deletion demos/src/Extensions/Gapcursor/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

<script>
import Document from '@tiptap/extension-document'
import Gapcursor from '@tiptap/extension-gapcursor'
import Image from '@tiptap/extension-image'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import { Gapcursor } from '@tiptap/extensions'
import { Editor, EditorContent } from '@tiptap/vue-3'

export default {
Expand Down
2 changes: 1 addition & 1 deletion demos/src/Nodes/Image/React/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import './styles.scss'

import Document from '@tiptap/extension-document'
import Dropcursor from '@tiptap/extension-dropcursor'
import Image from '@tiptap/extension-image'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import { Dropcursor } from '@tiptap/extensions'
import { EditorContent, useEditor } from '@tiptap/react'
import React, { useCallback } from 'react'

Expand Down
2 changes: 1 addition & 1 deletion demos/src/Nodes/Image/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

<script>
import Document from '@tiptap/extension-document'
import Dropcursor from '@tiptap/extension-dropcursor'
import Image from '@tiptap/extension-image'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import { Dropcursor } from '@tiptap/extensions'
import { Editor, EditorContent } from '@tiptap/vue-3'

export default {
Expand Down
2 changes: 1 addition & 1 deletion demos/src/Nodes/Table/React/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import './styles.scss'

import Document from '@tiptap/extension-document'
import Gapcursor from '@tiptap/extension-gapcursor'
import Paragraph from '@tiptap/extension-paragraph'
import { TableKit } from '@tiptap/extension-table'
import Text from '@tiptap/extension-text'
import { Gapcursor } from '@tiptap/extensions'
import { EditorContent, useEditor } from '@tiptap/react'
import React from 'react'

Expand Down
2 changes: 1 addition & 1 deletion demos/src/Nodes/Table/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@

<script>
import Document from '@tiptap/extension-document'
import Gapcursor from '@tiptap/extension-gapcursor'
import Paragraph from '@tiptap/extension-paragraph'
import { TableKit } from '@tiptap/extension-table'
import Text from '@tiptap/extension-text'
import { Gapcursor } from '@tiptap/extensions'
import { Editor, EditorContent } from '@tiptap/vue-3'
export default {
Expand Down
2 changes: 1 addition & 1 deletion demos/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const getPackageDependencies = () => {
replacement: resolve(`../packages/${name}/${subPkgName}/index.ts`),
})
})
} else if (name === 'extension-text-style' || name === 'extension-table') {
} else if (name === 'extension-text-style' || name === 'extension-table' || name === 'extensions') {
fg.sync(`../packages/${name}/src/*`, { onlyDirectories: true }).forEach(subName => {
const subPkgName = subName.replace(`../packages/${name}/src/`, '')

Expand Down
4 changes: 2 additions & 2 deletions packages/extension-dropcursor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"dist"
],
"devDependencies": {
"@tiptap/extension-utils": "^3.0.0-next.3"
"@tiptap/extensions": "^3.0.0-next.3"
},
"peerDependencies": {
"@tiptap/extension-utils": "^3.0.0-next.3"
"@tiptap/extensions": "^3.0.0-next.3"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/extension-dropcursor/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Dropcursor } from '@tiptap/extension-utils'
import { Dropcursor } from '@tiptap/extensions'

export { Dropcursor, DropcursorOptions } from '@tiptap/extension-utils'
export { Dropcursor, DropcursorOptions } from '@tiptap/extensions'

export default Dropcursor
4 changes: 2 additions & 2 deletions packages/extension-focus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"dist"
],
"devDependencies": {
"@tiptap/extension-utils": "3.0.0-next.3"
"@tiptap/extensions": "3.0.0-next.3"
},
"peerDependencies": {
"@tiptap/extension-utils": "3.0.0-next.3"
"@tiptap/extensions": "3.0.0-next.3"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/extension-focus/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Focus } from '@tiptap/extension-utils'
import { Focus } from '@tiptap/extensions'

export { Focus, FocusOptions } from '@tiptap/extension-utils'
export { Focus, FocusOptions } from '@tiptap/extensions'

export default Focus
4 changes: 2 additions & 2 deletions packages/extension-gapcursor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"dist"
],
"devDependencies": {
"@tiptap/extension-utils": "^3.0.0-next.3"
"@tiptap/extensions": "^3.0.0-next.3"
},
"peerDependencies": {
"@tiptap/extension-utils": "^3.0.0-next.3"
"@tiptap/extensions": "^3.0.0-next.3"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/extension-gapcursor/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Gapcursor } from '@tiptap/extension-utils'
import { Gapcursor } from '@tiptap/extensions'

export { Gapcursor } from '@tiptap/extension-utils'
export { Gapcursor } from '@tiptap/extensions'

export default Gapcursor
50 changes: 0 additions & 50 deletions packages/extension-utils/package.json

This file was deleted.

5 changes: 0 additions & 5 deletions packages/extension-utils/src/index.ts

This file was deleted.

11 changes: 0 additions & 11 deletions packages/extension-utils/tsup.config.ts

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @tiptap/extension-utils
# @tiptap/extensions

[![Version](https://img.shields.io/npm/v/@tiptap/extension-focus.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-focus)
[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-focus.svg)](https://npmcharts.com/compare/tiptap?minimal=true)
Expand Down
Loading
Loading