-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(richtext-lexical): add missing 'use client' directives
- Loading branch information
Showing
31 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/features/align/client/toolbarAlignGroup.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/features/blocks/client/component/removeEmptyArrayValues.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
import type { FormState } from 'payload' | ||
|
||
/** | ||
|
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/features/blocks/client/plugin/commands.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
import type { LexicalCommand } from 'lexical' | ||
|
||
import { createCommand } from 'lexical' | ||
|
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/features/experimental_table/client/utils/debounce.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/features/experimental_table/client/utils/useDebounce.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
import { useMemo, useRef } from 'react' | ||
|
||
import debounce from './debounce.js' | ||
|
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/features/format/shared/toolbarFormatGroup.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/features/indent/client/toolbarIndentGroup.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...chtext-lexical/src/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
import type { LexicalCommand } from 'lexical' | ||
|
||
import { createCommand } from 'lexical' | ||
|
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/lexical/plugins/SlashMenu/useMenuTriggerMatch.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
import type { LexicalEditor } from 'lexical' | ||
|
||
import { useCallback } from 'react' | ||
|
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/lexical/plugins/handles/DraggableBlockPlugin/debounce.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...xical/src/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...lexical/src/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/richtext-lexical/src/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...s/richtext-lexical/src/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
/** | ||
* Calculate distance between scrollerElem and target if target is not in scrollerElem | ||
*/ | ||
|
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/lexical/plugins/handles/utils/doesLineHeightAffectElement.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
const replacedElements = [ | ||
'IMG', | ||
'INPUT', | ||
|
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/lexical/plugins/handles/utils/getCollapsedMargins.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
export function getCollapsedMargins(elem: HTMLElement): { | ||
marginBottom: number | ||
marginTop: number | ||
|
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/lexical/plugins/handles/utils/getNodeCloseToPoint.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
import type { LexicalEditor, LexicalNode } from 'lexical' | ||
|
||
import { $getNodeByKey } from 'lexical' | ||
|
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/lexical/plugins/handles/utils/getTopLevelNodeKeys.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
import type { LexicalEditor } from 'lexical' | ||
|
||
import { $getRoot } from 'lexical' | ||
|
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/lexical/plugins/handles/utils/isOnHandleElement.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
export function isOnHandleElement(element: HTMLElement, handleElementClassName: string): boolean { | ||
return !!element.closest(`.${handleElementClassName}`) | ||
} |
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/lexical/plugins/handles/utils/setHandlePosition.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
import { CAN_USE_DOM } from './canUseDOM.js' | ||
|
||
declare global { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
export function isHTMLElement(x: unknown): x is HTMLElement { | ||
return x instanceof HTMLElement | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
export function joinClasses(...args: Array<boolean | null | string | undefined>): string { | ||
return args.filter(Boolean).join(' ') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
export class Point { | ||
private readonly _x: number | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
import { type Point, isPoint } from './point.js' | ||
|
||
interface ContainsPointReturn { | ||
|
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/lexical/utils/setFloatingElemPosition.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
const VERTICAL_GAP = 10 | ||
const HORIZONTAL_OFFSET = 5 | ||
|
||
|
1 change: 1 addition & 0 deletions
1
packages/richtext-lexical/src/lexical/utils/setFloatingElemPositionForLinkEditor.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use client' | ||
const VERTICAL_GAP = 10 | ||
const HORIZONTAL_OFFSET = 5 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters