Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Dec 19, 2024
1 parent ec6ff49 commit a40d772
Show file tree
Hide file tree
Showing 84 changed files with 223 additions and 223 deletions.
18 changes: 9 additions & 9 deletions e2e/src/createEditorView.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import 'prosemirror-example-setup/style/style.css'
import 'prosemirror-menu/style/menu.css'
import 'prosemirror-view/style/prosemirror.css'

import { exampleSetup } from 'prosemirror-example-setup'
import { keymap } from 'prosemirror-keymap'
import { DOMParser } from 'prosemirror-model'
import { schema } from 'prosemirror-schema-basic'
import type { Plugin } from 'prosemirror-state'
import { EditorState } from 'prosemirror-state'
import type {
MarkViewConstructor,
NodeViewConstructor,
} from 'prosemirror-view'
import { exampleSetup } from 'prosemirror-example-setup'

import { keymap } from 'prosemirror-keymap'
import { DOMParser } from 'prosemirror-model'
import { schema } from 'prosemirror-schema-basic'
import { EditorState } from 'prosemirror-state'
import { EditorView } from 'prosemirror-view'
import 'prosemirror-example-setup/style/style.css'
import 'prosemirror-menu/style/menu.css'
import 'prosemirror-view/style/prosemirror.css'

export function createEditorView(
element: HTMLElement | ShadowRoot,
Expand Down
8 changes: 4 additions & 4 deletions e2e/src/lit/components/Editor.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { RefOrCallback } from 'lit/directives/ref.js'
import type { EditorView } from 'prosemirror-view'
import {
ShallowLitElement,
useMarkViewFactory,
Expand All @@ -7,17 +9,15 @@ import {
} from '@prosemirror-adapter/lit'
import { html } from 'lit'
import { customElement } from 'lit/decorators.js'
import { ref } from 'lit/directives/ref.js'
import { Plugin } from 'prosemirror-state'
import type { EditorView } from 'prosemirror-view'
import { DecorationSet } from 'prosemirror-view'
import type { RefOrCallback } from 'lit/directives/ref.js'
import { ref } from 'lit/directives/ref.js'
import { createEditorView } from '../../createEditorView'
import { Hashes } from './Hashes'
import { Heading } from './Heading'
import { Link } from './Link'
import { Paragraph } from './Paragraph'
import { Size } from './Size'
import { Link } from './Link'

@customElement('my-editor')
export class MyEditor extends ShallowLitElement {
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/lit/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ShallowLitElement } from '@prosemirror-adapter/lit'
import { html } from 'lit'
import { customElement, state } from 'lit/decorators.js'
import { keyed } from 'lit/directives/keyed.js'
import { ShallowLitElement } from '@prosemirror-adapter/lit'

export * from './components/Editor'
export { ProsemirrorAdapterProvider } from '@prosemirror-adapter/lit'
Expand Down
10 changes: 5 additions & 5 deletions e2e/src/react/components/Editor.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import './Editor.css'
import type { EditorView } from 'prosemirror-view'

import type { FC } from 'react'
import { useMarkViewFactory, useNodeViewFactory, usePluginViewFactory, useWidgetViewFactory } from '@prosemirror-adapter/react'
import type { EditorView } from 'prosemirror-view'
import { Plugin } from 'prosemirror-state'
import { DecorationSet } from 'prosemirror-view'
import type { FC } from 'react'
import { useEffect, useRef } from 'react'

import { Plugin } from 'prosemirror-state'
import { createEditorView } from '../../createEditorView'
import { Hashes } from './Hashes'
import { Heading } from './Heading'
import { Link } from './Link'
import { Paragraph } from './Paragraph'
import { Size } from './Size'
import { Link } from './Link'
import './Editor.css'

export const Editor: FC = () => {
const viewRef = useRef<EditorView>()
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/react/components/Link.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react'
import { useMarkViewContext } from '@prosemirror-adapter/react'
import { useEffect, useState } from 'react'

const colors = [
'#f06292',
Expand Down
6 changes: 3 additions & 3 deletions e2e/src/solid/components/Editor.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { DecorationSet } from 'prosemirror-view'
import {
useMarkViewFactory,
useNodeViewFactory,
usePluginViewFactory,
useWidgetViewFactory,
} from '@prosemirror-adapter/solid'
import { Plugin } from 'prosemirror-state'
import { DecorationSet } from 'prosemirror-view'
import { createEditorView } from '../../createEditorView'
import { Paragraph } from './Paragraph'
import { Hashes } from './Hashes'
import { Heading } from './Heading'
import { Size } from './Size'
import { Link } from './Link'
import { Paragraph } from './Paragraph'
import { Size } from './Size'

export function Editor() {
const nodeViewFactory = useNodeViewFactory()
Expand Down
6 changes: 3 additions & 3 deletions e2e/src/solid/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ProsemirrorAdapterProvider } from '@prosemirror-adapter/solid'

/* @refresh reload */
import { render } from 'solid-js/web'

import './index.css'
import { ProsemirrorAdapterProvider } from '@prosemirror-adapter/solid'
import { Editor } from './components/Editor'
import './index.css'

const root = document.getElementById('root')

Expand Down
4 changes: 2 additions & 2 deletions e2e/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { resolve } from 'node:path'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import react from '@vitejs/plugin-react'
import vue from '@vitejs/plugin-vue'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import solid from 'vite-plugin-solid'
import { defineConfig } from 'vite'
import solid from 'vite-plugin-solid'

export default defineConfig({
root: 'src',
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import antfu from '@antfu/eslint-config'
import { fixupPluginRules } from '@eslint/compat'
import react from 'eslint-plugin-react'
import hooks from 'eslint-plugin-react-hooks'
import { fixupPluginRules } from '@eslint/compat'

export default antfu(
{
Expand Down
6 changes: 3 additions & 3 deletions examples/lit/src/components/Editor.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { RefOrCallback } from 'lit/directives/ref.js'
import type { EditorView } from 'prosemirror-view'
import {
ShallowLitElement,
useNodeViewFactory,
Expand All @@ -6,11 +8,9 @@ import {
} from '@prosemirror-adapter/lit'
import { html } from 'lit'
import { customElement } from 'lit/decorators.js'
import { ref } from 'lit/directives/ref.js'
import { Plugin } from 'prosemirror-state'
import type { EditorView } from 'prosemirror-view'
import { DecorationSet } from 'prosemirror-view'
import type { RefOrCallback } from 'lit/directives/ref.js'
import { ref } from 'lit/directives/ref.js'
import { createEditorView } from '../createEditorView'
import { Hashes } from './Hashes'
import { Heading } from './Heading'
Expand Down
12 changes: 6 additions & 6 deletions examples/lit/src/createEditorView.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import 'prosemirror-view/style/prosemirror.css'
import 'prosemirror-example-setup/style/style.css'
import 'prosemirror-menu/style/menu.css'

import type { Plugin } from 'prosemirror-state'
import type { NodeViewConstructor } from 'prosemirror-view'
import { exampleSetup } from 'prosemirror-example-setup'

import { keymap } from 'prosemirror-keymap'
import { DOMParser } from 'prosemirror-model'
import { schema } from 'prosemirror-schema-basic'
import type { Plugin } from 'prosemirror-state'
import { EditorState } from 'prosemirror-state'
import type { NodeViewConstructor } from 'prosemirror-view'
import { EditorView } from 'prosemirror-view'
import 'prosemirror-view/style/prosemirror.css'
import 'prosemirror-example-setup/style/style.css'
import 'prosemirror-menu/style/menu.css'

export function createEditorView(element: HTMLElement, nodeViews: Record<string, NodeViewConstructor>, plugins: Plugin[]) {
const content = document.querySelector('#content')
Expand Down
2 changes: 1 addition & 1 deletion examples/lit/src/my-element.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ShallowLitElement } from '@prosemirror-adapter/lit'
import { html } from 'lit'
import { customElement, state } from 'lit/decorators.js'
import { keyed } from 'lit/directives/keyed.js'
import { ShallowLitElement } from '@prosemirror-adapter/lit'

export * from './components/Editor'
export { ProsemirrorAdapterProvider } from '@prosemirror-adapter/lit'
Expand Down
10 changes: 5 additions & 5 deletions examples/react/components/Editor.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import './Editor.css'
import type { EditorView } from 'prosemirror-view'

import type { FC } from 'react'
import { useNodeViewFactory, usePluginViewFactory, useWidgetViewFactory } from '@prosemirror-adapter/react'
import type { EditorView } from 'prosemirror-view'
import { Plugin } from 'prosemirror-state'
import { DecorationSet } from 'prosemirror-view'
import type { FC } from 'react'
import { useCallback, useRef } from 'react'

import { Plugin } from 'prosemirror-state'
import { createEditorView } from '../createEditorView'
import { Hashes } from './Hashes'
import { Heading } from './Heading'
import { Paragraph } from './Paragraph'
import { Size } from './Size'
import { Hashes } from './Hashes'
import './Editor.css'

export const Editor: FC = () => {
const viewRef = useRef<EditorView>()
Expand Down
12 changes: 6 additions & 6 deletions examples/react/createEditorView.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import 'prosemirror-view/style/prosemirror.css'
import 'prosemirror-example-setup/style/style.css'
import 'prosemirror-menu/style/menu.css'

import type { Plugin } from 'prosemirror-state'
import type { NodeViewConstructor } from 'prosemirror-view'
import { exampleSetup } from 'prosemirror-example-setup'

import { keymap } from 'prosemirror-keymap'
import { DOMParser } from 'prosemirror-model'
import { schema } from 'prosemirror-schema-basic'
import type { Plugin } from 'prosemirror-state'
import { EditorState } from 'prosemirror-state'
import type { NodeViewConstructor } from 'prosemirror-view'
import { EditorView } from 'prosemirror-view'
import 'prosemirror-view/style/prosemirror.css'
import 'prosemirror-example-setup/style/style.css'
import 'prosemirror-menu/style/menu.css'

export function createEditorView(element: HTMLElement, nodeViews: Record<string, NodeViewConstructor>, plugins: Plugin[]) {
const content = document.querySelector('#content')
Expand Down
4 changes: 2 additions & 2 deletions examples/solid/src/components/Editor.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { DecorationSet } from 'prosemirror-view'
import {
useNodeViewFactory,
usePluginViewFactory,
useWidgetViewFactory,
} from '@prosemirror-adapter/solid'
import { Plugin } from 'prosemirror-state'
import { DecorationSet } from 'prosemirror-view'
import { createEditorView } from '../createEditorView'
import { Paragraph } from './Paragraph'
import { Hashes } from './Hashes'
import { Heading } from './Heading'
import { Paragraph } from './Paragraph'
import { Size } from './Size'

export function Editor() {
Expand Down
12 changes: 6 additions & 6 deletions examples/solid/src/createEditorView.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import 'prosemirror-view/style/prosemirror.css'
import 'prosemirror-example-setup/style/style.css'
import 'prosemirror-menu/style/menu.css'

import type { Plugin } from 'prosemirror-state'
import type { NodeViewConstructor } from 'prosemirror-view'
import { exampleSetup } from 'prosemirror-example-setup'

import { keymap } from 'prosemirror-keymap'
import { DOMParser } from 'prosemirror-model'
import { schema } from 'prosemirror-schema-basic'
import type { Plugin } from 'prosemirror-state'
import { EditorState } from 'prosemirror-state'
import type { NodeViewConstructor } from 'prosemirror-view'
import { EditorView } from 'prosemirror-view'
import 'prosemirror-view/style/prosemirror.css'
import 'prosemirror-example-setup/style/style.css'
import 'prosemirror-menu/style/menu.css'

export function createEditorView(element: HTMLElement, nodeViews: Record<string, NodeViewConstructor>, plugins: Plugin[]) {
const content = document.querySelector('#content')
Expand Down
6 changes: 3 additions & 3 deletions examples/solid/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ProsemirrorAdapterProvider } from '@prosemirror-adapter/solid'

/* @refresh reload */
import { render } from 'solid-js/web'

import './index.css'
import { ProsemirrorAdapterProvider } from '@prosemirror-adapter/solid'
import { Editor } from './components/Editor'
import './index.css'

const root = document.getElementById('root')

Expand Down
12 changes: 6 additions & 6 deletions examples/svelte/src/libs/createEditorView.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import 'prosemirror-view/style/prosemirror.css'
import 'prosemirror-example-setup/style/style.css'
import 'prosemirror-menu/style/menu.css'

import type { Plugin } from 'prosemirror-state'
import type { NodeViewConstructor } from 'prosemirror-view'
import { exampleSetup } from 'prosemirror-example-setup'

import { keymap } from 'prosemirror-keymap'
import { DOMParser } from 'prosemirror-model'
import { schema } from 'prosemirror-schema-basic'
import type { Plugin } from 'prosemirror-state'
import { EditorState } from 'prosemirror-state'
import type { NodeViewConstructor } from 'prosemirror-view'
import { EditorView } from 'prosemirror-view'
import 'prosemirror-view/style/prosemirror.css'
import 'prosemirror-example-setup/style/style.css'
import 'prosemirror-menu/style/menu.css'

export function createEditorView(element: HTMLElement, nodeViews: Record<string, NodeViewConstructor>, plugins: Plugin[]) {
const content = document.querySelector('#content')
Expand Down
12 changes: 6 additions & 6 deletions examples/vue/createEditorView.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import 'prosemirror-view/style/prosemirror.css'
import 'prosemirror-example-setup/style/style.css'
import 'prosemirror-menu/style/menu.css'

import type { Plugin } from 'prosemirror-state'
import type { NodeViewConstructor } from 'prosemirror-view'
import { exampleSetup } from 'prosemirror-example-setup'

import { keymap } from 'prosemirror-keymap'
import { DOMParser } from 'prosemirror-model'
import { schema } from 'prosemirror-schema-basic'
import type { Plugin } from 'prosemirror-state'
import { EditorState } from 'prosemirror-state'
import type { NodeViewConstructor } from 'prosemirror-view'
import { EditorView } from 'prosemirror-view'
import 'prosemirror-view/style/prosemirror.css'
import 'prosemirror-example-setup/style/style.css'
import 'prosemirror-menu/style/menu.css'

export function createEditorView(element: HTMLElement, nodeViews: Record<string, NodeViewConstructor>, plugins: Plugin[]) {
const content = document.querySelector('#content')
Expand Down
4 changes: 2 additions & 2 deletions packages/lit/src/Provider.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { ContextProvider } from '@lit-labs/context'
import { customElement } from 'lit/decorators.js'
import { useLitRenderer } from './LitRenderer'
import { markViewFactoryKey } from './markView'
import { useLitMarkViewCreator } from './markView/useLitMarkViewCreator'
import { nodeViewFactoryKey } from './nodeView'
import { useLitNodeViewCreator } from './nodeView/useLitNodeViewCreator'
import { pluginViewFactoryKey } from './pluginView'
import { useLitPluginViewCreator } from './pluginView/useLitPluginViewCreator'
import { ShallowLitElement } from './utils/ShallowLitElement'
import { widgetViewFactoryKey } from './widgetView'
import { useLitWidgetViewCreator } from './widgetView/useLitWidgetViewCreator'
import { markViewFactoryKey } from './markView'
import { useLitMarkViewCreator } from './markView/useLitMarkViewCreator'

@customElement('prosemirror-adapter-provider')
export class ProsemirrorAdapterProvider extends ShallowLitElement {
Expand Down
6 changes: 3 additions & 3 deletions packages/lit/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './utils'
export * from './Provider'
export * from './nodeView'
export * from './markView'
export * from './nodeView'
export * from './pluginView'
export * from './Provider'
export * from './utils'
export * from './widgetView'
8 changes: 4 additions & 4 deletions packages/lit/src/markView/LitMarkView.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type { Context } from '@lit-labs/context'
import type { LitRenderer } from '../LitRenderer'
import type { LitMarkViewComponent } from './LitMarkViewOptions'
import type { MarkViewContext } from './markViewContext'
import { ContextProvider } from '@lit-labs/context'

import { CoreMarkView } from '@prosemirror-adapter/core'
import { customElement } from 'lit/decorators.js'
import { nanoid } from 'nanoid'

import type { LitRenderer } from '../LitRenderer'
import { ShallowLitElement } from '../utils'
import { markViewContextKey } from './markViewContext'
import type { MarkViewContext } from './markViewContext'
import type { LitMarkViewComponent } from './LitMarkViewOptions'

declare global {
interface HTMLElementTagNameMap {
Expand Down
2 changes: 1 addition & 1 deletion packages/lit/src/markView/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './markViewContext'
export * from './LitMarkView'
export * from './LitMarkViewOptions'
export * from './markViewContext'
Loading

0 comments on commit a40d772

Please sign in to comment.