mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-31 19:01:54 +02:00
update emotion dependency for site (#4783)
This commit is contained in:
@@ -16,7 +16,7 @@ import {
|
||||
Descendant,
|
||||
Element as SlateElement,
|
||||
} from 'slate'
|
||||
import { css } from 'emotion'
|
||||
import { css } from '@emotion/css'
|
||||
import { withHistory } from 'slate-history'
|
||||
|
||||
const initialValue: Descendant[] = [
|
||||
|
@@ -7,7 +7,7 @@ import React, { useState, useCallback, useMemo } from 'react'
|
||||
import { Slate, Editable, withReact } from 'slate-react'
|
||||
import { Text, createEditor, Element as SlateElement, Descendant } from 'slate'
|
||||
import { withHistory } from 'slate-history'
|
||||
import { css } from 'emotion'
|
||||
import { css } from '@emotion/css'
|
||||
|
||||
const CodeHighlightingExample = () => {
|
||||
const [value, setValue] = useState<Descendant[]>(initialValue)
|
||||
@@ -99,7 +99,7 @@ const Leaf = ({ attributes, children, leaf }) => {
|
||||
${leaf.comment &&
|
||||
css`
|
||||
color: slategray;
|
||||
`}
|
||||
`}
|
||||
|
||||
${(leaf.operator || leaf.url) &&
|
||||
css`
|
||||
|
@@ -2,7 +2,7 @@ import React, { useState, useMemo } from 'react'
|
||||
import { Transforms, createEditor, Descendant } from 'slate'
|
||||
import { Slate, Editable, useSlateStatic, withReact } from 'slate-react'
|
||||
import { withHistory } from 'slate-history'
|
||||
import { css } from 'emotion'
|
||||
import { css } from '@emotion/css'
|
||||
|
||||
import RichTextEditor from './richtext'
|
||||
import { Button, Icon, Toolbar } from '../components'
|
||||
|
@@ -9,7 +9,7 @@ import {
|
||||
Descendant,
|
||||
Range,
|
||||
} from 'slate'
|
||||
import { css } from 'emotion'
|
||||
import { css } from '@emotion/css'
|
||||
import { withHistory } from 'slate-history'
|
||||
|
||||
import { Button, Icon, Menu, Portal } from '../components'
|
||||
|
@@ -12,7 +12,7 @@ import {
|
||||
ReactEditor,
|
||||
} from 'slate-react'
|
||||
import { withHistory } from 'slate-history'
|
||||
import { css } from 'emotion'
|
||||
import { css } from '@emotion/css'
|
||||
|
||||
import { Button, Icon, Toolbar } from '../components'
|
||||
import { ImageElement } from './custom-types'
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import React, { useState, useMemo } from 'react'
|
||||
import isUrl from 'is-url'
|
||||
import { isKeyHotkey } from 'is-hotkey'
|
||||
import { css } from 'emotion'
|
||||
import { css } from '@emotion/css'
|
||||
import { Editable, withReact, useSlate, useSelected } from 'slate-react'
|
||||
import * as SlateReact from 'slate-react'
|
||||
import {
|
||||
|
@@ -3,7 +3,7 @@ import React, { useState, useCallback, useMemo } from 'react'
|
||||
import { Slate, Editable, withReact } from 'slate-react'
|
||||
import { Text, createEditor, Element, Descendant } from 'slate'
|
||||
import { withHistory } from 'slate-history'
|
||||
import { css } from 'emotion'
|
||||
import { css } from '@emotion/css'
|
||||
|
||||
// eslint-disable-next-line
|
||||
;Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"}],title:[{pattern:/\w+.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])([\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^[*_]|[*_]$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.util.clone(Prism.languages.markdown.url),Prism.languages.markdown.italic.inside.url=Prism.util.clone(Prism.languages.markdown.url),Prism.languages.markdown.bold.inside.italic=Prism.util.clone(Prism.languages.markdown.italic),Prism.languages.markdown.italic.inside.bold=Prism.util.clone(Prism.languages.markdown.bold); // prettier-ignore
|
||||
|
@@ -2,7 +2,7 @@ import React, { useState, useCallback, useMemo } from 'react'
|
||||
import { jsx } from 'slate-hyperscript'
|
||||
import { Transforms, createEditor, Descendant } from 'slate'
|
||||
import { withHistory } from 'slate-history'
|
||||
import { css } from 'emotion'
|
||||
import { css } from '@emotion/css'
|
||||
import {
|
||||
Slate,
|
||||
Editable,
|
||||
|
@@ -2,7 +2,7 @@ import React, { useState, useMemo } from 'react'
|
||||
import { createEditor, Descendant } from 'slate'
|
||||
import { Slate, Editable, withReact } from 'slate-react'
|
||||
import { withHistory } from 'slate-history'
|
||||
import { css } from 'emotion'
|
||||
import { css } from '@emotion/css'
|
||||
import range from 'lodash/range'
|
||||
|
||||
/**
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import React, { useState, useCallback, useMemo } from 'react'
|
||||
import { Slate, Editable, withReact } from 'slate-react'
|
||||
import { Text, Descendant, createEditor } from 'slate'
|
||||
import { css } from 'emotion'
|
||||
import { css } from '@emotion/css'
|
||||
import { withHistory } from 'slate-history'
|
||||
|
||||
import { Icon, Toolbar } from '../components'
|
||||
|
Reference in New Issue
Block a user