+ Expo creates bundles for every platform containing only{' '}
+
+ platform-specific code
+
+ , like Android, iOS, and Web. Some platforms can also run in multiple environments.
+
+
+ Atlas marks every bundle with both the platform and target environment for which the
+ bundle is built.
+
+
+
+
+ Client — Bundles that run on
+ device.
+
+
+ SSR — Bundles that only run on
+ server.
+
+
+ RSC — React server component
+ bundles.
+
+
+
+
+
);
}
-
-function getBundelTagChildren(props: BundelTagProps) {
- const children: string[] = [];
-
- if (props.platform) {
- children.push(platformChildren[props.platform]);
- }
-
- // Only add the environment specifier if it's not bundled for the client
- if (props.environment && props.environment !== 'client') {
- children.push(environmentChildren[props.environment]);
- }
-
- return children.join(' × ');
-}
diff --git a/webui/src/components/EnvironmentIcon.tsx b/webui/src/components/EnvironmentIcon.tsx
new file mode 100644
index 0000000..7726be9
--- /dev/null
+++ b/webui/src/components/EnvironmentIcon.tsx
@@ -0,0 +1,21 @@
+import type { LucideProps } from 'lucide-react';
+
+import type { AtlasBundle } from '~core/data/types';
+
+type EnvironmentIconProps = Omit<
+ LucideProps & {
+ environment: AtlasBundle['environment'];
+ },
+ 'children'
+>;
+
+const iconsByEnvironment: Record = {
+ client: require('lucide-react/dist/esm/icons/tablet-smartphone').default,
+ node: require('lucide-react/dist/esm/icons/hexagon').default,
+ 'react-server': require('lucide-react/dist/esm/icons/server').default,
+};
+
+export function EnvironmentIcon({ className, environment, ...props }: EnvironmentIconProps) {
+ const Icon = iconsByEnvironment[environment];
+ return ;
+}
diff --git a/webui/src/components/EnvironmentName.tsx b/webui/src/components/EnvironmentName.tsx
new file mode 100644
index 0000000..d070576
--- /dev/null
+++ b/webui/src/components/EnvironmentName.tsx
@@ -0,0 +1,18 @@
+import type { PropsWithChildren } from 'react';
+
+import type { AtlasBundle } from '~core/data/types';
+
+type EnvironmentNameProps = PropsWithChildren<{
+ environment: AtlasBundle['environment'];
+ className?: string;
+}>;
+
+export const environmentNames: Record = {
+ client: 'Client',
+ node: 'SSR',
+ 'react-server': 'RSC',
+};
+
+export function EnvironmentName({ children, environment, ...props }: EnvironmentNameProps) {
+ return {children || environmentNames[environment]};
+}
diff --git a/webui/src/components/FileSize.tsx b/webui/src/components/FileSize.tsx
index a4a8e90..01ddd1c 100644
--- a/webui/src/components/FileSize.tsx
+++ b/webui/src/components/FileSize.tsx
@@ -1,7 +1,7 @@
// @ts-expect-error
import AsteriskIcon from 'lucide-react/dist/esm/icons/asterisk';
-import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '~/ui/Tooltip';
+import { Tooltip, TooltipContent, TooltipTrigger } from '~/ui/Tooltip';
type BundleFileSizeProps = {
/** The size of the files or bundle, in bytes */
@@ -12,32 +12,30 @@ export function FileSize(props: BundleFileSizeProps) {
return (
{formatByteSize(props.byteSize)}
-
-
-
-
-
-
-
- All file sizes are calculated based on the transpiled JavaScript byte size.
-
-
- While these sizes might differ from actual bundle size when using{' '}
-
- Hermes Bytecode (HBC)
-
- , the relative proportions are still correct.
-
-
-
-
+
+
+
+
+
+
+ All file sizes are calculated based on the transpiled JavaScript byte size.
+
+
+ While these sizes might differ from actual bundle size when using{' '}
+
+ Hermes Bytecode (HBC)
+
+ , the relative proportions are still correct.
+