2
0

build: add pnpm

This commit is contained in:
Baptiste Arnaud
2022-08-08 08:21:36 +02:00
parent 8c3b5058f1
commit ee338f62dc
183 changed files with 19442 additions and 18364 deletions

View File

@ -1,4 +1,4 @@
import { useEventListener } from '@chakra-ui/hooks'
import { useEventListener } from '@chakra-ui/react'
import assert from 'assert'
import {
useGraph,

View File

@ -1,4 +1,4 @@
import { chakra } from '@chakra-ui/system'
import { chakra } from '@chakra-ui/react'
import { colors } from 'libs/theme'
import { Edge as EdgeProps } from 'models'
import React from 'react'

View File

@ -3,7 +3,6 @@ import React, { useEffect, useMemo, useRef, useState } from 'react'
import {
Plate,
selectEditor,
serializeHtml,
TEditor,
TElement,
Value,
@ -16,6 +15,7 @@ import { parseHtmlStringToPlainText } from 'services/utils'
import { defaultTextBubbleContent, TextBubbleContent, Variable } from 'models'
import { VariableSearchInput } from 'components/shared/VariableSearchInput'
import { ReactEditor } from 'slate-react'
import { serializeHtml } from '@udecode/plate-serializer-html'
type Props = {
initialValue: TElement[]
@ -98,7 +98,7 @@ export const TextBubbleEditor = ({ initialValue, onClose }: Props) => {
setValue(val)
setIsVariableDropdownOpen(false)
}
const handleKeyDown = (e: React.KeyboardEvent) => {
const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {
if (e.shiftKey) return
if (e.key === 'Enter') closeEditor()
}

View File

@ -1,4 +1,4 @@
import { StackProps, HStack, Button } from '@chakra-ui/react'
import { StackProps, HStack, Button, IconButton } from '@chakra-ui/react'
import {
MARK_BOLD,
MARK_ITALIC,
@ -7,7 +7,13 @@ import {
import { getPluginType, PlateEditor, Value } from '@udecode/plate-core'
import { LinkToolbarButton } from '@udecode/plate-ui-link'
import { MarkToolbarButton } from '@udecode/plate-ui-toolbar'
import { BoldIcon, ItalicIcon, UnderlineIcon, LinkIcon } from 'assets/icons'
import {
BoldIcon,
ItalicIcon,
UnderlineIcon,
LinkIcon,
UserIcon,
} from 'assets/icons'
type Props = {
editor: PlateEditor<Value>
@ -33,9 +39,12 @@ export const ToolBar = ({
borderBottomWidth={1}
{...props}
>
<Button size="sm" onMouseDown={handleVariablesButtonMouseDown}>
Variables
</Button>
<IconButton
aria-label="Insert variable"
size="sm"
onMouseDown={handleVariablesButtonMouseDown}
icon={<UserIcon />}
/>
<span data-testid="bold-button">
<MarkToolbarButton
type={getPluginType(editor, MARK_BOLD)}