Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

Merge branch 'main' of github.com:facebookexperimental/xds

Cindy Zhangc3361b08e017
diff --cc apps/storybook/vite.config.ts
index 405316a078,1b713613ce..391701a0cc
--- a/apps/storybook/vite.config.ts
+++ b/apps/storybook/vite.config.ts
@@@ -1,5 -1,15 +1,14 @@@
+ /**
+ * @file vite.config.ts
+ * @input Uses vite, @vitejs/plugin-react, path
+ * @output Vite configuration with React plugin and @xds/core alias
+ * @position Build config; used by Storybook's Vite integration
+ *
+ * SYNC: When modified, update this header and /apps/storybook/README.md
+ */
+
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
-import { resolve } from 'path';
export default defineConfig({
plugins: [react()],
diff --cc packages/core/src/Button/Button.tsx
index 3c18343907,5299ae4512..41010a8cea
--- a/packages/core/src/Button/Button.tsx
+++ b/packages/core/src/Button/Button.tsx
@@@ -1,12 -1,13 +1,21 @@@
+ /**
+ * @file Button.tsx
+ * @input Uses React forwardRef, ButtonHTMLAttributes, ReactNode
+ * @output Exports Button component, ButtonProps, ButtonVariant, ButtonSize types
+ * @position Core implementation; consumed by index.ts, tested by Button.test.tsx
+ *
+ * SYNC: When modified, update this header and /packages/core/src/Button/README.md
+ */
+
import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from 'react';
+import * as stylex from '@stylexjs/stylex';
+import {
+ colorTokens,
+ spacingTokens,
+ radiusTokens,
+ transitionTokens,
+ typographyTokens,
+} from '../theme/tokens.stylex';
export type ButtonVariant = 'primary' | 'secondary' | 'ghost';
export type ButtonSize = 'sm' | 'md' | 'lg';
diff --cc packages/core/src/index.ts
index d8e5d62a1b,c874d39844..7576158ba3
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@@ -1,5 -1,11 +1,14 @@@
+ /**
+ * @file index.ts
+ * @input Imports from component directories (Button/)
+ * @output Exports all public components and types for @xds/core
+ * @position Package entry point; consumed by external applications
+ *
+ * SYNC: When modified, update this header and /packages/core/src/README.md
+ */
+
// Components
export * from './Button';
+
+// Theme
+export * from './theme';
diff --cc packages/core/tsup.config.ts
index 7a3b0a9f52,51f16b3fc4..45b3cb3343
--- a/packages/core/tsup.config.ts
+++ b/packages/core/tsup.config.ts
@@@ -1,5 -1,13 +1,14 @@@
+ /**
+ * @file tsup.config.ts
+ * @input Uses tsup
+ * @output Bundle configuration for CJS/ESM outputs with TypeScript declarations
+ * @position Build config; defines entry points and output formats for @xds/core
+ *
+ * SYNC: When modified, update this header and /packages/core/README.md
+ */
+
import { defineConfig } from 'tsup';
+import babel from 'esbuild-plugin-babel';
export default defineConfig({
entry: ['src/index.ts', 'src/Button/index.ts'],