Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions examples/website-chat/src/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ export function ChatInput({onSubmit}: ChatInputProps) {
contentEditable={null}>
<div className="flex w-full items-end gap-2 border-t [border-top-style:solid] border-zinc-200 bg-white px-3 py-2.5 dark:border-white/[0.08] dark:bg-[#232325]">
<EmojiPlugin />
<ContentEditable
className="max-h-[120px] min-h-[36px] flex-1 overflow-y-auto rounded-[20px] border border-solid border-transparent bg-zinc-100 px-2.5 py-1.5 text-sm leading-relaxed transition-[border-color] duration-150 outline-none focus:border-indigo-300 focus:bg-white dark:bg-[#3a3a3c] dark:text-zinc-200 dark:focus:border-indigo-500 dark:focus:bg-[#2e2e32]"
aria-label="Message input"
/>
<div className="min-w-0 flex-1">
<ContentEditable
className="max-h-[120px] min-h-[36px] w-full overflow-y-auto rounded-[20px] border border-solid border-transparent bg-zinc-100 px-2.5 py-1.5 text-sm leading-relaxed transition-[border-color] duration-150 outline-none focus:border-indigo-300 focus:bg-white dark:bg-[#3a3a3c] dark:text-zinc-200 dark:focus:border-indigo-500 dark:focus:bg-[#2e2e32]"
aria-label="Message input"
/>
</div>
<SubmitOnEnterPlugin onSubmit={onSubmit} />
<SendButtonPlugin onSubmit={onSubmit} />
</div>
Expand Down
5 changes: 1 addition & 4 deletions packages/lexical-website/docs/error.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
id: error
title: Error Code
---
import { OssOnly } from 'docusaurus-plugin-internaldocs-fb/internal';
import ErrorCodePage from '@site/src/components/ErrorCodePage';

# Error Code
<OssOnly>
<ErrorCodePage/>
</OssOnly>
<ErrorCodePage/>
3 changes: 1 addition & 2 deletions packages/lexical-website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ const config: Config = {
].filter(plugin => plugin != null),
presets: [
[
require.resolve('docusaurus-plugin-internaldocs-fb/docusaurus-preset'),
'classic',
{
blog: false,
docs: {
Expand All @@ -435,7 +435,6 @@ const config: Config = {
gtag: {
trackingID: 'G-7C6YYBYBBT',
},
staticDocsProject: 'lexical',
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
Expand Down
4 changes: 0 additions & 4 deletions packages/lexical-website/fb/sdoc-cache.json

This file was deleted.

2 changes: 0 additions & 2 deletions packages/lexical-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
"@mdx-js/react": "^3.1.1",
"@mermaid-js/layout-elk": "^0.2.1",
"@radix-ui/react-tabs": "^1.1.13",
"@vercel/analytics": "^1.5.0",
"clsx": "^2.1.1",
"docusaurus-plugin-internaldocs-fb": "1.19.3",
"docusaurus-plugin-typedoc": "^1.4.2",
"fs-extra": "^11.3.4",
"lexical": "workspace:*",
Expand Down
36 changes: 6 additions & 30 deletions packages/lexical-website/src/components/Gallery/GalleryCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
import BrowserOnly from '@docusaurus/BrowserOnly';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import clsx from 'clsx';
import React, {useEffect, useState} from 'react';
import React from 'react';

import Card from './Card';
import Filters from './components/Filters';
import SearchBar from './components/SearchBar';
import {Example, plugins} from './pluginList';
import styles from './styles.module.css';
import {Tag, TagList} from './tagList';
import {TagList} from './tagList';
import {useFilteredExamples} from './utils';

function CardList({cards}: {cards: Array<Example>}) {
Expand All @@ -40,40 +40,16 @@ function GalleryCardsImpl() {
siteConfig: {customFields},
} = useDocusaurusContext();

const [internGalleryCards, setInternGalleryCards] = useState<{
InternGalleryCards: () => Array<Example>;
} | null>(null);
const [internGalleryTags, setInternGalleryTags] = useState<{
InternGalleryTags: () => {[type in string]: Tag};
} | null>(null);

const pluginsCombined = plugins(customFields ?? {}).concat(
internGalleryCards != null ? internGalleryCards.InternGalleryCards() : [],
);

const tagList = {
...TagList,
...(internGalleryTags != null ? internGalleryTags.InternGalleryTags() : {}),
};

const filteredPlugins = useFilteredExamples(pluginsCombined);

useEffect(() => {
if (process.env.FB_INTERNAL) {
// @ts-ignore runtime dependency for intern builds
import('../../../../InternGalleryCards').then(setInternGalleryCards);
// @ts-ignore runtime dependency for intern builds
import('../../../../InternGalleryTags').then(setInternGalleryTags);
}
}, []);
const allPlugins = plugins(customFields ?? {});
const filteredPlugins = useFilteredExamples(allPlugins);

return (
<section className="margin-top--lg margin-bottom--xl">
<main className="margin-vert--lg">
<Filters
allPlugins={pluginsCombined}
allPlugins={allPlugins}
filteredPlugins={filteredPlugins}
tagList={tagList}
tagList={TagList}
/>
<div
style={{display: 'flex', marginLeft: 'auto'}}
Expand Down
1 change: 0 additions & 1 deletion packages/lexical-website/src/pages/gallery.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
id: gallery
title: Gallery
---
import { FBInternOnly } from 'docusaurus-plugin-internaldocs-fb/internal';
import GalleryPage from '@site/src/components/Gallery/GalleryPage';

# Gallery
Expand Down
4 changes: 0 additions & 4 deletions packages/lexical-website/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ import HomepageExamples from '@site/src/components/HomepageExamples';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import StackBlitzButton from '@site/src/components/StackBlitzButton';
import Layout from '@theme/Layout';
import {inject} from '@vercel/analytics';

// activate analytics
inject();

function LandingHero() {
return (
Expand Down
Loading
Loading