From 2f8d8fdcd0020d01127e1903823439bd3bb6a87a Mon Sep 17 00:00:00 2001 From: winetree94 Date: Thu, 9 May 2024 00:16:54 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20connect=20pm=20dependencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/_wip_command/package.json | 9 +- packages/_wip_command/src/plugin.ts | 4 +- packages/_wip_command/src/views/command.ts | 4 +- packages/_wip_emoji/package.json | 4 +- packages/_wip_emoji/src/plugin.ts | 2 +- packages/_wip_image/package.json | 6 +- packages/_wip_image/src/commands.ts | 2 +- packages/_wip_image/src/image.ts | 4 +- packages/_wip_image/src/placeholder.ts | 4 +- packages/_wip_mention/package.json | 7 +- .../_wip_mention/src/commands/add-mention.ts | 2 +- packages/_wip_mention/src/plugins/command.ts | 4 +- packages/_wip_mention/src/plugins/mention.ts | 4 +- packages/_wip_mention/src/plugins/unset.ts | 2 +- packages/_wip_mention/src/schemas/mention.ts | 2 +- .../src/utils/get-mention-range.ts | 2 +- .../_wip_mention/src/views/mention-layer.ts | 4 +- packages/blockquote/package.json | 6 +- .../src/commands/toggle-block-quote.ts | 2 +- packages/blockquote/src/plugins/blockquote.ts | 4 +- .../blockquote/src/plugins/input-rules.ts | 4 +- packages/blockquote/src/plugins/keymaps.ts | 6 +- packages/blockquote/src/plugins/merge.ts | 4 +- .../blockquote/src/schemas/block-quote.ts | 2 +- packages/bold/package.json | 4 +- packages/bold/src/plugins/bold.ts | 2 +- packages/bold/src/plugins/keymap.ts | 4 +- packages/bold/src/schemas/bold.ts | 2 +- packages/code/package.json | 5 +- packages/code/src/plugins/code.ts | 2 +- packages/code/src/plugins/input-rules.ts | 4 +- packages/code/src/plugins/keymap.ts | 4 +- packages/code/src/schemas/code.ts | 2 +- packages/codeblock/package.json | 7 +- packages/codeblock/src/plugins/codeblock.ts | 2 +- packages/codeblock/src/plugins/eject.ts | 4 +- packages/codeblock/src/plugins/input-rules.ts | 2 +- packages/codeblock/src/plugins/keymap.ts | 4 +- packages/codeblock/src/plugins/merge.ts | 2 +- packages/codeblock/src/schemas/code-block.ts | 2 +- .../codeblock/src/utils/is-in-codeblock.ts | 4 +- packages/core/package.json | 12 +- packages/core/src/commands/clear-marks.ts | 2 +- packages/core/src/commands/set-text-align.ts | 4 +- .../src/commands/toggle-mark-with-attrs.ts | 4 +- .../src/commands/transform-range-to-block.ts | 4 +- .../wrapping-input-rule-with-joins.ts | 4 +- packages/core/src/plugins/core.ts | 2 +- packages/core/src/plugins/history.ts | 2 +- packages/core/src/plugins/keymap.ts | 4 +- .../core/src/plugins/merge-adjacent-node.ts | 6 +- packages/core/src/plugins/overlay.ts | 2 +- packages/core/src/plugins/reset-mark.ts | 2 +- .../core/src/plugins/selection-element.ts | 4 +- packages/core/src/plugins/virtual-cursor.ts | 8 +- packages/core/src/schemas/base.ts | 2 +- packages/core/src/schemas/paragraph.ts | 2 +- packages/core/src/transforms/lift-out.ts | 4 +- packages/core/src/types.ts | 2 +- packages/core/src/utils/find-mark.ts | 4 +- .../src/utils/find-nearest-block-container.ts | 2 +- .../src/utils/get-block-container-children.ts | 2 +- .../src/utils/get-range-first-text-align.ts | 2 +- packages/core/src/utils/is-in-marks.ts | 2 +- packages/core/src/utils/is-text-selection.ts | 2 +- packages/core/src/utils/mark-active.ts | 4 +- packages/core/src/utils/mark-applies.ts | 4 +- packages/dev/package.json | 8 +- packages/dev/src/main.ts | 4 +- packages/devkit/package.json | 14 +- .../src/components/codemirror/codemirror.ts | 2 +- packages/docs/package.json | 12 +- .../src/components/editor/prose-mirror.tsx | 4 +- .../examples/getting-started/maximum.tsx | 4 +- .../examples/getting-started/minimal.tsx | 4 +- .../examples/packages/blockquote.tsx | 4 +- .../src/components/examples/packages/bold.tsx | 4 +- .../examples/packages/code-block.tsx | 4 +- .../src/components/examples/packages/core.tsx | 4 +- .../examples/packages/flat-list.tsx | 4 +- .../examples/packages/flat-task-list.tsx | 4 +- .../examples/packages/font-family.tsx | 4 +- .../components/examples/packages/heading.tsx | 4 +- .../examples/packages/horizontal-rule.tsx | 4 +- .../examples/packages/inline-code.tsx | 4 +- .../components/examples/packages/italic.tsx | 4 +- .../src/components/examples/packages/link.tsx | 4 +- .../components/examples/packages/mention.tsx | 4 +- .../components/examples/packages/menubar.tsx | 2 +- .../examples/packages/paragraph.tsx | 4 +- .../components/examples/packages/preset.tsx | 4 +- .../examples/packages/strikethrough.tsx | 4 +- .../examples/packages/subscript.tsx | 4 +- .../examples/packages/superscript.tsx | 4 +- .../components/examples/packages/table.tsx | 4 +- .../examples/packages/text-color.tsx | 4 +- .../examples/packages/underline.tsx | 4 +- packages/flat-list/package.json | 10 +- packages/flat-list/src/commands/backspace.ts | 4 +- .../src/commands/indent-list-item.ts | 4 +- .../flat-list/src/commands/split-list-item.ts | 6 +- .../flat-list/src/commands/toggle-list.ts | 4 +- packages/flat-list/src/plugins/flat-list.ts | 4 +- packages/flat-list/src/plugins/input-rules.ts | 4 +- packages/flat-list/src/plugins/keymaps.ts | 4 +- packages/flat-list/src/plugins/merge.ts | 4 +- packages/flat-list/src/schemas/bullet_list.ts | 2 +- packages/flat-list/src/schemas/list_item.ts | 2 +- .../flat-list/src/schemas/ordered_list.ts | 2 +- .../src/transforms/lift-out-of-list.ts | 6 +- .../flat-list/src/transforms/wrap-in-list.ts | 6 +- packages/flat-task-list/package.json | 8 +- .../src/plugins/flat-task-list.ts | 4 +- .../flat-task-list/src/plugins/input-rules.ts | 4 +- .../flat-task-list/src/plugins/keymaps.ts | 4 +- packages/flat-task-list/src/plugins/merge.ts | 4 +- .../src/plugins/task-list-item.ts | 4 +- .../src/schemas/task-list-item.ts | 2 +- .../flat-task-list/src/schemas/task-list.ts | 2 +- .../flat-task-list/src/utils/create-node.ts | 4 +- packages/font-family/package.json | 4 +- .../src/commands/toggle-font-family.ts | 4 +- .../font-family/src/schemas/font-family.ts | 2 +- packages/heading/package.json | 6 +- packages/heading/src/plugins/heading.ts | 2 +- packages/heading/src/plugins/input-rules.ts | 4 +- packages/heading/src/plugins/keymaps.ts | 6 +- packages/heading/src/schemas/heading.ts | 2 +- packages/hr/package.json | 3 +- packages/hr/src/hr.ts | 2 +- packages/hr/src/plugins/hr.ts | 2 +- packages/hr/src/plugins/keymap.ts | 2 +- packages/hr/src/schemas/hr.ts | 2 +- packages/italic/package.json | 4 +- packages/italic/src/plugins/italic.ts | 2 +- packages/italic/src/plugins/keymap.ts | 4 +- packages/italic/src/schemas/italic.ts | 2 +- packages/link/package.json | 7 +- packages/link/src/commands/add-link.ts | 4 +- packages/link/src/plugins/floating-layer.ts | 6 +- packages/link/src/plugins/link.ts | 4 +- packages/link/src/schemas/link.ts | 2 +- packages/link/src/utils/can-add-link.ts | 4 +- packages/menubar/package.json | 8 +- .../src/components/blockquote/blockquote.ts | 2 +- .../src/components/codeblock/codeblock.ts | 2 +- packages/menubar/src/components/context.ts | 4 +- .../menubar/src/components/marks/marks.ts | 2 +- packages/menubar/src/plugins/menubar.ts | 6 +- .../menubar/src/utils/current-align-type.ts | 2 +- .../menubar/src/utils/current-text-type.ts | 2 +- packages/paragraph/package.json | 9 +- packages/paragraph/src/plugins/keymaps.ts | 4 +- packages/paragraph/src/plugins/paragraph.ts | 4 +- packages/paragraph/src/schemas/paragraph.ts | 2 +- .../paragraph/src/utils/get-range-is-text.ts | 4 +- packages/pm/package.json | 1 + packages/pm/utils/index.ts | 1 + packages/pm/utils/package.json | 14 ++ packages/preset/package.json | 8 +- packages/preset/src/plugins/preset.ts | 4 +- packages/preset/src/schemas/preset.ts | 2 +- packages/strikethrough/package.json | 4 +- packages/strikethrough/src/plugins/keymap.ts | 4 +- .../src/plugins/strikethrough.ts | 2 +- .../src/schemas/strikethrough.ts | 2 +- packages/subscript/package.json | 4 +- packages/subscript/src/plugins/keymap.ts | 4 +- packages/subscript/src/plugins/subscript.ts | 2 +- packages/subscript/src/schemas/subscript.ts | 2 +- packages/superscript/package.json | 4 +- packages/superscript/src/plugins/keymap.ts | 4 +- .../superscript/src/plugins/superscript.ts | 2 +- .../superscript/src/schemas/superscript.ts | 2 +- packages/tables/package.json | 10 +- .../tables/src/commands/delete-columns.ts | 2 +- packages/tables/src/commands/delete-rows.ts | 2 +- packages/tables/src/commands/delete-table.ts | 2 +- packages/tables/src/commands/insert-tables.ts | 4 +- packages/tables/src/components/cell-button.ts | 2 +- .../tables/src/node-views/table-node-view.ts | 4 +- packages/tables/src/plugins/cell-button.ts | 4 +- packages/tables/src/plugins/focused-cell.ts | 4 +- packages/tables/src/plugins/table-editing.ts | 6 +- packages/tables/src/plugins/table.ts | 4 +- packages/tables/src/schemas/schema.ts | 4 +- packages/tables/src/utils/find.ts | 6 +- .../tables/src/utils/is-table-node-spec.ts | 2 +- packages/text-color/package.json | 3 +- .../src/commands/toggle-text-color.ts | 6 +- packages/text-color/src/schemas/text-color.ts | 2 +- packages/underline/package.json | 4 +- packages/underline/src/plugins/keymap.ts | 6 +- packages/underline/src/plugins/underline.ts | 4 +- packages/underline/src/schemas/underline.ts | 2 +- tsconfig.json | 1 + yarn.lock | 173 +++--------------- 197 files changed, 361 insertions(+), 571 deletions(-) create mode 100644 packages/pm/utils/index.ts create mode 100644 packages/pm/utils/package.json diff --git a/packages/_wip_command/package.json b/packages/_wip_command/package.json index 12b4176e..24f8294a 100644 --- a/packages/_wip_command/package.json +++ b/packages/_wip_command/package.json @@ -17,15 +17,10 @@ "dependencies": { "@edybara/core": "*", "@edybara/mention": "*", + "@edybara/pm": "*", "@edybara/tables": "*", "@edybara/ui": "*", - "preact": "*", - "prosemirror-commands": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-state": "*", - "prosemirror-view": "*" + "preact": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/_wip_command/src/plugin.ts b/packages/_wip_command/src/plugin.ts index 5384c062..5a45da42 100644 --- a/packages/_wip_command/src/plugin.ts +++ b/packages/_wip_command/src/plugin.ts @@ -1,5 +1,5 @@ -import { Plugin, PluginKey, PluginView } from 'prosemirror-state'; -import { EditorView } from 'prosemirror-view'; +import { Plugin, PluginKey, PluginView } from '@edybara/pm/state'; +import { EditorView } from '@edybara/pm/view'; export interface EdybaraCommandPluginConfigs { view?: ( diff --git a/packages/_wip_command/src/views/command.ts b/packages/_wip_command/src/views/command.ts index e790ce4b..e6d49733 100644 --- a/packages/_wip_command/src/views/command.ts +++ b/packages/_wip_command/src/views/command.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/unbound-method */ import { render } from 'preact'; -import { EditorState, PluginKey } from 'prosemirror-state'; -import { EditorView } from 'prosemirror-view'; +import { EditorState, PluginKey } from '@edybara/pm/state'; +import { EditorView } from '@edybara/pm/view'; import { EdybaraCommandPluginState, EdybaraCommandPluginView } from '../plugin'; import { addMention } from '@edybara/mention'; import { insertTable } from '@edybara/tables'; diff --git a/packages/_wip_emoji/package.json b/packages/_wip_emoji/package.json index 4df5a5e3..c1c9cead 100644 --- a/packages/_wip_emoji/package.json +++ b/packages/_wip_emoji/package.json @@ -16,9 +16,7 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/_wip_emoji/src/plugin.ts b/packages/_wip_emoji/src/plugin.ts index 7f1b80d6..2c03450c 100644 --- a/packages/_wip_emoji/src/plugin.ts +++ b/packages/_wip_emoji/src/plugin.ts @@ -1,4 +1,4 @@ -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; export interface EmojiAttribute { data_id: string; diff --git a/packages/_wip_image/package.json b/packages/_wip_image/package.json index b7e489f1..5273d1cb 100644 --- a/packages/_wip_image/package.json +++ b/packages/_wip_image/package.json @@ -16,11 +16,9 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", + "@edybara/pm": "*", "@edybara/ui": "*", - "preact": "*", - "prosemirror-model": "*", - "prosemirror-state": "*", - "prosemirror-view": "*" + "preact": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/_wip_image/src/commands.ts b/packages/_wip_image/src/commands.ts index e23150a0..38796d3f 100644 --- a/packages/_wip_image/src/commands.ts +++ b/packages/_wip_image/src/commands.ts @@ -1,4 +1,4 @@ -import { EditorState } from 'prosemirror-state'; +import { EditorState } from '@edybara/pm/state'; import { ImagePlaceholderSpec, imagePlaceholderPluginKey } from './placeholder'; export const findPlaceholderPos = (state: EditorState, id: string) => { diff --git a/packages/_wip_image/src/image.ts b/packages/_wip_image/src/image.ts index d34bff16..8ecd7591 100644 --- a/packages/_wip_image/src/image.ts +++ b/packages/_wip_image/src/image.ts @@ -1,9 +1,9 @@ -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; import { createImagePlaceholderPlugin, ImagePlaceholderViewProvider, } from './placeholder'; -import { EditorView } from 'prosemirror-view'; +import { EditorView } from '@edybara/pm/view'; export interface ImageAttrs { src: string; diff --git a/packages/_wip_image/src/placeholder.ts b/packages/_wip_image/src/placeholder.ts index b9d6b252..dd794d94 100644 --- a/packages/_wip_image/src/placeholder.ts +++ b/packages/_wip_image/src/placeholder.ts @@ -1,5 +1,5 @@ -import { Plugin, PluginKey } from 'prosemirror-state'; -import { Decoration, DecorationSet, EditorView } from 'prosemirror-view'; +import { Plugin, PluginKey } from '@edybara/pm/state'; +import { Decoration, DecorationSet, EditorView } from '@edybara/pm/view'; export interface ImagePlaceholderSpec { id: string; diff --git a/packages/_wip_mention/package.json b/packages/_wip_mention/package.json index 62fb08da..026390d0 100644 --- a/packages/_wip_mention/package.json +++ b/packages/_wip_mention/package.json @@ -16,12 +16,9 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", + "@edybara/pm": "*", "@edybara/ui": "*", - "preact": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-state": "*" + "preact": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/_wip_mention/src/commands/add-mention.ts b/packages/_wip_mention/src/commands/add-mention.ts index 745545e4..de7a6f8f 100644 --- a/packages/_wip_mention/src/commands/add-mention.ts +++ b/packages/_wip_mention/src/commands/add-mention.ts @@ -1,4 +1,4 @@ -import { Command } from 'prosemirror-state'; +import { Command } from '@edybara/pm/state'; /** * To initiate a mention input, insert the @ character. diff --git a/packages/_wip_mention/src/plugins/command.ts b/packages/_wip_mention/src/plugins/command.ts index 04a97f1e..10a92dc3 100644 --- a/packages/_wip_mention/src/plugins/command.ts +++ b/packages/_wip_mention/src/plugins/command.ts @@ -1,5 +1,5 @@ -import { Plugin as PMPlugin, PluginKey, PluginView } from 'prosemirror-state'; -import { EditorView } from 'prosemirror-view'; +import { Plugin as PMPlugin, PluginKey, PluginView } from '@edybara/pm/state'; +import { EditorView } from '@edybara/pm/view'; import { getMentionRange } from '../utils'; export interface MentionPluginState { diff --git a/packages/_wip_mention/src/plugins/mention.ts b/packages/_wip_mention/src/plugins/mention.ts index f6b8d95b..2483f077 100644 --- a/packages/_wip_mention/src/plugins/mention.ts +++ b/packages/_wip_mention/src/plugins/mention.ts @@ -1,5 +1,5 @@ -import { MarkType } from 'prosemirror-model'; -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { MarkType } from '@edybara/pm/model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { EdybaraMentionCommandPluginConfigs, edybaraMentionCommandPlugins, diff --git a/packages/_wip_mention/src/plugins/unset.ts b/packages/_wip_mention/src/plugins/unset.ts index 5f287175..0e73220a 100644 --- a/packages/_wip_mention/src/plugins/unset.ts +++ b/packages/_wip_mention/src/plugins/unset.ts @@ -1,4 +1,4 @@ -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; /** * Provides a feature to unmention when text with mention formatting is partially deleted. diff --git a/packages/_wip_mention/src/schemas/mention.ts b/packages/_wip_mention/src/schemas/mention.ts index 6d9ad19b..ca8872dd 100644 --- a/packages/_wip_mention/src/schemas/mention.ts +++ b/packages/_wip_mention/src/schemas/mention.ts @@ -1,4 +1,4 @@ -import { MarkSpec } from 'prosemirror-model'; +import { MarkSpec } from '@edybara/pm/model'; export const EDIM_MENTION_DEFAULT_MARK_NAME = 'mention'; diff --git a/packages/_wip_mention/src/utils/get-mention-range.ts b/packages/_wip_mention/src/utils/get-mention-range.ts index b451d3fa..fe7cc3f4 100644 --- a/packages/_wip_mention/src/utils/get-mention-range.ts +++ b/packages/_wip_mention/src/utils/get-mention-range.ts @@ -1,4 +1,4 @@ -import { EditorState } from 'prosemirror-state'; +import { EditorState } from '@edybara/pm/state'; export const KEYBOARD_KEY = { SPACE: ' ', diff --git a/packages/_wip_mention/src/views/mention-layer.ts b/packages/_wip_mention/src/views/mention-layer.ts index a52e2390..61c8dfe1 100644 --- a/packages/_wip_mention/src/views/mention-layer.ts +++ b/packages/_wip_mention/src/views/mention-layer.ts @@ -6,8 +6,8 @@ import { classes, html, } from '@edybara/ui'; -import { EditorState, PluginKey } from 'prosemirror-state'; -import { EditorView } from 'prosemirror-view'; +import { EditorState, PluginKey } from '@edybara/pm/state'; +import { EditorView } from '@edybara/pm/view'; import { render } from 'preact'; import { getMentionRange } from '../utils'; import { useEffect } from 'preact/hooks'; diff --git a/packages/blockquote/package.json b/packages/blockquote/package.json index 0a96196c..05c6a5e0 100644 --- a/packages/blockquote/package.json +++ b/packages/blockquote/package.json @@ -16,11 +16,7 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "prosemirror-commands": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-state": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/blockquote/src/commands/toggle-block-quote.ts b/packages/blockquote/src/commands/toggle-block-quote.ts index bac3ce9a..2e3cf6af 100644 --- a/packages/blockquote/src/commands/toggle-block-quote.ts +++ b/packages/blockquote/src/commands/toggle-block-quote.ts @@ -1,4 +1,4 @@ -import { Command } from 'prosemirror-state'; +import { Command } from '@edybara/pm/state'; import { NodePair } from '@edybara/core'; export const toggleBlockquote = (): Command => { diff --git a/packages/blockquote/src/plugins/blockquote.ts b/packages/blockquote/src/plugins/blockquote.ts index 17940e71..e7fee6e3 100644 --- a/packages/blockquote/src/plugins/blockquote.ts +++ b/packages/blockquote/src/plugins/blockquote.ts @@ -1,5 +1,5 @@ -import { NodeType } from 'prosemirror-model'; -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { NodeType } from '@edybara/pm/model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { edybaraBlockquoteInputRulePlugins } from './input-rules'; import { edybaraBlockquoteKeymapPlugins } from './keymaps'; import { edybaraBlockQuoteMergePlugins } from './merge'; diff --git a/packages/blockquote/src/plugins/input-rules.ts b/packages/blockquote/src/plugins/input-rules.ts index 1fe5114f..32aec6ba 100644 --- a/packages/blockquote/src/plugins/input-rules.ts +++ b/packages/blockquote/src/plugins/input-rules.ts @@ -1,6 +1,6 @@ import { inputRules, wrappingInputRule } from 'prosemirror-inputrules'; -import { Plugin as PMPlugin } from 'prosemirror-state'; -import { NodeType } from 'prosemirror-model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; +import { NodeType } from '@edybara/pm/model'; export interface EdybaraBlockquoteInputRulePluginConfigs { nodeType: NodeType; diff --git a/packages/blockquote/src/plugins/keymaps.ts b/packages/blockquote/src/plugins/keymaps.ts index 865585f4..e1d38e73 100644 --- a/packages/blockquote/src/plugins/keymaps.ts +++ b/packages/blockquote/src/plugins/keymaps.ts @@ -1,6 +1,6 @@ -import { Plugin as PMPlugin } from 'prosemirror-state'; -import { NodeType } from 'prosemirror-model'; -import { wrapIn } from 'prosemirror-commands'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; +import { NodeType } from '@edybara/pm/model'; +import { wrapIn } from '@edybara/pm/commands'; import { keymap } from 'prosemirror-keymap'; export interface EdybaraBlockquoteKeymapPluginConfigs { diff --git a/packages/blockquote/src/plugins/merge.ts b/packages/blockquote/src/plugins/merge.ts index 67fa870b..aace80d6 100644 --- a/packages/blockquote/src/plugins/merge.ts +++ b/packages/blockquote/src/plugins/merge.ts @@ -1,5 +1,5 @@ -import { NodeType } from 'prosemirror-model'; -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { NodeType } from '@edybara/pm/model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { edybaraMergeAdjacentNodePlugins } from '@edybara/core'; export interface EdybaraBlockQuoteMergePluginConfigs { diff --git a/packages/blockquote/src/schemas/block-quote.ts b/packages/blockquote/src/schemas/block-quote.ts index b12eef17..c6cb9093 100644 --- a/packages/blockquote/src/schemas/block-quote.ts +++ b/packages/blockquote/src/schemas/block-quote.ts @@ -1,4 +1,4 @@ -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; export const EDIM_BLOCKQUOTE_NODE_NAME = 'blockquote'; diff --git a/packages/bold/package.json b/packages/bold/package.json index c298b369..8965fc85 100644 --- a/packages/bold/package.json +++ b/packages/bold/package.json @@ -43,9 +43,7 @@ }, "dependencies": { "@edybara/core": "*", - "prosemirror-commands": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/bold/src/plugins/bold.ts b/packages/bold/src/plugins/bold.ts index c63aec4b..1f8eccd9 100644 --- a/packages/bold/src/plugins/bold.ts +++ b/packages/bold/src/plugins/bold.ts @@ -1,4 +1,4 @@ -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; import { edybaraBoldKeymapPlugins } from './keymap'; export interface EdybaraBoldPluginConfigs { diff --git a/packages/bold/src/plugins/keymap.ts b/packages/bold/src/plugins/keymap.ts index 47762926..275c91e1 100644 --- a/packages/bold/src/plugins/keymap.ts +++ b/packages/bold/src/plugins/keymap.ts @@ -1,6 +1,6 @@ -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; import { keymap } from 'prosemirror-keymap'; -import { toggleMark } from 'prosemirror-commands'; +import { toggleMark } from '@edybara/pm/commands'; export interface EdybaraBoldKeymapPluginConfigs { markType: MarkType; diff --git a/packages/bold/src/schemas/bold.ts b/packages/bold/src/schemas/bold.ts index 8432380f..59eb1334 100644 --- a/packages/bold/src/schemas/bold.ts +++ b/packages/bold/src/schemas/bold.ts @@ -1,4 +1,4 @@ -import { MarkSpec } from 'prosemirror-model'; +import { MarkSpec } from '@edybara/pm/model'; import { BaseMarkConfigs } from '@edybara/core'; export const EDIM_BOLD_MARK_NAME = 'bold'; diff --git a/packages/code/package.json b/packages/code/package.json index e28bb133..1f897d3e 100644 --- a/packages/code/package.json +++ b/packages/code/package.json @@ -16,10 +16,7 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "prosemirror-commands": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/code/src/plugins/code.ts b/packages/code/src/plugins/code.ts index b7f4c8a9..847d6a41 100644 --- a/packages/code/src/plugins/code.ts +++ b/packages/code/src/plugins/code.ts @@ -1,4 +1,4 @@ -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; import { edybaraCodeKeymapPlugins } from './keymap'; import { edybaraCodeInputRulePlugins } from './input-rules'; diff --git a/packages/code/src/plugins/input-rules.ts b/packages/code/src/plugins/input-rules.ts index e621c251..bd3db63b 100644 --- a/packages/code/src/plugins/input-rules.ts +++ b/packages/code/src/plugins/input-rules.ts @@ -1,6 +1,6 @@ -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { InputRule, inputRules } from 'prosemirror-inputrules'; -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; export interface EdybaraCodeInputRulePluginConfigs { markType: MarkType; diff --git a/packages/code/src/plugins/keymap.ts b/packages/code/src/plugins/keymap.ts index e61a4094..4f2e1c22 100644 --- a/packages/code/src/plugins/keymap.ts +++ b/packages/code/src/plugins/keymap.ts @@ -1,6 +1,6 @@ -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; import { keymap } from 'prosemirror-keymap'; -import { toggleMark } from 'prosemirror-commands'; +import { toggleMark } from '@edybara/pm/commands'; export interface EdybaraCodeKeymapPluginConfigs { markType: MarkType; diff --git a/packages/code/src/schemas/code.ts b/packages/code/src/schemas/code.ts index 259cdd5f..62d2e980 100644 --- a/packages/code/src/schemas/code.ts +++ b/packages/code/src/schemas/code.ts @@ -1,4 +1,4 @@ -import { MarkSpec } from 'prosemirror-model'; +import { MarkSpec } from '@edybara/pm/model'; export const EDIM_CODE_MARK_NAME = 'code'; diff --git a/packages/codeblock/package.json b/packages/codeblock/package.json index e01b15bb..be148718 100644 --- a/packages/codeblock/package.json +++ b/packages/codeblock/package.json @@ -16,12 +16,7 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "prosemirror-commands": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-state": "*", - "prosemirror-utils": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/codeblock/src/plugins/codeblock.ts b/packages/codeblock/src/plugins/codeblock.ts index 4fd47ba5..2b494a25 100644 --- a/packages/codeblock/src/plugins/codeblock.ts +++ b/packages/codeblock/src/plugins/codeblock.ts @@ -1,4 +1,4 @@ -import { NodeType } from 'prosemirror-model'; +import { NodeType } from '@edybara/pm/model'; import { edybaraCodeBlockInputRulePlugins } from './input-rules'; import { edybaraCodeBlockKeymapPlugins } from './keymap'; import { edybaraCodeBlockMergePlugins } from './merge'; diff --git a/packages/codeblock/src/plugins/eject.ts b/packages/codeblock/src/plugins/eject.ts index 6d063e9b..5fe5a451 100644 --- a/packages/codeblock/src/plugins/eject.ts +++ b/packages/codeblock/src/plugins/eject.ts @@ -1,5 +1,5 @@ -import { Plugin as PMPlugin, TextSelection } from 'prosemirror-state'; -import { NodeType } from 'prosemirror-model'; +import { Plugin as PMPlugin, TextSelection } from '@edybara/pm/state'; +import { NodeType } from '@edybara/pm/model'; import { isInCodeBlock } from '../utils'; import { findParentNode } from 'prosemirror-utils'; import { keymap } from 'prosemirror-keymap'; diff --git a/packages/codeblock/src/plugins/input-rules.ts b/packages/codeblock/src/plugins/input-rules.ts index 7302fb1b..34f4992f 100644 --- a/packages/codeblock/src/plugins/input-rules.ts +++ b/packages/codeblock/src/plugins/input-rules.ts @@ -1,4 +1,4 @@ -import { NodeType } from 'prosemirror-model'; +import { NodeType } from '@edybara/pm/model'; import { inputRules, textblockTypeInputRule } from 'prosemirror-inputrules'; export interface EdybaraCodeBlockInputRulePluginConfigs { diff --git a/packages/codeblock/src/plugins/keymap.ts b/packages/codeblock/src/plugins/keymap.ts index 6ad4b7c1..d5588493 100644 --- a/packages/codeblock/src/plugins/keymap.ts +++ b/packages/codeblock/src/plugins/keymap.ts @@ -1,6 +1,6 @@ -import { NodeType } from 'prosemirror-model'; +import { NodeType } from '@edybara/pm/model'; import { keymap } from 'prosemirror-keymap'; -import { setBlockType } from 'prosemirror-commands'; +import { setBlockType } from '@edybara/pm/commands'; export interface EdybaraCodeBlockKeymapPluginConfigs { nodeType: NodeType; diff --git a/packages/codeblock/src/plugins/merge.ts b/packages/codeblock/src/plugins/merge.ts index 37f46da9..ecfa8af0 100644 --- a/packages/codeblock/src/plugins/merge.ts +++ b/packages/codeblock/src/plugins/merge.ts @@ -1,4 +1,4 @@ -import { NodeType } from 'prosemirror-model'; +import { NodeType } from '@edybara/pm/model'; import { edybaraMergeAdjacentNodePlugins } from '@edybara/core'; export interface EdybaraCodeBlockMergePluginConfigs { diff --git a/packages/codeblock/src/schemas/code-block.ts b/packages/codeblock/src/schemas/code-block.ts index 45149260..a61561e4 100644 --- a/packages/codeblock/src/schemas/code-block.ts +++ b/packages/codeblock/src/schemas/code-block.ts @@ -1,4 +1,4 @@ -import { DOMOutputSpec, NodeSpec } from 'prosemirror-model'; +import { DOMOutputSpec, NodeSpec } from '@edybara/pm/model'; export const EDIM_CODEBLOCK_NODE_NAME = 'code_block'; diff --git a/packages/codeblock/src/utils/is-in-codeblock.ts b/packages/codeblock/src/utils/is-in-codeblock.ts index fee3060a..66194e30 100644 --- a/packages/codeblock/src/utils/is-in-codeblock.ts +++ b/packages/codeblock/src/utils/is-in-codeblock.ts @@ -1,5 +1,5 @@ -import { NodeType } from 'prosemirror-model'; -import { EditorState } from 'prosemirror-state'; +import { NodeType } from '@edybara/pm/model'; +import { EditorState } from '@edybara/pm/state'; export const isInCodeBlock = (state: EditorState, nodeType: NodeType) => { const $head = state.selection.$head; diff --git a/packages/core/package.json b/packages/core/package.json index 8cdb30f5..2456c849 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -15,17 +15,7 @@ "style": "styles/core.scss", "types": "dist/index.d.ts", "dependencies": { - "prosemirror-commands": "*", - "prosemirror-dropcursor": "*", - "prosemirror-gapcursor": "*", - "prosemirror-history": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-state": "*", - "prosemirror-transform": "*", - "prosemirror-utils": "*", - "prosemirror-view": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/core/src/commands/clear-marks.ts b/packages/core/src/commands/clear-marks.ts index 949ae0e4..db983cde 100644 --- a/packages/core/src/commands/clear-marks.ts +++ b/packages/core/src/commands/clear-marks.ts @@ -1,4 +1,4 @@ -import { Command } from 'prosemirror-state'; +import { Command } from '@edybara/pm/state'; /** * Remove all marks from the current selection diff --git a/packages/core/src/commands/set-text-align.ts b/packages/core/src/commands/set-text-align.ts index c0e7a790..aafd8336 100644 --- a/packages/core/src/commands/set-text-align.ts +++ b/packages/core/src/commands/set-text-align.ts @@ -1,6 +1,6 @@ -import { Command, Transaction } from 'prosemirror-state'; +import { Command, Transaction } from '@edybara/pm/state'; import { NodePair } from '../types'; -import { Attrs } from 'prosemirror-model'; +import { Attrs } from '@edybara/pm/model'; export const TEXT_ALIGNMENT = { LEFT: 'left', diff --git a/packages/core/src/commands/toggle-mark-with-attrs.ts b/packages/core/src/commands/toggle-mark-with-attrs.ts index 8c82b78c..ea46ad28 100644 --- a/packages/core/src/commands/toggle-mark-with-attrs.ts +++ b/packages/core/src/commands/toggle-mark-with-attrs.ts @@ -1,5 +1,5 @@ -import { Attrs, MarkType } from 'prosemirror-model'; -import { Command, TextSelection } from 'prosemirror-state'; +import { Attrs, MarkType } from '@edybara/pm/model'; +import { Command, TextSelection } from '@edybara/pm/state'; import { isInMarks, markApplies } from '../utils'; /// Create a command function that toggles the given mark with the diff --git a/packages/core/src/commands/transform-range-to-block.ts b/packages/core/src/commands/transform-range-to-block.ts index 0e092568..fdab556c 100644 --- a/packages/core/src/commands/transform-range-to-block.ts +++ b/packages/core/src/commands/transform-range-to-block.ts @@ -1,5 +1,5 @@ -import { Command } from 'prosemirror-state'; -import { Attrs, NodeType } from 'prosemirror-model'; +import { Command } from '@edybara/pm/state'; +import { Attrs, NodeType } from '@edybara/pm/model'; import { liftOut } from '../transforms'; import { getBlockContainerChildren } from '../utils'; diff --git a/packages/core/src/input-rules/wrapping-input-rule-with-joins.ts b/packages/core/src/input-rules/wrapping-input-rule-with-joins.ts index 656284f1..f14fbb62 100644 --- a/packages/core/src/input-rules/wrapping-input-rule-with-joins.ts +++ b/packages/core/src/input-rules/wrapping-input-rule-with-joins.ts @@ -1,6 +1,6 @@ import { InputRule } from 'prosemirror-inputrules'; -import { Attrs, Node, NodeType } from 'prosemirror-model'; -import { canJoin, findWrapping } from 'prosemirror-transform'; +import { Attrs, Node, NodeType } from '@edybara/pm/model'; +import { canJoin, findWrapping } from '@edybara/pm/transform'; // TODO 정리 및 분리 // 현재 join 목적보다는 attr 변경 목적으로 사용 중 diff --git a/packages/core/src/plugins/core.ts b/packages/core/src/plugins/core.ts index 2ee4824f..50d4c687 100644 --- a/packages/core/src/plugins/core.ts +++ b/packages/core/src/plugins/core.ts @@ -1,4 +1,4 @@ -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { edybaraBasicKeymapPlugins } from './keymap'; import { edybaraHistoryPlugins } from './history'; import { edybaraVirtualCursorPlugins } from './virtual-cursor'; diff --git a/packages/core/src/plugins/history.ts b/packages/core/src/plugins/history.ts index 571abbb5..1785a9a5 100644 --- a/packages/core/src/plugins/history.ts +++ b/packages/core/src/plugins/history.ts @@ -1,6 +1,6 @@ import { history, redo, undo } from 'prosemirror-history'; import { keymap } from 'prosemirror-keymap'; -import { Plugin } from 'prosemirror-state'; +import { Plugin } from '@edybara/pm/state'; export const edybaraHistoryPlugins = (): Plugin[] => { return [ diff --git a/packages/core/src/plugins/keymap.ts b/packages/core/src/plugins/keymap.ts index 1a777b7f..e747e51a 100644 --- a/packages/core/src/plugins/keymap.ts +++ b/packages/core/src/plugins/keymap.ts @@ -1,6 +1,6 @@ import { keymap } from 'prosemirror-keymap'; -import { baseKeymap } from 'prosemirror-commands'; -import { Plugin } from 'prosemirror-state'; +import { baseKeymap } from '@edybara/pm/commands'; +import { Plugin } from '@edybara/pm/state'; import { clearMarks } from '../commands'; export const edybaraBasicKeymapPlugins = (): Plugin[] => { diff --git a/packages/core/src/plugins/merge-adjacent-node.ts b/packages/core/src/plugins/merge-adjacent-node.ts index c28ad54b..0c9f1186 100644 --- a/packages/core/src/plugins/merge-adjacent-node.ts +++ b/packages/core/src/plugins/merge-adjacent-node.ts @@ -1,6 +1,6 @@ -import { Plugin as PMPlugin, Transaction } from 'prosemirror-state'; -import { NodeType } from 'prosemirror-model'; -import { canJoin } from 'prosemirror-transform'; +import { Plugin as PMPlugin, Transaction } from '@edybara/pm/state'; +import { NodeType } from '@edybara/pm/model'; +import { canJoin } from '@edybara/pm/transform'; import { NodePair } from '../types'; export interface EdybaraMergeAdjacentNodeOption { diff --git a/packages/core/src/plugins/overlay.ts b/packages/core/src/plugins/overlay.ts index 67fe0e31..ad8e9982 100644 --- a/packages/core/src/plugins/overlay.ts +++ b/packages/core/src/plugins/overlay.ts @@ -1,4 +1,4 @@ -import { Plugin as PMPlugin, PluginKey } from 'prosemirror-state'; +import { Plugin as PMPlugin, PluginKey } from '@edybara/pm/state'; export interface EdybaraOverlayPluginState { overlayElement: HTMLDivElement; diff --git a/packages/core/src/plugins/reset-mark.ts b/packages/core/src/plugins/reset-mark.ts index 3a9ac6d5..bed04b51 100644 --- a/packages/core/src/plugins/reset-mark.ts +++ b/packages/core/src/plugins/reset-mark.ts @@ -1,4 +1,4 @@ -import { Plugin as PMPlugin, TextSelection } from 'prosemirror-state'; +import { Plugin as PMPlugin, TextSelection } from '@edybara/pm/state'; /** * Remove the StoredMark when the text corresponding to the Mark range is deleted. diff --git a/packages/core/src/plugins/selection-element.ts b/packages/core/src/plugins/selection-element.ts index 08b4a970..1850d440 100644 --- a/packages/core/src/plugins/selection-element.ts +++ b/packages/core/src/plugins/selection-element.ts @@ -1,5 +1,5 @@ -import { Plugin as PMPlugin } from 'prosemirror-state'; -import { Decoration, DecorationSet } from 'prosemirror-view'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; +import { Decoration, DecorationSet } from '@edybara/pm/view'; import { isTextSelection } from '../utils'; export const edybaraSelectionElementPlugins = (): PMPlugin[] => { diff --git a/packages/core/src/plugins/virtual-cursor.ts b/packages/core/src/plugins/virtual-cursor.ts index e48ef529..fb1e5a0f 100644 --- a/packages/core/src/plugins/virtual-cursor.ts +++ b/packages/core/src/plugins/virtual-cursor.ts @@ -1,7 +1,7 @@ -import type { ResolvedPos } from 'prosemirror-model'; -import { Mark } from 'prosemirror-model'; -import type { Selection } from 'prosemirror-state'; -import { Plugin as PMPlugin, TextSelection } from 'prosemirror-state'; +import type { ResolvedPos } from '@edybara/pm/model'; +import { Mark } from '@edybara/pm/model'; +import type { Selection } from '@edybara/pm/state'; +import { Plugin as PMPlugin, TextSelection } from '@edybara/pm/state'; /** * Origin Project & License diff --git a/packages/core/src/schemas/base.ts b/packages/core/src/schemas/base.ts index 8bf65b6a..8faf8e6d 100644 --- a/packages/core/src/schemas/base.ts +++ b/packages/core/src/schemas/base.ts @@ -1,4 +1,4 @@ -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; export interface EdybaraBaseNodeConfigs { docNodeName?: string; diff --git a/packages/core/src/schemas/paragraph.ts b/packages/core/src/schemas/paragraph.ts index cfdc7fea..b2e77560 100644 --- a/packages/core/src/schemas/paragraph.ts +++ b/packages/core/src/schemas/paragraph.ts @@ -1,4 +1,4 @@ -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; export const EDIM_PARAGRAPH_NODE: Record = { paragraph: { diff --git a/packages/core/src/transforms/lift-out.ts b/packages/core/src/transforms/lift-out.ts index 83443c62..d8ae178a 100644 --- a/packages/core/src/transforms/lift-out.ts +++ b/packages/core/src/transforms/lift-out.ts @@ -1,5 +1,5 @@ -import { EditorState, Transaction } from 'prosemirror-state'; -import { liftTarget } from 'prosemirror-transform'; +import { EditorState, Transaction } from '@edybara/pm/state'; +import { liftTarget } from '@edybara/pm/transform'; import { getBlockContainerChildren } from '../utils'; import { NodePair } from '../types'; diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 9b72c45c..49144866 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -1,4 +1,4 @@ -import { Node } from 'prosemirror-model'; +import { Node } from '@edybara/pm/model'; export interface NodePair { node: Node; diff --git a/packages/core/src/utils/find-mark.ts b/packages/core/src/utils/find-mark.ts index bacceedd..e2634b8e 100644 --- a/packages/core/src/utils/find-mark.ts +++ b/packages/core/src/utils/find-mark.ts @@ -1,5 +1,5 @@ -import { EditorState } from 'prosemirror-state'; -import { Mark, MarkType, Node } from 'prosemirror-model'; +import { EditorState } from '@edybara/pm/state'; +import { Mark, MarkType, Node } from '@edybara/pm/model'; import { findParentNode } from 'prosemirror-utils'; import { rangeBetween } from '../utils'; diff --git a/packages/core/src/utils/find-nearest-block-container.ts b/packages/core/src/utils/find-nearest-block-container.ts index ea7f7ad3..62b4d340 100644 --- a/packages/core/src/utils/find-nearest-block-container.ts +++ b/packages/core/src/utils/find-nearest-block-container.ts @@ -1,4 +1,4 @@ -import { Selection } from 'prosemirror-state'; +import { Selection } from '@edybara/pm/state'; import { findParentNode } from 'prosemirror-utils'; const findBlockContainer = findParentNode((node) => { diff --git a/packages/core/src/utils/get-block-container-children.ts b/packages/core/src/utils/get-block-container-children.ts index 4838cb61..4f013830 100644 --- a/packages/core/src/utils/get-block-container-children.ts +++ b/packages/core/src/utils/get-block-container-children.ts @@ -1,5 +1,5 @@ import { NodePair } from '../types'; -import { Node } from 'prosemirror-model'; +import { Node } from '@edybara/pm/model'; export const getBlockContainerChildren = ( doc: Node, diff --git a/packages/core/src/utils/get-range-first-text-align.ts b/packages/core/src/utils/get-range-first-text-align.ts index 64397e66..f656218d 100644 --- a/packages/core/src/utils/get-range-first-text-align.ts +++ b/packages/core/src/utils/get-range-first-text-align.ts @@ -1,4 +1,4 @@ -import { EditorState } from 'prosemirror-state'; +import { EditorState } from '@edybara/pm/state'; export const getRangeFirstAlignment = (state: EditorState) => { const { from, to } = state.selection; diff --git a/packages/core/src/utils/is-in-marks.ts b/packages/core/src/utils/is-in-marks.ts index 1519c919..ab0544ed 100644 --- a/packages/core/src/utils/is-in-marks.ts +++ b/packages/core/src/utils/is-in-marks.ts @@ -1,4 +1,4 @@ -import { Attrs, Mark, MarkType } from 'prosemirror-model'; +import { Attrs, Mark, MarkType } from '@edybara/pm/model'; /** * Returns the presence of the specified MarkType within the current selection range. diff --git a/packages/core/src/utils/is-text-selection.ts b/packages/core/src/utils/is-text-selection.ts index 5bab71a4..b762f679 100644 --- a/packages/core/src/utils/is-text-selection.ts +++ b/packages/core/src/utils/is-text-selection.ts @@ -1,4 +1,4 @@ -import { Selection, TextSelection } from 'prosemirror-state'; +import { Selection, TextSelection } from '@edybara/pm/state'; export const isTextSelection = ( selection: Selection, diff --git a/packages/core/src/utils/mark-active.ts b/packages/core/src/utils/mark-active.ts index fa4043bd..275aea0a 100644 --- a/packages/core/src/utils/mark-active.ts +++ b/packages/core/src/utils/mark-active.ts @@ -1,5 +1,5 @@ -import { Attrs, Mark, MarkType } from 'prosemirror-model'; -import { EditorState } from 'prosemirror-state'; +import { Attrs, Mark, MarkType } from '@edybara/pm/model'; +import { EditorState } from '@edybara/pm/state'; import { isInMarks } from './is-in-marks'; /** diff --git a/packages/core/src/utils/mark-applies.ts b/packages/core/src/utils/mark-applies.ts index 3732fdee..e5c4c9bd 100644 --- a/packages/core/src/utils/mark-applies.ts +++ b/packages/core/src/utils/mark-applies.ts @@ -1,5 +1,5 @@ -import { MarkType, Node } from 'prosemirror-model'; -import { SelectionRange } from 'prosemirror-state'; +import { MarkType, Node } from '@edybara/pm/model'; +import { SelectionRange } from '@edybara/pm/state'; export const markApplies = ( doc: Node, diff --git a/packages/dev/package.json b/packages/dev/package.json index fd9bb363..d4391a1b 100644 --- a/packages/dev/package.json +++ b/packages/dev/package.json @@ -26,6 +26,7 @@ "@edybara/mention": "*", "@edybara/menubar": "*", "@edybara/paragraph": "*", + "@edybara/pm": "*", "@edybara/preset": "*", "@edybara/strikethrough": "*", "@edybara/subscript": "*", @@ -33,12 +34,7 @@ "@edybara/tables": "*", "@edybara/text-color": "*", "@edybara/ui": "*", - "@edybara/underline": "*", - "prosemirror-commands": "*", - "prosemirror-model": "*", - "prosemirror-state": "*", - "prosemirror-transform": "*", - "prosemirror-view": "*" + "@edybara/underline": "*" }, "devDependencies": { "typescript": "^5.2.2", diff --git a/packages/dev/src/main.ts b/packages/dev/src/main.ts index 53abdc1c..b6dfa3e4 100644 --- a/packages/dev/src/main.ts +++ b/packages/dev/src/main.ts @@ -1,6 +1,6 @@ import './style.scss'; -import { EditorState } from 'prosemirror-state'; -import { EditorView } from 'prosemirror-view'; +import { EditorState } from '@edybara/pm/state'; +import { EditorView } from '@edybara/pm/view'; import { edybaraPresetSchema, edybaraPresetPlugins } from '@edybara/preset'; const schema = edybaraPresetSchema(); diff --git a/packages/devkit/package.json b/packages/devkit/package.json index b8ff54b5..e3486c0d 100644 --- a/packages/devkit/package.json +++ b/packages/devkit/package.json @@ -17,20 +17,10 @@ "dependencies": { "@codemirror/lang-json": "^6.0.1", "@codemirror/state": "^6.4.1", + "@edybara/pm": "*", "@edybara/ui": "*", "codemirror": "^6.0.1", - "preact": "^10.20.1", - "prosemirror-commands": "*", - "prosemirror-dropcursor": "*", - "prosemirror-gapcursor": "*", - "prosemirror-history": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-state": "*", - "prosemirror-transform": "*", - "prosemirror-utils": "*", - "prosemirror-view": "*" + "preact": "^10.20.1" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/devkit/src/components/codemirror/codemirror.ts b/packages/devkit/src/components/codemirror/codemirror.ts index 5e41cd82..bae3600f 100644 --- a/packages/devkit/src/components/codemirror/codemirror.ts +++ b/packages/devkit/src/components/codemirror/codemirror.ts @@ -1,4 +1,4 @@ -import { Plugin as PMPlugin, PluginKey } from 'prosemirror-state'; +import { Plugin as PMPlugin, PluginKey } from '@edybara/pm/state'; import { EditorState } from '@codemirror/state'; import { EditorView, basicSetup } from 'codemirror'; import { json } from '@codemirror/lang-json'; diff --git a/packages/docs/package.json b/packages/docs/package.json index e0edfc83..bcf02d85 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -35,6 +35,7 @@ "@edybara/link": "*", "@edybara/menubar": "*", "@edybara/paragraph": "*", + "@edybara/pm": "*", "@edybara/preset": "*", "@edybara/strikethrough": "*", "@edybara/subscript": "*", @@ -48,17 +49,6 @@ "@types/react": "^18.2.66", "clsx": "^1.2.1", "prism-react-renderer": "^2.1.0", - "prosemirror-commands": "*", - "prosemirror-dropcursor": "*", - "prosemirror-gapcursor": "*", - "prosemirror-history": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-schema-basic": "*", - "prosemirror-state": "*", - "prosemirror-transform": "*", - "prosemirror-view": "*", "react": "^18.0.0", "react-dom": "^18.0.0", "remixicon": "^3.5.0" diff --git a/packages/docs/src/components/editor/prose-mirror.tsx b/packages/docs/src/components/editor/prose-mirror.tsx index 46891d5c..9e79b84c 100644 --- a/packages/docs/src/components/editor/prose-mirror.tsx +++ b/packages/docs/src/components/editor/prose-mirror.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { classes } from '@edybara/ui'; -import { EditorView } from 'prosemirror-view'; +import { EditorView } from '@edybara/pm/view'; import { useEffect, useRef } from 'react'; -import { EditorState } from 'prosemirror-state'; +import { EditorState } from '@edybara/pm/state'; export interface ProseMirrorProps { className?: string; diff --git a/packages/docs/src/components/examples/getting-started/maximum.tsx b/packages/docs/src/components/examples/getting-started/maximum.tsx index e3ccac8d..84b33914 100644 --- a/packages/docs/src/components/examples/getting-started/maximum.tsx +++ b/packages/docs/src/components/examples/getting-started/maximum.tsx @@ -2,11 +2,11 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState } from 'prosemirror-state'; +import { EditorState } from '@edybara/pm/state'; import React, { useState } from 'react'; import { edybaraPresetSchema, edybaraPresetPlugins } from '@edybara/preset'; import doc from '@site/src/pages/lorem-ipsum.json'; -import { Node } from 'prosemirror-model'; +import { Node } from '@edybara/pm/model'; const schema = edybaraPresetSchema(); const plugins = edybaraPresetPlugins({ diff --git a/packages/docs/src/components/examples/getting-started/minimal.tsx b/packages/docs/src/components/examples/getting-started/minimal.tsx index 9fc4decf..5439a820 100644 --- a/packages/docs/src/components/examples/getting-started/minimal.tsx +++ b/packages/docs/src/components/examples/getting-started/minimal.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState } from 'prosemirror-state'; +import { EditorState } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/blockquote.tsx b/packages/docs/src/components/examples/packages/blockquote.tsx index a4f6f4ed..b10315b0 100644 --- a/packages/docs/src/components/examples/packages/blockquote.tsx +++ b/packages/docs/src/components/examples/packages/blockquote.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/bold.tsx b/packages/docs/src/components/examples/packages/bold.tsx index 253f8893..33d864b0 100644 --- a/packages/docs/src/components/examples/packages/bold.tsx +++ b/packages/docs/src/components/examples/packages/bold.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/code-block.tsx b/packages/docs/src/components/examples/packages/code-block.tsx index 99d00248..de2c696e 100644 --- a/packages/docs/src/components/examples/packages/code-block.tsx +++ b/packages/docs/src/components/examples/packages/code-block.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/core.tsx b/packages/docs/src/components/examples/packages/core.tsx index f0885099..0749668c 100644 --- a/packages/docs/src/components/examples/packages/core.tsx +++ b/packages/docs/src/components/examples/packages/core.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState } from 'prosemirror-state'; +import { EditorState } from '@edybara/pm/state'; import React, { useRef, useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/flat-list.tsx b/packages/docs/src/components/examples/packages/flat-list.tsx index 47dc4a29..a74600ec 100644 --- a/packages/docs/src/components/examples/packages/flat-list.tsx +++ b/packages/docs/src/components/examples/packages/flat-list.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/flat-task-list.tsx b/packages/docs/src/components/examples/packages/flat-task-list.tsx index abfc9be2..2cd9cc57 100644 --- a/packages/docs/src/components/examples/packages/flat-task-list.tsx +++ b/packages/docs/src/components/examples/packages/flat-task-list.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/font-family.tsx b/packages/docs/src/components/examples/packages/font-family.tsx index 8936e37b..1086264d 100644 --- a/packages/docs/src/components/examples/packages/font-family.tsx +++ b/packages/docs/src/components/examples/packages/font-family.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/heading.tsx b/packages/docs/src/components/examples/packages/heading.tsx index 46ea116c..8ff6a0d0 100644 --- a/packages/docs/src/components/examples/packages/heading.tsx +++ b/packages/docs/src/components/examples/packages/heading.tsx @@ -3,9 +3,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraMenubarPlugins } from '@edybara/menubar'; import { diff --git a/packages/docs/src/components/examples/packages/horizontal-rule.tsx b/packages/docs/src/components/examples/packages/horizontal-rule.tsx index d1890e92..d4a60e97 100644 --- a/packages/docs/src/components/examples/packages/horizontal-rule.tsx +++ b/packages/docs/src/components/examples/packages/horizontal-rule.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/inline-code.tsx b/packages/docs/src/components/examples/packages/inline-code.tsx index 5b0f3c48..d9b62f4d 100644 --- a/packages/docs/src/components/examples/packages/inline-code.tsx +++ b/packages/docs/src/components/examples/packages/inline-code.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/italic.tsx b/packages/docs/src/components/examples/packages/italic.tsx index f296cddc..8952a855 100644 --- a/packages/docs/src/components/examples/packages/italic.tsx +++ b/packages/docs/src/components/examples/packages/italic.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/link.tsx b/packages/docs/src/components/examples/packages/link.tsx index 2b84f28c..1fa11a41 100644 --- a/packages/docs/src/components/examples/packages/link.tsx +++ b/packages/docs/src/components/examples/packages/link.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/mention.tsx b/packages/docs/src/components/examples/packages/mention.tsx index 11867250..bb7bd934 100644 --- a/packages/docs/src/components/examples/packages/mention.tsx +++ b/packages/docs/src/components/examples/packages/mention.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/menubar.tsx b/packages/docs/src/components/examples/packages/menubar.tsx index 128aa51e..b24f4606 100644 --- a/packages/docs/src/components/examples/packages/menubar.tsx +++ b/packages/docs/src/components/examples/packages/menubar.tsx @@ -3,7 +3,7 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState } from 'prosemirror-state'; +import { EditorState } from '@edybara/pm/state'; import { edybaraPresetSchema, edybaraPresetPlugins } from '@edybara/preset'; import { edybaraMenubarPlugins } from '@edybara/menubar'; diff --git a/packages/docs/src/components/examples/packages/paragraph.tsx b/packages/docs/src/components/examples/packages/paragraph.tsx index f527c341..30025899 100644 --- a/packages/docs/src/components/examples/packages/paragraph.tsx +++ b/packages/docs/src/components/examples/packages/paragraph.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/preset.tsx b/packages/docs/src/components/examples/packages/preset.tsx index 1bde698f..af19ff7e 100644 --- a/packages/docs/src/components/examples/packages/preset.tsx +++ b/packages/docs/src/components/examples/packages/preset.tsx @@ -2,11 +2,11 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState } from 'prosemirror-state'; +import { EditorState } from '@edybara/pm/state'; import React, { useRef, useState } from 'react'; import { edybaraPresetSchema, edybaraPresetPlugins } from '@edybara/preset'; import doc from '@site/src/pages/lorem-ipsum.json'; -import { Node } from 'prosemirror-model'; +import { Node } from '@edybara/pm/model'; import { edybaraDevkitCodeMirrorPlugins } from '@edybara/devkit'; export const PresetExample = (props: ProseMirrorProps) => { diff --git a/packages/docs/src/components/examples/packages/strikethrough.tsx b/packages/docs/src/components/examples/packages/strikethrough.tsx index c7f016bc..3d36056c 100644 --- a/packages/docs/src/components/examples/packages/strikethrough.tsx +++ b/packages/docs/src/components/examples/packages/strikethrough.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/subscript.tsx b/packages/docs/src/components/examples/packages/subscript.tsx index 6b570417..a65a6fd5 100644 --- a/packages/docs/src/components/examples/packages/subscript.tsx +++ b/packages/docs/src/components/examples/packages/subscript.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/superscript.tsx b/packages/docs/src/components/examples/packages/superscript.tsx index fad069da..aafe8879 100644 --- a/packages/docs/src/components/examples/packages/superscript.tsx +++ b/packages/docs/src/components/examples/packages/superscript.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/table.tsx b/packages/docs/src/components/examples/packages/table.tsx index 73464616..7588b797 100644 --- a/packages/docs/src/components/examples/packages/table.tsx +++ b/packages/docs/src/components/examples/packages/table.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/text-color.tsx b/packages/docs/src/components/examples/packages/text-color.tsx index 47f5cbec..7a64ce5d 100644 --- a/packages/docs/src/components/examples/packages/text-color.tsx +++ b/packages/docs/src/components/examples/packages/text-color.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/docs/src/components/examples/packages/underline.tsx b/packages/docs/src/components/examples/packages/underline.tsx index 64aead59..67bbc4fc 100644 --- a/packages/docs/src/components/examples/packages/underline.tsx +++ b/packages/docs/src/components/examples/packages/underline.tsx @@ -2,9 +2,9 @@ import { ProseMirror, ProseMirrorProps, } from '@site/src/components/editor/prose-mirror'; -import { EditorState, Plugin } from 'prosemirror-state'; +import { EditorState, Plugin } from '@edybara/pm/state'; import React, { useState } from 'react'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { edybaraBaseNodes, edybaraCorePlugins } from '@edybara/core'; import { edybaraParagraphNodes, diff --git a/packages/flat-list/package.json b/packages/flat-list/package.json index f7a4f832..a8b03106 100644 --- a/packages/flat-list/package.json +++ b/packages/flat-list/package.json @@ -16,14 +16,8 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "orderedmap": "*", - "prosemirror-commands": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-state": "*", - "prosemirror-transform": "*", - "prosemirror-utils": "*" + "@edybara/pm": "*", + "orderedmap": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/flat-list/src/commands/backspace.ts b/packages/flat-list/src/commands/backspace.ts index adb15b5e..4d562eb4 100644 --- a/packages/flat-list/src/commands/backspace.ts +++ b/packages/flat-list/src/commands/backspace.ts @@ -1,7 +1,7 @@ -import { Command, TextSelection } from 'prosemirror-state'; +import { Command, TextSelection } from '@edybara/pm/state'; import { indentListItem } from './indent-list-item'; import { findParentNode } from 'prosemirror-utils'; -import { NodeType } from 'prosemirror-model'; +import { NodeType } from '@edybara/pm/model'; export interface EdybaraListItemBackspaceCommandConfigs { listNodeTypes: NodeType[]; diff --git a/packages/flat-list/src/commands/indent-list-item.ts b/packages/flat-list/src/commands/indent-list-item.ts index 98673845..1015718b 100644 --- a/packages/flat-list/src/commands/indent-list-item.ts +++ b/packages/flat-list/src/commands/indent-list-item.ts @@ -1,5 +1,5 @@ -import { Node, NodeType } from 'prosemirror-model'; -import { Command, EditorState, Transaction } from 'prosemirror-state'; +import { Node, NodeType } from '@edybara/pm/model'; +import { Command, EditorState, Transaction } from '@edybara/pm/state'; import { liftOutOfFlatList } from '../transforms'; export interface IndentListItemCommandConfigs { diff --git a/packages/flat-list/src/commands/split-list-item.ts b/packages/flat-list/src/commands/split-list-item.ts index 55216b86..3deb9f18 100644 --- a/packages/flat-list/src/commands/split-list-item.ts +++ b/packages/flat-list/src/commands/split-list-item.ts @@ -1,12 +1,12 @@ -import { Attrs, Fragment, NodeType, Slice } from 'prosemirror-model'; +import { Attrs, Fragment, NodeType, Slice } from '@edybara/pm/model'; import { Command, EditorState, NodeSelection, Selection, Transaction, -} from 'prosemirror-state'; -import { canSplit } from 'prosemirror-transform'; +} from '@edybara/pm/state'; +import { canSplit } from '@edybara/pm/transform'; /// Build a command that splits a non-empty textblock at the top level /// of a list item by also splitting that list item. diff --git a/packages/flat-list/src/commands/toggle-list.ts b/packages/flat-list/src/commands/toggle-list.ts index 8462a906..41caf788 100644 --- a/packages/flat-list/src/commands/toggle-list.ts +++ b/packages/flat-list/src/commands/toggle-list.ts @@ -1,5 +1,5 @@ -import { Fragment, NodeType } from 'prosemirror-model'; -import { Command } from 'prosemirror-state'; +import { Fragment, NodeType } from '@edybara/pm/model'; +import { Command } from '@edybara/pm/state'; import { getBlockContainerChildren, liftOut } from '@edybara/core'; const allowedContentTypes = [ diff --git a/packages/flat-list/src/plugins/flat-list.ts b/packages/flat-list/src/plugins/flat-list.ts index 8a1e0d0c..6d4ee15e 100644 --- a/packages/flat-list/src/plugins/flat-list.ts +++ b/packages/flat-list/src/plugins/flat-list.ts @@ -1,5 +1,5 @@ -import { NodeType } from 'prosemirror-model'; -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { NodeType } from '@edybara/pm/model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { edybaraFlatListInputRulePlugins } from './input-rules'; import { edybaraFlatListKeymapPlugins } from './keymaps'; import { edybaraFlatListMergePlugins } from './merge'; diff --git a/packages/flat-list/src/plugins/input-rules.ts b/packages/flat-list/src/plugins/input-rules.ts index 1a14b998..f289a010 100644 --- a/packages/flat-list/src/plugins/input-rules.ts +++ b/packages/flat-list/src/plugins/input-rules.ts @@ -1,6 +1,6 @@ import { inputRules, wrappingInputRule } from 'prosemirror-inputrules'; -import { NodeType } from 'prosemirror-model'; -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { NodeType } from '@edybara/pm/model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; export interface EdybaraFlatListInputRulePluginConfigs { orderListNodeType?: NodeType; diff --git a/packages/flat-list/src/plugins/keymaps.ts b/packages/flat-list/src/plugins/keymaps.ts index 9dce0226..06b8eae8 100644 --- a/packages/flat-list/src/plugins/keymaps.ts +++ b/packages/flat-list/src/plugins/keymaps.ts @@ -1,7 +1,7 @@ import { keymap } from 'prosemirror-keymap'; import { indentListItem, listItemBackspace, splitListItem } from '../commands'; -import { Plugin as PMPlugin } from 'prosemirror-state'; -import { NodeType } from 'prosemirror-model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; +import { NodeType } from '@edybara/pm/model'; export interface EdybaraFlatListKeymapPluginConfigs { orderListNodeType?: NodeType; diff --git a/packages/flat-list/src/plugins/merge.ts b/packages/flat-list/src/plugins/merge.ts index c88d0bad..4ca476e6 100644 --- a/packages/flat-list/src/plugins/merge.ts +++ b/packages/flat-list/src/plugins/merge.ts @@ -1,5 +1,5 @@ -import { NodeType } from 'prosemirror-model'; -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { NodeType } from '@edybara/pm/model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { edybaraMergeAdjacentNodePlugins } from '@edybara/core'; import { EdybaraMergeAdjacentNodePluginConfigs } from '@edybara/core'; diff --git a/packages/flat-list/src/schemas/bullet_list.ts b/packages/flat-list/src/schemas/bullet_list.ts index 1263529c..6327d96a 100644 --- a/packages/flat-list/src/schemas/bullet_list.ts +++ b/packages/flat-list/src/schemas/bullet_list.ts @@ -1,4 +1,4 @@ -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; import { isQuillTaskList } from '@edybara/core'; export const EDIM_FLAT_BULLET_LIST_DEFAULT_NODE_NAME = 'bullet_list'; diff --git a/packages/flat-list/src/schemas/list_item.ts b/packages/flat-list/src/schemas/list_item.ts index da5cd4aa..ebd97e3b 100644 --- a/packages/flat-list/src/schemas/list_item.ts +++ b/packages/flat-list/src/schemas/list_item.ts @@ -1,4 +1,4 @@ -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; import { isQuillTaskList, parseQuillIndent, diff --git a/packages/flat-list/src/schemas/ordered_list.ts b/packages/flat-list/src/schemas/ordered_list.ts index d73bca4a..f8f789c6 100644 --- a/packages/flat-list/src/schemas/ordered_list.ts +++ b/packages/flat-list/src/schemas/ordered_list.ts @@ -1,4 +1,4 @@ -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; export const EDIM_FLAT_ORDERED_LIST_DEFAULT_NODE_NAME = 'ordered_list'; diff --git a/packages/flat-list/src/transforms/lift-out-of-list.ts b/packages/flat-list/src/transforms/lift-out-of-list.ts index 3552b087..d71a1aae 100644 --- a/packages/flat-list/src/transforms/lift-out-of-list.ts +++ b/packages/flat-list/src/transforms/lift-out-of-list.ts @@ -1,6 +1,6 @@ -import { Fragment, NodeRange, Slice } from 'prosemirror-model'; -import { Transaction } from 'prosemirror-state'; -import { ReplaceAroundStep } from 'prosemirror-transform'; +import { Fragment, NodeRange, Slice } from '@edybara/pm/model'; +import { Transaction } from '@edybara/pm/state'; +import { ReplaceAroundStep } from '@edybara/pm/transform'; export const liftOutOfFlatList = ( tr: Transaction, diff --git a/packages/flat-list/src/transforms/wrap-in-list.ts b/packages/flat-list/src/transforms/wrap-in-list.ts index eec91af5..9a046b50 100644 --- a/packages/flat-list/src/transforms/wrap-in-list.ts +++ b/packages/flat-list/src/transforms/wrap-in-list.ts @@ -1,4 +1,4 @@ -import { Transaction } from 'prosemirror-state'; +import { Transaction } from '@edybara/pm/state'; import { Attrs, Fragment, @@ -6,12 +6,12 @@ import { NodeType, ResolvedPos, Slice, -} from 'prosemirror-model'; +} from '@edybara/pm/model'; import { canSplit, findWrapping, ReplaceAroundStep, -} from 'prosemirror-transform'; +} from '@edybara/pm/transform'; export const doWrapInFlatList = ( tr: Transaction, diff --git a/packages/flat-task-list/package.json b/packages/flat-task-list/package.json index 2c457edf..28e04b89 100644 --- a/packages/flat-task-list/package.json +++ b/packages/flat-task-list/package.json @@ -17,13 +17,7 @@ "dependencies": { "@edybara/core": "*", "@edybara/flat-list": "*", - "prosemirror-commands": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-state": "*", - "prosemirror-transform": "*", - "prosemirror-utils": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/flat-task-list/src/plugins/flat-task-list.ts b/packages/flat-task-list/src/plugins/flat-task-list.ts index 1ad00cd7..ba6fe7c9 100644 --- a/packages/flat-task-list/src/plugins/flat-task-list.ts +++ b/packages/flat-task-list/src/plugins/flat-task-list.ts @@ -1,5 +1,5 @@ -import { NodeType } from 'prosemirror-model'; -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { NodeType } from '@edybara/pm/model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { edybaraTaskListInputRulePlugins } from './input-rules'; import { edybaraFlatTaskListKeymapPlugins } from './keymaps'; import { edybaraFlatTaskListMergePlugins } from './merge'; diff --git a/packages/flat-task-list/src/plugins/input-rules.ts b/packages/flat-task-list/src/plugins/input-rules.ts index 6a058430..88bee286 100644 --- a/packages/flat-task-list/src/plugins/input-rules.ts +++ b/packages/flat-task-list/src/plugins/input-rules.ts @@ -1,7 +1,7 @@ import { inputRules } from 'prosemirror-inputrules'; -import { NodeType } from 'prosemirror-model'; +import { NodeType } from '@edybara/pm/model'; import { wrappingInputRuleWithJoin } from '@edybara/core'; -import { Plugin } from 'prosemirror-state'; +import { Plugin } from '@edybara/pm/state'; export interface EdybaraTaskListInputRulePluginConfigs { taskListNodeType: NodeType; diff --git a/packages/flat-task-list/src/plugins/keymaps.ts b/packages/flat-task-list/src/plugins/keymaps.ts index 6616a958..4485b166 100644 --- a/packages/flat-task-list/src/plugins/keymaps.ts +++ b/packages/flat-task-list/src/plugins/keymaps.ts @@ -1,6 +1,6 @@ import { keymap } from 'prosemirror-keymap'; -import { Plugin as PMPlugin } from 'prosemirror-state'; -import { NodeType } from 'prosemirror-model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; +import { NodeType } from '@edybara/pm/model'; import { splitListItem, indentListItem, diff --git a/packages/flat-task-list/src/plugins/merge.ts b/packages/flat-task-list/src/plugins/merge.ts index ca412d23..1699bea6 100644 --- a/packages/flat-task-list/src/plugins/merge.ts +++ b/packages/flat-task-list/src/plugins/merge.ts @@ -1,5 +1,5 @@ -import { NodeType } from 'prosemirror-model'; -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { NodeType } from '@edybara/pm/model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { edybaraMergeAdjacentNodePlugins } from '@edybara/core'; export interface EdybaraFlatTaskListMergePluginConfigs { diff --git a/packages/flat-task-list/src/plugins/task-list-item.ts b/packages/flat-task-list/src/plugins/task-list-item.ts index 0c01b5a6..78350695 100644 --- a/packages/flat-task-list/src/plugins/task-list-item.ts +++ b/packages/flat-task-list/src/plugins/task-list-item.ts @@ -1,5 +1,5 @@ -import { NodeType } from 'prosemirror-model'; -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { NodeType } from '@edybara/pm/model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { createNode } from '../utils'; import { EdybaraFlatTaskListItemAttrs } from '../schemas'; diff --git a/packages/flat-task-list/src/schemas/task-list-item.ts b/packages/flat-task-list/src/schemas/task-list-item.ts index fd27861e..6839f6fc 100644 --- a/packages/flat-task-list/src/schemas/task-list-item.ts +++ b/packages/flat-task-list/src/schemas/task-list-item.ts @@ -1,4 +1,4 @@ -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; import { isQuillTaskList, parseQuillIndent, diff --git a/packages/flat-task-list/src/schemas/task-list.ts b/packages/flat-task-list/src/schemas/task-list.ts index 1e4ca7a7..694d176a 100644 --- a/packages/flat-task-list/src/schemas/task-list.ts +++ b/packages/flat-task-list/src/schemas/task-list.ts @@ -1,4 +1,4 @@ -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; import { isQuillTaskList } from '@edybara/core'; export const EDIM_DEFAULT_FLAT_TASK_LIST_NODE_NAME = 'task_list'; diff --git a/packages/flat-task-list/src/utils/create-node.ts b/packages/flat-task-list/src/utils/create-node.ts index 2e88297f..e3afa415 100644 --- a/packages/flat-task-list/src/utils/create-node.ts +++ b/packages/flat-task-list/src/utils/create-node.ts @@ -1,4 +1,4 @@ -import { Node } from 'prosemirror-model'; +import { Node } from '@edybara/pm/model'; import { EdybaraFlatTaskListItemAttrs } from '../schemas'; export const createNode = (node: Node) => { @@ -18,4 +18,4 @@ export const createNode = (node: Node) => { li.dataset['indent'] = `${attrs.indent || 1}`; li.dataset['checked'] = attrs.checked ? 'true' : 'false'; return li; -} \ No newline at end of file +} diff --git a/packages/font-family/package.json b/packages/font-family/package.json index df351d60..7e6e4846 100644 --- a/packages/font-family/package.json +++ b/packages/font-family/package.json @@ -15,9 +15,7 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "prosemirror-commands": "*", - "prosemirror-model": "*", - "prosemirror-state": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/font-family/src/commands/toggle-font-family.ts b/packages/font-family/src/commands/toggle-font-family.ts index 5a3a1081..5930a321 100644 --- a/packages/font-family/src/commands/toggle-font-family.ts +++ b/packages/font-family/src/commands/toggle-font-family.ts @@ -1,7 +1,7 @@ -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; import { toggleMarkWithAttrs } from '@edybara/core'; import { EdybaraFontFamilyAttrs } from '../schemas'; -import { Command } from 'prosemirror-state'; +import { Command } from '@edybara/pm/state'; export const toggleFontFamily = ( markType: MarkType, diff --git a/packages/font-family/src/schemas/font-family.ts b/packages/font-family/src/schemas/font-family.ts index 7baa50ec..471a3fd3 100644 --- a/packages/font-family/src/schemas/font-family.ts +++ b/packages/font-family/src/schemas/font-family.ts @@ -1,4 +1,4 @@ -import { MarkSpec, MarkType } from 'prosemirror-model'; +import { MarkSpec, MarkType } from '@edybara/pm/model'; export const EDIM_FONT_FAMILY_DEFAULT_MARK_NAME = 'font_family'; diff --git a/packages/heading/package.json b/packages/heading/package.json index f85394a0..ed7106fa 100644 --- a/packages/heading/package.json +++ b/packages/heading/package.json @@ -16,11 +16,7 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "prosemirror-commands": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-state": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/heading/src/plugins/heading.ts b/packages/heading/src/plugins/heading.ts index db727243..32ce6b90 100644 --- a/packages/heading/src/plugins/heading.ts +++ b/packages/heading/src/plugins/heading.ts @@ -1,6 +1,6 @@ import { edybaraHeadingInputRulePlugins } from './input-rules'; import { edybaraHeadingKeymapPlugins } from './keymaps'; -import { NodeType } from 'prosemirror-model'; +import { NodeType } from '@edybara/pm/model'; export interface EdybaraHeadingPluginConfigs { nodeType: NodeType; diff --git a/packages/heading/src/plugins/input-rules.ts b/packages/heading/src/plugins/input-rules.ts index cabc5a29..f1cb3da6 100644 --- a/packages/heading/src/plugins/input-rules.ts +++ b/packages/heading/src/plugins/input-rules.ts @@ -1,5 +1,5 @@ -import { Plugin as PMPlugin } from 'prosemirror-state'; -import { NodeType } from 'prosemirror-model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; +import { NodeType } from '@edybara/pm/model'; import { inputRules, textblockTypeInputRule } from 'prosemirror-inputrules'; import { EdybaraHeadingNodeSpec } from '../schemas'; diff --git a/packages/heading/src/plugins/keymaps.ts b/packages/heading/src/plugins/keymaps.ts index 9c224616..4c7708b3 100644 --- a/packages/heading/src/plugins/keymaps.ts +++ b/packages/heading/src/plugins/keymaps.ts @@ -1,7 +1,7 @@ -import { setBlockType } from 'prosemirror-commands'; +import { setBlockType } from '@edybara/pm/commands'; import { keymap } from 'prosemirror-keymap'; -import { NodeType } from 'prosemirror-model'; -import { Plugin as PMPlugin, Command } from 'prosemirror-state'; +import { NodeType } from '@edybara/pm/model'; +import { Plugin as PMPlugin, Command } from '@edybara/pm/state'; import { EdybaraHeadingNodeSpec } from '../schemas'; export interface EdybaraHeadingKeymapPluginConfigs { diff --git a/packages/heading/src/schemas/heading.ts b/packages/heading/src/schemas/heading.ts index 293120ad..936510f8 100644 --- a/packages/heading/src/schemas/heading.ts +++ b/packages/heading/src/schemas/heading.ts @@ -1,5 +1,5 @@ import { parseQuillTextAlign } from '@edybara/core'; -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; export type EdybaraHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6; export type EdybaraHeadingAlign = 'left' | 'right' | 'center' | null; diff --git a/packages/hr/package.json b/packages/hr/package.json index e80d645b..22117d6c 100644 --- a/packages/hr/package.json +++ b/packages/hr/package.json @@ -15,8 +15,7 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/hr/src/hr.ts b/packages/hr/src/hr.ts index f27ed6aa..a56f8a1d 100644 --- a/packages/hr/src/hr.ts +++ b/packages/hr/src/hr.ts @@ -1,5 +1,5 @@ import { keymap } from 'prosemirror-keymap'; -import { DOMOutputSpec, NodeSpec, NodeType } from 'prosemirror-model'; +import { DOMOutputSpec, NodeSpec, NodeType } from '@edybara/pm/model'; const hrDOM: DOMOutputSpec = ['hr']; export const edybaraHorizontalRuleNodes = (): Record => ({ diff --git a/packages/hr/src/plugins/hr.ts b/packages/hr/src/plugins/hr.ts index 03caf155..5ca7b390 100644 --- a/packages/hr/src/plugins/hr.ts +++ b/packages/hr/src/plugins/hr.ts @@ -1,4 +1,4 @@ -import { NodeType } from 'prosemirror-model'; +import { NodeType } from '@edybara/pm/model'; import { edybaraHorizontalKeymapPlugins } from './keymap'; export interface EdybaraHorizontalRulePluginConfigs { diff --git a/packages/hr/src/plugins/keymap.ts b/packages/hr/src/plugins/keymap.ts index ac5e3544..65f3fd98 100644 --- a/packages/hr/src/plugins/keymap.ts +++ b/packages/hr/src/plugins/keymap.ts @@ -1,5 +1,5 @@ import { keymap } from 'prosemirror-keymap'; -import { NodeType } from 'prosemirror-model'; +import { NodeType } from '@edybara/pm/model'; export interface EdybaraHorizontalKeymapPluginConfigs { nodeType: NodeType; diff --git a/packages/hr/src/schemas/hr.ts b/packages/hr/src/schemas/hr.ts index c998f42e..923169bc 100644 --- a/packages/hr/src/schemas/hr.ts +++ b/packages/hr/src/schemas/hr.ts @@ -1,4 +1,4 @@ -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; export const EDIM_HORIZONTAL_RULE_NODE_NAME = 'horizontal_rule'; diff --git a/packages/italic/package.json b/packages/italic/package.json index dc58f4f2..0ce51706 100644 --- a/packages/italic/package.json +++ b/packages/italic/package.json @@ -15,9 +15,7 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "prosemirror-commands": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/italic/src/plugins/italic.ts b/packages/italic/src/plugins/italic.ts index 0f28a198..17e2522a 100644 --- a/packages/italic/src/plugins/italic.ts +++ b/packages/italic/src/plugins/italic.ts @@ -1,4 +1,4 @@ -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; import { edybaraItalicKeymapPlugins } from './keymap'; export interface EdybaraItalicPluginConfigs { diff --git a/packages/italic/src/plugins/keymap.ts b/packages/italic/src/plugins/keymap.ts index f6877145..3b4f8d38 100644 --- a/packages/italic/src/plugins/keymap.ts +++ b/packages/italic/src/plugins/keymap.ts @@ -1,6 +1,6 @@ -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; import { keymap } from 'prosemirror-keymap'; -import { toggleMark } from 'prosemirror-commands'; +import { toggleMark } from '@edybara/pm/commands'; export interface EdybaraItalicKeymapPluginConfigs { markType: MarkType; diff --git a/packages/italic/src/schemas/italic.ts b/packages/italic/src/schemas/italic.ts index 2527ea5a..5b9c7fe3 100644 --- a/packages/italic/src/schemas/italic.ts +++ b/packages/italic/src/schemas/italic.ts @@ -1,4 +1,4 @@ -import { MarkSpec } from 'prosemirror-model'; +import { MarkSpec } from '@edybara/pm/model'; export const EDIM_ITALIC_MARK_NAME = 'em'; diff --git a/packages/link/package.json b/packages/link/package.json index 6b8236dc..f5a4f60e 100644 --- a/packages/link/package.json +++ b/packages/link/package.json @@ -16,12 +16,9 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", + "@edybara/pm": "*", "@edybara/ui": "*", - "preact": "*", - "prosemirror-model": "*", - "prosemirror-state": "*", - "prosemirror-utils": "*", - "prosemirror-view": "*" + "preact": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/link/src/commands/add-link.ts b/packages/link/src/commands/add-link.ts index c8114903..5bf4b998 100644 --- a/packages/link/src/commands/add-link.ts +++ b/packages/link/src/commands/add-link.ts @@ -1,4 +1,4 @@ -import { EditorState, Transaction } from 'prosemirror-state'; +import { EditorState, Transaction } from '@edybara/pm/state'; export const addLink = ( tr: Transaction, @@ -32,4 +32,4 @@ export const addLink = ( }), ) .scrollIntoView(); -}; \ No newline at end of file +}; diff --git a/packages/link/src/plugins/floating-layer.ts b/packages/link/src/plugins/floating-layer.ts index 0ed779fe..5d9d9d3a 100644 --- a/packages/link/src/plugins/floating-layer.ts +++ b/packages/link/src/plugins/floating-layer.ts @@ -1,7 +1,7 @@ -import { Plugin as PMPlugin, PluginKey, PluginView } from 'prosemirror-state'; +import { Plugin as PMPlugin, PluginKey, PluginView } from '@edybara/pm/state'; import { findMark, isTextSelection } from '@edybara/core'; -import { MarkType, Node as PMNode } from 'prosemirror-model'; -import { Decoration, DecorationSet, EditorView } from 'prosemirror-view'; +import { MarkType, Node as PMNode } from '@edybara/pm/model'; +import { Decoration, DecorationSet, EditorView } from '@edybara/pm/view'; import { render } from 'preact'; import { html } from '@edybara/ui'; import { EdybaraLinkFloatingLayer } from '../components'; diff --git a/packages/link/src/plugins/link.ts b/packages/link/src/plugins/link.ts index c0181abf..d5570867 100644 --- a/packages/link/src/plugins/link.ts +++ b/packages/link/src/plugins/link.ts @@ -1,6 +1,6 @@ -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { edybaraLinkFloatingLayerPlugins } from './floating-layer'; -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; export interface EdybaraLinkPluginConfigs { markType: MarkType; diff --git a/packages/link/src/schemas/link.ts b/packages/link/src/schemas/link.ts index 4fd91645..6fcb15a3 100644 --- a/packages/link/src/schemas/link.ts +++ b/packages/link/src/schemas/link.ts @@ -1,4 +1,4 @@ -import { MarkSpec } from 'prosemirror-model'; +import { MarkSpec } from '@edybara/pm/model'; export const EDIM_LINK_DEFAULT_MARK_NAME = 'link'; diff --git a/packages/link/src/utils/can-add-link.ts b/packages/link/src/utils/can-add-link.ts index 92d9c838..974c5d16 100644 --- a/packages/link/src/utils/can-add-link.ts +++ b/packages/link/src/utils/can-add-link.ts @@ -1,4 +1,4 @@ -import { EditorState, Transaction } from 'prosemirror-state'; +import { EditorState, Transaction } from '@edybara/pm/state'; export const canAddLink = (state: EditorState): boolean => { const { $from, $to } = state.selection; @@ -8,4 +8,4 @@ export const canAddLink = (state: EditorState): boolean => { } return $from.parent.isTextblock; -}; \ No newline at end of file +}; diff --git a/packages/menubar/package.json b/packages/menubar/package.json index 05a89dce..c40d7199 100644 --- a/packages/menubar/package.json +++ b/packages/menubar/package.json @@ -26,19 +26,13 @@ "@edybara/link": "*", "@edybara/mention": "*", "@edybara/paragraph": "*", + "@edybara/pm": "*", "@edybara/tables": "*", "@edybara/text-color": "*", "@edybara/ui": "*", "emoji-datasource": ">=15.0.0", "htm": ">=3.0.0", "preact": ">=10.0.0", - "prosemirror-commands": "*", - "prosemirror-history": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-state": "*", - "prosemirror-utils": "*", - "prosemirror-view": "*", "remixicon": ">=3.0.0" }, "devDependencies": { diff --git a/packages/menubar/src/components/blockquote/blockquote.ts b/packages/menubar/src/components/blockquote/blockquote.ts index 846e2495..d8f2d74a 100644 --- a/packages/menubar/src/components/blockquote/blockquote.ts +++ b/packages/menubar/src/components/blockquote/blockquote.ts @@ -1,7 +1,7 @@ import { EdybaraButton, html } from '@edybara/ui'; import { EdybaraMenubarContext } from '../context'; import { useContext } from 'preact/hooks'; -import { setBlockType } from 'prosemirror-commands'; +import { setBlockType } from '@edybara/pm/commands'; export const EdybaraMenubarBlockquoteToggleButtons = () => { const context = useContext(EdybaraMenubarContext); diff --git a/packages/menubar/src/components/codeblock/codeblock.ts b/packages/menubar/src/components/codeblock/codeblock.ts index ac25b69d..244bfca2 100644 --- a/packages/menubar/src/components/codeblock/codeblock.ts +++ b/packages/menubar/src/components/codeblock/codeblock.ts @@ -1,7 +1,7 @@ import { EdybaraButton, html } from '@edybara/ui'; import { EdybaraMenubarContext } from '../context'; import { useContext } from 'preact/hooks'; -import { setBlockType } from 'prosemirror-commands'; +import { setBlockType } from '@edybara/pm/commands'; export const EdybaraMenubarCodeblockToggleButtons = () => { const context = useContext(EdybaraMenubarContext); diff --git a/packages/menubar/src/components/context.ts b/packages/menubar/src/components/context.ts index 0ce0b62c..b7d87460 100644 --- a/packages/menubar/src/components/context.ts +++ b/packages/menubar/src/components/context.ts @@ -1,7 +1,7 @@ import { EdybaraMenubarPluginConfigs } from '../plugins'; import { createContext } from 'preact'; -import { EditorState } from 'prosemirror-state'; -import { EditorView } from 'prosemirror-view'; +import { EditorState } from '@edybara/pm/state'; +import { EditorView } from '@edybara/pm/view'; export interface EdybaraMenubarContextType { editorView: EditorView; diff --git a/packages/menubar/src/components/marks/marks.ts b/packages/menubar/src/components/marks/marks.ts index b8390483..b6db0a03 100644 --- a/packages/menubar/src/components/marks/marks.ts +++ b/packages/menubar/src/components/marks/marks.ts @@ -8,7 +8,7 @@ import { EdybaraShortCut, html, } from '@edybara/ui'; -import { toggleMark } from 'prosemirror-commands'; +import { toggleMark } from '@edybara/pm/commands'; import { clearMarks, mac, markActive } from '@edybara/core'; import { Attributes, VNode } from 'preact'; diff --git a/packages/menubar/src/plugins/menubar.ts b/packages/menubar/src/plugins/menubar.ts index 0c545a67..7e159ff4 100644 --- a/packages/menubar/src/plugins/menubar.ts +++ b/packages/menubar/src/plugins/menubar.ts @@ -1,9 +1,9 @@ import { render } from 'preact'; -import { EditorState, Plugin, PluginKey, PluginView } from 'prosemirror-state'; -import { EditorView } from 'prosemirror-view'; +import { EditorState, Plugin, PluginKey, PluginView } from '@edybara/pm/state'; +import { EditorView } from '@edybara/pm/view'; import { html } from '@edybara/ui'; import { EdybaraMenubar } from '../components'; -import { MarkType, NodeType } from 'prosemirror-model'; +import { MarkType, NodeType } from '@edybara/pm/model'; export interface EdybaraMenubarPluginConfigs { position?: 'top' | 'bottom'; diff --git a/packages/menubar/src/utils/current-align-type.ts b/packages/menubar/src/utils/current-align-type.ts index 8238b2c2..dd36f9ac 100644 --- a/packages/menubar/src/utils/current-align-type.ts +++ b/packages/menubar/src/utils/current-align-type.ts @@ -1,5 +1,5 @@ import { getBlockContainerChildren } from '@edybara/core'; -import { EditorState } from 'prosemirror-state'; +import { EditorState } from '@edybara/pm/state'; export const getAlignType = (state: EditorState) => { const { selection } = state; diff --git a/packages/menubar/src/utils/current-text-type.ts b/packages/menubar/src/utils/current-text-type.ts index 71a68d0f..739c6dad 100644 --- a/packages/menubar/src/utils/current-text-type.ts +++ b/packages/menubar/src/utils/current-text-type.ts @@ -1,4 +1,4 @@ -import { EditorState } from 'prosemirror-state'; +import { EditorState } from '@edybara/pm/state'; import { EdybaraHeadingAttrs } from '@edybara/heading'; export const getTextType = (state: EditorState) => { diff --git a/packages/paragraph/package.json b/packages/paragraph/package.json index d61de150..808b274a 100644 --- a/packages/paragraph/package.json +++ b/packages/paragraph/package.json @@ -16,13 +16,8 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "orderedmap": "*", - "prosemirror-commands": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-state": "*", - "prosemirror-transform": "*" + "@edybara/pm": "*", + "orderedmap": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/paragraph/src/plugins/keymaps.ts b/packages/paragraph/src/plugins/keymaps.ts index 2a0e6622..b3191f9a 100644 --- a/packages/paragraph/src/plugins/keymaps.ts +++ b/packages/paragraph/src/plugins/keymaps.ts @@ -1,6 +1,6 @@ -import { NodeType } from 'prosemirror-model'; +import { NodeType } from '@edybara/pm/model'; import { keymap } from 'prosemirror-keymap'; -import { setBlockType } from 'prosemirror-commands'; +import { setBlockType } from '@edybara/pm/commands'; import { mac } from '@edybara/core'; export interface EdybaraParagraphKeymapPluginConfigs { diff --git a/packages/paragraph/src/plugins/paragraph.ts b/packages/paragraph/src/plugins/paragraph.ts index 6f753b31..78c34e8f 100644 --- a/packages/paragraph/src/plugins/paragraph.ts +++ b/packages/paragraph/src/plugins/paragraph.ts @@ -1,5 +1,5 @@ -import { NodeType } from 'prosemirror-model'; -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { NodeType } from '@edybara/pm/model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { edybaraParagraphKeymapPlugins } from './keymaps'; export interface EdybaraParagraphPluginConfigs { diff --git a/packages/paragraph/src/schemas/paragraph.ts b/packages/paragraph/src/schemas/paragraph.ts index ecd6cdab..e198f088 100644 --- a/packages/paragraph/src/schemas/paragraph.ts +++ b/packages/paragraph/src/schemas/paragraph.ts @@ -1,4 +1,4 @@ -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; import { parseQuillTextAlign } from '@edybara/core'; export const EDIM_PARAGRAPH_DEFAULT_NODE_NAME = 'paragraph'; diff --git a/packages/paragraph/src/utils/get-range-is-text.ts b/packages/paragraph/src/utils/get-range-is-text.ts index dcb24b24..754fa4b9 100644 --- a/packages/paragraph/src/utils/get-range-is-text.ts +++ b/packages/paragraph/src/utils/get-range-is-text.ts @@ -1,5 +1,5 @@ -import { EditorState } from 'prosemirror-state'; -import { Node } from 'prosemirror-model'; +import { EditorState } from '@edybara/pm/state'; +import { Node } from '@edybara/pm/model'; export const getRangeIsText = (state: EditorState) => { const { $from, $to } = state.selection; diff --git a/packages/pm/package.json b/packages/pm/package.json index 2c810e62..66a21507 100644 --- a/packages/pm/package.json +++ b/packages/pm/package.json @@ -143,6 +143,7 @@ "prosemirror-tables": "*", "prosemirror-trailing-node": "*", "prosemirror-transform": "*", + "prosemirror-utils": "*", "prosemirror-view": "*" }, "repository": { diff --git a/packages/pm/utils/index.ts b/packages/pm/utils/index.ts new file mode 100644 index 00000000..afbe2fd6 --- /dev/null +++ b/packages/pm/utils/index.ts @@ -0,0 +1 @@ +export * from 'prosemirror-utils' diff --git a/packages/pm/utils/package.json b/packages/pm/utils/package.json new file mode 100644 index 00000000..a09224e2 --- /dev/null +++ b/packages/pm/utils/package.json @@ -0,0 +1,14 @@ +{ + "type": "module", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.cjs", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "./dist/index.cjs", + "module": "./dist/index.js", + "types": "./dist/index.d.ts" +} diff --git a/packages/preset/package.json b/packages/preset/package.json index 8663dd3d..327d5d57 100644 --- a/packages/preset/package.json +++ b/packages/preset/package.json @@ -32,18 +32,14 @@ "@edybara/link": "*", "@edybara/menubar": "*", "@edybara/paragraph": "*", + "@edybara/pm": "*", "@edybara/strikethrough": "*", "@edybara/subscript": "*", "@edybara/superscript": "*", "@edybara/tables": "*", "@edybara/text-color": "*", "@edybara/ui": "*", - "@edybara/underline": "*", - "prosemirror-commands": "*", - "prosemirror-inputrules": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-state": "*" + "@edybara/underline": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/preset/src/plugins/preset.ts b/packages/preset/src/plugins/preset.ts index 356e81ef..739a0d6d 100644 --- a/packages/preset/src/plugins/preset.ts +++ b/packages/preset/src/plugins/preset.ts @@ -1,4 +1,4 @@ -import { Plugin as PMPlugin, Plugin } from 'prosemirror-state'; +import { Plugin as PMPlugin, Plugin } from '@edybara/pm/state'; import { edybaraCorePlugins } from '@edybara/core'; import { EDIM_HEADING_DEFAULT_NODE_NAME, @@ -85,7 +85,7 @@ import { EdybaraMenubarPluginConfigs, edybaraMenubarPlugins, } from '@edybara/menubar'; -import { Schema } from 'prosemirror-model'; +import { Schema } from '@edybara/pm/model'; import { EDIM_FONT_FAMILY_DEFAULT_MARK_NAME } from '@edybara/font-family'; import { EDIM_LINK_DEFAULT_MARK_NAME, diff --git a/packages/preset/src/schemas/preset.ts b/packages/preset/src/schemas/preset.ts index ead3fdb0..5abed9c7 100644 --- a/packages/preset/src/schemas/preset.ts +++ b/packages/preset/src/schemas/preset.ts @@ -1,4 +1,4 @@ -import { MarkSpec, NodeSpec, Schema } from 'prosemirror-model'; +import { MarkSpec, NodeSpec, Schema } from '@edybara/pm/model'; import { edybaraBaseNodes } from '@edybara/core'; import { EdybaraHeadingNodeConfigs, diff --git a/packages/strikethrough/package.json b/packages/strikethrough/package.json index 8a375bed..44b4e5e4 100644 --- a/packages/strikethrough/package.json +++ b/packages/strikethrough/package.json @@ -15,9 +15,7 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "prosemirror-commands": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/strikethrough/src/plugins/keymap.ts b/packages/strikethrough/src/plugins/keymap.ts index 147ee9c0..94c99be2 100644 --- a/packages/strikethrough/src/plugins/keymap.ts +++ b/packages/strikethrough/src/plugins/keymap.ts @@ -1,6 +1,6 @@ -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; import { keymap } from 'prosemirror-keymap'; -import { toggleMark } from 'prosemirror-commands'; +import { toggleMark } from '@edybara/pm/commands'; export interface EdybaraStrikethroughKeymapPluginConfigs { markType: MarkType; diff --git a/packages/strikethrough/src/plugins/strikethrough.ts b/packages/strikethrough/src/plugins/strikethrough.ts index 91429f16..290fb960 100644 --- a/packages/strikethrough/src/plugins/strikethrough.ts +++ b/packages/strikethrough/src/plugins/strikethrough.ts @@ -1,4 +1,4 @@ -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; import { edybaraStrikethroughKeymapPlugins } from './keymap'; export interface EdybaraStrikethroughPluginConfigs { diff --git a/packages/strikethrough/src/schemas/strikethrough.ts b/packages/strikethrough/src/schemas/strikethrough.ts index 350f456e..060cf1ee 100644 --- a/packages/strikethrough/src/schemas/strikethrough.ts +++ b/packages/strikethrough/src/schemas/strikethrough.ts @@ -1,4 +1,4 @@ -import { MarkSpec } from 'prosemirror-model'; +import { MarkSpec } from '@edybara/pm/model'; export const EDIM_STRIKETHROUGH_MARK_NAME = 'strikethrough'; diff --git a/packages/subscript/package.json b/packages/subscript/package.json index 6ecab422..89b3fc8b 100644 --- a/packages/subscript/package.json +++ b/packages/subscript/package.json @@ -15,9 +15,7 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "prosemirror-commands": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/subscript/src/plugins/keymap.ts b/packages/subscript/src/plugins/keymap.ts index 2ca96f07..065ad7f2 100644 --- a/packages/subscript/src/plugins/keymap.ts +++ b/packages/subscript/src/plugins/keymap.ts @@ -1,6 +1,6 @@ -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; import { keymap } from 'prosemirror-keymap'; -import { toggleMark } from 'prosemirror-commands'; +import { toggleMark } from '@edybara/pm/commands'; export interface EdybaraSubscriptKeymapPluginConfigs { markType: MarkType; diff --git a/packages/subscript/src/plugins/subscript.ts b/packages/subscript/src/plugins/subscript.ts index bcbd0f13..be2c4823 100644 --- a/packages/subscript/src/plugins/subscript.ts +++ b/packages/subscript/src/plugins/subscript.ts @@ -1,4 +1,4 @@ -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; import { edybaraSubscriptKeymapPlugins } from './keymap'; export interface EdybaraSubscriptPluginConfigs { diff --git a/packages/subscript/src/schemas/subscript.ts b/packages/subscript/src/schemas/subscript.ts index 02c73ab3..80e5b37c 100644 --- a/packages/subscript/src/schemas/subscript.ts +++ b/packages/subscript/src/schemas/subscript.ts @@ -1,4 +1,4 @@ -import { MarkSpec } from 'prosemirror-model'; +import { MarkSpec } from '@edybara/pm/model'; export const EDIM_SUBSCRIPT_MARK_NAME = 'subscript'; diff --git a/packages/superscript/package.json b/packages/superscript/package.json index 8dd35dd1..83a16d14 100644 --- a/packages/superscript/package.json +++ b/packages/superscript/package.json @@ -15,9 +15,7 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "prosemirror-commands": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/superscript/src/plugins/keymap.ts b/packages/superscript/src/plugins/keymap.ts index 7aeecfb9..9a0991cb 100644 --- a/packages/superscript/src/plugins/keymap.ts +++ b/packages/superscript/src/plugins/keymap.ts @@ -1,6 +1,6 @@ -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; import { keymap } from 'prosemirror-keymap'; -import { toggleMark } from 'prosemirror-commands'; +import { toggleMark } from '@edybara/pm/commands'; export interface EdybaraSuperscriptKeymapPluginConfigs { markType: MarkType; diff --git a/packages/superscript/src/plugins/superscript.ts b/packages/superscript/src/plugins/superscript.ts index 676156f2..8c949cf4 100644 --- a/packages/superscript/src/plugins/superscript.ts +++ b/packages/superscript/src/plugins/superscript.ts @@ -1,4 +1,4 @@ -import { MarkType } from 'prosemirror-model'; +import { MarkType } from '@edybara/pm/model'; import { edybaraSuperscriptKeymapPlugins } from './keymap'; export interface EdybaraSuperscriptPluginConfigs { diff --git a/packages/superscript/src/schemas/superscript.ts b/packages/superscript/src/schemas/superscript.ts index 8e037538..4e7c67aa 100644 --- a/packages/superscript/src/schemas/superscript.ts +++ b/packages/superscript/src/schemas/superscript.ts @@ -1,4 +1,4 @@ -import { MarkSpec } from 'prosemirror-model'; +import { MarkSpec } from '@edybara/pm/model'; export const EDIM_SUPERSCRIPT_MARK_NAME = 'superscript'; diff --git a/packages/tables/package.json b/packages/tables/package.json index adfadb88..5eafa7a7 100644 --- a/packages/tables/package.json +++ b/packages/tables/package.json @@ -16,15 +16,9 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", + "@edybara/pm": "*", "@edybara/ui": "*", - "preact": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*", - "prosemirror-state": "*", - "prosemirror-tables": "*", - "prosemirror-transform": "*", - "prosemirror-utils": "*", - "prosemirror-view": "*" + "preact": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/tables/src/commands/delete-columns.ts b/packages/tables/src/commands/delete-columns.ts index 914dc817..e2cedb2b 100644 --- a/packages/tables/src/commands/delete-columns.ts +++ b/packages/tables/src/commands/delete-columns.ts @@ -1 +1 @@ -export { deleteColumn } from 'prosemirror-tables'; \ No newline at end of file +export { deleteColumn } from '@edybara/pm/tables'; diff --git a/packages/tables/src/commands/delete-rows.ts b/packages/tables/src/commands/delete-rows.ts index 2d1b023a..f621d5c9 100644 --- a/packages/tables/src/commands/delete-rows.ts +++ b/packages/tables/src/commands/delete-rows.ts @@ -1 +1 @@ -export { deleteRow } from 'prosemirror-tables'; +export { deleteRow } from '@edybara/pm/tables'; diff --git a/packages/tables/src/commands/delete-table.ts b/packages/tables/src/commands/delete-table.ts index 3a9ac0a4..acb62139 100644 --- a/packages/tables/src/commands/delete-table.ts +++ b/packages/tables/src/commands/delete-table.ts @@ -1,4 +1,4 @@ -import { EditorState, Transaction } from 'prosemirror-state'; +import { EditorState, Transaction } from '@edybara/pm/state'; export function deleteTable( state: EditorState, diff --git a/packages/tables/src/commands/insert-tables.ts b/packages/tables/src/commands/insert-tables.ts index 09cddb25..847c8269 100644 --- a/packages/tables/src/commands/insert-tables.ts +++ b/packages/tables/src/commands/insert-tables.ts @@ -1,5 +1,5 @@ -import { Fragment, Node } from 'prosemirror-model'; -import { Command, TextSelection } from 'prosemirror-state'; +import { Fragment, Node } from '@edybara/pm/model'; +import { Command, TextSelection } from '@edybara/pm/state'; export const insertTable = (): Command => { return (state, dispatch) => { diff --git a/packages/tables/src/components/cell-button.ts b/packages/tables/src/components/cell-button.ts index f2e59ebb..60d700d0 100644 --- a/packages/tables/src/components/cell-button.ts +++ b/packages/tables/src/components/cell-button.ts @@ -1,6 +1,6 @@ import { html, EdybaraSelect } from '@edybara/ui'; import { Fragment } from 'preact'; -import { EditorView } from 'prosemirror-view'; +import { EditorView } from '@edybara/pm/view'; export interface EdybaraTableCellButtonWrapperProps { editorView: EditorView; diff --git a/packages/tables/src/node-views/table-node-view.ts b/packages/tables/src/node-views/table-node-view.ts index c8bf7422..1effecf6 100644 --- a/packages/tables/src/node-views/table-node-view.ts +++ b/packages/tables/src/node-views/table-node-view.ts @@ -1,5 +1,5 @@ -import { Node as PMNode } from 'prosemirror-model'; -import { EditorView, NodeView } from 'prosemirror-view'; +import { Node as PMNode } from '@edybara/pm/model'; +import { EditorView, NodeView } from '@edybara/pm/view'; import { html } from '@edybara/ui'; import { createRef, render } from 'preact'; import { forwardRef, useImperativeHandle, useRef } from 'preact/compat'; diff --git a/packages/tables/src/plugins/cell-button.ts b/packages/tables/src/plugins/cell-button.ts index 929afe96..d7711ddc 100644 --- a/packages/tables/src/plugins/cell-button.ts +++ b/packages/tables/src/plugins/cell-button.ts @@ -1,5 +1,5 @@ -import { Plugin as PMPlugin, PluginKey } from 'prosemirror-state'; -import { Decoration, DecorationSet, EditorView } from 'prosemirror-view'; +import { Plugin as PMPlugin, PluginKey } from '@edybara/pm/state'; +import { Decoration, DecorationSet, EditorView } from '@edybara/pm/view'; import { findCellClosestToPos } from '../utils'; import { EdybaraTableCellButtonWrapper } from '../components'; import { render } from 'preact'; diff --git a/packages/tables/src/plugins/focused-cell.ts b/packages/tables/src/plugins/focused-cell.ts index 1461a837..bc60d184 100644 --- a/packages/tables/src/plugins/focused-cell.ts +++ b/packages/tables/src/plugins/focused-cell.ts @@ -1,5 +1,5 @@ -import { Plugin as PMPlugin, PluginKey } from 'prosemirror-state'; -import { Decoration, DecorationSet } from 'prosemirror-view'; +import { Plugin as PMPlugin, PluginKey } from '@edybara/pm/state'; +import { Decoration, DecorationSet } from '@edybara/pm/view'; import { findCellClosestToPos } from '../utils'; export const focusedCellPluginKey = new PluginKey( diff --git a/packages/tables/src/plugins/table-editing.ts b/packages/tables/src/plugins/table-editing.ts index 72d27e05..10353e61 100644 --- a/packages/tables/src/plugins/table-editing.ts +++ b/packages/tables/src/plugins/table-editing.ts @@ -1,9 +1,9 @@ -import { columnResizing, tableEditing } from 'prosemirror-tables'; +import { columnResizing, tableEditing } from '@edybara/pm/tables'; import { edybaraTableCellButtonPlugins } from './cell-button'; import { edybaraFocusedCellDecorationPlugins } from './focused-cell'; -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { EdybaraTableNodeView } from '../node-views'; -import { NodeType } from 'prosemirror-model'; +import { NodeType } from '@edybara/pm/model'; export interface EdybaraTableEditingPluginConfigs { tableNodeType: NodeType; diff --git a/packages/tables/src/plugins/table.ts b/packages/tables/src/plugins/table.ts index e55ae028..05a985d5 100644 --- a/packages/tables/src/plugins/table.ts +++ b/packages/tables/src/plugins/table.ts @@ -1,5 +1,5 @@ -import { NodeType } from 'prosemirror-model'; -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { NodeType } from '@edybara/pm/model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; export interface EdybaraTablePluginConfigs { tableNodeType: NodeType; diff --git a/packages/tables/src/schemas/schema.ts b/packages/tables/src/schemas/schema.ts index 7ff041a2..d328d99f 100644 --- a/packages/tables/src/schemas/schema.ts +++ b/packages/tables/src/schemas/schema.ts @@ -1,5 +1,5 @@ -import { AttributeSpec, Attrs, Node, NodeSpec } from 'prosemirror-model'; -import { MutableAttrs, TableRole } from 'prosemirror-tables'; +import { AttributeSpec, Attrs, Node, NodeSpec } from '@edybara/pm/model'; +import { MutableAttrs, TableRole } from '@edybara/pm/tables'; export const EDIM_TABLE_DEFAULT_NODE_NAME = 'table'; export const EDIM_TABLE_ROW_DEFAULT_NODE_NAME = 'table_row'; diff --git a/packages/tables/src/utils/find.ts b/packages/tables/src/utils/find.ts index 82227213..57be32c7 100644 --- a/packages/tables/src/utils/find.ts +++ b/packages/tables/src/utils/find.ts @@ -1,7 +1,7 @@ -import { Rect, TableMap } from 'prosemirror-tables'; +import { Rect, TableMap } from '@edybara/pm/tables'; import { findParentNode, findParentNodeClosestToPos } from 'prosemirror-utils'; -import { Selection } from 'prosemirror-state'; -import { Node, ResolvedPos } from 'prosemirror-model'; +import { Selection } from '@edybara/pm/state'; +import { Node, ResolvedPos } from '@edybara/pm/model'; import { isTableNodeSpec } from './is-table-node-spec'; export const findTable = (selection: Selection) => diff --git a/packages/tables/src/utils/is-table-node-spec.ts b/packages/tables/src/utils/is-table-node-spec.ts index 7f3ac762..a66eaaca 100644 --- a/packages/tables/src/utils/is-table-node-spec.ts +++ b/packages/tables/src/utils/is-table-node-spec.ts @@ -1,4 +1,4 @@ -import { NodeSpec } from 'prosemirror-model'; +import { NodeSpec } from '@edybara/pm/model'; import { TableNodeSpec } from '../schemas'; export const isTableNodeSpec = ( diff --git a/packages/text-color/package.json b/packages/text-color/package.json index 12fcf491..98dca502 100644 --- a/packages/text-color/package.json +++ b/packages/text-color/package.json @@ -15,8 +15,7 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "prosemirror-commands": "*", - "prosemirror-model": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/text-color/src/commands/toggle-text-color.ts b/packages/text-color/src/commands/toggle-text-color.ts index 1099f60d..4eab356d 100644 --- a/packages/text-color/src/commands/toggle-text-color.ts +++ b/packages/text-color/src/commands/toggle-text-color.ts @@ -1,6 +1,6 @@ -import { MarkType } from 'prosemirror-model'; -import { Command } from 'prosemirror-state'; -import { toggleMark } from 'prosemirror-commands'; +import { MarkType } from '@edybara/pm/model'; +import { Command } from '@edybara/pm/state'; +import { toggleMark } from '@edybara/pm/commands'; import { toggleMarkWithAttrs } from '@edybara/core'; import { EdybaraTextColorAttrs } from 'schemas'; diff --git a/packages/text-color/src/schemas/text-color.ts b/packages/text-color/src/schemas/text-color.ts index 6a832eaa..37e67bd5 100644 --- a/packages/text-color/src/schemas/text-color.ts +++ b/packages/text-color/src/schemas/text-color.ts @@ -1,4 +1,4 @@ -import { MarkSpec, MarkType } from 'prosemirror-model'; +import { MarkSpec, MarkType } from '@edybara/pm/model'; export const EDIM_TEXT_COLOR_DEFAULT_MARK_NAME = 'text_color'; diff --git a/packages/underline/package.json b/packages/underline/package.json index 229077dc..72689085 100644 --- a/packages/underline/package.json +++ b/packages/underline/package.json @@ -15,9 +15,7 @@ "types": "dist/index.d.ts", "dependencies": { "@edybara/core": "*", - "prosemirror-commands": "*", - "prosemirror-keymap": "*", - "prosemirror-model": "*" + "@edybara/pm": "*" }, "devDependencies": { "rimraf": "^5.0.5", diff --git a/packages/underline/src/plugins/keymap.ts b/packages/underline/src/plugins/keymap.ts index efa13731..b73070e5 100644 --- a/packages/underline/src/plugins/keymap.ts +++ b/packages/underline/src/plugins/keymap.ts @@ -1,7 +1,7 @@ -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { keymap } from 'prosemirror-keymap'; -import { MarkType } from 'prosemirror-model'; -import { toggleMark } from 'prosemirror-commands'; +import { MarkType } from '@edybara/pm/model'; +import { toggleMark } from '@edybara/pm/commands'; export interface EdybaraUnderlineKeymapPluginConfigs { markType: MarkType; diff --git a/packages/underline/src/plugins/underline.ts b/packages/underline/src/plugins/underline.ts index 7a451b5f..799c60e0 100644 --- a/packages/underline/src/plugins/underline.ts +++ b/packages/underline/src/plugins/underline.ts @@ -1,5 +1,5 @@ -import { MarkType } from 'prosemirror-model'; -import { Plugin as PMPlugin } from 'prosemirror-state'; +import { MarkType } from '@edybara/pm/model'; +import { Plugin as PMPlugin } from '@edybara/pm/state'; import { edybaraUnderlineKeymapPlugins } from './keymap'; export interface EdybaraUnderlinePluginConfigs { diff --git a/packages/underline/src/schemas/underline.ts b/packages/underline/src/schemas/underline.ts index fee8df9d..8b05f6b8 100644 --- a/packages/underline/src/schemas/underline.ts +++ b/packages/underline/src/schemas/underline.ts @@ -1,4 +1,4 @@ -import { MarkSpec } from 'prosemirror-model'; +import { MarkSpec } from '@edybara/pm/model'; export const EDIM_UNDERLINE_MARK_NAME = 'underline'; diff --git a/tsconfig.json b/tsconfig.json index f5dea957..620781c4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,6 +17,7 @@ "downlevelIteration": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, + "esModuleInterop": true, "moduleResolution": "node", "importHelpers": true, "target": "ESNext", diff --git a/yarn.lock b/yarn.lock index f7ac6eac..10170d6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3399,11 +3399,7 @@ __metadata: resolution: "@edybara/blockquote@workspace:packages/blockquote" dependencies: "@edybara/core": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3416,9 +3412,7 @@ __metadata: resolution: "@edybara/bold@workspace:packages/bold" dependencies: "@edybara/core": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3431,10 +3425,7 @@ __metadata: resolution: "@edybara/code@workspace:packages/code" dependencies: "@edybara/core": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3447,12 +3438,7 @@ __metadata: resolution: "@edybara/codeblock@workspace:packages/codeblock" dependencies: "@edybara/core": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" - prosemirror-utils: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3466,15 +3452,10 @@ __metadata: dependencies: "@edybara/core": "npm:*" "@edybara/mention": "npm:*" + "@edybara/pm": "npm:*" "@edybara/tables": "npm:*" "@edybara/ui": "npm:*" preact: "npm:*" - prosemirror-commands: "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" - prosemirror-view: "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3486,17 +3467,7 @@ __metadata: version: 0.0.0-use.local resolution: "@edybara/core@workspace:packages/core" dependencies: - prosemirror-commands: "npm:*" - prosemirror-dropcursor: "npm:*" - prosemirror-gapcursor: "npm:*" - prosemirror-history: "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" - prosemirror-transform: "npm:*" - prosemirror-utils: "npm:*" - prosemirror-view: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3510,20 +3481,10 @@ __metadata: dependencies: "@codemirror/lang-json": "npm:^6.0.1" "@codemirror/state": "npm:^6.4.1" + "@edybara/pm": "npm:*" "@edybara/ui": "npm:*" codemirror: "npm:^6.0.1" preact: "npm:^10.20.1" - prosemirror-commands: "npm:*" - prosemirror-dropcursor: "npm:*" - prosemirror-gapcursor: "npm:*" - prosemirror-history: "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" - prosemirror-transform: "npm:*" - prosemirror-utils: "npm:*" - prosemirror-view: "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3536,9 +3497,7 @@ __metadata: resolution: "@edybara/emoji@workspace:packages/_wip_emoji" dependencies: "@edybara/core": "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3551,14 +3510,8 @@ __metadata: resolution: "@edybara/flat-list@workspace:packages/flat-list" dependencies: "@edybara/core": "npm:*" + "@edybara/pm": "npm:*" orderedmap: "npm:*" - prosemirror-commands: "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" - prosemirror-transform: "npm:*" - prosemirror-utils: "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3572,13 +3525,7 @@ __metadata: dependencies: "@edybara/core": "npm:*" "@edybara/flat-list": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" - prosemirror-transform: "npm:*" - prosemirror-utils: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3591,9 +3538,7 @@ __metadata: resolution: "@edybara/font-family@workspace:packages/font-family" dependencies: "@edybara/core": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3606,11 +3551,7 @@ __metadata: resolution: "@edybara/heading@workspace:packages/heading" dependencies: "@edybara/core": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3623,8 +3564,7 @@ __metadata: resolution: "@edybara/hr@workspace:packages/hr" dependencies: "@edybara/core": "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3637,11 +3577,9 @@ __metadata: resolution: "@edybara/image@workspace:packages/_wip_image" dependencies: "@edybara/core": "npm:*" + "@edybara/pm": "npm:*" "@edybara/ui": "npm:*" preact: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" - prosemirror-view: "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3654,9 +3592,7 @@ __metadata: resolution: "@edybara/italic@workspace:packages/italic" dependencies: "@edybara/core": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3669,12 +3605,9 @@ __metadata: resolution: "@edybara/link@workspace:packages/link" dependencies: "@edybara/core": "npm:*" + "@edybara/pm": "npm:*" "@edybara/ui": "npm:*" preact: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" - prosemirror-utils: "npm:*" - prosemirror-view: "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3687,12 +3620,9 @@ __metadata: resolution: "@edybara/mention@workspace:packages/_wip_mention" dependencies: "@edybara/core": "npm:*" + "@edybara/pm": "npm:*" "@edybara/ui": "npm:*" preact: "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3715,19 +3645,13 @@ __metadata: "@edybara/link": "npm:*" "@edybara/mention": "npm:*" "@edybara/paragraph": "npm:*" + "@edybara/pm": "npm:*" "@edybara/tables": "npm:*" "@edybara/text-color": "npm:*" "@edybara/ui": "npm:*" emoji-datasource: "npm:>=15.0.0" htm: "npm:>=3.0.0" preact: "npm:>=10.0.0" - prosemirror-commands: "npm:*" - prosemirror-history: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" - prosemirror-utils: "npm:*" - prosemirror-view: "npm:*" remixicon: "npm:>=3.0.0" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" @@ -3741,13 +3665,8 @@ __metadata: resolution: "@edybara/paragraph@workspace:packages/paragraph" dependencies: "@edybara/core": "npm:*" + "@edybara/pm": "npm:*" orderedmap: "npm:*" - prosemirror-commands: "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" - prosemirror-transform: "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3755,7 +3674,7 @@ __metadata: languageName: unknown linkType: soft -"@edybara/pm@workspace:packages/pm": +"@edybara/pm@npm:*, @edybara/pm@workspace:packages/pm": version: 0.0.0-use.local resolution: "@edybara/pm@workspace:packages/pm" dependencies: @@ -3776,6 +3695,7 @@ __metadata: prosemirror-tables: "npm:*" prosemirror-trailing-node: "npm:*" prosemirror-transform: "npm:*" + prosemirror-utils: "npm:*" prosemirror-view: "npm:*" languageName: unknown linkType: soft @@ -3801,6 +3721,7 @@ __metadata: "@edybara/link": "npm:*" "@edybara/menubar": "npm:*" "@edybara/paragraph": "npm:*" + "@edybara/pm": "npm:*" "@edybara/strikethrough": "npm:*" "@edybara/subscript": "npm:*" "@edybara/superscript": "npm:*" @@ -3808,11 +3729,6 @@ __metadata: "@edybara/text-color": "npm:*" "@edybara/ui": "npm:*" "@edybara/underline": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3825,9 +3741,7 @@ __metadata: resolution: "@edybara/strikethrough@workspace:packages/strikethrough" dependencies: "@edybara/core": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3840,9 +3754,7 @@ __metadata: resolution: "@edybara/subscript@workspace:packages/subscript" dependencies: "@edybara/core": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3855,9 +3767,7 @@ __metadata: resolution: "@edybara/superscript@workspace:packages/superscript" dependencies: "@edybara/core": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3870,15 +3780,9 @@ __metadata: resolution: "@edybara/tables@workspace:packages/tables" dependencies: "@edybara/core": "npm:*" + "@edybara/pm": "npm:*" "@edybara/ui": "npm:*" preact: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" - prosemirror-tables: "npm:*" - prosemirror-transform: "npm:*" - prosemirror-utils: "npm:*" - prosemirror-view: "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3891,8 +3795,7 @@ __metadata: resolution: "@edybara/text-color@workspace:packages/text-color" dependencies: "@edybara/core": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-model: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -3920,9 +3823,7 @@ __metadata: resolution: "@edybara/underline@workspace:packages/underline" dependencies: "@edybara/core": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" + "@edybara/pm": "npm:*" rimraf: "npm:^5.0.5" sass: "npm:^1.69.5" tsup: "npm:^8.0.1" @@ -7506,6 +7407,7 @@ __metadata: "@edybara/mention": "npm:*" "@edybara/menubar": "npm:*" "@edybara/paragraph": "npm:*" + "@edybara/pm": "npm:*" "@edybara/preset": "npm:*" "@edybara/strikethrough": "npm:*" "@edybara/subscript": "npm:*" @@ -7514,11 +7416,6 @@ __metadata: "@edybara/text-color": "npm:*" "@edybara/ui": "npm:*" "@edybara/underline": "npm:*" - prosemirror-commands: "npm:*" - prosemirror-model: "npm:*" - prosemirror-state: "npm:*" - prosemirror-transform: "npm:*" - prosemirror-view: "npm:*" typescript: "npm:^5.2.2" vite: "npm:^5.0.8" languageName: unknown @@ -7591,6 +7488,7 @@ __metadata: "@edybara/link": "npm:*" "@edybara/menubar": "npm:*" "@edybara/paragraph": "npm:*" + "@edybara/pm": "npm:*" "@edybara/preset": "npm:*" "@edybara/strikethrough": "npm:*" "@edybara/subscript": "npm:*" @@ -7607,17 +7505,6 @@ __metadata: docusaurus-plugin-sass: "npm:^0.2.5" postcss: "npm:^8.4.37" prism-react-renderer: "npm:^2.1.0" - prosemirror-commands: "npm:*" - prosemirror-dropcursor: "npm:*" - prosemirror-gapcursor: "npm:*" - prosemirror-history: "npm:*" - prosemirror-inputrules: "npm:*" - prosemirror-keymap: "npm:*" - prosemirror-model: "npm:*" - prosemirror-schema-basic: "npm:*" - prosemirror-state: "npm:*" - prosemirror-transform: "npm:*" - prosemirror-view: "npm:*" react: "npm:^18.0.0" react-dom: "npm:^18.0.0" remixicon: "npm:^3.5.0"