apply formatter cleanup to web files

This commit is contained in:
CREDO23 2026-02-20 20:56:31 +02:00
parent 7d25778927
commit e7f9c658ce
43 changed files with 224 additions and 276 deletions

View file

@ -1,22 +1,21 @@
"use client";
import * as React from "react";
import { DndPlugin, useDraggable, useDropLine } from "@platejs/dnd";
import { expandListItemsWithChildren } from "@platejs/list";
import { BlockSelectionPlugin } from "@platejs/selection/react";
import { GripVertical } from "lucide-react";
import { type TElement, getPluginByType, isType, KEYS } from "platejs";
import { getPluginByType, isType, KEYS, type TElement } from "platejs";
import {
MemoizedChildren,
type PlateEditor,
type PlateElementProps,
type RenderNodeWrapper,
MemoizedChildren,
useEditorRef,
useElement,
usePluginOption,
useSelected,
} from "platejs/react";
import { useSelected } from "platejs/react";
import * as React from "react";
import { Button } from "@/components/ui/button";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";

View file

@ -1,12 +1,10 @@
"use client";
import React from "react";
import type { TListElement } from "platejs";
import { isOrderedList } from "@platejs/list";
import { useTodoListElement, useTodoListElementState } from "@platejs/list/react";
import type { TListElement } from "platejs";
import { type PlateElementProps, type RenderNodeWrapper, useReadOnly } from "platejs/react";
import type React from "react";
import { Checkbox } from "@/components/ui/checkbox";
import { cn } from "@/lib/utils";

View file

@ -1,11 +1,10 @@
"use client";
import * as React from "react";
import { DndPlugin } from "@platejs/dnd";
import { useBlockSelected } from "@platejs/selection/react";
import { cva } from "class-variance-authority";
import { type PlateElementProps, usePluginOption } from "platejs/react";
import * as React from "react";
export const blockSelectionVariants = cva(
"pointer-events-none absolute inset-0 z-1 bg-brand/[.13] transition-opacity",

View file

@ -1,6 +1,6 @@
"use client";
import { type PlateElementProps, PlateElement } from "platejs/react";
import { PlateElement, type PlateElementProps } from "platejs/react";
export function BlockquoteElement(props: PlateElementProps) {
return <PlateElement as="blockquote" className="my-1 border-l-2 pl-6 italic" {...props} />;

View file

@ -1,12 +1,10 @@
"use client";
import * as React from "react";
import type { TCalloutElement } from "platejs";
import { CalloutPlugin } from "@platejs/callout/react";
import { cva } from "class-variance-authority";
import { type PlateElementProps, PlateElement, useEditorPlugin } from "platejs/react";
import type { TCalloutElement } from "platejs";
import { PlateElement, type PlateElementProps, useEditorPlugin } from "platejs/react";
import * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,8 +1,8 @@
"use client";
import * as React from "react";
import { CheckIcon } from "lucide-react";
import { Checkbox as CheckboxPrimitive } from "radix-ui";
import type * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,17 +1,18 @@
"use client";
import * as React from "react";
import { formatCodeBlock, isLangSupported } from "@platejs/code-block";
import { BracesIcon, Check, CheckIcon, CopyIcon } from "lucide-react";
import { type TCodeBlockElement, type TCodeSyntaxLeaf, NodeApi } from "platejs";
import { NodeApi, type TCodeBlockElement, type TCodeSyntaxLeaf } from "platejs";
import {
type PlateElementProps,
type PlateLeafProps,
PlateElement,
type PlateElementProps,
PlateLeaf,
type PlateLeafProps,
useEditorRef,
useElement,
useReadOnly,
} from "platejs/react";
import { useEditorRef, useElement, useReadOnly } from "platejs/react";
import * as React from "react";
import { Button } from "@/components/ui/button";
import {

View file

@ -1,10 +1,8 @@
"use client";
import * as React from "react";
import type { PlateLeafProps } from "platejs/react";
import { PlateLeaf } from "platejs/react";
import * as React from "react";
export function CodeLeaf(props: PlateLeafProps) {
return (

View file

@ -1,8 +1,8 @@
"use client";
import * as React from "react";
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
import type * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,12 +1,10 @@
"use client";
import * as React from "react";
import type { VariantProps } from "class-variance-authority";
import type { PlateContentProps, PlateViewProps } from "platejs/react";
import { cva } from "class-variance-authority";
import type { PlateContentProps, PlateViewProps } from "platejs/react";
import { PlateContainer, PlateContent, PlateView } from "platejs/react";
import type * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,12 +1,10 @@
"use client";
import * as React from "react";
import type { TEquationElement } from "platejs";
import { useEquationElement, useEquationInput } from "@platejs/math/react";
import { RadicalIcon } from "lucide-react";
import { type PlateElementProps, PlateElement, useSelected } from "platejs/react";
import type { TEquationElement } from "platejs";
import { PlateElement, type PlateElementProps, useSelected } from "platejs/react";
import * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,7 +1,5 @@
"use client";
import * as React from "react";
import {
BoldIcon,
Code2Icon,
@ -15,10 +13,11 @@ import {
} from "lucide-react";
import { KEYS } from "platejs";
import { useEditorReadOnly, useEditorRef } from "platejs/react";
import * as React from "react";
import { useEditorSave } from "@/components/editor/editor-save-context";
import { usePlatformShortcut } from "@/hooks/use-platform-shortcut";
import { Spinner } from "@/components/ui/spinner";
import { usePlatformShortcut } from "@/hooks/use-platform-shortcut";
import { InsertToolbarButton } from "./insert-toolbar-button";
import { LinkToolbarButton } from "./link-toolbar-button";

View file

@ -1,6 +1,6 @@
"use client";
import * as React from "react";
import type * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,10 +1,9 @@
"use client";
import * as React from "react";
import { BoldIcon, Code2Icon, ItalicIcon, StrikethroughIcon, UnderlineIcon } from "lucide-react";
import { KEYS } from "platejs";
import { useEditorReadOnly } from "platejs/react";
import * as React from "react";
import { LinkToolbarButton } from "./link-toolbar-button";
import { MarkToolbarButton } from "./mark-toolbar-button";

View file

@ -1,7 +1,5 @@
"use client";
import * as React from "react";
import {
type FloatingToolbarState,
flip,
@ -12,9 +10,9 @@ import {
import { useComposedRef } from "@udecode/cn";
import { KEYS } from "platejs";
import { useEditorId, useEventEditorValue, usePluginOption } from "platejs/react";
import { cn } from "@/lib/utils";
import type * as React from "react";
import { useIsMobile } from "@/hooks/use-mobile";
import { cn } from "@/lib/utils";
import { Toolbar } from "./toolbar";

View file

@ -1,11 +1,10 @@
"use client";
import * as React from "react";
import { cva, type VariantProps } from "class-variance-authority";
import type { PlateElementProps } from "platejs/react";
import { type VariantProps, cva } from "class-variance-authority";
import { PlateElement } from "platejs/react";
import * as React from "react";
const headingVariants = cva("relative mb-1", {
variants: {

View file

@ -1,10 +1,8 @@
"use client";
import * as React from "react";
import type { PlateLeafProps } from "platejs/react";
import { PlateLeaf } from "platejs/react";
import * as React from "react";
export function HighlightLeaf(props: PlateLeafProps) {
return (

View file

@ -1,10 +1,8 @@
"use client";
import * as React from "react";
import type { PlateElementProps } from "platejs/react";
import { PlateElement, useFocused, useReadOnly, useSelected } from "platejs/react";
import * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,15 +1,11 @@
"use client";
import * as React from "react";
import type { Point, TElement } from "platejs";
import {
type ComboboxItemProps,
Combobox,
ComboboxGroup,
ComboboxGroupLabel,
ComboboxItem,
type ComboboxItemProps,
ComboboxPopover,
ComboboxProvider,
ComboboxRow,
@ -24,7 +20,9 @@ import {
useHTMLInputCursorState,
} from "@platejs/combobox/react";
import { cva } from "class-variance-authority";
import type { Point, TElement } from "platejs";
import { useComposedRef, useEditorRef } from "platejs/react";
import * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,9 +1,6 @@
"use client";
import * as React from "react";
import type { DropdownMenuProps } from "@radix-ui/react-dropdown-menu";
import {
ChevronRightIcon,
FileCodeIcon,
@ -25,14 +22,14 @@ import {
} from "lucide-react";
import { KEYS } from "platejs";
import { type PlateEditor, useEditorRef } from "platejs/react";
import * as React from "react";
import { insertBlock, insertInlineElement } from "@/components/editor/transforms";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { insertBlock, insertInlineElement } from "@/components/editor/transforms";
import { ToolbarButton, ToolbarMenuGroup } from "./toolbar";

View file

@ -1,12 +1,11 @@
"use client";
import * as React from "react";
import { getLinkAttributes } from "@platejs/link";
import type { TLinkElement } from "platejs";
import type { PlateElementProps } from "platejs/react";
import { getLinkAttributes } from "@platejs/link";
import { PlateElement } from "platejs/react";
import * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,9 +1,8 @@
"use client";
import * as React from "react";
import { useLinkToolbarButton, useLinkToolbarButtonState } from "@platejs/link/react";
import { Link } from "lucide-react";
import type * as React from "react";
import { ToolbarButton } from "./toolbar";

View file

@ -1,14 +1,10 @@
"use client";
import * as React from "react";
import type { TLinkElement } from "platejs";
import { type UseVirtualFloatingOptions, flip, offset } from "@platejs/floating";
import { flip, offset, type UseVirtualFloatingOptions } from "@platejs/floating";
import { getLinkAttributes } from "@platejs/link";
import {
type LinkFloatingToolbarState,
FloatingLinkUrlInput,
type LinkFloatingToolbarState,
useFloatingLinkEdit,
useFloatingLinkEditState,
useFloatingLinkInsert,
@ -16,6 +12,7 @@ import {
} from "@platejs/link/react";
import { cva } from "class-variance-authority";
import { ExternalLink, Link, Text, Unlink } from "lucide-react";
import type { TLinkElement } from "platejs";
import { KEYS } from "platejs";
import {
useEditorRef,
@ -23,6 +20,7 @@ import {
useFormInputProps,
usePluginOption,
} from "platejs/react";
import * as React from "react";
import { buttonVariants } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";

View file

@ -1,8 +1,7 @@
"use client";
import * as React from "react";
import { useMarkToolbarButton, useMarkToolbarButtonState } from "platejs/react";
import type * as React from "react";
import { ToolbarButton } from "./toolbar";

View file

@ -1,10 +1,8 @@
"use client";
import * as React from "react";
import type { PlateElementProps } from "platejs/react";
import { PlateElement } from "platejs/react";
import * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,16 +1,15 @@
"use client";
import * as React from "react";
import type { VariantProps } from "class-variance-authority";
import {
type ResizeHandle as ResizeHandlePrimitive,
Resizable as ResizablePrimitive,
type ResizeHandle as ResizeHandlePrimitive,
useResizeHandle,
useResizeHandleState,
} from "@platejs/resizable";
import type { VariantProps } from "class-variance-authority";
import { cva } from "class-variance-authority";
import type * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,7 +1,7 @@
"use client";
import * as React from "react";
import { Separator as SeparatorPrimitive } from "radix-ui";
import type * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,9 +1,5 @@
"use client";
import * as React from "react";
import type { PlateElementProps } from "platejs/react";
import { SlashInputPlugin } from "@platejs/slash-command/react";
import {
ChevronRightIcon,
@ -23,8 +19,10 @@ import {
TableIcon,
} from "lucide-react";
import { KEYS } from "platejs";
import type { PlateElementProps } from "platejs/react";
import { PlateElement, useEditorRef } from "platejs/react";
import type * as React from "react";
import { insertBlock, insertInlineElement } from "@/components/editor/transforms";
import {
InlineCombobox,
InlineComboboxContent,
@ -34,7 +32,6 @@ import {
InlineComboboxInput,
InlineComboboxItem,
} from "@/components/ui/inline-combobox";
import { insertBlock, insertInlineElement } from "@/components/editor/transforms";
interface SlashCommandItem {
icon: React.ReactNode;

View file

@ -1,7 +1,5 @@
"use client";
import * as React from "react";
import { useDraggable, useDropLine } from "@platejs/dnd";
import { BlockSelectionPlugin, useBlockSelected } from "@platejs/selection/react";
import {
@ -26,21 +24,22 @@ import {
XIcon,
} from "lucide-react";
import {
KEYS,
PathApi,
type TElement,
type TTableCellElement,
type TTableElement,
type TTableRowElement,
KEYS,
PathApi,
} from "platejs";
import {
type PlateElementProps,
PlateElement,
type PlateElementProps,
useComposedRef,
useEditorPlugin,
useEditorRef,
useEditorSelector,
useElement,
useElementSelector,
useFocusedLast,
usePluginOption,
useReadOnly,
@ -48,7 +47,7 @@ import {
useSelected,
withHOC,
} from "platejs/react";
import { useElementSelector } from "platejs/react";
import type * as React from "react";
import { Button } from "@/components/ui/button";
import { Popover, PopoverContent } from "@/components/ui/popover";

View file

@ -1,10 +1,9 @@
"use client";
import * as React from "react";
import { useToggleButton, useToggleButtonState } from "@platejs/toggle/react";
import { ChevronRightIcon } from "lucide-react";
import { type PlateElementProps, PlateElement } from "platejs/react";
import { PlateElement, type PlateElementProps } from "platejs/react";
import * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,11 +1,10 @@
"use client";
import * as React from "react";
import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
import { type VariantProps, cva } from "class-variance-authority";
import { cva, type VariantProps } from "class-variance-authority";
import { ChevronDown } from "lucide-react";
import * as React from "react";
import {
DropdownMenuLabel,

View file

@ -1,7 +1,7 @@
"use client";
import * as React from "react";
import { Tooltip as TooltipPrimitive } from "radix-ui";
import type * as React from "react";
import { cn } from "@/lib/utils";

View file

@ -1,10 +1,6 @@
"use client";
import * as React from "react";
import type { DropdownMenuProps } from "@radix-ui/react-dropdown-menu";
import type { TElement } from "platejs";
import { DropdownMenuItemIndicator } from "@radix-ui/react-dropdown-menu";
import {
CheckIcon,
@ -23,16 +19,17 @@ import {
QuoteIcon,
SquareIcon,
} from "lucide-react";
import type { TElement } from "platejs";
import { KEYS } from "platejs";
import { useEditorRef, useSelectionFragmentProp } from "platejs/react";
import * as React from "react";
import { getBlockType, setBlockType } from "@/components/editor/transforms";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuRadioItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { getBlockType, setBlockType } from "@/components/editor/transforms";
import { ToolbarButton, ToolbarMenuGroup } from "./toolbar";