1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-01-17 21:49:20 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 131 additions and 103 deletions

View File

@ -54,6 +54,7 @@
"@babel/runtime": "^7.7.4",
"@changesets/changelog-github": "^0.3.0",
"@changesets/cli": "^2.14.1",
"@emotion/css": "^11.7.1",
"@testing-library/cypress": "^8.0.0",
"@types/jest": "27.0.1",
"@types/lodash": "^4.14.149",
@ -68,7 +69,6 @@
"babel-plugin-dev-expression": "^0.2.2",
"babel-plugin-module-resolver": "^3.1.1",
"cypress": "^8.3.0",
"emotion": "^10.0.9",
"eslint": "^6.7.1",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-import": "^2.18.2",

View File

@ -1,6 +1,6 @@
import React, { Ref, PropsWithChildren } from 'react'
import ReactDOM from 'react-dom'
import { cx, css } from 'emotion'
import { cx, css } from '@emotion/css'
interface BaseProps {
className: string

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'

View File

@ -1,5 +1,5 @@
import React, { useState, PropsWithChildren, Ref } from 'react'
import { cx, css } from 'emotion'
import { cx, css } from '@emotion/css'
import Head from 'next/head'
import Link from 'next/link'
import dynamic from 'next/dynamic'

206
yarn.lock
View File

@ -268,6 +268,13 @@ __metadata:
languageName: node
linkType: hard
"@babel/helper-plugin-utils@npm:^7.16.7":
version: 7.16.7
resolution: "@babel/helper-plugin-utils@npm:7.16.7"
checksum: d08dd86554a186c2538547cd537552e4029f704994a9201d41d82015c10ed7f58f9036e8d1527c3760f042409163269d308b0b3706589039c5f1884619c6d4ce
languageName: node
linkType: hard
"@babel/helper-remap-async-to-generator@npm:^7.14.5":
version: 7.14.5
resolution: "@babel/helper-remap-async-to-generator@npm:7.14.5"
@ -675,6 +682,17 @@ __metadata:
languageName: node
linkType: hard
"@babel/plugin-syntax-jsx@npm:^7.12.13":
version: 7.16.7
resolution: "@babel/plugin-syntax-jsx@npm:7.16.7"
dependencies:
"@babel/helper-plugin-utils": ^7.16.7
peerDependencies:
"@babel/core": ^7.0.0-0
checksum: cd9b0e53c50e8ddb0afaf0f42e0b221a94e4f59aee32a591364266a31195c48cac5fef288d02c1c935686bda982d2e0f1ed61cceb995fc9f6fb09ef5ebecdd2b
languageName: node
linkType: hard
"@babel/plugin-syntax-jsx@npm:^7.14.5":
version: 7.14.5
resolution: "@babel/plugin-syntax-jsx@npm:7.14.5"
@ -1419,6 +1437,15 @@ __metadata:
languageName: node
linkType: hard
"@babel/runtime@npm:^7.13.10":
version: 7.16.7
resolution: "@babel/runtime@npm:7.16.7"
dependencies:
regenerator-runtime: ^0.13.4
checksum: 47912f0aaacd1cab2e2552aaf3e6eaffbcaf2d5ac9b07a89a12ac0d42029cb92c070b0d16f825e4277c4a34677c54d8ffe85e1f7c6feb57de58f700eec67ce2f
languageName: node
linkType: hard
"@babel/template@npm:^7.14.5, @babel/template@npm:^7.3.3":
version: 7.14.5
resolution: "@babel/template@npm:7.14.5"
@ -1757,74 +1784,108 @@ __metadata:
languageName: node
linkType: hard
"@emotion/cache@npm:^10.0.27":
version: 10.0.29
resolution: "@emotion/cache@npm:10.0.29"
"@emotion/babel-plugin@npm:^11.7.1":
version: 11.7.2
resolution: "@emotion/babel-plugin@npm:11.7.2"
dependencies:
"@emotion/sheet": 0.9.4
"@emotion/stylis": 0.8.5
"@emotion/utils": 0.11.3
"@emotion/weak-memoize": 0.2.5
checksum: 78b37fb0c2e513c90143a927abef229e995b6738ef8a92ce17abe2ed409b38859ddda7c14d7f4854d6f4e450b6db50231532f53a7fec4903d7ae775b2ae3fd64
"@babel/helper-module-imports": ^7.12.13
"@babel/plugin-syntax-jsx": ^7.12.13
"@babel/runtime": ^7.13.10
"@emotion/hash": ^0.8.0
"@emotion/memoize": ^0.7.5
"@emotion/serialize": ^1.0.2
babel-plugin-macros: ^2.6.1
convert-source-map: ^1.5.0
escape-string-regexp: ^4.0.0
find-root: ^1.1.0
source-map: ^0.5.7
stylis: 4.0.13
peerDependencies:
"@babel/core": ^7.0.0
checksum: eb9607356663c3e158b91ae7b8fde7335c74e6302d1671da1ca0b34142f762e1354bac8cb0bdf5baedf1278912eeea01e103b8f5c59ee107746d1b03f56aa664
languageName: node
linkType: hard
"@emotion/hash@npm:0.8.0":
"@emotion/cache@npm:^11.7.1":
version: 11.7.1
resolution: "@emotion/cache@npm:11.7.1"
dependencies:
"@emotion/memoize": ^0.7.4
"@emotion/sheet": ^1.1.0
"@emotion/utils": ^1.0.0
"@emotion/weak-memoize": ^0.2.5
stylis: 4.0.13
checksum: cf7aa8fe3bacfdedcda94b53e76a7635e122043439715fcfbf7f1a81340cfe6099a59134481a03ec3e0437466566d18528577d1e6ea92f5b98c372b8b38a8f35
languageName: node
linkType: hard
"@emotion/css@npm:^11.7.1":
version: 11.7.1
resolution: "@emotion/css@npm:11.7.1"
dependencies:
"@emotion/babel-plugin": ^11.7.1
"@emotion/cache": ^11.7.1
"@emotion/serialize": ^1.0.0
"@emotion/sheet": ^1.0.3
"@emotion/utils": ^1.0.0
peerDependencies:
"@babel/core": ^7.0.0
peerDependenciesMeta:
"@babel/core":
optional: true
checksum: ac1f56656f33bdb6539cb4ca941532d8a155167296acdc7d0f820e1a4c679cee59f4b3456e79e1c1f6a493a1f7c6c62fb6ae29a56a51a0bf531374f9b2838967
languageName: node
linkType: hard
"@emotion/hash@npm:^0.8.0":
version: 0.8.0
resolution: "@emotion/hash@npm:0.8.0"
checksum: 4b35d88a97e67275c1d990c96d3b0450451d089d1508619488fc0acb882cb1ac91e93246d471346ebd1b5402215941ef4162efe5b51534859b39d8b3a0e3ffaa
languageName: node
linkType: hard
"@emotion/memoize@npm:0.7.4":
version: 0.7.4
resolution: "@emotion/memoize@npm:0.7.4"
checksum: 4e3920d4ec95995657a37beb43d3f4b7d89fed6caa2b173a4c04d10482d089d5c3ea50bbc96618d918b020f26ed6e9c4026bbd45433566576c1f7b056c3271dc
"@emotion/memoize@npm:^0.7.4, @emotion/memoize@npm:^0.7.5":
version: 0.7.5
resolution: "@emotion/memoize@npm:0.7.5"
checksum: 83da8d4a7649a92c72f960817692bc6be13cc13e107b9f7e878d63766525ed4402881bfeb3cda61145c050281e7e260f114a0a2870515527346f2ef896b915b3
languageName: node
linkType: hard
"@emotion/serialize@npm:^0.11.15, @emotion/serialize@npm:^0.11.16":
version: 0.11.16
resolution: "@emotion/serialize@npm:0.11.16"
"@emotion/serialize@npm:^1.0.0, @emotion/serialize@npm:^1.0.2":
version: 1.0.2
resolution: "@emotion/serialize@npm:1.0.2"
dependencies:
"@emotion/hash": 0.8.0
"@emotion/memoize": 0.7.4
"@emotion/unitless": 0.7.5
"@emotion/utils": 0.11.3
csstype: ^2.5.7
checksum: 2949832fab9d803e6236f2af6aad021c09c6b6722ae910b06b4ec3bfb84d77cbecfe3eab9a7dcc269ac73e672ef4b696c7836825931670cb110731712e331438
"@emotion/hash": ^0.8.0
"@emotion/memoize": ^0.7.4
"@emotion/unitless": ^0.7.5
"@emotion/utils": ^1.0.0
csstype: ^3.0.2
checksum: ff84fbe09ec06e7ad3deaef5c5b5ea6af6a522e8efe49c2b398b875d06872626284a83b6b18b7f777750c94264a61e7924157d869d9bca2f675731bbb91a6055
languageName: node
linkType: hard
"@emotion/sheet@npm:0.9.4":
version: 0.9.4
resolution: "@emotion/sheet@npm:0.9.4"
checksum: 53bb833b4bb69ea2af04e1ecad164f78fb2614834d2820f584c909686a8e047c44e96a6e824798c5c558e6d95e10772454a9e5c473c5dbe0d198e50deb2815bc
"@emotion/sheet@npm:^1.0.3, @emotion/sheet@npm:^1.1.0":
version: 1.1.0
resolution: "@emotion/sheet@npm:1.1.0"
checksum: a4b74e16a8fea1157413efe4904f5f679d724323cb605d66d20a0b98744422f5d411fca927ceb52e4de454a0a819c5273ca9496db9f011b4ecd17b9f1b212007
languageName: node
linkType: hard
"@emotion/stylis@npm:0.8.5":
version: 0.8.5
resolution: "@emotion/stylis@npm:0.8.5"
checksum: 67ff5958449b2374b329fb96e83cb9025775ffe1e79153b499537c6c8b2eb64b77f32d7b5d004d646973662356ceb646afd9269001b97c54439fceea3203ce65
languageName: node
linkType: hard
"@emotion/unitless@npm:0.7.5":
"@emotion/unitless@npm:^0.7.5":
version: 0.7.5
resolution: "@emotion/unitless@npm:0.7.5"
checksum: f976e5345b53fae9414a7b2e7a949aa6b52f8bdbcc84458b1ddc0729e77ba1d1dfdff9960e0da60183877873d3a631fa24d9695dd714ed94bcd3ba5196586a6b
languageName: node
linkType: hard
"@emotion/utils@npm:0.11.3":
version: 0.11.3
resolution: "@emotion/utils@npm:0.11.3"
checksum: 9c4204bda84f9acd153a9be9478a83f9baa74d5d7a4c21882681c4d1b86cd113b84540cb1f92e1c30313b5075f024da2658dbc553f5b00776ef9b6ec7991c0c9
"@emotion/utils@npm:^1.0.0":
version: 1.0.0
resolution: "@emotion/utils@npm:1.0.0"
checksum: 3ce8048441a915447d9ef51eb6d1d4cbcce8c8d1647bc7a23333ce2fb2249e74cf9471670d6f49a716e93ff633c9e7a6633517698e17391aebfc40c9d0cabcc0
languageName: node
linkType: hard
"@emotion/weak-memoize@npm:0.2.5":
"@emotion/weak-memoize@npm:^0.2.5":
version: 0.2.5
resolution: "@emotion/weak-memoize@npm:0.2.5"
checksum: 27d402b0c683b94658220b6d47840346ee582329ca2a15ec9c233492e0f1a27687ccb233b76eedc922f2e185e444cc89f7b97a81a1d3e5ae9f075bab08e965ea
@ -4403,24 +4464,6 @@ __metadata:
languageName: node
linkType: hard
"babel-plugin-emotion@npm:^10.0.27":
version: 10.2.2
resolution: "babel-plugin-emotion@npm:10.2.2"
dependencies:
"@babel/helper-module-imports": ^7.0.0
"@emotion/hash": 0.8.0
"@emotion/memoize": 0.7.4
"@emotion/serialize": ^0.11.16
babel-plugin-macros: ^2.0.0
babel-plugin-syntax-jsx: ^6.18.0
convert-source-map: ^1.5.0
escape-string-regexp: ^1.0.5
find-root: ^1.1.0
source-map: ^0.5.7
checksum: 763f38c67ffbe7d091691d68c74686ba478296cc24716699fb5b0feddce1b1b47878a20b0bbe2aa4dea17f41074ead4deae7935d2cf6823638766709812c5b40
languageName: node
linkType: hard
"babel-plugin-istanbul@npm:^6.0.0":
version: 6.0.0
resolution: "babel-plugin-istanbul@npm:6.0.0"
@ -4446,7 +4489,7 @@ __metadata:
languageName: node
linkType: hard
"babel-plugin-macros@npm:^2.0.0":
"babel-plugin-macros@npm:^2.6.1":
version: 2.8.0
resolution: "babel-plugin-macros@npm:2.8.0"
dependencies:
@ -4506,7 +4549,7 @@ __metadata:
languageName: node
linkType: hard
"babel-plugin-syntax-jsx@npm:6.18.0, babel-plugin-syntax-jsx@npm:^6.18.0":
"babel-plugin-syntax-jsx@npm:6.18.0":
version: 6.18.0
resolution: "babel-plugin-syntax-jsx@npm:6.18.0"
checksum: 0c7ce5b81d6cfc01a7dd7a76a9a8f090ee02ba5c890310f51217ef1a7e6163fb7848994bbc14fd560117892e82240df9c7157ad0764da67ca5f2afafb73a7d27
@ -5894,18 +5937,6 @@ __metadata:
languageName: node
linkType: hard
"create-emotion@npm:^10.0.27":
version: 10.0.27
resolution: "create-emotion@npm:10.0.27"
dependencies:
"@emotion/cache": ^10.0.27
"@emotion/serialize": ^0.11.15
"@emotion/sheet": 0.9.4
"@emotion/utils": 0.11.3
checksum: 6838f6fe0a3e8d6a7a354685f1ffed6a23f28e74ce4bcdd045882f8e007715dc61596bddc05937cdfd67581eb66a697621a6d01c1a7357b85a816fddc22203fe
languageName: node
linkType: hard
"create-hash@npm:^1.1.0, create-hash@npm:^1.1.2, create-hash@npm:^1.2.0":
version: 1.2.0
resolution: "create-hash@npm:1.2.0"
@ -6039,13 +6070,6 @@ __metadata:
languageName: node
linkType: hard
"csstype@npm:^2.5.7":
version: 2.6.17
resolution: "csstype@npm:2.6.17"
checksum: 6eee5cf81a4b1b2f0e8707b4accd7504f7cceb4b5a496d58c6e4fcea1a70c1443a975e45d722c892d372ffe788fa278ddfe4d70c5f881375f34e48bb99c70ecc
languageName: node
linkType: hard
"csstype@npm:^3.0.2":
version: 3.0.8
resolution: "csstype@npm:3.0.8"
@ -6659,16 +6683,6 @@ __metadata:
languageName: node
linkType: hard
"emotion@npm:^10.0.9":
version: 10.0.27
resolution: "emotion@npm:10.0.27"
dependencies:
babel-plugin-emotion: ^10.0.27
create-emotion: ^10.0.27
checksum: e925a6ae323e77df7fd3064004c16d37a150c838d5fbf96b50075e5176315d0e4b8b6d60ca036fa767c0eabecbe941ec79382f4d3a392d9a06f84b6039d0af49
languageName: node
linkType: hard
"encoding@npm:0.1.13, encoding@npm:^0.1.11, encoding@npm:^0.1.12":
version: 0.1.13
resolution: "encoding@npm:0.1.13"
@ -6826,6 +6840,13 @@ __metadata:
languageName: node
linkType: hard
"escape-string-regexp@npm:^4.0.0":
version: 4.0.0
resolution: "escape-string-regexp@npm:4.0.0"
checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5
languageName: node
linkType: hard
"escodegen@npm:^2.0.0":
version: 2.0.0
resolution: "escodegen@npm:2.0.0"
@ -14351,6 +14372,7 @@ resolve@^2.0.0-next.3:
"@babel/runtime": ^7.7.4
"@changesets/changelog-github": ^0.3.0
"@changesets/cli": ^2.14.1
"@emotion/css": ^11.7.1
"@testing-library/cypress": ^8.0.0
"@types/jest": 27.0.1
"@types/lodash": ^4.14.149
@ -14365,7 +14387,6 @@ resolve@^2.0.0-next.3:
babel-plugin-dev-expression: ^0.2.2
babel-plugin-module-resolver: ^3.1.1
cypress: ^8.3.0
emotion: ^10.0.9
eslint: ^6.7.1
eslint-config-prettier: ^6.7.0
eslint-plugin-import: ^2.18.2
@ -15252,6 +15273,13 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"stylis@npm:4.0.13":
version: 4.0.13
resolution: "stylis@npm:4.0.13"
checksum: 8ea7a87028b6383c6a982231c4b5b6150031ce028e0fdaf7b2ace82253d28a8af50cc5a9da8a421d3c7c4441592f393086e332795add672aa4a825f0fe3713a3
languageName: node
linkType: hard
"supports-color@npm:6.0.0":
version: 6.0.0
resolution: "supports-color@npm:6.0.0"