diff --git a/nx-dev/ui-fence/src/lib/fence.tsx b/nx-dev/ui-fence/src/lib/fence.tsx
index 35e2cf78a2eec..92e9892c6341f 100644
--- a/nx-dev/ui-fence/src/lib/fence.tsx
+++ b/nx-dev/ui-fence/src/lib/fence.tsx
@@ -1,10 +1,9 @@
import {
ClipboardDocumentCheckIcon,
ClipboardDocumentIcon,
- InformationCircleIcon,
SparklesIcon,
} from '@heroicons/react/24/outline';
-import { ReactNode, JSX, useEffect, useState } from 'react';
+import { JSX, ReactNode, useEffect, useState } from 'react';
// @ts-ignore
import { CopyToClipboard } from 'react-copy-to-clipboard';
// @ts-ignore
@@ -29,31 +28,20 @@ function CodeWrapper(options: {
fileName: string;
command: string;
path: string;
- isMessageBelow: boolean;
language: string;
children: string; // intentionally typed as such
}): ({ children }: { children: ReactNode }) => JSX.Element {
return ({ children }: { children: ReactNode }) =>
options.language === 'shell' ? (
-
+
) : options.command ? (
) : (
-
+
);
}
@@ -138,6 +126,7 @@ export function Fence({
position: 'absolute',
};
}
+
const highlightOptions = Object.keys(lineGroups).map((lineNumberKey) => ({
label: lineNumberKey,
value: lineNumberKey,
@@ -163,11 +152,11 @@ export function Fence({
t && clearTimeout(t);
};
}, [copied]);
- const showRescopeMessage =
- (!skipRescope && children.includes('@nx/')) || command.includes('@nx/');
+
function highlightChange(item: { label: string; value: string }) {
onLineGroupSelectionChange?.(item.value);
}
+
return (
);
diff --git a/nx-dev/ui-fence/src/lib/fences/code-output.tsx b/nx-dev/ui-fence/src/lib/fences/code-output.tsx
index 9dbeb29286db7..df5246b80affa 100644
--- a/nx-dev/ui-fence/src/lib/fences/code-output.tsx
+++ b/nx-dev/ui-fence/src/lib/fences/code-output.tsx
@@ -1,22 +1,14 @@
-import { cx } from '@nx/nx-dev/ui-primitives';
import { JSX, ReactNode } from 'react';
export function CodeOutput({
content,
fileName,
- isMessageBelow,
}: {
content: ReactNode;
fileName: string;
- isMessageBelow: boolean;
}): JSX.Element {
return (
-
+
{!!fileName && (
{fileName}
diff --git a/nx-dev/ui-fence/src/lib/fences/terminal-output.tsx b/nx-dev/ui-fence/src/lib/fences/terminal-output.tsx
index eebb77b97adef..34d366ac877ed 100644
--- a/nx-dev/ui-fence/src/lib/fences/terminal-output.tsx
+++ b/nx-dev/ui-fence/src/lib/fences/terminal-output.tsx
@@ -4,17 +4,15 @@ import { TerminalShellWrapper } from './terminal-shell';
export function TerminalOutput({
content,
command,
- isMessageBelow,
path,
}: {
content: ReactNode | null;
command: string;
- isMessageBelow: boolean;
path: string;
}): JSX.Element {
const commandLines = command.split('\n').filter(Boolean);
return (
-
+
{commandLines.map((line, index) => {
diff --git a/nx-dev/ui-fence/src/lib/fences/terminal-shell.tsx b/nx-dev/ui-fence/src/lib/fences/terminal-shell.tsx
index 9ebd1121ebf0c..c8685ba353ccd 100644
--- a/nx-dev/ui-fence/src/lib/fences/terminal-shell.tsx
+++ b/nx-dev/ui-fence/src/lib/fences/terminal-shell.tsx
@@ -1,20 +1,12 @@
-import { cx } from '@nx/nx-dev/ui-primitives';
import { JSX, ReactNode } from 'react';
export function TerminalShellWrapper({
- isMessageBelow,
children,
}: {
- isMessageBelow: boolean;
children: ReactNode;
}): JSX.Element {
return (
-
+
diff --git a/nx-dev/ui-markdoc/src/lib/tags/terminal-video.component.tsx b/nx-dev/ui-markdoc/src/lib/tags/terminal-video.component.tsx
index c6635b8c60014..f69ef4c59ec3c 100644
--- a/nx-dev/ui-markdoc/src/lib/tags/terminal-video.component.tsx
+++ b/nx-dev/ui-markdoc/src/lib/tags/terminal-video.component.tsx
@@ -24,7 +24,7 @@ export function TerminalVideo({
alt: string;
}): JSX.Element {
return (
-
+