+ defaultSize={{width: 350}}
+ enable={{right: true, bottom: false}}>
+
onToggle(false)}
style={{
@@ -106,30 +110,60 @@ function ExpandedEditor({
borderTopLeftRadius: 0,
borderBottomLeftRadius: 0,
}}>
-
+
+
+
+
+
+
+ Config Overrides
+
+
+
+
+
-
-
+
+
+
+
+ Applied Configs
+
+
+
+
+
@@ -143,10 +177,10 @@ function CollapsedEditor({
}): React.ReactElement {
return (
+ className="w-4 !h-[calc(100vh_-_3.5rem)]"
+ style={{position: 'relative'}}>
onToggle(true)}
style={{
@@ -156,7 +190,7 @@ function CollapsedEditor({
borderTopLeftRadius: 0,
borderBottomLeftRadius: 0,
}}>
-
+
);
diff --git a/compiler/apps/playground/components/Editor/EditorImpl.tsx b/compiler/apps/playground/components/Editor/EditorImpl.tsx
index a90447c96b50a..8b75ce6ac5eb5 100644
--- a/compiler/apps/playground/components/Editor/EditorImpl.tsx
+++ b/compiler/apps/playground/components/Editor/EditorImpl.tsx
@@ -201,7 +201,7 @@ function compile(
source: string,
mode: 'compiler' | 'linter',
configOverrides: string,
-): [CompilerOutput, 'flow' | 'typescript'] {
+): [CompilerOutput, 'flow' | 'typescript', PluginOptions | null] {
const results = new Map
>();
const error = new CompilerError();
const otherErrors: Array = [];
@@ -279,7 +279,7 @@ function compile(
...baseOpts,
logger: {
debugLogIRs: logIR,
- logEvent: (_filename: string | null, event: LoggerEvent) => {
+ logEvent: (_filename: string | null, event: LoggerEvent): void => {
if (event.kind === 'CompileError') {
otherErrors.push(event.detail);
}
@@ -315,11 +315,12 @@ function compile(
otherErrors.forEach(e => error.details.push(e));
}
if (error.hasErrors()) {
- return [{kind: 'err', results, error}, language];
+ return [{kind: 'err', results, error}, language, baseOpts];
}
return [
{kind: 'ok', results, transformOutput, errors: error.details},
language,
+ baseOpts,
];
}
@@ -328,7 +329,7 @@ export default function Editor(): JSX.Element {
const deferredStore = useDeferredValue(store);
const dispatchStore = useStoreDispatch();
const {enqueueSnackbar} = useSnackbar();
- const [compilerOutput, language] = useMemo(
+ const [compilerOutput, language, appliedOptions] = useMemo(
() => compile(deferredStore.source, 'compiler', deferredStore.config),
[deferredStore.source, deferredStore.config],
);
@@ -379,7 +380,7 @@ export default function Editor(): JSX.Element {
<>
-
+
diff --git a/compiler/apps/playground/components/TabbedWindow.tsx b/compiler/apps/playground/components/TabbedWindow.tsx
index 49ff76543bb5c..1751bd87e26c2 100644
--- a/compiler/apps/playground/components/TabbedWindow.tsx
+++ b/compiler/apps/playground/components/TabbedWindow.tsx
@@ -33,7 +33,7 @@ export default function TabbedWindow({
key={tab}
onClick={() => onTabChange(tab)}
className={clsx(
- 'active:scale-95 transition-transform text-center outline-none py-1.5 px-1.5 xs:px-3 sm:px-4 rounded-full capitalize whitespace-nowrap text-sm',
+ 'active:scale-95 transition-transform py-1.5 px-1.5 xs:px-3 sm:px-4 rounded-full text-sm',
!isActive && 'hover:bg-primary/5',
isActive && 'bg-highlight text-link',
)}>
diff --git a/compiler/apps/playground/lib/defaultStore.ts b/compiler/apps/playground/lib/defaultStore.ts
index 17a80094a6628..bb33c1b76c539 100644
--- a/compiler/apps/playground/lib/defaultStore.ts
+++ b/compiler/apps/playground/lib/defaultStore.ts
@@ -17,9 +17,7 @@ export const defaultConfig = `\
import type { PluginOptions } from 'babel-plugin-react-compiler/dist';
({
- environment: {
- enableResetCacheOnSourceFileChanges: false
- }
+ //compilationMode: "all"
} satisfies Partial
);`;
export const defaultStore: Store = {