Skip to content

Commit 00f5a5c

Browse files
aaryan610vamsikrishnamathala
authored andcommitted
refactor: remove cn helper function from the editor package (#6217)
1 parent fa4af3c commit 00f5a5c

File tree

49 files changed

+120
-129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+120
-129
lines changed

packages/editor/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"@tiptap/starter-kit": "^2.1.13",
5858
"@tiptap/suggestion": "^2.0.13",
5959
"class-variance-authority": "^0.7.0",
60-
"clsx": "^1.2.1",
6160
"highlight.js": "^11.8.0",
6261
"jsx-dom-cjs": "^8.0.3",
6362
"linkifyjs": "^4.1.3",
@@ -66,7 +65,6 @@
6665
"prosemirror-codemark": "^0.4.2",
6766
"prosemirror-utils": "^1.2.2",
6867
"react-moveable": "^0.54.2",
69-
"tailwind-merge": "^1.14.0",
7068
"tippy.js": "^6.3.7",
7169
"tiptap-markdown": "^0.8.9",
7270
"uuid": "^10.0.0",

packages/editor/src/core/components/editors/editor-container.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { FC, ReactNode } from "react";
22
import { Editor } from "@tiptap/react";
3+
// plane utils
4+
import { cn } from "@plane/utils";
35
// constants
46
import { DEFAULT_DISPLAY_CONFIG } from "@/constants/config";
5-
// helpers
6-
import { cn } from "@/helpers/common";
77
// types
88
import { TDisplayConfig } from "@/types";
99

packages/editor/src/core/components/menus/ai-menu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useCallback, useEffect, useRef, useState } from "react";
22
import tippy, { Instance } from "tippy.js";
3-
// helpers
4-
import { cn } from "@/helpers/common";
3+
// plane utils
4+
import { cn } from "@plane/utils";
55
// types
66
import { TAIHandler } from "@/types";
77

packages/editor/src/core/components/menus/bubble-menu/alignment-selector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Editor } from "@tiptap/core";
22
import { AlignCenter, AlignLeft, AlignRight, LucideIcon } from "lucide-react";
3+
// plane utils
4+
import { cn } from "@plane/utils";
35
// components
46
import { TextAlignItem } from "@/components/menus";
5-
// helpers
6-
import { cn } from "@/helpers/common";
77
// types
88
import { TEditorCommands } from "@/types";
99

packages/editor/src/core/components/menus/bubble-menu/color-selector.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { Dispatch, FC, SetStateAction } from "react";
22
import { Editor } from "@tiptap/react";
33
import { ALargeSmall, Ban } from "lucide-react";
4+
// plane utils
5+
import { cn } from "@plane/utils";
46
// constants
57
import { COLORS_LIST } from "@/constants/common";
68
// helpers
7-
import { cn } from "@/helpers/common";
89
import { BackgroundColorItem, TextColorItem } from "../menu-items";
910

1011
type Props = {

packages/editor/src/core/components/menus/bubble-menu/link-selector.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { Dispatch, FC, SetStateAction, useCallback, useEffect, useRef } from "react";
22
import { Editor } from "@tiptap/core";
33
import { Check, Link, Trash } from "lucide-react";
4+
// plane utils
5+
import { cn } from "@plane/utils";
46
// helpers
5-
import { cn, isValidHttpUrl } from "@/helpers/common";
7+
import { isValidHttpUrl } from "@/helpers/common";
68
import { setLinkEditor, unsetLinkEditor } from "@/helpers/editor-commands";
79

810
type Props = {

packages/editor/src/core/components/menus/bubble-menu/node-selector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { Dispatch, FC, SetStateAction } from "react";
22
import { Editor } from "@tiptap/react";
33
import { Check, ChevronDown } from "lucide-react";
4+
// plane utils
5+
import { cn } from "@plane/utils";
46
// components
57
import {
68
BulletListItem,
@@ -17,8 +19,6 @@ import {
1719
HeadingSixItem,
1820
EditorMenuItem,
1921
} from "@/components/menus";
20-
// helpers
21-
import { cn } from "@/helpers/common";
2222
// types
2323
import { TEditorCommands } from "@/types";
2424

packages/editor/src/core/components/menus/bubble-menu/root.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { FC, useEffect, useState } from "react";
22
import { BubbleMenu, BubbleMenuProps, Editor, isNodeSelection } from "@tiptap/react";
3+
// plane utils
4+
import { cn } from "@plane/utils";
35
// components
46
import {
57
BoldItem,
@@ -13,8 +15,6 @@ import {
1315
} from "@/components/menus";
1416
// extensions
1517
import { isCellSelection } from "@/extensions/table/table/utilities/is-cell-selection";
16-
// helpers
17-
import { cn } from "@/helpers/common";
1818
// local components
1919
import { TextAlignmentSelector } from "./alignment-selector";
2020

packages/editor/src/core/extensions/callout/color-selector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Ban, ChevronDown } from "lucide-react";
2+
// plane utils
3+
import { cn } from "@plane/utils";
24
// constants
35
import { COLORS_LIST } from "@/constants/common";
4-
// helpers
5-
import { cn } from "@/helpers/common";
66

77
type Props = {
88
disabled: boolean;

packages/editor/src/core/extensions/callout/logo-selector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import { convertHexEmojiToDecimal } from "@plane/utils";
33
// plane ui
44
import { EmojiIconPicker, EmojiIconPickerTypes, Logo, TEmojiLogoProps } from "@plane/ui";
5-
// helpers
6-
import { cn } from "@/helpers/common";
5+
// plane utils
6+
import { cn } from "@plane/utils";
77
// types
88
import { TCalloutBlockAttributes } from "./types";
99
// utils

0 commit comments

Comments
 (0)