Lexical: modify headers

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2023-07-31 20:24:08 +02:00
parent bcd958a473
commit 1d8b686928
17 changed files with 73 additions and 115 deletions

View file

@ -1,11 +1,9 @@
/* /**
MIT License * This source code is derived from code from Meta Platforms, Inc.
* and affiliates, licensed under the MIT license located in the
* LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
Copyright (c) Meta Platforms, Inc. and affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
import { AutoLinkPlugin, createLinkMatcherWithRegExp } from '@lexical/react/LexicalAutoLinkPlugin'; import { AutoLinkPlugin, createLinkMatcherWithRegExp } from '@lexical/react/LexicalAutoLinkPlugin';
import { LexicalComposer, InitialConfigType } from '@lexical/react/LexicalComposer'; import { LexicalComposer, InitialConfigType } from '@lexical/react/LexicalComposer';
import { ContentEditable } from '@lexical/react/LexicalContentEditable'; import { ContentEditable } from '@lexical/react/LexicalContentEditable';

View file

@ -1,12 +1,9 @@
/** /**
* Copyright (c) Meta Platforms, Inc. and affiliates. * This source code is derived from code from Meta Platforms, Inc.
* * and affiliates, licensed under the MIT license located in the
* This source code is licensed under the MIT license found in the * LICENSE file in the /app/soapbox/features/compose/editor directory.
* LICENSE file in the root directory of this source tree.
*
*/ */
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
import { useLexicalNodeSelection } from '@lexical/react/useLexicalNodeSelection'; import { useLexicalNodeSelection } from '@lexical/react/useLexicalNodeSelection';
import { mergeRegister } from '@lexical/utils'; import { mergeRegister } from '@lexical/utils';

View file

@ -1,9 +1,7 @@
/** /**
* Copyright (c) Meta Platforms, Inc. and affiliates. * This source code is derived from code from Meta Platforms, Inc.
* * and affiliates, licensed under the MIT license located in the
* This source code is licensed under the MIT license found in the * LICENSE file in the /app/soapbox/features/compose/editor directory.
* LICENSE file in the root directory of this source tree.
*
*/ */
import { $applyNodeReplacement, DecoratorNode } from 'lexical'; import { $applyNodeReplacement, DecoratorNode } from 'lexical';

View file

@ -1,11 +1,8 @@
/* /**
MIT License * This source code is derived from code from Meta Platforms, Inc.
* and affiliates, licensed under the MIT license located in the
Copyright (c) Meta Platforms, Inc. and affiliates. * LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
This source code is licensed under the MIT license found in the
LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
import { CodeHighlightNode, CodeNode } from '@lexical/code'; import { CodeHighlightNode, CodeNode } from '@lexical/code';
import { HashtagNode } from '@lexical/hashtag'; import { HashtagNode } from '@lexical/hashtag';

View file

@ -1,9 +1,7 @@
/** /**
* Copyright (c) Meta Platforms, Inc. and affiliates. * This source code is derived from code from Meta Platforms, Inc.
* * and affiliates, licensed under the MIT license located in the
* This source code is licensed under the MIT license found in the * LICENSE file in the /app/soapbox/features/compose/editor directory.
* LICENSE file in the root directory of this source tree.
*
*/ */
import { addClassNamesToElement } from '@lexical/utils'; import { addClassNamesToElement } from '@lexical/utils';

View file

@ -1,9 +1,7 @@
/** /**
* Copyright (c) Meta Platforms, Inc. and affiliates. * This source code is derived from code from Meta Platforms, Inc.
* * and affiliates, licensed under the MIT license located in the
* This source code is licensed under the MIT license found in the * LICENSE file in the /app/soapbox/features/compose/editor directory.
* LICENSE file in the root directory of this source tree.
*
*/ */
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';

View file

@ -1,11 +1,8 @@
/* /**
MIT License * This source code is derived from code from Meta Platforms, Inc.
* and affiliates, licensed under the MIT license located in the
Copyright (c) Meta Platforms, Inc. and affiliates. * LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
This source code is licensed under the MIT license found in the
LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
import { $createHorizontalRuleNode } from '@lexical/react/LexicalHorizontalRuleNode'; import { $createHorizontalRuleNode } from '@lexical/react/LexicalHorizontalRuleNode';

View file

@ -1,11 +1,8 @@
/* /**
MIT License * This source code is derived from code from Meta Platforms, Inc.
* and affiliates, licensed under the MIT license located in the
Copyright (c) Meta Platforms, Inc. and affiliates. * LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
This source code is licensed under the MIT license found in the
LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
import { $isAutoLinkNode, $isLinkNode, TOGGLE_LINK_COMMAND } from '@lexical/link'; import { $isAutoLinkNode, $isLinkNode, TOGGLE_LINK_COMMAND } from '@lexical/link';
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';

View file

@ -1,11 +1,8 @@
/* /**
MIT License * This source code is derived from code from Meta Platforms, Inc.
* and affiliates, licensed under the MIT license located in the
Copyright (c) Meta Platforms, Inc. and affiliates. * LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
This source code is licensed under the MIT license found in the
LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
import { $createCodeNode, $isCodeHighlightNode } from '@lexical/code'; import { $createCodeNode, $isCodeHighlightNode } from '@lexical/code';
import { $isLinkNode, TOGGLE_LINK_COMMAND } from '@lexical/link'; import { $isLinkNode, TOGGLE_LINK_COMMAND } from '@lexical/link';

View file

@ -1,11 +1,8 @@
/* /**
MIT License * This source code is derived from code from Meta Platforms, Inc.
* and affiliates, licensed under the MIT license located in the
Copyright (c) Meta Platforms, Inc. and affiliates. * LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
This source code is licensed under the MIT license found in the
LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
import { LinkPlugin as LexicalLinkPlugin } from '@lexical/react/LexicalLinkPlugin'; import { LinkPlugin as LexicalLinkPlugin } from '@lexical/react/LexicalLinkPlugin';
import * as React from 'react'; import * as React from 'react';

View file

@ -1,9 +1,7 @@
/** /**
* Copyright (c) Meta Platforms, Inc. and affiliates. * This source code is derived from code from Meta Platforms, Inc.
* * and affiliates, licensed under the MIT license located in the
* This source code is licensed under the MIT license found in the * LICENSE file in the /app/soapbox/features/compose/editor directory.
* LICENSE file in the root directory of this source tree.
*
*/ */
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';

View file

@ -1,11 +1,8 @@
/* /**
MIT License * This source code is derived from code from Meta Platforms, Inc.
* and affiliates, licensed under the MIT license located in the
Copyright (c) Meta Platforms, Inc. and affiliates. * LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
This source code is licensed under the MIT license found in the
LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
/* eslint-disable eqeqeq */ /* eslint-disable eqeqeq */

View file

@ -1,11 +1,8 @@
/* /**
MIT License * This source code is derived from code from Meta Platforms, Inc.
* and affiliates, licensed under the MIT license located in the
Copyright (c) Meta Platforms, Inc. and affiliates. * LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
This source code is licensed under the MIT license found in the
LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
import { $isAtNodeEnd } from '@lexical/selection'; import { $isAtNodeEnd } from '@lexical/selection';
import { ElementNode, RangeSelection, TextNode } from 'lexical'; import { ElementNode, RangeSelection, TextNode } from 'lexical';

View file

@ -1,10 +1,9 @@
/** /**
* Copyright (c) Meta Platforms, Inc. and affiliates. * This source code is derived from code from Meta Platforms, Inc.
* * and affiliates, licensed under the MIT license located in the
* This source code is licensed under the MIT license found in the * LICENSE file in the /app/soapbox/features/compose/editor directory.
* LICENSE file in the root directory of this source tree.
*
*/ */
class Point { class Point {
private readonly _x: number; private readonly _x: number;

View file

@ -1,11 +1,10 @@
/* eslint-disable no-dupe-class-members */ /* eslint-disable no-dupe-class-members */
/** /**
* Copyright (c) Meta Platforms, Inc. and affiliates. * This source code is derived from code from Meta Platforms, Inc.
* * and affiliates, licensed under the MIT license located in the
* This source code is licensed under the MIT license found in the * LICENSE file in the /app/soapbox/features/compose/editor directory.
* LICENSE file in the root directory of this source tree.
*
*/ */
import { isPoint, Point } from './point'; import { isPoint, Point } from './point';
type ContainsPointReturn = { type ContainsPointReturn = {

View file

@ -1,11 +1,8 @@
/* /**
MIT License * This source code is derived from code from Meta Platforms, Inc.
* and affiliates, licensed under the MIT license located in the
Copyright (c) Meta Platforms, Inc. and affiliates. * LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
This source code is licensed under the MIT license found in the
LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
const VERTICAL_GAP = 10; const VERTICAL_GAP = 10;
const HORIZONTAL_OFFSET = 5; const HORIZONTAL_OFFSET = 5;

View file

@ -1,11 +1,8 @@
/* /**
MIT License * This source code is derived from code from Meta Platforms, Inc.
* and affiliates, licensed under the MIT license located in the
Copyright (c) Meta Platforms, Inc. and affiliates. * LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
This source code is licensed under the MIT license found in the
LICENSE file in the /app/soapbox/features/compose/editor directory.
*/
export const sanitizeUrl = (url: string): string => { export const sanitizeUrl = (url: string): string => {
/** A pattern that matches safe URLs. */ /** A pattern that matches safe URLs. */