Skip to content

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

TypeScript

refactor: rename xds-* runtime keys/events in sandbox + docsite (#3015)

EJ Hammond078ac4efe768
diff --git a/.gitignore b/.gitignore
index cff322cfa0..97e08cbe4a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,7 +46,7 @@ e2e/playwright/.cache/
internal/vibe-tests/results/
# XDS agent docs (generated)
-.xds-docs/
+.astryx-docs/
apps/sandbox/.next/
apps/sandbox/out/
apps/sandbox/next-env.d.ts
diff --git a/apps/docsite/src/app/playground/PlaygroundClient.tsx b/apps/docsite/src/app/playground/PlaygroundClient.tsx
index 31db06b34c..e563077fcd 100644
--- a/apps/docsite/src/app/playground/PlaygroundClient.tsx
+++ b/apps/docsite/src/app/playground/PlaygroundClient.tsx
@@ -296,7 +296,7 @@ export function PlaygroundClient({defaultIsMobile}: PlaygroundClientProps) {
defaultSize: 440,
minSizePx: 340,
maxSizePx: 760,
- autoSaveId: 'xds-playground-left-width',
+ autoSaveId: 'astryx-playground-left-width',
});
// Seed the preview mode once from the docsite's mode; afterward the toolbar
diff --git a/apps/sandbox/src/app/(fullscreen)/PreviewShell.tsx b/apps/sandbox/src/app/(fullscreen)/PreviewShell.tsx
index 47730e2992..8ca4e04fbb 100644
--- a/apps/sandbox/src/app/(fullscreen)/PreviewShell.tsx
+++ b/apps/sandbox/src/app/(fullscreen)/PreviewShell.tsx
@@ -310,7 +310,7 @@ export function PreviewShell({children}: {children: React.ReactNode}) {
return;
}
iframe.contentWindow.postMessage(
- {type: 'xds-theme-sync', theme: themeName, mode},
+ {type: 'astryx-theme-sync', theme: themeName, mode},
'*',
);
}, [themeName, mode]);
diff --git a/apps/sandbox/src/app/layout.tsx b/apps/sandbox/src/app/layout.tsx
index 6a7411ff93..fd659f9f60 100644
--- a/apps/sandbox/src/app/layout.tsx
+++ b/apps/sandbox/src/app/layout.tsx
@@ -27,12 +27,12 @@ export default function RootLayout({children}: {children: React.ReactNode}) {
Runs before paint so the toolbar is never visible in embed contexts. */}
<script
dangerouslySetInnerHTML={{
- __html: `try{if(window.self!==window.top)document.documentElement.classList.add('xds-embed')}catch(e){document.documentElement.classList.add('xds-embed')}`,
+ __html: `try{if(window.self!==window.top)document.documentElement.classList.add('astryx-embed')}catch(e){document.documentElement.classList.add('astryx-embed')}`,
}}
/>
<style
dangerouslySetInnerHTML={{
- __html: `html.xds-embed [data-preview-shell]{display:none!important}`,
+ __html: `html.astryx-embed [data-preview-shell]{display:none!important}`,
}}
/>
</head>
diff --git a/apps/sandbox/src/app/providers.tsx b/apps/sandbox/src/app/providers.tsx
index aa96838193..247a04e927 100644
--- a/apps/sandbox/src/app/providers.tsx
+++ b/apps/sandbox/src/app/providers.tsx
@@ -59,8 +59,8 @@ const ThemeContext = createContext<ThemeContextValue>({
export const useThemeControls = () => useContext(ThemeContext);
-const THEME_STORAGE_KEY = 'xds-sandbox-theme';
-const MODE_STORAGE_KEY = 'xds-sandbox-mode';
+const THEME_STORAGE_KEY = 'astryx-sandbox-theme';
+const MODE_STORAGE_KEY = 'astryx-sandbox-mode';
/**
* Reads theme/mode from URL search params when rendered inside an embed iframe.
@@ -155,7 +155,7 @@ export function Providers({children}: {children: React.ReactNode}) {
return;
}
const handler = (event: MessageEvent) => {
- if (event.data?.type === 'xds-theme-sync') {
+ if (event.data?.type === 'astryx-theme-sync') {
const {theme: newTheme, mode: newMode} = event.data;
if (newTheme && newTheme in themes) {
setThemeName(newTheme);
diff --git a/internal/vibe-tests/.gitignore b/internal/vibe-tests/.gitignore
index 63d1a60032..adb393f9cd 100644
--- a/internal/vibe-tests/.gitignore
+++ b/internal/vibe-tests/.gitignore
@@ -1,5 +1,5 @@
# XDS agent docs (generated)
-.xds-docs/
+.astryx-docs/
AGENTS.md
# Baseline comparison docs (generated)
diff --git a/scripts/package-source.js b/scripts/package-source.js
index dc48ec5292..ca2ced330b 100644
--- a/scripts/package-source.js
+++ b/scripts/package-source.js
@@ -270,7 +270,7 @@ node src/xds/setup.mjs
This will:
- Ask if you want to add XDS guidance to your AGENTS.md
-- Create a \`.xds-docs/\` folder with component documentation
+- Create a \`.astryx-docs/\` folder with component documentation
## Version