Skip to content

Commit

Permalink
chore: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
hunghg255 committed Oct 20, 2024
1 parent 1eacdd3 commit 38995c8
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "reactjs-tiptap-editor",
"type": "module",
"version": "0.0.51",
"version": "0.0.50",
"main": "./lib/reactjs-tiptap-editor.cjs",
"module": "./lib/reactjs-tiptap-editor.js",
"types": "./lib/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/components/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export * from './tabs'
export * from './toast'
export * from './toggle'
export * from './tooltip'
export * from './select'
export * from './use-toast'
8 changes: 5 additions & 3 deletions src/extensions/CodeBlock/components/CodeBlockActiveButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable react/no-duplicate-key */
import React, { useMemo } from 'react'

import type { BundledLanguage } from 'shiki'
Expand All @@ -8,7 +7,6 @@ import {
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from '@/components'
import { MAP_LANGUAGE_CODE_LABELS } from '@/constants'

Expand Down Expand Up @@ -53,7 +51,11 @@ function CodeBlockActiveButton({ action, languages, ...props }: Props) {
<SelectContent className="richtext-w-full richtext-max-h-60 richtext-overflow-y-auto">
{langs?.map((item: any) => {
return (
<SelectItem key={`codeblock-${item.title}`} onClick={() => onClick(item.language)}>
<SelectItem
value={item.language}
key={`codeblock-${item.title}`}
onClick={() => onClick(item.language)}
>
<div className="richtext-h-full richtext-ml-1">
{item.title}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/Mermaid/Mermaid.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CommandProps } from '@tiptap/core'
import { Node, mergeAttributes } from '@tiptap/core'
import { mergeAttributes } from '@tiptap/core'

import { ReactNodeViewRenderer } from '@tiptap/react'
import TiptapImage from '@tiptap/extension-image'
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/Mermaid/components/MermaidActiveButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable react-dom/no-dangerously-set-innerhtml */
import { useCallback, useEffect, useRef, useState } from 'react'
import { useEffect, useRef, useState } from 'react'
import mermaid from 'mermaid'
// @ts-ignore
import svg64 from 'svg64'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'
import { NodeViewWrapper, isNumber } from '@tiptap/react'
import { throttle } from 'lodash-es'
import { flushSync } from 'react-dom'
import { useLocale } from '@/locales'
import { IMAGE_MAX_SIZE, IMAGE_MIN_SIZE, IMAGE_THROTTLE_WAIT_TIME } from '@/constants'
import { clamp } from '@/utils/utils'

Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useExtension.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useRef, useState } from 'react'
import { useEffect, useState } from 'react'

import type { Editor } from '@tiptap/core'

Expand Down
1 change: 1 addition & 0 deletions src/locales/vi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const locale = {
'editor.image.dialog.tab.url': 'Url',
'editor.image.dialog.tab.upload': 'Tải lên',
'editor.image.dialog.tab.uploadCrop': 'Tải lên & Cắt',
'editor.image.dialog.uploading': 'Đang tải lên',
'editor.image.dialog.form.link': 'Liên kết',
'editor.image.dialog.placeholder': 'Liên kết',
'editor.image.dialog.form.alt': 'Alt',
Expand Down

0 comments on commit 38995c8

Please sign in to comment.