1
0
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:
Dylan Schiemann
2022-01-11 15:36:04 +00:00
committed by GitHub
parent 345b8fc9e8
commit ce1e096df7
14 changed files with 131 additions and 103 deletions

View File

@@ -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[] = [

View File

@@ -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`

View File

@@ -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'

View File

@@ -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'

View File

@@ -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'

View File

@@ -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 {

View File

@@ -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

View File

@@ -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,

View File

@@ -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'
/**

View File

@@ -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'