diff --git a/.babelrc b/.babelrc index 38611bd..9c21090 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,6 @@ { - "presets": [["@babel/preset-env", { "targets": { "esmodules": true } }]] + "presets": [ + ["@babel/preset-env", { "targets": { "esmodules": true } }], + "@babel/preset-react" + ] } diff --git a/package-lock.json b/package-lock.json index 6f2058c..c9cef56 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,22 +10,22 @@ "license": "MIT", "dependencies": { "@excalidraw/excalidraw": "0.11.0", - "@lexical/clipboard": "0.3.1", - "@lexical/code": "0.3.1", - "@lexical/file": "0.3.1", - "@lexical/hashtag": "0.3.1", - "@lexical/link": "0.3.1", - "@lexical/list": "0.3.1", - "@lexical/mark": "0.3.1", - "@lexical/overflow": "0.3.1", - "@lexical/plain-text": "0.3.1", - "@lexical/react": "0.3.1", - "@lexical/rich-text": "0.3.1", - "@lexical/selection": "0.3.1", - "@lexical/table": "0.3.1", - "@lexical/utils": "0.3.1", + "@lexical/clipboard": "0.3.8", + "@lexical/code": "0.3.8", + "@lexical/file": "0.3.8", + "@lexical/hashtag": "0.3.8", + "@lexical/link": "0.3.8", + "@lexical/list": "0.3.8", + "@lexical/mark": "0.3.8", + "@lexical/overflow": "0.3.8", + "@lexical/plain-text": "0.3.8", + "@lexical/react": "0.3.8", + "@lexical/rich-text": "0.3.8", + "@lexical/selection": "0.3.8", + "@lexical/table": "0.3.8", + "@lexical/utils": "0.3.8", "katex": "^0.15.2", - "lexical": "^0.3.1", + "lexical": "0.3.8", "use-child": "^1.0.0", "utility-types": "^3.10.0", "y-websocket": ">=1.3.x", @@ -40,6 +40,9 @@ "@storybook/addon-links": "^6.5.4", "@storybook/addons": "^6.5.4", "@storybook/react": "^6.5.4", + "@storybook/testing-react": "^1.3.0", + "@testing-library/jest-dom": "^5.16.4", + "@testing-library/react": "^13.3.0", "@types/intl": "^1.2.0", "@types/react": "^18.0.9", "@types/react-dom": "^18.0.4", @@ -3867,240 +3870,244 @@ } }, "node_modules/@lexical/clipboard": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/clipboard/-/clipboard-0.3.1.tgz", - "integrity": "sha512-7tGpHMGszCS+Wf1dXlnBGqxLGH2VE8Npv0Kbet8nHPDGia+UWmXOb6+uVyEOdFA5chZZ8+845+r58ZcgYEY8ZA==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/clipboard/-/clipboard-0.3.8.tgz", + "integrity": "sha512-fYYSduSwMq+XUT15ygnDxdscdzRnnSrBOHZFqAWi1qeQl/mhyE2IfOQH+settVyHKq3sSlBn+bRaiGoro/gwvw==", "dependencies": { - "@lexical/html": "0.3.1", - "@lexical/selection": "0.3.1", - "@lexical/utils": "0.3.1" + "@lexical/html": "0.3.8", + "@lexical/list": "0.3.8", + "@lexical/selection": "0.3.8", + "@lexical/utils": "0.3.8" }, "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/code": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/code/-/code-0.3.1.tgz", - "integrity": "sha512-/K+r4FMKYEcgUwnkZLVbaZBvkqbgBW8soAa0geMXSTQhQX+GCSSHxrjBB+jep4rfoqqW6ZKxcrY6kxI8Drtg5w==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/code/-/code-0.3.8.tgz", + "integrity": "sha512-W2A21Jh83FEPKeObqiVx8NNMp/I5Ev2xsqBaKrikRKqyPesub4dr98CMM/s8+PANpr7VQVdMABydbGkMvmKmhQ==", "dependencies": { - "@lexical/utils": "0.3.1", + "@lexical/utils": "0.3.8", "prismjs": "^1.27.0" }, "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/dragon": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/dragon/-/dragon-0.3.1.tgz", - "integrity": "sha512-M7R8cgJ6aMa2WtE13yMe1BsfCQArotucMkdbngxCChwvKIIMT5zm1wSpFDoImoJj87erXowB6BkIMEhuVTJTIQ==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/dragon/-/dragon-0.3.8.tgz", + "integrity": "sha512-B/Q9GaGYCDFuOIQM79lKTWdEu0noRdvc7vrgXP0uRV3XWaKGSHO+LjjCN5P0ZpFQ6Fq4GLDfVTXP7qadGNOPyA==", "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/file": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/file/-/file-0.3.1.tgz", - "integrity": "sha512-kth/gUC1a6OBaZwBSqBBTZn0c+3rIMe9I05Xa1640Cn2YpT9ciQOvZwtfEEla0QBnDJezH/YUQRxSj+owEtXyw==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/file/-/file-0.3.8.tgz", + "integrity": "sha512-sfw0To+mm0LTroXUGWkuffiIiba0q3DgsEL91DdvQeds7Jy4s2yOrQlKwJF7H2rzClVrqPQaicIPFyqMznA7cQ==", "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/hashtag": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/hashtag/-/hashtag-0.3.1.tgz", - "integrity": "sha512-SkQN1M1C/HRV/MRlIDWPW3NldFmM3/HVKxN4qWHe9d+wouF4pcXwJlrumJsr6uG6qcr8jAJsvmVxnhwTdl0x/w==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/hashtag/-/hashtag-0.3.8.tgz", + "integrity": "sha512-Y7pIknL1IPDLax6buxtarIDgCun84wQujJVt7swhO7ufnCndVy1C0UvWt0wGRFEeyW8VKkxGMJgaxNk16LnhyQ==", "dependencies": { - "@lexical/utils": "0.3.1" + "@lexical/utils": "0.3.8" }, "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/history": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/history/-/history-0.3.1.tgz", - "integrity": "sha512-zYnxBC0WDLsyHaa936+N9sRUDZAliDsdW+QBGW+OU9/kI6FBW2r7wzjIw3pg1PSZM6PMMKsChBmw5xRoaEpqhg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/history/-/history-0.3.8.tgz", + "integrity": "sha512-xRo6Kfhj1QiI0RDQ8tWFdjX7krUO9b3LJYQE/p3mbjqV/jXRWURjH+Y3ImFzmgBFS+sQhmSceZsOuEdTn4nwFw==", "dependencies": { - "@lexical/utils": "0.3.1" + "@lexical/utils": "0.3.8" }, "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/html": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/html/-/html-0.3.1.tgz", - "integrity": "sha512-kt4fLRDpf3uX1GqY4DtYBj6q0lq6oHVG00zalrck4PQOUx17adI4gsfGZnCupdfgRvrOxXFREIxH0m3B62mC0g==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/html/-/html-0.3.8.tgz", + "integrity": "sha512-rJ9xAYfAIFk4lJUJjOZO1T4RDRUDWhSqdzZ7FghGWHhQ/+mkX1Y9H5x3c+ozWUie4GGkKDPH2/Uhglvcrpn64A==", + "dependencies": { + "@lexical/selection": "0.3.8" + }, "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/link": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/link/-/link-0.3.1.tgz", - "integrity": "sha512-8+yOOX+OcJ6aF6QtruGyYRdo/IDnirke2ph+hYZEHH4FpycbsVLYFyNeeIe0ydSu5HkmuYEWstmPfHzrW9qYHg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/link/-/link-0.3.8.tgz", + "integrity": "sha512-k5rx10lwyZgU9wiA0dxaST9yb8vDZttScr8krFkrdHRiRbFZ+FevxcpOZDGTUc3vQY6n5fdfRUWUSlXFYu9WzA==", "dependencies": { - "@lexical/utils": "0.3.1" + "@lexical/utils": "0.3.8" }, "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/list": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/list/-/list-0.3.1.tgz", - "integrity": "sha512-GmOiaqCIF++0UMPNAZAfHTI3BCKHxGdXiZIPLLKoItBNibtHP9TTY8+xHC+97HANJF2Arqm0gfAgaPs/HYKc0A==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/list/-/list-0.3.8.tgz", + "integrity": "sha512-Qajk9HBwuYVyYJho0R5ym9GeztJPY2v3jTzOv0Md9qNlXP0b+Pnr+4qK+j/wtGDh7X/pJ3KyQ0nh3uqLSzhHPg==", "dependencies": { - "@lexical/utils": "0.3.1" + "@lexical/utils": "0.3.8" }, "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/mark": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/mark/-/mark-0.3.1.tgz", - "integrity": "sha512-aIUisnGAxbUK8wQcUKS2zfmCIgfCs2h0nFRu4Yo8Db4zFhh1UZEi+1D6qX4cU/pu9N8DbkbGvXVZyQSR+rX4Jg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/mark/-/mark-0.3.8.tgz", + "integrity": "sha512-lnBzXlsTsZcKN2+yDembxWPWpN/zt6m/EElYddOjFmU1jcUMrlqSon5SHulWFu+TYfc10sw5WchHTmNnfRBMig==", "dependencies": { - "@lexical/utils": "0.3.1" + "@lexical/utils": "0.3.8" }, "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/markdown": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/markdown/-/markdown-0.3.1.tgz", - "integrity": "sha512-Gip4g9lvefVkjPGXt91pnhEYEEdUqKbFGW0FeD1B1AepQaHqI8ahw3NrY6JboIRdo1DRbyKCA6GtBx5WK3yr9Q==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/markdown/-/markdown-0.3.8.tgz", + "integrity": "sha512-5PCYccbT++In8LHMH6/u9DVFbY1QMGC7gmU63sa1AV8pgK+2zFT+X5gPdwuDpbOertI06t/LBLNAXhi//OP3hQ==", "dependencies": { - "@lexical/code": "0.3.1", - "@lexical/link": "0.3.1", - "@lexical/list": "0.3.1", - "@lexical/rich-text": "0.3.1", - "@lexical/text": "0.3.1", - "@lexical/utils": "0.3.1" + "@lexical/code": "0.3.8", + "@lexical/link": "0.3.8", + "@lexical/list": "0.3.8", + "@lexical/rich-text": "0.3.8", + "@lexical/text": "0.3.8", + "@lexical/utils": "0.3.8" }, "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/offset": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/offset/-/offset-0.3.1.tgz", - "integrity": "sha512-1yNAFVHWGVt0nyRGlCNuSNfF80C52aE8cONAoLamtS8UFB2tW6/5ZyGdgK8AoGxqeOd6M4orJhRSgWq082b7Tg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/offset/-/offset-0.3.8.tgz", + "integrity": "sha512-U1AQyDx28KIZYJQ78hf9oPbcLq3G3HnT8VNIZGjl38uzgfqqdB9CHsMgmS5n8FzAcf+iQWditOKtAFLTT34iLg==", "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/overflow": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/overflow/-/overflow-0.3.1.tgz", - "integrity": "sha512-dGsRGlKcx5a5VT5oiZ1NY0XJjQ5Xqfmc4oaNzcoHO/jsYwA7673lSGd1GpX+vOPVyqqHAsjfiniRu38uJljm4g==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/overflow/-/overflow-0.3.8.tgz", + "integrity": "sha512-6Ot3H/Mnt62BtRKDCVDJ0zKFVrwvK9vvno5Z/8uh/jwhVhk0j9gpnVZnbs0sIB1+hEukNNba7+wgQA+LWZoTjA==", "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/plain-text": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/plain-text/-/plain-text-0.3.1.tgz", - "integrity": "sha512-iETAtmH3LR1/DTlB9sdlXls3uSY6Gss2V1XRHHSCvnRIZSfJGQzO4/ljykq9fA8cvvDAX5QKfIj3fypy/D/3vg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/plain-text/-/plain-text-0.3.8.tgz", + "integrity": "sha512-sOh6MUbAX9gq3EglqFDkCeZRK+zYWL5okcA7j62ycdmLoVEqoTntiIU20sh9YIuAihwLjQxDZ9StDxlsUalLoQ==", "peerDependencies": { - "@lexical/clipboard": "0.3.1", - "@lexical/selection": "0.3.1", - "@lexical/utils": "0.3.1", - "lexical": "0.3.1" + "@lexical/clipboard": "0.3.8", + "@lexical/selection": "0.3.8", + "@lexical/utils": "0.3.8", + "lexical": "0.3.8" } }, "node_modules/@lexical/react": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/react/-/react-0.3.1.tgz", - "integrity": "sha512-IwbNcnAPx3WR7KLPayNAinDpgxNT7CJTPeL1KJKXvqS+u/CR4JVJ8V8YCO4zliPM7T5E7RNa7EgCa38gv7LunQ==", - "dependencies": { - "@lexical/clipboard": "0.3.1", - "@lexical/code": "0.3.1", - "@lexical/dragon": "0.3.1", - "@lexical/hashtag": "0.3.1", - "@lexical/history": "0.3.1", - "@lexical/link": "0.3.1", - "@lexical/list": "0.3.1", - "@lexical/mark": "0.3.1", - "@lexical/markdown": "0.3.1", - "@lexical/overflow": "0.3.1", - "@lexical/plain-text": "0.3.1", - "@lexical/rich-text": "0.3.1", - "@lexical/selection": "0.3.1", - "@lexical/table": "0.3.1", - "@lexical/text": "0.3.1", - "@lexical/utils": "0.3.1", - "@lexical/yjs": "0.3.1" - }, - "peerDependencies": { - "lexical": "0.3.1", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/react/-/react-0.3.8.tgz", + "integrity": "sha512-29qo81K3ZZ+J/SESrLorIjwuz1JxnQB7pUEXsy2+bonkiZkqspmydYaxVozBJFLb42h+hvDP4JvXer88tJLu8g==", + "dependencies": { + "@lexical/clipboard": "0.3.8", + "@lexical/code": "0.3.8", + "@lexical/dragon": "0.3.8", + "@lexical/hashtag": "0.3.8", + "@lexical/history": "0.3.8", + "@lexical/link": "0.3.8", + "@lexical/list": "0.3.8", + "@lexical/mark": "0.3.8", + "@lexical/markdown": "0.3.8", + "@lexical/overflow": "0.3.8", + "@lexical/plain-text": "0.3.8", + "@lexical/rich-text": "0.3.8", + "@lexical/selection": "0.3.8", + "@lexical/table": "0.3.8", + "@lexical/text": "0.3.8", + "@lexical/utils": "0.3.8", + "@lexical/yjs": "0.3.8" + }, + "peerDependencies": { + "lexical": "0.3.8", "react": ">=17.x", "react-dom": ">=17.x" } }, "node_modules/@lexical/rich-text": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/rich-text/-/rich-text-0.3.1.tgz", - "integrity": "sha512-7vkL+B/IUIQ0aE+HzPYvUT1qOxAkQtiKZSo+YD3zxgKF0wfJDXxgCLJMpve5a9XabveyrO4i3h+V9eLfAkwe+g==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/rich-text/-/rich-text-0.3.8.tgz", + "integrity": "sha512-TCeaQaJs8AfSafZfn94i7Z+UPOMDNfTwOyjkcoZYY9QE46vPuUV+uhzFZpdJ9U199BPBUOhv8jf9mKDKiBfGqw==", "peerDependencies": { - "@lexical/clipboard": "0.3.1", - "@lexical/selection": "0.3.1", - "@lexical/utils": "0.3.1", - "lexical": "0.3.1" + "@lexical/clipboard": "0.3.8", + "@lexical/selection": "0.3.8", + "@lexical/utils": "0.3.8", + "lexical": "0.3.8" } }, "node_modules/@lexical/selection": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/selection/-/selection-0.3.1.tgz", - "integrity": "sha512-eOIp+NYIwXxgAkeVTajirkvfYZK84hYmF66GTO1Dr2YGfCEIf9jAIwGNIClXo8Ma6akYe5DBzGSPkSPdRm4ytg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/selection/-/selection-0.3.8.tgz", + "integrity": "sha512-8LKlWCfiPcH+ym/CQ66CscJJuO1dB+EsuIpa4jrYUcGE98xhAexSQ2Ezrab1qhE9dXoucice/0ikBzy87orXaw==", "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/table": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/table/-/table-0.3.1.tgz", - "integrity": "sha512-wGRBcTWA/Eg/vwbW5JYytcUpwC5hzhR8+akz1c7WsdBidLfL8B0hEhH1zB5Pjmj6U50iy8JuA5zd2XQfXmeALQ==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/table/-/table-0.3.8.tgz", + "integrity": "sha512-JaEOlZVgR6tUt0KDRdXt3VNO509je3ZCNY4/qK2G5pZf8K7nmgP8aAe/dluLDMbgzfyV9n+JhIsRWN4CzY+4Fg==", "dependencies": { - "@lexical/utils": "0.3.1" + "@lexical/utils": "0.3.8" }, "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/text": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/text/-/text-0.3.1.tgz", - "integrity": "sha512-UgPBheNyxU1W1ZgAqlSw+i1gJNtgTTcac7wSKm4r9sCz5BOdV7tqEhpjGWiqCh6aHCWl0KBQdKwzejH2k6hizw==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/text/-/text-0.3.8.tgz", + "integrity": "sha512-TdImt1hmkCugOpS1hPJ8XXE4jV0fI98xfMlKew6jkxFtwEv+dUuGJMQYdBD4ixL4TcV4DReW1dhRRxRsuBq6IA==", "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/utils": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/utils/-/utils-0.3.1.tgz", - "integrity": "sha512-oGt459HUigO5nQdArJg0EhkIfQFVlIjvnHffkL/wy0Kq6xkqKQOgtqmqGR2G0dzHYRzQtvAjw1H/vacygR+uXg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/utils/-/utils-0.3.8.tgz", + "integrity": "sha512-LWLSNeBUBZnuG06in2LG9tzURZ8YQdP2oEu68BNE76Qkw7VMjvCZA6p2a2D4PbzxawSpmqsiqswk+PAAKbdcJw==", "dependencies": { - "@lexical/list": "0.3.1", - "@lexical/table": "0.3.1" + "@lexical/list": "0.3.8", + "@lexical/table": "0.3.8" }, "peerDependencies": { - "lexical": "0.3.1" + "lexical": "0.3.8" } }, "node_modules/@lexical/yjs": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/yjs/-/yjs-0.3.1.tgz", - "integrity": "sha512-44yRW+bOkIoJKZBIkJ8Q260a7Ll8kzH1XkAN+BQQg/VnDMD2XaDphfV5ISY1WzaNXCcnT7SZ6evW1q8Hbn4a6A==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/yjs/-/yjs-0.3.8.tgz", + "integrity": "sha512-ePukNrmwYlPqCGOGGlhYbOIRQ772Cor/7t5457zYlXrJR88wEOUEoxu8jSux1Yzt3B27lPxTJBgyUfUGObKkWw==", "dependencies": { - "@lexical/offset": "0.3.1" + "@lexical/offset": "0.3.8" }, "peerDependencies": { - "lexical": "0.3.1", + "lexical": "0.3.8", "yjs": ">=13.5.22" } }, @@ -7091,6 +7098,34 @@ "node": ">=8" } }, + "node_modules/@storybook/testing-react": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@storybook/testing-react/-/testing-react-1.3.0.tgz", + "integrity": "sha512-TfxzflxwBHSPhetWKuYt239t+1iN8gnnUN8OKo5UGtwwirghKQlApjH23QXW6j8YBqFhmq+yP29Oqf8HgKCFLw==", + "dev": true, + "dependencies": { + "@storybook/csf": "0.0.2--canary.87bc651.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@storybook/addons": ">=6.4.0", + "@storybook/client-api": ">=6.4.0", + "@storybook/preview-web": ">=6.4.0", + "@storybook/react": ">=6.4.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@storybook/testing-react/node_modules/@storybook/csf": { + "version": "0.0.2--canary.87bc651.0", + "resolved": "https://registry.npmjs.org/@storybook/csf/-/csf-0.0.2--canary.87bc651.0.tgz", + "integrity": "sha512-ajk1Uxa+rBpFQHKrCcTmJyQBXZ5slfwHVEaKlkuFaW77it8RgbPJp/ccna3sgoi8oZ7FkkOyvv1Ve4SmwFqRqw==", + "dev": true, + "dependencies": { + "lodash": "^4.17.15" + } + }, "node_modules/@storybook/theming": { "version": "6.5.9", "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-6.5.9.tgz", @@ -7141,6 +7176,265 @@ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/@testing-library/dom": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.14.0.tgz", + "integrity": "sha512-m8FOdUo77iMTwVRCyzWcqxlEIk+GnopbrRI15a0EaLbpZSCinIVI4kSQzWhkShK83GogvEFJSsHF3Ws0z1vrqA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^4.2.0", + "aria-query": "^5.0.0", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.4.4", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@testing-library/dom/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@testing-library/dom/node_modules/aria-query": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.0.0.tgz", + "integrity": "sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/@testing-library/dom/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@testing-library/dom/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@testing-library/dom/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@testing-library/dom/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/dom/node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@testing-library/dom/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@testing-library/dom/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, + "node_modules/@testing-library/dom/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/jest-dom": { + "version": "5.16.4", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.4.tgz", + "integrity": "sha512-Gy+IoFutbMQcky0k+bqqumXZ1cTGswLsFqmNLzNdSKkU9KGV2u9oXhukCbbJ9/LRPKiqwxEE8VpV/+YZlfkPUA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.9.2", + "@types/testing-library__jest-dom": "^5.9.1", + "aria-query": "^5.0.0", + "chalk": "^3.0.0", + "css": "^3.0.0", + "css.escape": "^1.5.1", + "dom-accessibility-api": "^0.5.6", + "lodash": "^4.17.15", + "redent": "^3.0.0" + }, + "engines": { + "node": ">=8", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/aria-query": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.0.0.tgz", + "integrity": "sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@testing-library/jest-dom/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/react": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-13.3.0.tgz", + "integrity": "sha512-DB79aA426+deFgGSjnf5grczDPiL4taK3hFaa+M5q7q20Kcve9eQottOG5kZ74KEr55v0tU2CQormSSDK87zYQ==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.12.5", + "@testing-library/dom": "^8.5.0", + "@types/react-dom": "^18.0.0" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" + } + }, "node_modules/@trysound/sax": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", @@ -7150,6 +7444,12 @@ "node": ">=10.13.0" } }, + "node_modules/@types/aria-query": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", + "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==", + "dev": true + }, "node_modules/@types/babel__core": { "version": "7.1.19", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", @@ -7466,6 +7766,15 @@ "integrity": "sha512-ipixuVrh2OdNmauvtT51o3d8z12p6LtFW9in7U79der/kwejjdNchQC5UMn5u/KxNoM7VHHOs/l8KS8uHxhODQ==", "dev": true }, + "node_modules/@types/testing-library__jest-dom": { + "version": "5.14.5", + "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.5.tgz", + "integrity": "sha512-SBwbxYoyPIvxHbeHxTZX2Pe/74F/tX2/D3mMvzabdeJ25bBojfW0TyB8BHrbq/9zaaKICJZjLP+8r6AeZMFCuQ==", + "dev": true, + "dependencies": { + "@types/jest": "*" + } + }, "node_modules/@types/uglify-js": { "version": "3.16.0", "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.16.0.tgz", @@ -11280,6 +11589,17 @@ "node": "*" } }, + "node_modules/css": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", + "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.4", + "source-map": "^0.6.1", + "source-map-resolve": "^0.6.0" + } + }, "node_modules/css-declaration-sorter": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.3.0.tgz", @@ -11431,6 +11751,12 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "dev": true + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -11965,6 +12291,12 @@ "node": ">=6.0.0" } }, + "node_modules/dom-accessibility-api": { + "version": "0.5.14", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.14.tgz", + "integrity": "sha512-NMt+m9zFMPZe0JcY9gN224Qvk6qLIdqex29clBvc/y75ZBX9YA9wNK3frsYvu2DI1xcCIwxwnX+TlsJ2DSOADg==", + "dev": true + }, "node_modules/dom-converter": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", @@ -20108,8 +20440,7 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { "version": "3.14.1", @@ -20658,9 +20989,9 @@ } }, "node_modules/lexical": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/lexical/-/lexical-0.3.5.tgz", - "integrity": "sha512-zi4OvEH7BFOl8NX27cjqbwJSm9qKCgtPw4JJrUfHgXVNCW5yMDV3rXSUW4KnCjeiXHKEi2E+dDk+awfKntroNg==" + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/lexical/-/lexical-0.3.8.tgz", + "integrity": "sha512-0OG/170nHV8UmBvxKGR5LoWwRGYmVmUcrzmUHpkJ7sDwwleqKOt5fQ/vjKqJ1g0cXwyGj9Fe/xauCgrVcFwSfA==" }, "node_modules/lib0": { "version": "0.2.51", @@ -20980,7 +21311,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -21043,6 +21373,15 @@ "integrity": "sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==", "optional": true }, + "node_modules/lz-string": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", + "integrity": "sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ==", + "dev": true, + "bin": { + "lz-string": "bin/bin.js" + } + }, "node_modules/magic-string": { "version": "0.25.9", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", @@ -24469,7 +24808,6 @@ "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", - "dev": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -24543,7 +24881,6 @@ "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", - "dev": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.0" @@ -26372,7 +26709,6 @@ "version": "0.23.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", - "dev": true, "dependencies": { "loose-envify": "^1.1.0" } @@ -33802,169 +34138,181 @@ } }, "@lexical/clipboard": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/clipboard/-/clipboard-0.3.1.tgz", - "integrity": "sha512-7tGpHMGszCS+Wf1dXlnBGqxLGH2VE8Npv0Kbet8nHPDGia+UWmXOb6+uVyEOdFA5chZZ8+845+r58ZcgYEY8ZA==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/clipboard/-/clipboard-0.3.8.tgz", + "integrity": "sha512-fYYSduSwMq+XUT15ygnDxdscdzRnnSrBOHZFqAWi1qeQl/mhyE2IfOQH+settVyHKq3sSlBn+bRaiGoro/gwvw==", "requires": { - "@lexical/html": "0.3.1", - "@lexical/selection": "0.3.1", - "@lexical/utils": "0.3.1" + "@lexical/html": "0.3.8", + "@lexical/list": "0.3.8", + "@lexical/selection": "0.3.8", + "@lexical/utils": "0.3.8" } }, "@lexical/code": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/code/-/code-0.3.1.tgz", - "integrity": "sha512-/K+r4FMKYEcgUwnkZLVbaZBvkqbgBW8soAa0geMXSTQhQX+GCSSHxrjBB+jep4rfoqqW6ZKxcrY6kxI8Drtg5w==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/code/-/code-0.3.8.tgz", + "integrity": "sha512-W2A21Jh83FEPKeObqiVx8NNMp/I5Ev2xsqBaKrikRKqyPesub4dr98CMM/s8+PANpr7VQVdMABydbGkMvmKmhQ==", "requires": { - "@lexical/utils": "0.3.1", + "@lexical/utils": "0.3.8", "prismjs": "^1.27.0" } }, "@lexical/dragon": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/dragon/-/dragon-0.3.1.tgz", - "integrity": "sha512-M7R8cgJ6aMa2WtE13yMe1BsfCQArotucMkdbngxCChwvKIIMT5zm1wSpFDoImoJj87erXowB6BkIMEhuVTJTIQ==" + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/dragon/-/dragon-0.3.8.tgz", + "integrity": "sha512-B/Q9GaGYCDFuOIQM79lKTWdEu0noRdvc7vrgXP0uRV3XWaKGSHO+LjjCN5P0ZpFQ6Fq4GLDfVTXP7qadGNOPyA==", + "requires": {} }, "@lexical/file": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/file/-/file-0.3.1.tgz", - "integrity": "sha512-kth/gUC1a6OBaZwBSqBBTZn0c+3rIMe9I05Xa1640Cn2YpT9ciQOvZwtfEEla0QBnDJezH/YUQRxSj+owEtXyw==" + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/file/-/file-0.3.8.tgz", + "integrity": "sha512-sfw0To+mm0LTroXUGWkuffiIiba0q3DgsEL91DdvQeds7Jy4s2yOrQlKwJF7H2rzClVrqPQaicIPFyqMznA7cQ==", + "requires": {} }, "@lexical/hashtag": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/hashtag/-/hashtag-0.3.1.tgz", - "integrity": "sha512-SkQN1M1C/HRV/MRlIDWPW3NldFmM3/HVKxN4qWHe9d+wouF4pcXwJlrumJsr6uG6qcr8jAJsvmVxnhwTdl0x/w==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/hashtag/-/hashtag-0.3.8.tgz", + "integrity": "sha512-Y7pIknL1IPDLax6buxtarIDgCun84wQujJVt7swhO7ufnCndVy1C0UvWt0wGRFEeyW8VKkxGMJgaxNk16LnhyQ==", "requires": { - "@lexical/utils": "0.3.1" + "@lexical/utils": "0.3.8" } }, "@lexical/history": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/history/-/history-0.3.1.tgz", - "integrity": "sha512-zYnxBC0WDLsyHaa936+N9sRUDZAliDsdW+QBGW+OU9/kI6FBW2r7wzjIw3pg1PSZM6PMMKsChBmw5xRoaEpqhg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/history/-/history-0.3.8.tgz", + "integrity": "sha512-xRo6Kfhj1QiI0RDQ8tWFdjX7krUO9b3LJYQE/p3mbjqV/jXRWURjH+Y3ImFzmgBFS+sQhmSceZsOuEdTn4nwFw==", "requires": { - "@lexical/utils": "0.3.1" + "@lexical/utils": "0.3.8" } }, "@lexical/html": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/html/-/html-0.3.1.tgz", - "integrity": "sha512-kt4fLRDpf3uX1GqY4DtYBj6q0lq6oHVG00zalrck4PQOUx17adI4gsfGZnCupdfgRvrOxXFREIxH0m3B62mC0g==" + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/html/-/html-0.3.8.tgz", + "integrity": "sha512-rJ9xAYfAIFk4lJUJjOZO1T4RDRUDWhSqdzZ7FghGWHhQ/+mkX1Y9H5x3c+ozWUie4GGkKDPH2/Uhglvcrpn64A==", + "requires": { + "@lexical/selection": "0.3.8" + } }, "@lexical/link": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/link/-/link-0.3.1.tgz", - "integrity": "sha512-8+yOOX+OcJ6aF6QtruGyYRdo/IDnirke2ph+hYZEHH4FpycbsVLYFyNeeIe0ydSu5HkmuYEWstmPfHzrW9qYHg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/link/-/link-0.3.8.tgz", + "integrity": "sha512-k5rx10lwyZgU9wiA0dxaST9yb8vDZttScr8krFkrdHRiRbFZ+FevxcpOZDGTUc3vQY6n5fdfRUWUSlXFYu9WzA==", "requires": { - "@lexical/utils": "0.3.1" + "@lexical/utils": "0.3.8" } }, "@lexical/list": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/list/-/list-0.3.1.tgz", - "integrity": "sha512-GmOiaqCIF++0UMPNAZAfHTI3BCKHxGdXiZIPLLKoItBNibtHP9TTY8+xHC+97HANJF2Arqm0gfAgaPs/HYKc0A==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/list/-/list-0.3.8.tgz", + "integrity": "sha512-Qajk9HBwuYVyYJho0R5ym9GeztJPY2v3jTzOv0Md9qNlXP0b+Pnr+4qK+j/wtGDh7X/pJ3KyQ0nh3uqLSzhHPg==", "requires": { - "@lexical/utils": "0.3.1" + "@lexical/utils": "0.3.8" } }, "@lexical/mark": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/mark/-/mark-0.3.1.tgz", - "integrity": "sha512-aIUisnGAxbUK8wQcUKS2zfmCIgfCs2h0nFRu4Yo8Db4zFhh1UZEi+1D6qX4cU/pu9N8DbkbGvXVZyQSR+rX4Jg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/mark/-/mark-0.3.8.tgz", + "integrity": "sha512-lnBzXlsTsZcKN2+yDembxWPWpN/zt6m/EElYddOjFmU1jcUMrlqSon5SHulWFu+TYfc10sw5WchHTmNnfRBMig==", "requires": { - "@lexical/utils": "0.3.1" + "@lexical/utils": "0.3.8" } }, "@lexical/markdown": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/markdown/-/markdown-0.3.1.tgz", - "integrity": "sha512-Gip4g9lvefVkjPGXt91pnhEYEEdUqKbFGW0FeD1B1AepQaHqI8ahw3NrY6JboIRdo1DRbyKCA6GtBx5WK3yr9Q==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/markdown/-/markdown-0.3.8.tgz", + "integrity": "sha512-5PCYccbT++In8LHMH6/u9DVFbY1QMGC7gmU63sa1AV8pgK+2zFT+X5gPdwuDpbOertI06t/LBLNAXhi//OP3hQ==", "requires": { - "@lexical/code": "0.3.1", - "@lexical/link": "0.3.1", - "@lexical/list": "0.3.1", - "@lexical/rich-text": "0.3.1", - "@lexical/text": "0.3.1", - "@lexical/utils": "0.3.1" + "@lexical/code": "0.3.8", + "@lexical/link": "0.3.8", + "@lexical/list": "0.3.8", + "@lexical/rich-text": "0.3.8", + "@lexical/text": "0.3.8", + "@lexical/utils": "0.3.8" } }, "@lexical/offset": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/offset/-/offset-0.3.1.tgz", - "integrity": "sha512-1yNAFVHWGVt0nyRGlCNuSNfF80C52aE8cONAoLamtS8UFB2tW6/5ZyGdgK8AoGxqeOd6M4orJhRSgWq082b7Tg==" + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/offset/-/offset-0.3.8.tgz", + "integrity": "sha512-U1AQyDx28KIZYJQ78hf9oPbcLq3G3HnT8VNIZGjl38uzgfqqdB9CHsMgmS5n8FzAcf+iQWditOKtAFLTT34iLg==", + "requires": {} }, "@lexical/overflow": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/overflow/-/overflow-0.3.1.tgz", - "integrity": "sha512-dGsRGlKcx5a5VT5oiZ1NY0XJjQ5Xqfmc4oaNzcoHO/jsYwA7673lSGd1GpX+vOPVyqqHAsjfiniRu38uJljm4g==" + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/overflow/-/overflow-0.3.8.tgz", + "integrity": "sha512-6Ot3H/Mnt62BtRKDCVDJ0zKFVrwvK9vvno5Z/8uh/jwhVhk0j9gpnVZnbs0sIB1+hEukNNba7+wgQA+LWZoTjA==", + "requires": {} }, "@lexical/plain-text": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/plain-text/-/plain-text-0.3.1.tgz", - "integrity": "sha512-iETAtmH3LR1/DTlB9sdlXls3uSY6Gss2V1XRHHSCvnRIZSfJGQzO4/ljykq9fA8cvvDAX5QKfIj3fypy/D/3vg==" + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/plain-text/-/plain-text-0.3.8.tgz", + "integrity": "sha512-sOh6MUbAX9gq3EglqFDkCeZRK+zYWL5okcA7j62ycdmLoVEqoTntiIU20sh9YIuAihwLjQxDZ9StDxlsUalLoQ==", + "requires": {} }, "@lexical/react": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/react/-/react-0.3.1.tgz", - "integrity": "sha512-IwbNcnAPx3WR7KLPayNAinDpgxNT7CJTPeL1KJKXvqS+u/CR4JVJ8V8YCO4zliPM7T5E7RNa7EgCa38gv7LunQ==", - "requires": { - "@lexical/clipboard": "0.3.1", - "@lexical/code": "0.3.1", - "@lexical/dragon": "0.3.1", - "@lexical/hashtag": "0.3.1", - "@lexical/history": "0.3.1", - "@lexical/link": "0.3.1", - "@lexical/list": "0.3.1", - "@lexical/mark": "0.3.1", - "@lexical/markdown": "0.3.1", - "@lexical/overflow": "0.3.1", - "@lexical/plain-text": "0.3.1", - "@lexical/rich-text": "0.3.1", - "@lexical/selection": "0.3.1", - "@lexical/table": "0.3.1", - "@lexical/text": "0.3.1", - "@lexical/utils": "0.3.1", - "@lexical/yjs": "0.3.1" + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/react/-/react-0.3.8.tgz", + "integrity": "sha512-29qo81K3ZZ+J/SESrLorIjwuz1JxnQB7pUEXsy2+bonkiZkqspmydYaxVozBJFLb42h+hvDP4JvXer88tJLu8g==", + "requires": { + "@lexical/clipboard": "0.3.8", + "@lexical/code": "0.3.8", + "@lexical/dragon": "0.3.8", + "@lexical/hashtag": "0.3.8", + "@lexical/history": "0.3.8", + "@lexical/link": "0.3.8", + "@lexical/list": "0.3.8", + "@lexical/mark": "0.3.8", + "@lexical/markdown": "0.3.8", + "@lexical/overflow": "0.3.8", + "@lexical/plain-text": "0.3.8", + "@lexical/rich-text": "0.3.8", + "@lexical/selection": "0.3.8", + "@lexical/table": "0.3.8", + "@lexical/text": "0.3.8", + "@lexical/utils": "0.3.8", + "@lexical/yjs": "0.3.8" } }, "@lexical/rich-text": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/rich-text/-/rich-text-0.3.1.tgz", - "integrity": "sha512-7vkL+B/IUIQ0aE+HzPYvUT1qOxAkQtiKZSo+YD3zxgKF0wfJDXxgCLJMpve5a9XabveyrO4i3h+V9eLfAkwe+g==" + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/rich-text/-/rich-text-0.3.8.tgz", + "integrity": "sha512-TCeaQaJs8AfSafZfn94i7Z+UPOMDNfTwOyjkcoZYY9QE46vPuUV+uhzFZpdJ9U199BPBUOhv8jf9mKDKiBfGqw==", + "requires": {} }, "@lexical/selection": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/selection/-/selection-0.3.1.tgz", - "integrity": "sha512-eOIp+NYIwXxgAkeVTajirkvfYZK84hYmF66GTO1Dr2YGfCEIf9jAIwGNIClXo8Ma6akYe5DBzGSPkSPdRm4ytg==" + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/selection/-/selection-0.3.8.tgz", + "integrity": "sha512-8LKlWCfiPcH+ym/CQ66CscJJuO1dB+EsuIpa4jrYUcGE98xhAexSQ2Ezrab1qhE9dXoucice/0ikBzy87orXaw==", + "requires": {} }, "@lexical/table": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/table/-/table-0.3.1.tgz", - "integrity": "sha512-wGRBcTWA/Eg/vwbW5JYytcUpwC5hzhR8+akz1c7WsdBidLfL8B0hEhH1zB5Pjmj6U50iy8JuA5zd2XQfXmeALQ==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/table/-/table-0.3.8.tgz", + "integrity": "sha512-JaEOlZVgR6tUt0KDRdXt3VNO509je3ZCNY4/qK2G5pZf8K7nmgP8aAe/dluLDMbgzfyV9n+JhIsRWN4CzY+4Fg==", "requires": { - "@lexical/utils": "0.3.1" + "@lexical/utils": "0.3.8" } }, "@lexical/text": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/text/-/text-0.3.1.tgz", - "integrity": "sha512-UgPBheNyxU1W1ZgAqlSw+i1gJNtgTTcac7wSKm4r9sCz5BOdV7tqEhpjGWiqCh6aHCWl0KBQdKwzejH2k6hizw==" + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/text/-/text-0.3.8.tgz", + "integrity": "sha512-TdImt1hmkCugOpS1hPJ8XXE4jV0fI98xfMlKew6jkxFtwEv+dUuGJMQYdBD4ixL4TcV4DReW1dhRRxRsuBq6IA==", + "requires": {} }, "@lexical/utils": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/utils/-/utils-0.3.1.tgz", - "integrity": "sha512-oGt459HUigO5nQdArJg0EhkIfQFVlIjvnHffkL/wy0Kq6xkqKQOgtqmqGR2G0dzHYRzQtvAjw1H/vacygR+uXg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/utils/-/utils-0.3.8.tgz", + "integrity": "sha512-LWLSNeBUBZnuG06in2LG9tzURZ8YQdP2oEu68BNE76Qkw7VMjvCZA6p2a2D4PbzxawSpmqsiqswk+PAAKbdcJw==", "requires": { - "@lexical/list": "0.3.1", - "@lexical/table": "0.3.1" + "@lexical/list": "0.3.8", + "@lexical/table": "0.3.8" } }, "@lexical/yjs": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@lexical/yjs/-/yjs-0.3.1.tgz", - "integrity": "sha512-44yRW+bOkIoJKZBIkJ8Q260a7Ll8kzH1XkAN+BQQg/VnDMD2XaDphfV5ISY1WzaNXCcnT7SZ6evW1q8Hbn4a6A==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@lexical/yjs/-/yjs-0.3.8.tgz", + "integrity": "sha512-ePukNrmwYlPqCGOGGlhYbOIRQ772Cor/7t5457zYlXrJR88wEOUEoxu8jSux1Yzt3B27lPxTJBgyUfUGObKkWw==", "requires": { - "@lexical/offset": "0.3.1" + "@lexical/offset": "0.3.8" } }, "@mdx-js/mdx": { @@ -34045,7 +34393,8 @@ "version": "1.6.22", "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz", "integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==", - "dev": true + "dev": true, + "requires": {} }, "@mdx-js/util": { "version": "1.6.22", @@ -36111,6 +36460,26 @@ } } }, + "@storybook/testing-react": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@storybook/testing-react/-/testing-react-1.3.0.tgz", + "integrity": "sha512-TfxzflxwBHSPhetWKuYt239t+1iN8gnnUN8OKo5UGtwwirghKQlApjH23QXW6j8YBqFhmq+yP29Oqf8HgKCFLw==", + "dev": true, + "requires": { + "@storybook/csf": "0.0.2--canary.87bc651.0" + }, + "dependencies": { + "@storybook/csf": { + "version": "0.0.2--canary.87bc651.0", + "resolved": "https://registry.npmjs.org/@storybook/csf/-/csf-0.0.2--canary.87bc651.0.tgz", + "integrity": "sha512-ajk1Uxa+rBpFQHKrCcTmJyQBXZ5slfwHVEaKlkuFaW77it8RgbPJp/ccna3sgoi8oZ7FkkOyvv1Ve4SmwFqRqw==", + "dev": true, + "requires": { + "lodash": "^4.17.15" + } + } + } + }, "@storybook/theming": { "version": "6.5.9", "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-6.5.9.tgz", @@ -36145,12 +36514,211 @@ "resolve-from": "^5.0.0" } }, + "@testing-library/dom": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.14.0.tgz", + "integrity": "sha512-m8FOdUo77iMTwVRCyzWcqxlEIk+GnopbrRI15a0EaLbpZSCinIVI4kSQzWhkShK83GogvEFJSsHF3Ws0z1vrqA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^4.2.0", + "aria-query": "^5.0.0", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.4.4", + "pretty-format": "^27.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "aria-query": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.0.0.tgz", + "integrity": "sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg==", + "dev": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@testing-library/jest-dom": { + "version": "5.16.4", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.4.tgz", + "integrity": "sha512-Gy+IoFutbMQcky0k+bqqumXZ1cTGswLsFqmNLzNdSKkU9KGV2u9oXhukCbbJ9/LRPKiqwxEE8VpV/+YZlfkPUA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.9.2", + "@types/testing-library__jest-dom": "^5.9.1", + "aria-query": "^5.0.0", + "chalk": "^3.0.0", + "css": "^3.0.0", + "css.escape": "^1.5.1", + "dom-accessibility-api": "^0.5.6", + "lodash": "^4.17.15", + "redent": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "aria-query": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.0.0.tgz", + "integrity": "sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg==", + "dev": true + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "requires": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@testing-library/react": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-13.3.0.tgz", + "integrity": "sha512-DB79aA426+deFgGSjnf5grczDPiL4taK3hFaa+M5q7q20Kcve9eQottOG5kZ74KEr55v0tU2CQormSSDK87zYQ==", + "dev": true, + "requires": { + "@babel/runtime": "^7.12.5", + "@testing-library/dom": "^8.5.0", + "@types/react-dom": "^18.0.0" + } + }, "@trysound/sax": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", "dev": true }, + "@types/aria-query": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", + "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==", + "dev": true + }, "@types/babel__core": { "version": "7.1.19", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", @@ -36467,6 +37035,15 @@ "integrity": "sha512-ipixuVrh2OdNmauvtT51o3d8z12p6LtFW9in7U79der/kwejjdNchQC5UMn5u/KxNoM7VHHOs/l8KS8uHxhODQ==", "dev": true }, + "@types/testing-library__jest-dom": { + "version": "5.14.5", + "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.5.tgz", + "integrity": "sha512-SBwbxYoyPIvxHbeHxTZX2Pe/74F/tX2/D3mMvzabdeJ25bBojfW0TyB8BHrbq/9zaaKICJZjLP+8r6AeZMFCuQ==", + "dev": true, + "requires": { + "@types/jest": "*" + } + }, "@types/uglify-js": { "version": "3.16.0", "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.16.0.tgz", @@ -36860,7 +37437,8 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true + "dev": true, + "requires": {} }, "acorn-walk": { "version": "7.2.0", @@ -36925,13 +37503,15 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true + "dev": true, + "requires": {} }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true + "dev": true, + "requires": {} }, "ansi-align": { "version": "3.0.1", @@ -37636,7 +38216,8 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/babel-plugin-annotate-pure-calls/-/babel-plugin-annotate-pure-calls-0.4.0.tgz", "integrity": "sha512-oi4M/PWUJOU9ZyRGoPTfPMqdyMp06jbJAomd3RcyYuzUtBOddv98BqLm96Lucpi2QFoQHkdGQt0ACvw7VzVEQA==", - "dev": true + "dev": true, + "requires": {} }, "babel-plugin-apply-mdx-type-prop": { "version": "1.6.22", @@ -37660,7 +38241,8 @@ "version": "0.2.3", "resolved": "https://registry.npmjs.org/babel-plugin-dev-expression/-/babel-plugin-dev-expression-0.2.3.tgz", "integrity": "sha512-rP5LK9QQTzCW61nVVzw88En1oK8t8gTsIeC6E61oelxNsU842yMjF0G1MxhvUpCkxCEIj7sE8/e5ieTheT//uw==", - "dev": true + "dev": true, + "requires": {} }, "babel-plugin-dynamic-import-node": { "version": "2.3.3", @@ -39486,11 +40068,23 @@ "randomfill": "^1.0.3" } }, + "css": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", + "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", + "dev": true, + "requires": { + "inherits": "^2.0.4", + "source-map": "^0.6.1", + "source-map-resolve": "^0.6.0" + } + }, "css-declaration-sorter": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.3.0.tgz", "integrity": "sha512-OGT677UGHJTAVMRhPO+HJ4oKln3wkBTwtDFH0ojbqm+MJm6xuDMHp2nkhh/ThaBqq20IbraBQSWKfSLNHQO9Og==", - "dev": true + "dev": true, + "requires": {} }, "css-loader": { "version": "3.6.0", @@ -39591,6 +40185,12 @@ "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", "dev": true }, + "css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "dev": true + }, "cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -39649,7 +40249,8 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.1.0.tgz", "integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==", - "dev": true + "dev": true, + "requires": {} }, "csso": { "version": "4.2.0", @@ -40016,6 +40617,12 @@ "esutils": "^2.0.2" } }, + "dom-accessibility-api": { + "version": "0.5.14", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.14.tgz", + "integrity": "sha512-NMt+m9zFMPZe0JcY9gN224Qvk6qLIdqex29clBvc/y75ZBX9YA9wNK3frsYvu2DI1xcCIwxwnX+TlsJ2DSOADg==", + "dev": true + }, "dom-converter": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", @@ -41061,7 +41668,8 @@ "version": "2.5.1", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.5.1.tgz", "integrity": "sha512-Y2c4b55R+6ZzwtTppKwSmK/Kar8AdLiC2f9NADCuxbcTgPPg41Gyqa6b9GppgXSvCtkRw43ZE86CT5sejKC6/g==", - "dev": true + "dev": true, + "requires": {} }, "eslint-scope": { "version": "5.1.1", @@ -45100,7 +45708,8 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true + "dev": true, + "requires": {} }, "jest-regex-util": { "version": "26.0.0", @@ -46234,8 +46843,7 @@ "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { "version": "3.14.1", @@ -46336,7 +46944,8 @@ "version": "7.5.8", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.8.tgz", "integrity": "sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw==", - "dev": true + "dev": true, + "requires": {} } } }, @@ -46637,9 +47246,9 @@ } }, "lexical": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/lexical/-/lexical-0.3.5.tgz", - "integrity": "sha512-zi4OvEH7BFOl8NX27cjqbwJSm9qKCgtPw4JJrUfHgXVNCW5yMDV3rXSUW4KnCjeiXHKEi2E+dDk+awfKntroNg==" + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/lexical/-/lexical-0.3.8.tgz", + "integrity": "sha512-0OG/170nHV8UmBvxKGR5LoWwRGYmVmUcrzmUHpkJ7sDwwleqKOt5fQ/vjKqJ1g0cXwyGj9Fe/xauCgrVcFwSfA==" }, "lib0": { "version": "0.2.51", @@ -46893,7 +47502,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, "requires": { "js-tokens": "^3.0.0 || ^4.0.0" } @@ -46943,6 +47551,12 @@ "integrity": "sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==", "optional": true }, + "lz-string": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", + "integrity": "sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ==", + "dev": true + }, "magic-string": { "version": "0.25.9", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", @@ -48619,25 +49233,29 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz", "integrity": "sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==", - "dev": true + "dev": true, + "requires": {} }, "postcss-discard-duplicates": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz", "integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==", - "dev": true + "dev": true, + "requires": {} }, "postcss-discard-empty": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz", "integrity": "sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==", - "dev": true + "dev": true, + "requires": {} }, "postcss-discard-overridden": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz", "integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==", - "dev": true + "dev": true, + "requires": {} }, "postcss-flexbugs-fixes": { "version": "4.2.1", @@ -48782,13 +49400,15 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true + "dev": true, + "requires": {} }, "postcss-modules-extract-imports": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true + "dev": true, + "requires": {} }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -48938,7 +49558,8 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz", "integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==", - "dev": true + "dev": true, + "requires": {} }, "postcss-normalize-display-values": { "version": "5.1.0", @@ -49540,7 +50161,6 @@ "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", - "dev": true, "requires": { "loose-envify": "^1.1.0" } @@ -49595,13 +50215,13 @@ "version": "2.2.2", "resolved": "https://registry.npmjs.org/react-docgen-typescript/-/react-docgen-typescript-2.2.2.tgz", "integrity": "sha512-tvg2ZtOpOi6QDwsb3GZhOjDkkX0h8Z2gipvTg6OVMUyoYoURhEiRNePT8NZItTVCDh39JJHnLdfCOkzoLbFnTg==", - "dev": true + "dev": true, + "requires": {} }, "react-dom": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", - "dev": true, "requires": { "loose-envify": "^1.1.0", "scheduler": "^0.23.0" @@ -51019,7 +51639,6 @@ "version": "0.23.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", - "dev": true, "requires": { "loose-envify": "^1.1.0" } @@ -53431,7 +54050,8 @@ "use-child": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/use-child/-/use-child-1.0.0.tgz", - "integrity": "sha512-SJYget7tkpfzMJzcNXdErPyNlD02J7SrUjgx+cshbcjNdh1JMCqmh/q6LGWOT1ZQXuPINXG8KvliX+tkT3JNdQ==" + "integrity": "sha512-SJYget7tkpfzMJzcNXdErPyNlD02J7SrUjgx+cshbcjNdh1JMCqmh/q6LGWOT1ZQXuPINXG8KvliX+tkT3JNdQ==", + "requires": {} }, "use-sidecar": { "version": "1.1.2", @@ -54279,7 +54899,8 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/webpack-filter-warnings-plugin/-/webpack-filter-warnings-plugin-1.2.1.tgz", "integrity": "sha512-Ez6ytc9IseDMLPo0qCuNNYzgtUl8NovOqjIq4uAU8LTD4uoa1w1KpZyyzFtLTEMZpkkOkLfL9eN+KGYdk1Qtwg==", - "dev": true + "dev": true, + "requires": {} }, "webpack-hot-middleware": { "version": "2.25.1", @@ -54535,7 +55156,8 @@ "version": "8.8.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz", "integrity": "sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ==", - "dev": true + "dev": true, + "requires": {} }, "x-default-browser": { "version": "0.4.0", diff --git a/package.json b/package.json index 57e9d78..0462c53 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,11 @@ "engines": { "node": ">=10" }, + "jest": { + "moduleNameMapper": { + "\\.(css|scss)$": "/test/mocks/styleMock.js" + } + }, "scripts": { "start": "tsdx watch", "build": "tsdx build", @@ -60,6 +65,9 @@ "@storybook/addon-links": "^6.5.4", "@storybook/addons": "^6.5.4", "@storybook/react": "^6.5.4", + "@storybook/testing-react": "^1.3.0", + "@testing-library/jest-dom": "^5.16.4", + "@testing-library/react": "^13.3.0", "@types/intl": "^1.2.0", "@types/react": "^18.0.9", "@types/react-dom": "^18.0.4", @@ -82,22 +90,22 @@ }, "dependencies": { "@excalidraw/excalidraw": "0.11.0", - "@lexical/clipboard": "0.3.1", - "@lexical/code": "0.3.1", - "@lexical/file": "0.3.1", - "@lexical/hashtag": "0.3.1", - "@lexical/link": "0.3.1", - "@lexical/list": "0.3.1", - "@lexical/mark": "0.3.1", - "@lexical/overflow": "0.3.1", - "@lexical/plain-text": "0.3.1", - "@lexical/react": "0.3.1", - "@lexical/rich-text": "0.3.1", - "@lexical/selection": "0.3.1", - "@lexical/table": "0.3.1", - "@lexical/utils": "0.3.1", + "@lexical/clipboard": "0.3.8", + "@lexical/code": "0.3.8", + "@lexical/file": "0.3.8", + "@lexical/hashtag": "0.3.8", + "@lexical/link": "0.3.8", + "@lexical/list": "0.3.8", + "@lexical/mark": "0.3.8", + "@lexical/overflow": "0.3.8", + "@lexical/plain-text": "0.3.8", + "@lexical/react": "0.3.8", + "@lexical/rich-text": "0.3.8", + "@lexical/selection": "0.3.8", + "@lexical/table": "0.3.8", + "@lexical/utils": "0.3.8", "katex": "^0.15.2", - "lexical": "^0.3.1", + "lexical": "0.3.8", "use-child": "^1.0.0", "utility-types": "^3.10.0", "y-websocket": ">=1.3.x", diff --git a/src/commenting/index.ts b/src/commenting/index.ts index 3c41ebd..ab78e00 100644 --- a/src/commenting/index.ts +++ b/src/commenting/index.ts @@ -6,14 +6,24 @@ * */ -export type CommentContextType = { - isActive: boolean; - setActive: (val: boolean) => void; -}; +import type { LexicalEditor } from 'lexical'; + +import { TOGGLE_CONNECT_COMMAND } from '@lexical/yjs'; +import { COMMAND_PRIORITY_EDITOR } from 'lexical'; +import { useEffect, useState } from 'react'; +import { WebsocketProvider } from 'y-websocket'; +import { + Array as YArray, + Map as YMap, + Transaction, + YArrayEvent, + YEvent, +} from 'yjs'; export type Comment = { author: string; content: string; + deleted: boolean; id: string; timeStamp: number; type: 'comment'; @@ -35,26 +45,37 @@ function createUID(): string { .substr(0, 5); } -export function createComment(content: string): Comment { +export function createComment( + content: string, + author: string, + id?: string, + timeStamp?: number, + deleted?: boolean +): Comment { return { - author: 'Playground User', + author, content, - id: createUID(), - timeStamp: performance.now(), + deleted: deleted === undefined ? false : deleted, + id: id === undefined ? createUID() : id, + timeStamp: timeStamp === undefined ? performance.now() : timeStamp, type: 'comment', }; } -export function createThread(quote: string, content: string): Thread { +export function createThread( + quote: string, + comments: Array, + id?: string +): Thread { return { - comments: [createComment(content)], - id: createUID(), + comments, + id: id === undefined ? createUID() : id, quote, type: 'thread', }; } -export function cloneThread(thread: Thread): Thread { +function cloneThread(thread: Thread): Thread { return { comments: Array.from(thread.comments), id: thread.id, @@ -62,3 +83,370 @@ export function cloneThread(thread: Thread): Thread { type: 'thread', }; } + +function markDeleted(comment: Comment): Comment { + return { + author: comment.author, + content: '[Deleted Comment]', + deleted: true, + id: comment.id, + timeStamp: comment.timeStamp, + type: 'comment', + }; +} + +function triggerOnChange(commentStore: CommentStore): void { + const listeners = commentStore._changeListeners; + for (const listener of listeners) { + listener(); + } +} + +export class CommentStore { + _editor: LexicalEditor; + _comments: Comments; + _changeListeners: Set<() => void>; + _collabProvider: null | WebsocketProvider; + + constructor(editor: LexicalEditor) { + this._comments = []; + this._editor = editor; + this._collabProvider = null; + this._changeListeners = new Set(); + } + + isCollaborative(): boolean { + return this._collabProvider !== null; + } + + getComments(): Comments { + return this._comments; + } + + addComment( + commentOrThread: Comment | Thread, + thread?: Thread, + offset?: number + ): void { + const nextComments = Array.from(this._comments); + // The YJS types explicitly use `any` as well. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const sharedCommentsArray: YArray | null = this._getCollabComments(); + + if (thread !== undefined && commentOrThread.type === 'comment') { + for (let i = 0; i < nextComments.length; i++) { + const comment = nextComments[i]; + if (comment.type === 'thread' && comment.id === thread.id) { + const newThread = cloneThread(comment); + nextComments.splice(i, 1, newThread); + const insertOffset = + offset !== undefined ? offset : newThread.comments.length; + if (this.isCollaborative() && sharedCommentsArray !== null) { + const parentSharedArray = sharedCommentsArray + .get(i) + .get('comments'); + this._withRemoteTransaction(() => { + const sharedMap = this._createCollabSharedMap(commentOrThread); + parentSharedArray.insert(insertOffset, [sharedMap]); + }); + } + newThread.comments.splice(insertOffset, 0, commentOrThread); + break; + } + } + } else { + const insertOffset = offset !== undefined ? offset : nextComments.length; + if (this.isCollaborative() && sharedCommentsArray !== null) { + this._withRemoteTransaction(() => { + const sharedMap = this._createCollabSharedMap(commentOrThread); + sharedCommentsArray.insert(insertOffset, [sharedMap]); + }); + } + nextComments.splice(insertOffset, 0, commentOrThread); + } + this._comments = nextComments; + triggerOnChange(this); + } + + deleteCommentOrThread( + commentOrThread: Comment | Thread, + thread?: Thread + ): { markedComment: Comment; index: number } | null { + const nextComments = Array.from(this._comments); + // The YJS types explicitly use `any` as well. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const sharedCommentsArray: YArray | null = this._getCollabComments(); + let commentIndex: number | null = null; + + if (thread !== undefined) { + for (let i = 0; i < nextComments.length; i++) { + const nextComment = nextComments[i]; + if (nextComment.type === 'thread' && nextComment.id === thread.id) { + const newThread = cloneThread(nextComment); + nextComments.splice(i, 1, newThread); + const threadComments = newThread.comments; + commentIndex = threadComments.indexOf(commentOrThread as Comment); + if (this.isCollaborative() && sharedCommentsArray !== null) { + const parentSharedArray = sharedCommentsArray + .get(i) + .get('comments'); + this._withRemoteTransaction(() => { + parentSharedArray.delete(commentIndex); + }); + } + threadComments.splice(commentIndex, 1); + break; + } + } + } else { + commentIndex = nextComments.indexOf(commentOrThread); + if (this.isCollaborative() && sharedCommentsArray !== null) { + this._withRemoteTransaction(() => { + sharedCommentsArray.delete(commentIndex as number); + }); + } + nextComments.splice(commentIndex, 1); + } + this._comments = nextComments; + triggerOnChange(this); + + if (commentOrThread.type === 'comment') { + return { + index: commentIndex as number, + markedComment: markDeleted(commentOrThread as Comment), + }; + } + + return null; + } + + registerOnChange(onChange: () => void): () => void { + const changeListeners = this._changeListeners; + changeListeners.add(onChange); + return () => { + changeListeners.delete(onChange); + }; + } + + _withRemoteTransaction(fn: () => void): void { + const provider = this._collabProvider; + if (provider !== null) { + // @ts-ignore doc does exist + const doc = provider.doc; + doc.transact(fn, this); + } + } + + _withLocalTransaction(fn: () => void): void { + const collabProvider = this._collabProvider; + try { + this._collabProvider = null; + fn(); + } finally { + this._collabProvider = collabProvider; + } + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + _getCollabComments(): null | YArray { + const provider = this._collabProvider; + if (provider !== null) { + // @ts-ignore doc does exist + const doc = provider.doc; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return doc.get('comments', YArray) as YArray; + } + return null; + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + _createCollabSharedMap(commentOrThread: Comment | Thread): YMap { + const sharedMap = new YMap(); + const type = commentOrThread.type; + const id = commentOrThread.id; + sharedMap.set('type', type); + sharedMap.set('id', id); + if (type === 'comment') { + commentOrThread = commentOrThread as Comment; + sharedMap.set('author', commentOrThread.author); + sharedMap.set('content', commentOrThread.content); + sharedMap.set('deleted', commentOrThread.deleted); + sharedMap.set('timeStamp', commentOrThread.timeStamp); + } else { + commentOrThread = commentOrThread as Thread; + sharedMap.set('quote', commentOrThread.quote); + const commentsArray = new YArray(); + commentOrThread.comments.forEach((comment, i) => { + const sharedChildComment = this._createCollabSharedMap(comment); + commentsArray.insert(i, [sharedChildComment]); + }); + sharedMap.set('comments', commentsArray); + } + return sharedMap; + } + + registerCollaboration(provider: WebsocketProvider): () => void { + this._collabProvider = provider; + const sharedCommentsArray = this._getCollabComments(); + + const connect = () => { + provider.connect(); + }; + + const disconnect = () => { + try { + provider.disconnect(); + } catch (e) { + // Do nothing + } + }; + + const unsubscribe = this._editor.registerCommand( + TOGGLE_CONNECT_COMMAND, + (payload) => { + if (connect !== undefined && disconnect !== undefined) { + const shouldConnect = payload; + + if (shouldConnect) { + // eslint-disable-next-line no-console + console.log('Comments connected!'); + connect(); + } else { + // eslint-disable-next-line no-console + console.log('Comments disconnected!'); + disconnect(); + } + } + + return true; + }, + COMMAND_PRIORITY_EDITOR + ); + + const onSharedCommentChanges = ( + // The YJS types explicitly use `any` as well. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + events: Array>, + transaction: Transaction + ) => { + if (transaction.origin !== this) { + for (let i = 0; i < events.length; i++) { + const event = events[i]; + + if (event instanceof YArrayEvent) { + const target = event.target; + const deltas = event.delta; + let offset = 0; + + for (let s = 0; s < deltas.length; s++) { + const delta = deltas[s]; + const insert = delta.insert; + const retain = delta.retain; + const del = delta.delete; + const parent = target.parent; + const parentThread = + target === sharedCommentsArray + ? undefined + : parent instanceof YMap && + (this._comments.find((t) => t.id === parent.get('id')) as + | Thread + | undefined); + + if (Array.isArray(insert)) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + insert.forEach((map: YMap) => { + const id = map.get('id'); + const type = map.get('type'); + + const commentOrThread = + type === 'thread' + ? createThread( + map.get('quote'), + map + .get('comments') + .toArray() + // eslint-disable-next-line @typescript-eslint/no-explicit-any + .map( + ( + innerComment: Map< + string, + string | number | boolean + > + ) => + createComment( + innerComment.get('content') as string, + innerComment.get('author') as string, + innerComment.get('id') as string, + innerComment.get('timeStamp') as number, + innerComment.get('deleted') as boolean + ) + ), + id + ) + : createComment( + map.get('content'), + map.get('author'), + id, + map.get('timeStamp'), + map.get('deleted') + ); + this._withLocalTransaction(() => { + this.addComment( + commentOrThread, + parentThread as Thread, + offset + ); + }); + }); + } else if (typeof retain === 'number') { + offset += retain; + } else if (typeof del === 'number') { + for (let d = 0; d < del; d++) { + const commentOrThread = + parentThread === undefined // FIXME: commented out for ts error: || parentThread === false + ? this._comments[offset] + : parentThread.comments[offset]; + this._withLocalTransaction(() => { + this.deleteCommentOrThread( + commentOrThread, + parentThread as Thread + ); + }); + offset++; + } + } + } + } + } + } + }; + + if (sharedCommentsArray === null) { + return () => null; + } + + sharedCommentsArray.observeDeep(onSharedCommentChanges); + + connect(); + + return () => { + sharedCommentsArray.unobserveDeep(onSharedCommentChanges); + unsubscribe(); + this._collabProvider = null; + }; + } +} + +export function useCommentStore(commentStore: CommentStore): Comments { + const [comments, setComments] = useState( + commentStore.getComments() + ); + + useEffect(() => { + return commentStore.registerOnChange(() => { + setComments(commentStore.getComments()); + }); + }, [commentStore]); + + return comments; +} diff --git a/src/nodes/TweetNode.tsx b/src/nodes/TweetNode.tsx index 7471a63..8f668b1 100644 --- a/src/nodes/TweetNode.tsx +++ b/src/nodes/TweetNode.tsx @@ -6,23 +6,33 @@ * */ -import type { ElementFormatType, LexicalNode, NodeKey } from 'lexical'; +import type { + DOMConversionMap, + DOMConversionOutput, + DOMExportOutput, + EditorConfig, + ElementFormatType, + LexicalEditor, + LexicalNode, + NodeKey, + Spread, +} from 'lexical'; import { BlockWithAlignableContents } from '@lexical/react/LexicalBlockWithAlignableContents'; -import { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode'; - -import SerializedDecoratorBlockNode from '@lexical/react/LexicalDecoratorBlockNode'; - -import { Spread } from 'globals'; +import { + DecoratorBlockNode, + SerializedDecoratorBlockNode, +} from '@lexical/react/LexicalDecoratorBlockNode'; import * as React from 'react'; import { useCallback, useEffect, useRef, useState } from 'react'; const WIDGET_SCRIPT_URL = 'https://platform.twitter.com/widgets.js'; -const getHasScriptCached = () => - document.querySelector(`script[src="${WIDGET_SCRIPT_URL}"]`); - type TweetComponentProps = Readonly<{ + className: Readonly<{ + base: string; + focus: string; + }>; format: ElementFormatType | null; loadingComponent?: JSX.Element | string; nodeKey: NodeKey; @@ -31,7 +41,21 @@ type TweetComponentProps = Readonly<{ tweetID: string; }>; +function convertTweetElement( + domNode: HTMLDivElement +): DOMConversionOutput | null { + const id = domNode.getAttribute('data-lexical-tweet-id'); + if (id) { + const node = $createTweetNode(id); + return { node }; + } + return null; +} + +let isTwitterScriptLoading = true; + function TweetComponent({ + className, format, loadingComponent, nodeKey, @@ -42,14 +66,15 @@ function TweetComponent({ const containerRef = useRef(null); const previousTweetIDRef = useRef(''); - const [isLoading, setIsLoading] = useState(false); + const [isTweetLoading, setIsTweetLoading] = useState(false); const createTweet = useCallback(async () => { try { // @ts-expect-error Twitter is attached to the window. await window.twttr.widgets.createTweet(tweetID, containerRef.current); - setIsLoading(false); + setIsTweetLoading(false); + isTwitterScriptLoading = false; if (onLoad) { onLoad(); @@ -63,15 +88,17 @@ function TweetComponent({ useEffect(() => { if (tweetID !== previousTweetIDRef.current) { - setIsLoading(true); + setIsTweetLoading(true); - if (!getHasScriptCached()) { + if (isTwitterScriptLoading) { const script = document.createElement('script'); script.src = WIDGET_SCRIPT_URL; script.async = true; document.body?.appendChild(script); script.onload = createTweet; - script.onerror = onError; + if (onError) { + script.onerror = onError as OnErrorEventHandler; + } } else { createTweet(); } @@ -83,8 +110,12 @@ function TweetComponent({ }, [createTweet, onError, tweetID]); return ( - - {isLoading ? loadingComponent : null} + + {isTweetLoading ? loadingComponent : null}
; -export class TweetNode extends DecoratorBlockNode { +export class TweetNode extends DecoratorBlockNode { __id: string; static getType(): string { @@ -128,7 +159,27 @@ export class TweetNode extends DecoratorBlockNode { }; } - constructor(id: string, format?: ElementFormatType | null, key?: NodeKey) { + static importDOM(): DOMConversionMap | null { + return { + div: (domNode: HTMLDivElement) => { + if (!domNode.hasAttribute('data-lexical-tweet-id')) { + return null; + } + return { + conversion: convertTweetElement, + priority: 2, + }; + }, + }; + } + + exportDOM(): DOMExportOutput { + const element = document.createElement('div'); + element.setAttribute('data-lexical-tweet-id', this.__id); + return { element }; + } + + constructor(id: string, format?: ElementFormatType, key?: NodeKey) { super(format, key); this.__id = id; } @@ -137,9 +188,15 @@ export class TweetNode extends DecoratorBlockNode { return this.__id; } - decorate(): JSX.Element { + decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element { + const embedBlockTheme = config.theme.embedBlock || {}; + const className = { + base: embedBlockTheme.base || '', + focus: embedBlockTheme.focus || '', + }; return ( ; format: ElementFormatType | null; nodeKey: NodeKey; videoID: string; }>; -function YouTubeComponent({ format, nodeKey, videoID }: YouTubeComponentProps) { +function YouTubeComponent({ + className, + format, + nodeKey, + videoID, +}: YouTubeComponentProps) { return ( - +