-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(list): add new
extension-list
package which packages all the l…
…ist packages into a single package This maintains backwards-compatibility with the existing packages by making them into re-exports
- Loading branch information
1 parent
a0e0dc7
commit 263d7a6
Showing
43 changed files
with
296 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { BulletList } from './bullet-list.js' | ||
import { BulletList } from '@tiptap/extension-list' | ||
|
||
export * from './bullet-list.js' | ||
export { BulletList, BulletListOptions } from '@tiptap/extension-list' | ||
|
||
export default BulletList |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { ListItem } from './list-item.js' | ||
import { ListItem } from '@tiptap/extension-list' | ||
|
||
export * from './list-item.js' | ||
export { ListItem, ListItemOptions } from '@tiptap/extension-list' | ||
|
||
export default ListItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import { ListKeymap } from './list-keymap.js' | ||
import { ListKeymap } from '@tiptap/extension-list' | ||
|
||
export * from './list-keymap.js' | ||
export * as listHelpers from './listHelpers/index.js' | ||
export { listHelpers, ListKeymap, ListKeymapOptions } from '@tiptap/extension-list' | ||
|
||
export default ListKeymap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Change Log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# @tiptap/extension-list | ||
|
||
[](https://www.npmjs.com/package/@tiptap/extension-list) | ||
[](https://npmcharts.com/compare/tiptap?minimal=true) | ||
[](https://www.npmjs.com/package/@tiptap/extension-list) | ||
[](https://github.com/sponsors/ueberdosis) | ||
|
||
## Introduction | ||
|
||
Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. | ||
|
||
## Official Documentation | ||
|
||
Documentation can be found on the [Tiptap website](https://tiptap.dev). | ||
|
||
## License | ||
|
||
Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
{ | ||
"name": "@tiptap/extension-list", | ||
"description": "List extension for tiptap", | ||
"version": "3.0.0-next.4", | ||
"homepage": "https://tiptap.dev", | ||
"keywords": [ | ||
"tiptap", | ||
"tiptap extension" | ||
], | ||
"license": "MIT", | ||
"funding": { | ||
"type": "github", | ||
"url": "https://github.com/sponsors/ueberdosis" | ||
}, | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": { | ||
"import": "./dist/index.d.ts", | ||
"require": "./dist/index.d.cts" | ||
}, | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs" | ||
}, | ||
"./bullet-list": { | ||
"types": { | ||
"import": "./dist/bullet-list/index.d.ts", | ||
"require": "./dist/bullet-list/index.d.cts" | ||
}, | ||
"import": "./dist/bullet-list/index.js", | ||
"require": "./dist/bullet-list/index.cjs" | ||
}, | ||
"./item": { | ||
"types": { | ||
"import": "./dist/item/index.d.ts", | ||
"require": "./dist/item/index.d.cts" | ||
}, | ||
"import": "./dist/item/index.js", | ||
"require": "./dist/item/index.cjs" | ||
}, | ||
"./keymap": { | ||
"types": { | ||
"import": "./dist/keymap/index.d.ts", | ||
"require": "./dist/keymap/index.d.cts" | ||
}, | ||
"import": "./dist/keymap/index.js", | ||
"require": "./dist/keymap/index.cjs" | ||
}, | ||
"./kit": { | ||
"types": { | ||
"import": "./dist/kit/index.d.ts", | ||
"require": "./dist/kit/index.d.cts" | ||
}, | ||
"import": "./dist/kit/index.js", | ||
"require": "./dist/kit/index.cjs" | ||
}, | ||
"./ordered-list": { | ||
"types": { | ||
"import": "./dist/ordered-list/index.d.ts", | ||
"require": "./dist/ordered-list/index.d.cts" | ||
}, | ||
"import": "./dist/ordered-list/index.js", | ||
"require": "./dist/ordered-list/index.cjs" | ||
}, | ||
"./task-item": { | ||
"types": { | ||
"import": "./dist/task-item/index.d.ts", | ||
"require": "./dist/task-item/index.d.cts" | ||
}, | ||
"import": "./dist/task-item/index.js", | ||
"require": "./dist/task-item/index.cjs" | ||
}, | ||
"./task-list": { | ||
"types": { | ||
"import": "./dist/task-list/index.d.ts", | ||
"require": "./dist/task-list/index.d.cts" | ||
}, | ||
"import": "./dist/task-list/index.js", | ||
"require": "./dist/task-list/index.cjs" | ||
} | ||
}, | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"src", | ||
"dist" | ||
], | ||
"devDependencies": { | ||
"@tiptap/core": "^3.0.0-next.4", | ||
"@tiptap/pm": "^3.0.0-next.4" | ||
}, | ||
"peerDependencies": { | ||
"@tiptap/core": "^3.0.0-next.4", | ||
"@tiptap/pm": "^3.0.0-next.4" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ueberdosis/tiptap", | ||
"directory": "packages/extension-list" | ||
}, | ||
"scripts": { | ||
"build": "tsup", | ||
"lint": "prettier ./src/ --check && eslint --cache --quiet --no-error-on-unmatched-pattern ./src/" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './bullet-list.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export * from './bullet-list/index.js' | ||
export * from './item/index.js' | ||
export * from './keymap/index.js' | ||
export * from './kit/index.js' | ||
export * from './ordered-list/index.js' | ||
export * from './task-item/index.js' | ||
export * from './task-list/index.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './list-item.js' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './list-keymap.js' | ||
export * as listHelpers from './listHelpers/index.js' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import { Extension } from '@tiptap/core' | ||
|
||
import { BulletList, BulletListOptions } from '../bullet-list/index.js' | ||
import { ListItem, ListItemOptions } from '../item/index.js' | ||
import { ListKeymap, ListKeymapOptions } from '../keymap/index.js' | ||
import { OrderedList, OrderedListOptions } from '../ordered-list/index.js' | ||
import { TaskItem, TaskItemOptions } from '../task-item/index.js' | ||
import { TaskList, TaskListOptions } from '../task-list/index.js' | ||
|
||
export interface ListKitOptions { | ||
/** | ||
* If set to false, the bulletList extension will not be registered | ||
* @example table: false | ||
*/ | ||
bulletList: Partial<BulletListOptions> | false | ||
/** | ||
* If set to false, the listItem extension will not be registered | ||
*/ | ||
listItem: Partial<ListItemOptions> | false | ||
/** | ||
* If set to false, the listKeymap extension will not be registered | ||
*/ | ||
listKeymap: Partial<ListKeymapOptions> | false | ||
/** | ||
* If set to false, the orderedList extension will not be registered | ||
*/ | ||
orderedList: Partial<OrderedListOptions> | false | ||
/** | ||
* If set to false, the taskItem extension will not be registered | ||
*/ | ||
taskItem: Partial<TaskItemOptions> | false | ||
/** | ||
* If set to false, the taskList extension will not be registered | ||
*/ | ||
taskList: Partial<TaskListOptions> | false | ||
} | ||
|
||
/** | ||
* The table kit is a collection of table editor extensions. | ||
* | ||
* It’s a good starting point for building your own table in Tiptap. | ||
*/ | ||
export const ListKit = Extension.create<ListKitOptions>({ | ||
name: 'listKit', | ||
|
||
addExtensions() { | ||
const extensions = [] | ||
|
||
if (this.options.bulletList !== false) { | ||
extensions.push(BulletList.configure(this.options.bulletList)) | ||
} | ||
|
||
if (this.options.listItem !== false) { | ||
extensions.push(ListItem.configure(this.options.listItem)) | ||
} | ||
|
||
if (this.options.listKeymap !== false) { | ||
extensions.push(ListKeymap.configure(this.options.listKeymap)) | ||
} | ||
|
||
if (this.options.orderedList !== false) { | ||
extensions.push(OrderedList.configure(this.options.orderedList)) | ||
} | ||
|
||
if (this.options.taskItem !== false) { | ||
extensions.push(TaskItem.configure(this.options.taskItem)) | ||
} | ||
|
||
if (this.options.taskList !== false) { | ||
extensions.push(TaskList.configure(this.options.taskList)) | ||
} | ||
|
||
return extensions | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './ordered-list.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './task-item.js' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './task-list.js' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { defineConfig } from 'tsup' | ||
|
||
export default defineConfig( | ||
[ | ||
'src/bullet-list/index.ts', | ||
'src/item/index.ts', | ||
'src/keymap/index.ts', | ||
'src/kit/index.ts', | ||
'src/ordered-list/index.ts', | ||
'src/task-item/index.ts', | ||
'src/task-list/index.ts', | ||
'src/index.ts', | ||
].map(entry => ({ | ||
entry: [entry], | ||
tsconfig: '../../tsconfig.build.json', | ||
outDir: `dist${entry.replace('src', '').split('/').slice(0, -1).join('/')}`, | ||
dts: true, | ||
sourcemap: true, | ||
format: ['esm', 'cjs'], | ||
external: [/^[^./]/], | ||
})), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { OrderedList } from './ordered-list.js' | ||
import { OrderedList } from '@tiptap/extension-list' | ||
|
||
export * from './ordered-list.js' | ||
export { OrderedList, OrderedListOptions } from '@tiptap/extension-list' | ||
|
||
export default OrderedList |
Oops, something went wrong.