ConfigEditor.tsx — react Source File
Architecture documentation for ConfigEditor.tsx, a tsx file in the react codebase. 10 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 84f17a2e_0d58_9d14_2c35_30f086f6e436["ConfigEditor.tsx"] 73168655_c854_d3d1_50a0_b37f865f3c7e["StoreContext.tsx"] 84f17a2e_0d58_9d14_2c35_30f086f6e436 --> 73168655_c854_d3d1_50a0_b37f865f3c7e 69a967f0_da34_9d76_02a5_8fdbe7a1e5af["monacoOptions.ts"] 84f17a2e_0d58_9d14_2c35_30f086f6e436 --> 69a967f0_da34_9d76_02a5_8fdbe7a1e5af 4e4e5a98_5124_5b44_9988_b087b9a52d93["IconChevron.tsx"] 84f17a2e_0d58_9d14_2c35_30f086f6e436 --> 4e4e5a98_5124_5b44_9988_b087b9a52d93 797436f0_309d_36b4_90ba_a12f5f622e48["IconChevron"] 84f17a2e_0d58_9d14_2c35_30f086f6e436 --> 797436f0_309d_36b4_90ba_a12f5f622e48 17f774ac_71d5_1815_6a34_f58dd5c8a61b["transitionTypes.ts"] 84f17a2e_0d58_9d14_2c35_30f086f6e436 --> 17f774ac_71d5_1815_6a34_f58dd5c8a61b 614e952b_3d61_c4d4_c772_736b3ce12512["react"] 84f17a2e_0d58_9d14_2c35_30f086f6e436 --> 614e952b_3d61_c4d4_c772_736b3ce12512 be60078a_fa8c_61df_2166_fcc9d56cb30b["monaco-editor"] 84f17a2e_0d58_9d14_2c35_30f086f6e436 --> be60078a_fa8c_61df_2166_fcc9d56cb30b ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] 84f17a2e_0d58_9d14_2c35_30f086f6e436 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 960ac0c1_705f_efd0_beac_76a8819749ba["re-resizable"] 84f17a2e_0d58_9d14_2c35_30f086f6e436 --> 960ac0c1_705f_efd0_beac_76a8819749ba b3a13895_070c_fee5_e384_55ccdef7a5db["index.d.ts"] 84f17a2e_0d58_9d14_2c35_30f086f6e436 --> b3a13895_070c_fee5_e384_55ccdef7a5db 6c4ddf93_cf1a_7b66_fd69_69c7c8032b25["EditorImpl.tsx"] 6c4ddf93_cf1a_7b66_fd69_69c7c8032b25 --> 84f17a2e_0d58_9d14_2c35_30f086f6e436 style 84f17a2e_0d58_9d14_2c35_30f086f6e436 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import MonacoEditor, {loader, type Monaco} from '@monaco-editor/react';
import type {editor} from 'monaco-editor';
import * as monaco from 'monaco-editor';
import React, {
useState,
useRef,
unstable_ViewTransition as ViewTransition,
unstable_addTransitionType as addTransitionType,
startTransition,
} from 'react';
import {Resizable} from 're-resizable';
import {useStore, useStoreDispatch} from '../StoreContext';
import {monacoConfigOptions} from './monacoOptions';
import {IconChevron} from '../Icons/IconChevron';
import {CONFIG_PANEL_TRANSITION} from '../../lib/transitionTypes';
// @ts-expect-error - webpack asset/source loader handles .d.ts files as strings
import compilerTypeDefs from 'babel-plugin-react-compiler/dist/index.d.ts';
loader.config({monaco});
export default function ConfigEditor({
formattedAppliedConfig,
}: {
formattedAppliedConfig: string;
}): React.ReactElement {
const [isExpanded, setIsExpanded] = useState(false);
// TODO: Add back <Activity> after upgrading next.js
return (
<>
<div
style={{
display: isExpanded ? 'block' : 'none',
}}>
{/* <Activity mode={isExpanded ? 'visible' : 'hidden'}> */}
<ExpandedEditor
onToggle={() => {
startTransition(() => {
addTransitionType(CONFIG_PANEL_TRANSITION);
setIsExpanded(false);
});
}}
formattedAppliedConfig={formattedAppliedConfig}
/>
</div>
<div
style={{
display: !isExpanded ? 'block' : 'none',
}}>
{/* </Activity>
<Activity mode={isExpanded ? 'hidden' : 'visible'}></Activity> */}
<CollapsedEditor
// ... (162 more lines)
Domain
Subdomains
Dependencies
- IconChevron
- IconChevron.tsx
- StoreContext.tsx
- index.d.ts
- monaco-editor
- monacoOptions.ts
- re-resizable
- react
- react
- transitionTypes.ts
Source
Frequently Asked Questions
What does ConfigEditor.tsx do?
ConfigEditor.tsx is a source file in the react codebase, written in tsx. It belongs to the MonacoIntegration domain, Options subdomain.
What functions are defined in ConfigEditor.tsx?
ConfigEditor.tsx defines 3 function(s): CollapsedEditor, ConfigEditor, ExpandedEditor.
What does ConfigEditor.tsx depend on?
ConfigEditor.tsx imports 10 module(s): IconChevron, IconChevron.tsx, StoreContext.tsx, index.d.ts, monaco-editor, monacoOptions.ts, re-resizable, react, and 2 more.
What files import ConfigEditor.tsx?
ConfigEditor.tsx is imported by 1 file(s): EditorImpl.tsx.
Where is ConfigEditor.tsx in the architecture?
ConfigEditor.tsx is located at compiler/apps/playground/components/Editor/ConfigEditor.tsx (domain: MonacoIntegration, subdomain: Options, directory: compiler/apps/playground/components/Editor).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free