An open source design system that's fully customizable and agent ready
TypeScript
feat(sandbox): add Explore and Profile views, logo nav, and section updates (#1252)
rubyycheungd205ecd972b9
diff --git a/apps/sandbox/src/app/(fullscreen)/PreviewShell.tsx b/apps/sandbox/src/app/(fullscreen)/PreviewShell.tsxindex 3c1f0b7aa8..ea9a6dadd7 100644--- a/apps/sandbox/src/app/(fullscreen)/PreviewShell.tsx+++ b/apps/sandbox/src/app/(fullscreen)/PreviewShell.tsx@@ -194,12 +194,12 @@ export function PreviewShell({children}: {children: React.ReactNode}) {const [viewport, setViewport] = useState<ViewportSize>('desktop');const [copied, setCopied] = useState(false);const {themeName, setThemeName, mode, setMode} = useThemeControls();- const [toolbarHidden, setToolbarHidden] = useState(() => {- if (typeof window !== 'undefined') {- return localStorage.getItem('sandbox-toolbar-hidden') === 'true';- }- return false;- });+ const [toolbarHidden, setToolbarHidden] = useState(false);++ useEffect(() => {+ const saved = localStorage.getItem('sandbox-toolbar-hidden');+ if (saved === 'true') setToolbarHidden(true);+ }, []);useEffect(() => {localStorage.setItem('sandbox-toolbar-hidden', String(toolbarHidden));diff --git a/apps/sandbox/src/app/(fullscreen)/pages/docsite/page.tsx b/apps/sandbox/src/app/(fullscreen)/pages/docsite/page.tsxindex 080c4d37af..cd142de58e 100644--- a/apps/sandbox/src/app/(fullscreen)/pages/docsite/page.tsx+++ b/apps/sandbox/src/app/(fullscreen)/pages/docsite/page.tsx@@ -13,7 +13,9 @@ import {XDSSegmentedControlItem,} from '@xds/core/SegmentedControl';import {XDSSkeleton} from '@xds/core/Skeleton';+import {XDSAvatar} from '@xds/core/Avatar';import {XDSBadge} from '@xds/core/Badge';+import {XDSTextInput} from '@xds/core/TextInput';import {XDSToken} from '@xds/core/Token';import {XDSToolbar} from '@xds/core/Toolbar';import {XDSTooltip} from '@xds/core/Tooltip';@@ -35,6 +37,17 @@ const SearchIcon = (props: React.SVGProps<SVGSVGElement>) => (</svg>);+const ProfileIcon = (props: React.SVGProps<SVGSVGElement>) => (+ <svg+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth={1.5}+ {...props}>+ <circle cx="12" cy="8" r="4" />+ <path d="M20 21a8 8 0 10-16 0" />+ </svg>+);const HamburgerIcon = (props: React.SVGProps<SVGSVGElement>) => (<svgviewBox="0 0 24 24"@@ -239,6 +252,29 @@ const FullscreenIcon = (props: React.SVGProps<SVGSVGElement>) => (</svg>);+const GearIcon = (props: React.SVGProps<SVGSVGElement>) => (+ <svg+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth={1.5}+ {...props}>+ <circle cx="12" cy="12" r="3" />+ <path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" />+ </svg>+);++const FolderIcon = (props: React.SVGProps<SVGSVGElement>) => (+ <svg+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth={1.5}+ {...props}>+ <path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" />+ </svg>+);+// ---------------------------------------------------------------------------// Boids ASCII Canvas — generating state animation// ---------------------------------------------------------------------------@@ -896,8 +932,8 @@ function ChatPanel({}: {isGenerating: boolean;onSend?: () => void;- activeView: 'craft' | 'docs';- setActiveView: (view: 'craft' | 'docs') => void;+ activeView: 'craft' | 'docs' | 'explore' | 'profile';+ setActiveView: (view: 'craft' | 'docs' | 'explore' | 'profile') => void;}) {const [prompt, setPrompt] = useState('');@@ -933,6 +969,11 @@ function ChatPanel({icon: activeView === 'craft' ? CheckIcon : undefined,onClick: () => setActiveView('craft'),},+ {+ label: 'Explore',+ icon: activeView === 'explore' ? CheckIcon : undefined,+ onClick: () => setActiveView('explore'),+ },{label: 'Docs',icon: activeView === 'docs' ? CheckIcon : undefined,@@ -961,22 +1002,6 @@ function ChatPanel({fill="currentColor"/></svg>- <span- style={{- width: 1,- height: 20,- backgroundColor: 'var(--color-divider, rgba(0,0,0,0.15))',- flexShrink: 0,- }}- />- <span- style={{- fontSize: 16,- fontWeight: 600,- color: 'var(--color-text-primary, #1a1a1a)',- }}>- {activeView === 'craft' ? 'Craft' : 'Docs'}- </span></div><XDSButtonlabel="Toggle sidebar"@@ -1659,12 +1684,162 @@ const SEARCH_COMMANDS = createStaticSource([},]);+// ---------------------------------------------------------------------------+// LogoNav — hover-based logo navigation dropdown+// ---------------------------------------------------------------------------++const XDS_LOGO_SVG = (+ <svg+ width="101"+ height="24"+ viewBox="0 0 101 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg">+ <path+ d="M2.4239 15.8011C2.03945 16.3796 1.66972 16.9538 1.3147 17.524C0.707427 18.4992 1.42354 19.7348 2.57241 19.7348C3.13302 19.7348 3.64463 19.4209 3.91525 18.93C4.29391 18.243 4.71274 17.5352 5.17173 16.8066C5.38894 16.4618 5.60743 16.12 5.82721 15.7812C6.25251 15.1254 6.46516 14.7976 6.76252 14.68C6.99255 14.5891 7.27368 14.5899 7.50317 14.6822C7.79984 14.8014 8.00881 15.1278 8.42675 15.7804C8.64287 16.1179 8.85732 16.46 9.07008 16.8066C9.52175 17.534 9.93823 18.2339 10.3195 18.9063C10.6075 19.4141 11.1428 19.7348 11.7266 19.7348C12.9476 19.7348 13.7063 18.4203 13.0547 17.3877C12.7332 16.8781 12.3991 16.3639 12.0525 15.8453C11.3983 14.8527 10.7379 13.8906 10.0714 12.9592C9.81687 12.6036 9.68962 12.4258 9.64377 12.2384C9.60589 12.0836 9.60492 11.9307 9.64085 11.7754C9.68435 11.5874 9.80856 11.4091 10.057 11.0526C10.7093 10.1164 11.3596 9.15781 12.0078 8.1768C12.3869 7.60474 12.7521 7.03681 13.1035 6.47298C13.71 5.49987 12.9962 4.26519 11.8496 4.26519C11.2943 4.26519 10.7868 4.57405 10.5169 5.05923C10.1399 5.73688 9.72461 6.43721 9.27114 7.16022C9.06143 7.49458 8.8505 7.82569 8.63835 8.15358C8.21478 8.80819 8.003 9.1355 7.70554 9.25334C7.47561 9.34442 7.19397 9.34375 6.96448 9.25156C6.66759 9.13229 6.45853 8.80578 6.04043 8.15276C5.83116 7.82591 5.62351 7.49506 5.41747 7.16022C4.97918 6.44793 4.5738 5.76096 4.20132 5.0993C3.9136 4.58821 3.37618 4.26519 2.78967 4.26519C1.56624 4.26519 0.805692 5.58299 1.45419 6.62041C1.76588 7.11903 2.08912 7.6231 2.4239 8.1326C3.0752 9.10994 3.73263 10.059 4.3962 10.9796C4.65373 11.337 4.7825 11.5156 4.82882 11.7042C4.86709 11.86 4.86797 12.0139 4.83149 12.1702C4.78732 12.3593 4.66122 12.5385 4.40903 12.897C3.74526 13.8406 3.08355 14.8086 2.4239 15.8011Z"+ fill="currentColor"+ />+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M22.4734 4.26519C20.4471 4.26519 19.434 4.26519 18.6657 4.67201C18.0456 5.00031 17.5385 5.50739 17.2102 6.12744C16.8034 6.89579 16.8034 7.90892 16.8034 9.9352V14.0648C16.8034 16.0911 16.8034 17.1042 17.2102 17.8726C17.5385 18.4926 18.0456 18.9997 18.6657 19.328C19.434 19.7348 20.4471 19.7348 22.4734 19.7348H23.2039C24.8496 19.7348 26.2644 19.4033 27.4485 18.7403C28.6399 18.07 29.5559 17.1529 30.1963 15.989C30.8367 14.825 31.1569 13.4954 31.1569 12C31.1569 10.5046 30.8367 9.17495 30.1963 8.01105C29.5559 6.84714 28.6399 5.9337 27.4485 5.27072C26.2644 4.60037 24.8496 4.26519 23.2039 4.26519H22.4734ZM20.0092 8.74707C20.0092 8.16814 20.0092 7.87867 20.1255 7.65914C20.2193 7.48198 20.3641 7.33711 20.5413 7.24331C20.7608 7.12707 21.0503 7.12707 21.6292 7.12707H23.1927C24.6522 7.12707 25.7916 7.57274 26.6107 8.46409C27.4299 9.34807 27.8394 10.5267 27.8394 12C27.8394 13.4659 27.4299 14.6446 26.6107 15.5359C25.7916 16.4273 24.6522 16.8729 23.1927 16.8729H21.6292C21.0503 16.8729 20.7608 16.8729 20.5413 16.7567C20.3641 16.6629 20.2193 16.518 20.1255 16.3409C20.0092 16.1213 20.0092 15.8319 20.0092 15.2529V8.74707Z"+ fill="currentColor"+ />+ <path+ d="M35.4666 19.2376C36.6134 19.7459 37.9501 20 39.4767 20H39.8006C41.7144 20 43.2261 19.5801 44.3357 18.7403C45.4452 17.9006 46 16.7403 46 15.2597C46 14.3757 45.8213 13.6501 45.4638 13.0829C45.1064 12.5083 44.6559 12.0589 44.1123 11.7348C43.5761 11.4033 43.0325 11.1565 42.4814 10.9945C41.9304 10.8324 41.4575 10.7145 41.0628 10.6409L38.706 10.1878C38.0283 10.0552 37.4698 9.87477 37.0305 9.64641C36.5985 9.41068 36.3826 9.02762 36.3826 8.49724C36.3826 7.96685 36.6395 7.55064 37.1533 7.24862C37.6671 6.93923 38.3858 6.78453 39.3091 6.78453H39.6219C40.3964 6.78453 41.1224 6.93186 41.8001 7.22652C42.0982 7.35474 42.3899 7.5234 42.6754 7.73251C43.326 8.20923 44.2444 8.27802 44.8243 7.71734C45.34 7.21868 45.4053 6.39786 44.8761 5.91349C44.3498 5.43171 43.7638 5.03698 43.1181 4.72928C42.1054 4.24309 40.9511 4 39.6554 4H39.3315C38.0953 4 37.0156 4.19521 36.0922 4.58564C35.1762 4.97606 34.4613 5.52486 33.9475 6.23205C33.4411 6.93186 33.188 7.76059 33.188 8.71823C33.188 9.49171 33.3406 10.1436 33.6459 10.674C33.9587 11.2044 34.3571 11.6354 34.8411 11.9669C35.3326 12.2983 35.8539 12.5599 36.4049 12.7514C36.956 12.9355 37.4698 13.0718 37.9464 13.1602L40.3033 13.6243C40.6905 13.698 41.074 13.8011 41.4538 13.9337C41.841 14.0589 42.1612 14.2431 42.4144 14.4862C42.6676 14.7293 42.7942 15.0608 42.7942 15.4807C42.7942 16.6151 41.7814 17.1823 39.7559 17.1823H39.4432C38.49 17.1823 37.615 17.0055 36.8182 16.6519C36.4847 16.4994 36.1665 16.3134 35.8635 16.0938C35.17 15.5911 34.1857 15.5241 33.5784 16.1282C33.0651 16.6388 32.9912 17.4631 33.5198 17.9578C34.0797 18.4818 34.7287 18.9083 35.4666 19.2376Z"+ fill="currentColor"+ />+ <path+ d="M59.8471 19.26C58.5271 19.26 57.4004 18.96 56.4671 18.36C55.5338 17.7467 54.8538 16.9067 54.4271 15.84C54.0138 14.7733 53.9004 13.5467 54.0871 12.16C54.2471 11.0933 54.5538 10.1133 55.0071 9.21999C55.4604 8.32666 56.0404 7.54666 56.7471 6.87999C57.4538 6.21332 58.2538 5.69999 59.1471 5.33999C60.0404 4.96666 60.9871 4.77999 61.9871 4.77999C62.8538 4.77999 63.6538 4.93332 64.3871 5.23999C65.1204 5.54666 65.7538 5.97999 66.2871 6.53999C66.8204 7.08666 67.1938 7.70666 67.4071 8.39999L65.8671 9.03999C65.6938 8.49332 65.4071 8.01999 65.0071 7.61999C64.6204 7.20666 64.1671 6.88666 63.6471 6.65999C63.1271 6.43332 62.5671 6.31999 61.9671 6.31999C61.1938 6.31999 60.4604 6.46666 59.7671 6.75999C59.0738 7.05332 58.4471 7.47332 57.8871 8.01999C57.3404 8.55332 56.8804 9.17999 56.5071 9.89999C56.1471 10.62 55.9004 11.4067 55.7671 12.26C55.6071 13.34 55.6738 14.2933 55.9671 15.12C56.2604 15.9467 56.7471 16.5933 57.4271 17.06C58.1071 17.5267 58.9338 17.76 59.9071 17.76C60.5471 17.76 61.1804 17.6267 61.8071 17.36C62.4471 17.0933 63.0338 16.7333 63.5671 16.28C64.1138 15.8133 64.5671 15.2867 64.9271 14.7L66.3271 15.54C65.8471 16.2733 65.2604 16.92 64.5671 17.48C63.8738 18.04 63.1138 18.48 62.2871 18.8C61.4738 19.1067 60.6604 19.26 59.8471 19.26Z"+ fill="currentColor"+ />+ <path+ d="M67.8407 19.02L69.5207 9.01999H71.1207L70.8407 10.76C71.3474 10.1333 71.934 9.67999 72.6007 9.39999C73.2674 9.11999 73.9407 8.97999 74.6207 8.97999L74.4407 10.48C73.854 10.48 73.274 10.58 72.7007 10.78C72.1274 10.98 71.6274 11.3067 71.2007 11.76C70.7874 12.2 70.5074 12.7933 70.3607 13.54L69.4407 19.02H67.8407Z"+ fill="currentColor"+ />+ <path+ d="M82.0576 19.02L82.2976 17.16L83.6576 9.01999H85.2576L83.5776 19.02H82.0576ZM78.6776 19.26C77.8909 19.26 77.2042 19.0733 76.6176 18.7C76.0309 18.3267 75.5776 17.8133 75.2576 17.16C74.9509 16.4933 74.8109 15.7267 74.8376 14.86C74.8642 14.0733 75.0042 13.32 75.2576 12.6C75.5242 11.8667 75.8909 11.2133 76.3576 10.64C76.8376 10.0667 77.3976 9.61332 78.0376 9.27999C78.6776 8.94666 79.3909 8.77999 80.1776 8.77999C80.9642 8.77999 81.6242 8.96666 82.1576 9.33999C82.6909 9.69999 83.0909 10.2067 83.3576 10.86C83.6242 11.5 83.7376 12.2533 83.6976 13.12C83.6842 14.1333 83.5309 15.0267 83.2376 15.8C82.9442 16.56 82.5576 17.2 82.0776 17.72C81.6109 18.2267 81.0842 18.6133 80.4976 18.88C79.9109 19.1333 79.3042 19.26 78.6776 19.26ZM79.1176 17.8C79.7042 17.8 80.2242 17.6667 80.6776 17.4C81.1442 17.1333 81.5376 16.7733 81.8576 16.32C82.1909 15.8667 82.4442 15.3667 82.6176 14.82C82.7909 14.2733 82.8842 13.72 82.8976 13.16C82.9109 12.28 82.6976 11.5733 82.2576 11.04C81.8176 10.5067 81.2176 10.24 80.4576 10.24C79.8576 10.24 79.3176 10.3733 78.8376 10.64C78.3576 10.9067 77.9376 11.26 77.5776 11.7C77.2176 12.14 76.9442 12.6333 76.7576 13.18C76.5709 13.7133 76.4709 14.26 76.4576 14.82C76.4442 15.7 76.6776 16.42 77.1576 16.98C77.6509 17.5267 78.3042 17.8 79.1176 17.8Z"+ fill="currentColor"+ />+ <path+ d="M87.3759 19.02L89.2359 7.83999C89.4225 6.79999 89.7892 6.02666 90.3359 5.51999C90.8959 4.99999 91.6692 4.73999 92.6559 4.73999C92.9359 4.73999 93.2359 4.79332 93.5559 4.89999C93.8759 4.99332 94.2159 5.12666 94.5759 5.29999L93.8359 6.51999C93.5425 6.39999 93.2892 6.31332 93.0759 6.25999C92.8759 6.19332 92.7159 6.15999 92.5959 6.15999C92.1025 6.15999 91.7092 6.31999 91.4159 6.63999C91.1225 6.94666 90.9292 7.41332 90.8359 8.03999L88.9759 19.02H87.3759ZM86.9959 10.4L87.2159 9.01999H93.5559L93.3159 10.4H86.9959Z"+ fill="currentColor"+ />+ <path+ d="M97.5991 19.26C96.6391 19.26 95.9391 19.0067 95.4991 18.5C95.0725 17.98 94.9391 17.2533 95.0991 16.32L96.0791 10.44H94.3591L94.5791 9.01999H96.3191L96.8391 5.89999H98.4391L97.9191 9.01999H100.919L100.679 10.44H97.6791L96.6991 16.22C96.6191 16.7267 96.6791 17.1133 96.8791 17.38C97.0925 17.6467 97.4391 17.78 97.9191 17.78C98.0791 17.78 98.2458 17.7467 98.4191 17.68C98.6058 17.6133 98.8458 17.5067 99.1391 17.36L99.5991 18.68C99.1725 18.9067 98.7991 19.06 98.4791 19.14C98.1725 19.22 97.8791 19.26 97.5991 19.26Z"+ fill="currentColor"+ />+ </svg>+);++const XDS_LOGO_PLAIN = (+ <svg+ width="46"+ height="24"+ viewBox="0 0 46 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg">+ <path+ d="M2.4239 15.8011C2.03945 16.3796 1.66972 16.9538 1.3147 17.524C0.707427 18.4992 1.42354 19.7348 2.57241 19.7348C3.13302 19.7348 3.64463 19.4209 3.91525 18.93C4.29391 18.243 4.71274 17.5352 5.17173 16.8066C5.38894 16.4618 5.60743 16.12 5.82721 15.7812C6.25251 15.1254 6.46516 14.7976 6.76252 14.68C6.99255 14.5891 7.27368 14.5899 7.50317 14.6822C7.79984 14.8014 8.00881 15.1278 8.42675 15.7804C8.64287 16.1179 8.85732 16.46 9.07008 16.8066C9.52175 17.534 9.93823 18.2339 10.3195 18.9063C10.6075 19.4141 11.1428 19.7348 11.7266 19.7348C12.9476 19.7348 13.7063 18.4203 13.0547 17.3877C12.7332 16.8781 12.3991 16.3639 12.0525 15.8453C11.3983 14.8527 10.7379 13.8906 10.0714 12.9592C9.81687 12.6036 9.68962 12.4258 9.64377 12.2384C9.60589 12.0836 9.60492 11.9307 9.64085 11.7754C9.68435 11.5874 9.80856 11.4091 10.057 11.0526C10.7093 10.1164 11.3596 9.15781 12.0078 8.1768C12.3869 7.60474 12.7521 7.03681 13.1035 6.47298C13.71 5.49987 12.9962 4.26519 11.8496 4.26519C11.2943 4.26519 10.7868 4.57405 10.5169 5.05923C10.1399 5.73688 9.72461 6.43721 9.27114 7.16022C9.06143 7.49458 8.8505 7.82569 8.63835 8.15358C8.21478 8.80819 8.003 9.1355 7.70554 9.25334C7.47561 9.34442 7.19397 9.34375 6.96448 9.25156C6.66759 9.13229 6.45853 8.80578 6.04043 8.15276C5.83116 7.82591 5.62351 7.49506 5.41747 7.16022C4.97918 6.44793 4.5738 5.76096 4.20132 5.0993C3.9136 4.58821 3.37617 4.26519 2.78967 4.26519C1.56624 4.26519 0.805692 5.58299 1.45419 6.62041C1.76588 7.11903 2.08912 7.6231 2.4239 8.1326C3.0752 9.10994 3.73263 10.059 4.3962 10.9796C4.65373 11.337 4.7825 11.5156 4.82882 11.7042C4.86709 11.86 4.86797 12.0139 4.83149 12.1702C4.78732 12.3593 4.66122 12.5385 4.40903 12.897C3.74526 13.8406 3.08355 14.8086 2.4239 15.8011Z"+ fill="currentColor"+ />+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M22.4734 4.26519C20.4471 4.26519 19.434 4.26519 18.6657 4.67201C18.0456 5.00031 17.5385 5.50739 17.2102 6.12744C16.8034 6.89579 16.8034 7.90892 16.8034 9.9352V14.0648C16.8034 16.0911 16.8034 17.1042 17.2102 17.8726C17.5385 18.4926 18.0456 18.9997 18.6657 19.328C19.434 19.7348 20.4471 19.7348 22.4734 19.7348H23.2039C24.8496 19.7348 26.2644 19.4033 27.4485 18.7403C28.6399 18.07 29.5559 17.1529 30.1963 15.989C30.8367 14.825 31.1569 13.4954 31.1569 12C31.1569 10.5046 30.8367 9.17495 30.1963 8.01105C29.5559 6.84714 28.6399 5.9337 27.4485 5.27072C26.2644 4.60037 24.8496 4.26519 23.2039 4.26519H22.4734ZM20.0092 8.74707C20.0092 8.16814 20.0092 7.87867 20.1255 7.65914C20.2193 7.48198 20.3641 7.33711 20.5413 7.24331C20.7608 7.12707 21.0503 7.12707 21.6292 7.12707H23.1927C24.6522 7.12707 25.7916 7.57274 26.6107 8.46409C27.4299 9.34807 27.8394 10.5267 27.8394 12C27.8394 13.4659 27.4299 14.6446 26.6107 15.5359C25.7916 16.4273 24.6522 16.8729 23.1927 16.8729H21.6292C21.0503 16.8729 20.7608 16.8729 20.5413 16.7567C20.3641 16.6629 20.2193 16.518 20.1255 16.3409C20.0092 16.1213 20.0092 15.8319 20.0092 15.2529V8.74707Z"+ fill="currentColor"+ />+ <path+ d="M35.4666 19.2376C36.6134 19.7459 37.9501 20 39.4767 20H39.8006C41.7144 20 43.2261 19.5801 44.3357 18.7403C45.4452 17.9006 46 16.7403 46 15.2597C46 14.3757 45.8213 13.6501 45.4638 13.0829C45.1064 12.5083 44.6559 12.0589 44.1123 11.7348C43.5761 11.4033 43.0325 11.1565 42.4814 10.9945C41.9304 10.8324 41.4575 10.7145 41.0628 10.6409L38.706 10.1878C38.0283 10.0552 37.4698 9.87477 37.0305 9.64641C36.5985 9.41068 36.3826 9.02762 36.3826 8.49724C36.3826 7.96685 36.6395 7.55064 37.1533 7.24862C37.6671 6.93923 38.3857 6.78453 39.3091 6.78453H39.6219C40.3964 6.78453 41.1224 6.93186 41.8001 7.22652C42.0982 7.35474 42.3899 7.5234 42.6754 7.73251C43.326 8.20923 44.2444 8.27802 44.8243 7.71734C45.34 7.21868 45.4053 6.39786 44.8761 5.91349C44.3498 5.43171 43.7638 5.03698 43.1181 4.72928C42.1054 4.24309 40.9511 4 39.6554 4H39.3315C38.0953 4 37.0156 4.19521 36.0922 4.58564C35.1762 4.97606 34.4613 5.52486 33.9475 6.23204C33.4411 6.93186 33.188 7.76059 33.188 8.71823C33.188 9.49171 33.3406 10.1436 33.6459 10.674C33.9587 11.2044 34.3571 11.6354 34.8411 11.9669C35.3326 12.2983 35.8539 12.5599 36.4049 12.7514C36.956 12.9355 37.4698 13.0718 37.9464 13.1602L40.3033 13.6243C40.6905 13.698 41.074 13.8011 41.4538 13.9337C41.841 14.0589 42.1612 14.2431 42.4144 14.4862C42.6676 14.7293 42.7942 15.0608 42.7942 15.4807C42.7942 16.6151 41.7814 17.1823 39.7559 17.1823H39.4432C38.49 17.1823 37.615 17.0055 36.8182 16.6519C36.4847 16.4994 36.1665 16.3134 35.8635 16.0938C35.17 15.5911 34.1857 15.5241 33.5784 16.1282C33.0651 16.6388 32.9912 17.4631 33.5198 17.9578C34.0797 18.4818 34.7287 18.9083 35.4666 19.2376Z"+ fill="currentColor"+ />+ </svg>+);++const NAV_ITEMS: Array<{key: 'craft' | 'explore' | 'docs'; label: string}> = [+ {key: 'craft', label: 'Craft'},+ {key: 'explore', label: 'Explore'},+ {key: 'docs', label: 'Docs'},+];++function LogoNav({+ activeView,+ setActiveView,+ logo,+}: {+ activeView: 'craft' | 'docs' | 'explore' | 'profile';+ setActiveView: (view: 'craft' | 'docs' | 'explore' | 'profile') => void;+ logo?: React.ReactNode;+}) {+ const [isOpen, setIsOpen] = useState(false);+ const [hoveredItem, setHoveredItem] = useState<string | null>(null);++ return (+ <div+ style={{position: 'relative'}}+ onMouseEnter={() => setIsOpen(true)}+ onMouseLeave={() => {+ setIsOpen(false);+ setHoveredItem(null);+ }}>+ <div style={{cursor: 'pointer'}}>{logo || XDS_LOGO_SVG}</div>+ {isOpen && (+ <div+ style={{+ position: 'absolute',+ top: -8,+ left: -16,+ backgroundColor: 'var(--color-background-card, white)',+ borderRadius: 16,+ boxShadow: '0 4px 24px rgba(0,0,0,0.12)',+ padding: 8,+ minWidth: 200,+ zIndex: 100,+ }}>+ <div style={{marginBottom: 12, paddingLeft: 8, paddingRight: 8}}>+ {logo || XDS_LOGO_SVG}+ </div>+ <div+ style={{display: 'flex', flexDirection: 'column' as const, gap: 2}}>+ {NAV_ITEMS.map(item => {+ const isActive = activeView === item.key;+ const isHovered = hoveredItem === item.key;+ return (+ <div+ key={item.key}+ onClick={() => setActiveView(item.key)}+ onMouseEnter={() => setHoveredItem(item.key)}+ onMouseLeave={() => setHoveredItem(null)}+ style={{+ padding: '8px 12px',+ borderRadius: 8,+ cursor: 'pointer',+ fontWeight: isActive ? 600 : 400,+ fontSize: 14,+ color: 'var(--color-text-primary, #1a1a1a)',+ backgroundColor:+ isActive || isHovered+ ? 'var(--color-background-body, #f1f4f7)'+ : 'transparent',+ transition: 'background-color 150ms ease',+ }}>+ {item.label}+ </div>+ );+ })}+ </div>+ </div>+ )}+ </div>+ );+}+function AppTopNav({activeView,setActiveView,}: {- activeView: 'craft' | 'docs';- setActiveView: (view: 'craft' | 'docs') => void;+ activeView: 'craft' | 'docs' | 'explore' | 'profile';+ setActiveView: (view: 'craft' | 'docs' | 'explore' | 'profile') => void;}) {const [isSearchOpen, setIsSearchOpen] = useState(false);const [activeTab, setActiveTab] = useState('newest');@@ -1680,50 +1855,9 @@ function AppTopNav({padding: '0 16px',backgroundColor: 'var(--color-background-surface, white)',}}>- {/* Left: hamburger + logo */}+ {/* Left: logo nav */}<div style={{display: 'flex', alignItems: 'center', gap: 8, flex: 1}}>- <XDSDropdownMenu- button={{- label: 'Menu',- variant: 'ghost',- size: 'sm',- icon: <HamburgerIcon />,- }}- hasChevron={false}- items={[- {- label: 'Craft',- icon: activeView === 'craft' ? CheckIcon : undefined,- onClick: () => setActiveView('craft'),- },- {- label: 'Docs',- icon: activeView === 'docs' ? CheckIcon : undefined,- onClick: () => setActiveView('docs'),- },- ]}- />- <svg- width="46"- height="24"- viewBox="0 0 46 24"- fill="none"- xmlns="http://www.w3.org/2000/svg">- <path- d="M2.4239 15.8011C2.03945 16.3796 1.66972 16.9538 1.3147 17.524C0.707427 18.4992 1.42354 19.7348 2.57241 19.7348C3.13302 19.7348 3.64463 19.4209 3.91525 18.93C4.29391 18.243 4.71274 17.5352 5.17173 16.8066C5.38894 16.4618 5.60743 16.12 5.82721 15.7812C6.25251 15.1254 6.46516 14.7976 6.76252 14.68C6.99255 14.5891 7.27368 14.5899 7.50317 14.6822C7.79984 14.8014 8.00881 15.1278 8.42675 15.7804C8.64287 16.1179 8.85732 16.46 9.07008 16.8066C9.52175 17.534 9.93823 18.2339 10.3195 18.9063C10.6075 19.4141 11.1428 19.7348 11.7266 19.7348C12.9476 19.7348 13.7063 18.4203 13.0547 17.3877C12.7332 16.8781 12.3991 16.3639 12.0525 15.8453C11.3983 14.8527 10.7379 13.8906 10.0714 12.9592C9.81687 12.6036 9.68962 12.4258 9.64377 12.2384C9.60589 12.0836 9.60492 11.9307 9.64085 11.7754C9.68435 11.5874 9.80856 11.4091 10.057 11.0526C10.7093 10.1164 11.3596 9.15781 12.0078 8.1768C12.3869 7.60474 12.7521 7.03681 13.1035 6.47298C13.71 5.49987 12.9962 4.26519 11.8496 4.26519C11.2943 4.26519 10.7868 4.57405 10.5169 5.05923C10.1399 5.73688 9.72461 6.43721 9.27114 7.16022C9.06143 7.49458 8.8505 7.82569 8.63835 8.15358C8.21478 8.80819 8.003 9.1355 7.70554 9.25334C7.47561 9.34442 7.19397 9.34375 6.96448 9.25156C6.66759 9.13229 6.45853 8.80578 6.04043 8.15276C5.83116 7.82591 5.62351 7.49506 5.41747 7.16022C4.97918 6.44793 4.5738 5.76096 4.20132 5.0993C3.9136 4.58821 3.37617 4.26519 2.78967 4.26519C1.56624 4.26519 0.805692 5.58299 1.45419 6.62041C1.76588 7.11903 2.08912 7.6231 2.4239 8.1326C3.0752 9.10994 3.73263 10.059 4.3962 10.9796C4.65373 11.337 4.7825 11.5156 4.82882 11.7042C4.86709 11.86 4.86797 12.0139 4.83149 12.1702C4.78732 12.3593 4.66122 12.5385 4.40903 12.897C3.74526 13.8406 3.08355 14.8086 2.4239 15.8011Z"- fill="currentColor"- />- <path- fillRule="evenodd"- clipRule="evenodd"- d="M22.4734 4.26519C20.4471 4.26519 19.434 4.26519 18.6657 4.67201C18.0456 5.00031 17.5385 5.50739 17.2102 6.12744C16.8034 6.89579 16.8034 7.90892 16.8034 9.9352V14.0648C16.8034 16.0911 16.8034 17.1042 17.2102 17.8726C17.5385 18.4926 18.0456 18.9997 18.6657 19.328C19.434 19.7348 20.4471 19.7348 22.4734 19.7348H23.2039C24.8496 19.7348 26.2644 19.4033 27.4485 18.7403C28.6399 18.07 29.5559 17.1529 30.1963 15.989C30.8367 14.825 31.1569 13.4954 31.1569 12C31.1569 10.5046 30.8367 9.17495 30.1963 8.01105C29.5559 6.84714 28.6399 5.9337 27.4485 5.27072C26.2644 4.60037 24.8496 4.26519 23.2039 4.26519H22.4734ZM20.0092 8.74707C20.0092 8.16814 20.0092 7.87867 20.1255 7.65914C20.2193 7.48198 20.3641 7.33711 20.5413 7.24331C20.7608 7.12707 21.0503 7.12707 21.6292 7.12707H23.1927C24.6522 7.12707 25.7916 7.57274 26.6107 8.46409C27.4299 9.34807 27.8394 10.5267 27.8394 12C27.8394 13.4659 27.4299 14.6446 26.6107 15.5359C25.7916 16.4273 24.6522 16.8729 23.1927 16.8729H21.6292C21.0503 16.8729 20.7608 16.8729 20.5413 16.7567C20.3641 16.6629 20.2193 16.518 20.1255 16.3409C20.0092 16.1213 20.0092 15.8319 20.0092 15.2529V8.74707Z"- fill="currentColor"- />- <path- d="M35.4666 19.2376C36.6134 19.7459 37.9501 20 39.4767 20H39.8006C41.7144 20 43.2261 19.5801 44.3357 18.7403C45.4452 17.9006 46 16.7403 46 15.2597C46 14.3757 45.8213 13.6501 45.4638 13.0829C45.1064 12.5083 44.6559 12.0589 44.1123 11.7348C43.5761 11.4033 43.0325 11.1565 42.4814 10.9945C41.9304 10.8324 41.4575 10.7145 41.0628 10.6409L38.706 10.1878C38.0283 10.0552 37.4698 9.87477 37.0305 9.64641C36.5985 9.41068 36.3826 9.02762 36.3826 8.49724C36.3826 7.96685 36.6395 7.55064 37.1533 7.24862C37.6671 6.93923 38.3857 6.78453 39.3091 6.78453H39.6219C40.3964 6.78453 41.1224 6.93186 41.8001 7.22652C42.0982 7.35474 42.3899 7.5234 42.6754 7.73251C43.326 8.20923 44.2444 8.27802 44.8243 7.71734C45.34 7.21868 45.4053 6.39786 44.8761 5.91349C44.3498 5.43171 43.7638 5.03698 43.1181 4.72928C42.1054 4.24309 40.9511 4 39.6554 4H39.3315C38.0953 4 37.0156 4.19521 36.0922 4.58564C35.1762 4.97606 34.4613 5.52486 33.9475 6.23204C33.4411 6.93186 33.188 7.76059 33.188 8.71823C33.188 9.49171 33.3406 10.1436 33.6459 10.674C33.9587 11.2044 34.3571 11.6354 34.8411 11.9669C35.3326 12.2983 35.8539 12.5599 36.4049 12.7514C36.956 12.9355 37.4698 13.0718 37.9464 13.1602L40.3033 13.6243C40.6905 13.698 41.074 13.8011 41.4538 13.9337C41.841 14.0589 42.1612 14.2431 42.4144 14.4862C42.6676 14.7293 42.7942 15.0608 42.7942 15.4807C42.7942 16.6151 41.7814 17.1823 39.7559 17.1823H39.4432C38.49 17.1823 37.615 17.0055 36.8182 16.6519C36.4847 16.4994 36.1665 16.3134 35.8635 16.0938C35.17 15.5911 34.1857 15.5241 33.5784 16.1282C33.0651 16.6388 32.9912 17.4631 33.5198 17.9578C34.0797 18.4818 34.7287 18.9083 35.4666 19.2376Z"- fill="currentColor"- />- </svg>+ <LogoNav activeView={activeView} setActiveView={setActiveView} /></div>{/* Center: tabs */}@@ -1757,6 +1891,13 @@ function AppTopNav({icon={<SearchIcon />}onClick={() => setIsSearchOpen(true)}/>+ <XDSButton+ label="Profile"+ variant="ghost"+ size="sm"+ icon={<ProfileIcon />}+ onClick={() => setActiveView('profile')}+ /></div></nav><XDSCommandPalette@@ -1962,8 +2103,8 @@ function DocsView({activeView,setActiveView,}: {- activeView: 'craft' | 'docs';- setActiveView: (v: 'craft' | 'docs') => void;+ activeView: 'craft' | 'docs' | 'explore' | 'profile';+ setActiveView: (v: 'craft' | 'docs' | 'explore' | 'profile') => void;}) {const [activeNav, setActiveNav] = useState('button');const [inputsExpanded, setInputsExpanded] = useState(true);@@ -2000,64 +2141,13 @@ function DocsView({flexShrink: 0,}}><div style={{display: 'flex', alignItems: 'center', gap: 6}}>- <XDSDropdownMenu- button={{- label: 'Menu',- variant: 'ghost',- size: 'sm',- icon: <HamburgerIcon />,- }}- hasChevron={false}- items={[- {- label: 'Craft',- icon: activeView === 'craft' ? CheckIcon : undefined,- onClick: () => setActiveView('craft'),- },- {- label: 'Docs',- icon: activeView === 'docs' ? CheckIcon : undefined,- onClick: () => setActiveView('docs'),- },- ]}- />- <svg- width="46"- height="24"- viewBox="0 0 46 24"- fill="none"- xmlns="http://www.w3.org/2000/svg">- <path- d="M2.4239 15.8011C2.03945 16.3796 1.66972 16.9538 1.3147 17.524C0.707427 18.4992 1.42354 19.7348 2.57241 19.7348C3.13302 19.7348 3.64463 19.4209 3.91525 18.93C4.29391 18.243 4.71274 17.5352 5.17173 16.8066C5.38894 16.4618 5.60743 16.12 5.82721 15.7812C6.25251 15.1254 6.46516 14.7976 6.76252 14.68C6.99255 14.5891 7.27368 14.5899 7.50317 14.6822C7.79984 14.8014 8.00881 15.1278 8.42675 15.7804C8.64287 16.1179 8.85732 16.46 9.07008 16.8066C9.52175 17.534 9.93823 18.2339 10.3195 18.9063C10.6075 19.4141 11.1428 19.7348 11.7266 19.7348C12.9476 19.7348 13.7063 18.4203 13.0547 17.3877C12.7332 16.8781 12.3991 16.3639 12.0525 15.8453C11.3983 14.8527 10.7379 13.8906 10.0714 12.9592C9.81687 12.6036 9.68962 12.4258 9.64377 12.2384C9.60589 12.0836 9.60492 11.9307 9.64085 11.7754C9.68435 11.5874 9.80856 11.4091 10.057 11.0526C10.7093 10.1164 11.3596 9.15781 12.0078 8.1768C12.3869 7.60474 12.7521 7.03681 13.1035 6.47298C13.71 5.49987 12.9962 4.26519 11.8496 4.26519C11.2943 4.26519 10.7868 4.57405 10.5169 5.05923C10.1399 5.73688 9.72461 6.43721 9.27114 7.16022C9.06143 7.49458 8.8505 7.82569 8.63835 8.15358C8.21478 8.80819 8.003 9.1355 7.70554 9.25334C7.47561 9.34442 7.19397 9.34375 6.96448 9.25156C6.66759 9.13229 6.45853 8.80578 6.04043 8.15276C5.83116 7.82591 5.62351 7.49506 5.41747 7.16022C4.97918 6.44793 4.5738 5.76096 4.20132 5.0993C3.9136 4.58821 3.37617 4.26519 2.78967 4.26519C1.56624 4.26519 0.805692 5.58299 1.45419 6.62041C1.76588 7.11903 2.08912 7.6231 2.4239 8.1326C3.0752 9.10994 3.73263 10.059 4.3962 10.9796C4.65373 11.337 4.7825 11.5156 4.82882 11.7042C4.86709 11.86 4.86797 12.0139 4.83149 12.1702C4.78732 12.3593 4.66122 12.5385 4.40903 12.897C3.74526 13.8406 3.08355 14.8086 2.4239 15.8011Z"- fill="currentColor"- />- <path- fillRule="evenodd"- clipRule="evenodd"- d="M22.4734 4.26519C20.4471 4.26519 19.434 4.26519 18.6657 4.67201C18.0456 5.00031 17.5385 5.50739 17.2102 6.12744C16.8034 6.89579 16.8034 7.90892 16.8034 9.9352V14.0648C16.8034 16.0911 16.8034 17.1042 17.2102 17.8726C17.5385 18.4926 18.0456 18.9997 18.6657 19.328C19.434 19.7348 20.4471 19.7348 22.4734 19.7348H23.2039C24.8496 19.7348 26.2644 19.4033 27.4485 18.7403C28.6399 18.07 29.5559 17.1529 30.1963 15.989C30.8367 14.825 31.1569 13.4954 31.1569 12C31.1569 10.5046 30.8367 9.17495 30.1963 8.01105C29.5559 6.84714 28.6399 5.9337 27.4485 5.27072C26.2644 4.60037 24.8496 4.26519 23.2039 4.26519H22.4734ZM20.0092 8.74707C20.0092 8.16814 20.0092 7.87867 20.1255 7.65914C20.2193 7.48198 20.3641 7.33711 20.5413 7.24331C20.7608 7.12707 21.0503 7.12707 21.6292 7.12707H23.1927C24.6522 7.12707 25.7916 7.57274 26.6107 8.46409C27.4299 9.34807 27.8394 10.5267 27.8394 12C27.8394 13.4659 27.4299 14.6446 26.6107 15.5359C25.7916 16.4273 24.6522 16.8729 23.1927 16.8729H21.6292C21.0503 16.8729 20.7608 16.8729 20.5413 16.7567C20.3641 16.6629 20.2193 16.518 20.1255 16.3409C20.0092 16.1213 20.0092 15.8319 20.0092 15.2529V8.74707Z"- fill="currentColor"+ <div style={{paddingLeft: 16}}>+ <LogoNav+ activeView={activeView}+ setActiveView={setActiveView}+ logo={XDS_LOGO_PLAIN}/>- <path- d="M35.4666 19.2376C36.6134 19.7459 37.9501 20 39.4767 20H39.8006C41.7144 20 43.2261 19.5801 44.3357 18.7403C45.4452 17.9006 46 16.7403 46 15.2597C46 14.3757 45.8213 13.6501 45.4638 13.0829C45.1064 12.5083 44.6559 12.0589 44.1123 11.7348C43.5761 11.4033 43.0325 11.1565 42.4814 10.9945C41.9304 10.8324 41.4575 10.7145 41.0628 10.6409L38.706 10.1878C38.0283 10.0552 37.4698 9.87477 37.0305 9.64641C36.5985 9.41068 36.3826 9.02762 36.3826 8.49724C36.3826 7.96685 36.6395 7.55064 37.1533 7.24862C37.6671 6.93923 38.3857 6.78453 39.3091 6.78453H39.6219C40.3964 6.78453 41.1224 6.93186 41.8001 7.22652C42.0982 7.35474 42.3899 7.5234 42.6754 7.73251C43.326 8.20923 44.2444 8.27802 44.8243 7.71734C45.34 7.21868 45.4053 6.39786 44.8761 5.91349C44.3498 5.43171 43.7638 5.03698 43.1181 4.72928C42.1054 4.24309 40.9511 4 39.6554 4H39.3315C38.0953 4 37.0156 4.19521 36.0922 4.58564C35.1762 4.97606 34.4613 5.52486 33.9475 6.23204C33.4411 6.93186 33.188 7.76059 33.188 8.71823C33.188 9.49171 33.3406 10.1436 33.6459 10.674C33.9587 11.2044 34.3571 11.6354 34.8411 11.9669C35.3326 12.2983 35.8539 12.5599 36.4049 12.7514C36.956 12.9355 37.4698 13.0718 37.9464 13.1602L40.3033 13.6243C40.6905 13.698 41.074 13.8011 41.4538 13.9337C41.841 14.0589 42.1612 14.2431 42.4144 14.4862C42.6676 14.7293 42.7942 15.0608 42.7942 15.4807C42.7942 16.6151 41.7814 17.1823 39.7559 17.1823H39.4432C38.49 17.1823 37.615 17.0055 36.8182 16.6519C36.4847 16.4994 36.1665 16.3134 35.8635 16.0938C35.17 15.5911 34.1857 15.5241 33.5784 16.1282C33.0651 16.6388 32.9912 17.4631 33.5198 17.9578C34.0797 18.4818 34.7287 18.9083 35.4666 19.2376Z"- fill="currentColor"- />- </svg>- <span- style={{- width: 1,- height: 20,- backgroundColor: 'var(--color-divider, rgba(0,0,0,0.15))',- flexShrink: 0,- }}- />- <span- style={{- fontSize: 16,- fontWeight: 600,- color: 'var(--color-text-primary, #1a1a1a)',- }}>- Docs- </span>+ </div></div><XDSButtonlabel="Collapse sidebar"@@ -2430,59 +2520,1208 @@ function DocsView({}// ----------------------------------------------------------------------------// Page+// Explore Icons// ----------------------------------------------------------------------------export default function DocsiteLandingTemplate() {- const [activeView, setActiveView] = useState<'craft' | 'docs'>('craft');- const [selected, setSelected] = useState<Set<number>>(new Set());- const [isMobile, setIsMobile] = useState(false);- const [isTablet, setIsTablet] = useState(false);- const [generatingSource, setGeneratingSource] = useState<number | null>(null);- const [chatOpen, setChatOpen] = useState(false);- const [useTarget, setUseTarget] = useState<number | null>(null);- const [previewGenerating, setPreviewGenerating] = useState(false);- const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);- const previewTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);- const simRef = useRef<BoidsSimulation | null>(null);- const simAnimRef = useRef<number>(0);+const CompassIcon = (props: React.SVGProps<SVGSVGElement>) => (+ <svg+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth={2}+ strokeLinecap="round"+ strokeLinejoin="round"+ {...props}>+ <circle cx="12" cy="12" r="10" />+ <polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76" />+ </svg>+);- if (!simRef.current) {- simRef.current = createSimulation();- }+const LayoutIcon = (props: React.SVGProps<SVGSVGElement>) => (+ <svg+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth={2}+ strokeLinecap="round"+ strokeLinejoin="round"+ {...props}>+ <rect x="3" y="3" width="18" height="18" rx="2" />+ <line x1="3" y1="9" x2="21" y2="9" />+ <line x1="9" y1="21" x2="9" y2="9" />+ </svg>+);- // Single update loop for the shared simulation- const simRunning = generatingSource !== null || previewGenerating;- useEffect(() => {- if (!simRunning) {- cancelAnimationFrame(simAnimRef.current);- return;- }- function tick() {- simRef.current!.update();- simAnimRef.current = requestAnimationFrame(tick);- }- simAnimRef.current = requestAnimationFrame(tick);- return () => cancelAnimationFrame(simAnimRef.current);- }, [simRunning]);+const PackageIcon = (props: React.SVGProps<SVGSVGElement>) => (+ <svg+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth={2}+ strokeLinecap="round"+ strokeLinejoin="round"+ {...props}>+ <path d="M16.5 9.4l-9-5.19M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z" />+ <polyline points="3.27 6.96 12 12.01 20.73 6.96" />+ <line x1="12" y1="22.08" x2="12" y2="12" />+ </svg>+);- useEffect(() => {- const mobileMql = window.matchMedia('(max-width: 768px)');- const tabletMql = window.matchMedia(- '(min-width: 769px) and (max-width: 1024px)',- );- setIsMobile(mobileMql.matches);- setIsTablet(tabletMql.matches);+const ZapIcon = (props: React.SVGProps<SVGSVGElement>) => (+ <svg+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth={2}+ strokeLinecap="round"+ strokeLinejoin="round"+ {...props}>+ <polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />+ </svg>+);- const mobileHandler = (e: MediaQueryListEvent) => {- setIsMobile(e.matches);- };- const tabletHandler = (e: MediaQueryListEvent) => setIsTablet(e.matches);- mobileMql.addEventListener('change', mobileHandler);- tabletMql.addEventListener('change', tabletHandler);- return () => {- mobileMql.removeEventListener('change', mobileHandler);- tabletMql.removeEventListener('change', tabletHandler);+const GridIcon = (props: React.SVGProps<SVGSVGElement>) => (+ <svg+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth={2}+ strokeLinecap="round"+ strokeLinejoin="round"+ {...props}>+ <rect x="3" y="3" width="7" height="7" />+ <rect x="14" y="3" width="7" height="7" />+ <rect x="3" y="14" width="7" height="7" />+ <rect x="14" y="14" width="7" height="7" />+ </svg>+);++const VerifiedIcon = (props: React.SVGProps<SVGSVGElement>) => (+ <svg+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth={2}+ strokeLinecap="round"+ strokeLinejoin="round"+ {...props}>+ <path d="M22 11.08V12a10 10 0 11-5.93-9.14" />+ <polyline points="22 4 12 14.01 9 11.01" />+ </svg>+);++const DownloadIcon = (props: React.SVGProps<SVGSVGElement>) => (+ <svg+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth={2}+ strokeLinecap="round"+ strokeLinejoin="round"+ {...props}>+ <path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4" />+ <polyline points="7 10 12 15 17 10" />+ <line x1="12" y1="15" x2="12" y2="3" />+ </svg>+);++const StarIcon = (props: React.SVGProps<SVGSVGElement>) => (+ <svg+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth={2}+ strokeLinecap="round"+ strokeLinejoin="round"+ {...props}>+ <polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />+ </svg>+);++// ---------------------------------------------------------------------------+// ExploreView+// ---------------------------------------------------------------------------++function ExploreView({+ activeView,+ setActiveView,+}: {+ activeView: 'craft' | 'docs' | 'explore' | 'profile';+ setActiveView: (v: 'craft' | 'docs' | 'explore' | 'profile') => void;+}) {+ const [featuredTab, setFeaturedTab] = useState('trending');++ return (+ <div+ style={{+ display: 'flex',+ flexDirection: 'column' as const,+ height: '100vh',+ backgroundColor: 'var(--color-background-surface, #ffffff)',+ fontFamily: 'system-ui, -apple-system, sans-serif',+ }}>+ {/* Top Nav Bar */}+ <nav+ style={{+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'space-between',+ height: 48,+ padding: '0 16px',+ flexShrink: 0,+ }}>+ <div style={{display: 'flex', alignItems: 'center', gap: 8}}>+ <LogoNav activeView={activeView} setActiveView={setActiveView} />+ </div>+ <div style={{display: 'flex', alignItems: 'center', gap: 4}}>+ <XDSButton+ label="Search"+ variant="ghost"+ size="sm"+ icon={<SearchIcon />}+ />+ <XDSButton+ label="Create new"+ variant="secondary"+ size="sm"+ icon={<PlusIcon />}>+ Create new+ </XDSButton>+ <XDSButton+ label="Profile"+ variant="ghost"+ size="sm"+ icon={<ProfileIcon />}+ onClick={() => setActiveView('profile')}+ />+ </div>+ </nav>++ {/* Scrollable content */}+ <div+ style={{+ flex: 1,+ overflowY: 'auto' as const,+ padding: '40px 48px 64px',+ }}>+ <div style={{maxWidth: 1200, margin: '0 auto'}}>+ {/* a. Hero */}+ <div style={{marginBottom: 48}}>+ <XDSHeading+ level={1}+ style={{fontSize: 40, letterSpacing: '-0.02em', marginBottom: 8}}>+ Discover templates, themes & components+ </XDSHeading>+ <XDSText+ type="body"+ color="secondary"+ style={{marginBottom: 24, maxWidth: 600}}>+ Browse curated resources to kickstart your next project. Find+ templates, themes, and components built by XDS and the community.+ </XDSText>+ <XDSTextInput+ label="Search"+ isLabelHidden+ value=""+ onChange={() => {}}+ startIcon={SearchIcon}+ size="lg"+ placeholder="Search..."+ style={{marginBottom: 16, maxWidth: 600}}+ />+ <div style={{display: 'flex', flexWrap: 'wrap' as const, gap: 6}}>+ <XDSToken label="Dashboard" size="sm" />+ <XDSToken label="Admin Panel" size="sm" />+ <XDSToken label="E-commerce" size="sm" />+ <XDSToken label="Landing Page" size="sm" />+ <XDSToken label="Settings" size="sm" />+ <XDSToken label="Auth" size="sm" />+ <XDSToken label="Data Table" size="sm" />+ </div>+ </div>++ {/* b. Featured */}+ <div style={{marginBottom: 48}}>+ <XDSHeading level={2} style={{marginBottom: 16}}>+ Featured+ </XDSHeading>+ <XDSSegmentedControl+ value={featuredTab}+ onChange={setFeaturedTab}+ label="Featured filter"+ size="sm"+ style={{marginBottom: 16}}>+ <XDSSegmentedControlItem value="trending" label="Trending" />+ <XDSSegmentedControlItem value="popular" label="Most popular" />+ <XDSSegmentedControlItem value="newest" label="Newest" />+ </XDSSegmentedControl>+ <div+ style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(3, 1fr)',+ gap: 16,+ }}>+ {[+ {+ title: 'Product detail',+ desc: 'Description',+ users: '1.5K',+ hearts: 5,+ img: FIRST_CARD_IMAGE,+ },+ {+ title: 'Meta Theme',+ desc: 'Description',+ users: '1.5K',+ hearts: 5,+ img: SHOPPING_DETAILS_IMAGE,+ },+ {+ title: 'Daiily',+ desc: 'Description',+ users: '1.5K',+ hearts: 5,+ img: SCREENSHOT_3_IMAGE,+ },+ ].map((item, i) => (+ <XDSCard key={i} padding={0}>+ <div style={{position: 'relative'}}>+ <img+ src={item.img}+ alt={item.title}+ style={{+ display: 'block',+ width: '100%',+ height: 180,+ objectFit: 'cover',+ }}+ />+ </div>+ <div style={{padding: '12px 16px'}}>+ <XDSHeading level={2}>{item.title}</XDSHeading>+ <XDSText type="supporting" color="secondary">+ {item.desc}+ </XDSText>+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 12,+ marginTop: 8,+ }}>+ <svg+ width="14"+ height="14"+ viewBox="0 0 24 24"+ fill="none"+ style={{flexShrink: 0}}>+ <path+ d="M9 12l2 2 4-4"+ stroke="#0866ff"+ strokeWidth={2.5}+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ <circle+ cx="12"+ cy="12"+ r="10"+ stroke="#0866ff"+ strokeWidth={2}+ />+ </svg>+ <XDSText type="supporting" color="secondary">+ {item.users}+ </XDSText>+ <XDSText type="supporting" color="secondary">+ ♡ {item.hearts}+ </XDSText>+ </div>+ </div>+ </XDSCard>+ ))}+ </div>+ </div>++ {/* c. Designed by XDS */}+ <div style={{marginBottom: 48}}>+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 8,+ marginBottom: 16,+ }}>+ <XDSHeading level={2}>Designed by XDS</XDSHeading>+ <VerifiedIcon width={20} height={20} style={{color: '#0066FF'}} />+ </div>+ <div+ style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(3, 1fr)',+ gap: 16,+ }}>+ {[+ {name: 'Admin Console', desc: 'Full-featured admin panel'},+ {name: 'Data Explorer', desc: 'Interactive data visualization'},+ {name: 'Onboarding Flow', desc: 'Multi-step onboarding wizard'},+ ].map((item, i) => (+ <XDSCard key={i}>+ <div+ style={{+ height: 140,+ backgroundColor: 'var(--color-background-body, #f5f6f7)',+ borderRadius: 8,+ marginBottom: 12,+ }}+ />+ <div+ style={{+ display: 'flex',+ flexDirection: 'column' as const,+ gap: 4,+ }}>+ <XDSText type="body" weight="bold">+ {item.name}+ </XDSText>+ <XDSText type="supporting" color="secondary">+ {item.desc}+ </XDSText>+ </div>+ </XDSCard>+ ))}+ </div>+ </div>++ {/* d. From the community */}+ <div style={{marginBottom: 48}}>+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'space-between',+ marginBottom: 16,+ }}>+ <XDSHeading level={2}>From the community</XDSHeading>+ <XDSButton label="View all" variant="ghost" size="sm" />+ </div>+ <div+ style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(4, 1fr)',+ gap: 16,+ }}>+ {[+ {name: 'CRM Dashboard', author: 'Alex Chen'},+ {name: 'Social Feed', author: 'Maria Lopez'},+ {name: 'Task Board', author: 'James Wilson'},+ {name: 'Chat Interface', author: 'Sarah Kim'},+ ].map((item, i) => (+ <XDSCard key={i}>+ <div+ style={{+ height: 120,+ backgroundColor: 'var(--color-background-body, #f5f6f7)',+ borderRadius: 8,+ marginBottom: 12,+ }}+ />+ <XDSText type="body" weight="bold">+ {item.name}+ </XDSText>+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 8,+ marginTop: 8,+ }}>+ <XDSAvatar name={item.author} size="xsmall" />+ <XDSText type="supporting" color="secondary">+ {item.author}+ </XDSText>+ </div>+ </XDSCard>+ ))}+ </div>+ </div>++ {/* e. Starter kits */}+ <div style={{marginBottom: 48}}>+ <XDSHeading level={2} style={{marginBottom: 16}}>+ Starter kits+ </XDSHeading>+ <div+ style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(3, 1fr)',+ gap: 16,+ }}>+ {[+ {+ name: 'SaaS Starter',+ gradient: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',+ },+ {+ name: 'Internal Tool Kit',+ gradient: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)',+ },+ {+ name: 'Data Platform',+ gradient: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',+ },+ ].map((item, i) => (+ <XDSCard key={i} padding={0}>+ <div+ style={{+ height: 160,+ background: item.gradient,+ borderRadius: '8px 8px 0 0',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ }}>+ <PackageIcon+ width={40}+ height={40}+ style={{color: '#fff'}}+ />+ </div>+ <div style={{padding: 16}}>+ <XDSText type="body" weight="bold">+ {item.name}+ </XDSText>+ <XDSText type="supporting" color="secondary">+ Complete starter template+ </XDSText>+ </div>+ </XDSCard>+ ))}+ </div>+ </div>++ {/* f. Popular themes */}+ <div style={{marginBottom: 48}}>+ <XDSHeading level={2} style={{marginBottom: 16}}>+ Popular themes+ </XDSHeading>+ <div+ style={{+ display: 'flex',+ gap: 16,+ overflowX: 'auto' as const,+ paddingBottom: 8,+ }}>+ {[+ {name: 'Ocean', colors: ['#0066FF', '#00BFFF', '#E0F4FF']},+ {name: 'Forest', colors: ['#228B22', '#90EE90', '#F0FFF0']},+ {name: 'Sunset', colors: ['#FF6347', '#FFA07A', '#FFF5EE']},+ {name: 'Midnight', colors: ['#191970', '#4169E1', '#E8EAF6']},+ {name: 'Rose', colors: ['#E91E63', '#F48FB1', '#FCE4EC']},+ {name: 'Amber', colors: ['#FF8F00', '#FFB74D', '#FFF8E1']},+ ].map((theme, i) => (+ <XDSCard key={i} style={{minWidth: 180, flexShrink: 0}}>+ <div style={{display: 'flex', gap: 6, marginBottom: 12}}>+ {theme.colors.map((color, j) => (+ <div+ key={j}+ style={{+ width: 24,+ height: 24,+ borderRadius: '50%',+ backgroundColor: color,+ border:+ '1px solid var(--color-divider, rgba(0,0,0,0.1))',+ }}+ />+ ))}+ </div>+ <XDSText type="body" weight="bold">+ {theme.name}+ </XDSText>+ </XDSCard>+ ))}+ </div>+ </div>++ {/* g. Browse by use case */}+ <div style={{marginBottom: 48}}>+ <XDSHeading level={2} style={{marginBottom: 16}}>+ Browse by use case+ </XDSHeading>+ <div+ style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(4, 1fr)',+ gap: 12,+ }}>+ {[+ {label: 'Dashboards', icon: LayoutIcon},+ {label: 'Forms', icon: AaIcon},+ {label: 'Data Tables', icon: GridIcon},+ {label: 'Navigation', icon: CompassIcon},+ {label: 'Authentication', icon: FilterIcon},+ {label: 'Settings', icon: PackageIcon},+ {label: 'Onboarding', icon: ZapIcon},+ {label: 'E-commerce', icon: StarIcon},+ ].map((item, i) => (+ <div+ key={i}+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 12,+ padding: '16px 20px',+ borderRadius: 12,+ border: '1px solid var(--color-divider, rgba(0,0,0,0.1))',+ cursor: 'pointer',+ backgroundColor: 'var(--color-background-surface, #fff)',+ }}>+ <item.icon+ width={20}+ height={20}+ style={{flexShrink: 0, opacity: 0.7}}+ />+ <XDSText type="body" weight="bold">+ {item.label}+ </XDSText>+ </div>+ ))}+ </div>+ </div>++ {/* h. All templates and themes */}+ <div style={{marginBottom: 48}}>+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'space-between',+ marginBottom: 16,+ }}>+ <XDSHeading level={2}>All templates and themes</XDSHeading>+ <div style={{display: 'flex', gap: 8}}>+ <XDSDropdownMenu+ button={{label: 'Category', variant: 'secondary', size: 'sm'}}+ hasChevron+ items={[+ {label: 'All', onClick: () => {}},+ {label: 'Templates', onClick: () => {}},+ {label: 'Themes', onClick: () => {}},+ {label: 'Components', onClick: () => {}},+ ]}+ />+ <XDSDropdownMenu+ button={{label: 'Sort by', variant: 'secondary', size: 'sm'}}+ hasChevron+ items={[+ {label: 'Most popular', onClick: () => {}},+ {label: 'Newest', onClick: () => {}},+ {label: 'Most downloads', onClick: () => {}},+ ]}+ />+ </div>+ </div>+ <div+ style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(4, 1fr)',+ gap: 16,+ }}>+ {[+ {+ name: 'Admin Dashboard Pro',+ category: 'Template',+ downloads: '2.4k',+ stars: 186,+ isOfficial: true,+ img: FIRST_CARD_IMAGE,+ },+ {+ name: 'Dark Mode Theme',+ category: 'Theme',+ downloads: '5.1k',+ stars: 342,+ isOfficial: true,+ img: DUMMY_IMAGE,+ },+ {+ name: 'Login Page Bundle',+ category: 'Template',+ downloads: '3.2k',+ stars: 210,+ isOfficial: false,+ img: SHOPPING_DETAILS_IMAGE,+ },+ {+ name: 'Brutalist Theme',+ category: 'Theme',+ downloads: '1.8k',+ stars: 95,+ isOfficial: true,+ img: DUMMY_IMAGE,+ },+ {+ name: 'E-commerce Kit',+ category: 'Template',+ downloads: '4.7k',+ stars: 289,+ isOfficial: false,+ img: SCREENSHOT_3_IMAGE,+ },+ {+ name: 'Neutral Theme',+ category: 'Theme',+ downloads: '2.1k',+ stars: 134,+ isOfficial: true,+ img: DUMMY_IMAGE,+ },+ {+ name: 'Settings Panel',+ category: 'Template',+ downloads: '1.9k',+ stars: 112,+ isOfficial: true,+ img: DUMMY_IMAGE,+ },+ {+ name: 'WhatsApp Theme',+ category: 'Theme',+ downloads: '1.4k',+ stars: 78,+ isOfficial: true,+ img: DUMMY_IMAGE,+ },+ ].map((item, i) => (+ <XDSCard key={i} padding={0}>+ <div style={{position: 'relative'}}>+ <img+ src={item.img}+ alt={item.name}+ style={{+ display: 'block',+ width: '100%',+ height: 160,+ objectFit: 'cover',+ }}+ />+ </div>+ <div style={{padding: '12px 16px'}}>+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 8,+ marginBottom: 4,+ }}>+ <XDSText type="body" weight="bold">+ {item.name}+ </XDSText>+ {item.isOfficial && (+ <XDSBadge label="Official" variant="info" />+ )}+ </div>+ <XDSText type="supporting" color="secondary">+ {item.category}+ </XDSText>+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 12,+ marginTop: 8,+ }}>+ <div+ style={{display: 'flex', alignItems: 'center', gap: 4}}>+ <DownloadIcon+ width={14}+ height={14}+ style={{opacity: 0.4}}+ />+ <XDSText type="supporting" color="secondary">+ {item.downloads}+ </XDSText>+ </div>+ <div+ style={{display: 'flex', alignItems: 'center', gap: 4}}>+ <StarIcon+ width={14}+ height={14}+ style={{opacity: 0.4}}+ />+ <XDSText type="supporting" color="secondary">+ {item.stars}+ </XDSText>+ </div>+ </div>+ </div>+ </XDSCard>+ ))}+ </div>+ </div>+ </div>+ </div>+ </div>+ );+}++// ---------------------------------------------------------------------------+// ProfileView+// ---------------------------------------------------------------------------++const PROFILE_USED_ITEMS = [+ {name: 'Dashboard Pro', lastUsed: 'Last used 2 days ago'},+ {name: 'Login Form', lastUsed: 'Last used 2 days ago'},+ {name: 'Settings Panel', lastUsed: 'Last used 2 days ago'},+ {name: 'E-commerce Kit', lastUsed: 'Last used 2 days ago'},+ {name: 'Data Table', lastUsed: 'Last used 2 days ago'},+ {name: 'Contact Form', lastUsed: 'Last used 2 days ago'},+];++const PROFILE_LIKED_ITEMS = [+ {name: 'Meta Theme', lastUsed: 'Last used 2 days ago'},+ {name: 'Brutalist Theme', lastUsed: 'Last used 2 days ago'},+ {name: 'Admin Dashboard', lastUsed: 'Last used 2 days ago'},+ {name: 'Product Detail', lastUsed: 'Last used 2 days ago'},+];++const PROFILE_COLLECTIONS = [+ {name: 'Work Projects', count: 4},+ {name: 'Design Inspiration', count: 6},+ {name: 'Client Templates', count: 3},+];++function ProfileView({+ activeView,+ setActiveView,+}: {+ activeView: 'craft' | 'docs' | 'explore' | 'profile';+ setActiveView: (v: 'craft' | 'docs' | 'explore' | 'profile') => void;+}) {+ const [profileTab, setProfileTab] = useState('used');+ const [expandedCollection, setExpandedCollection] = useState<string | null>(+ null,+ );++ return (+ <div+ style={{+ display: 'flex',+ flexDirection: 'column' as const,+ height: '100vh',+ backgroundColor: 'var(--color-background-surface, #ffffff)',+ fontFamily: 'system-ui, -apple-system, sans-serif',+ }}>+ {/* Top Nav */}+ <nav+ style={{+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'space-between',+ height: 48,+ padding: '0 16px',+ flexShrink: 0,+ }}>+ <div style={{display: 'flex', alignItems: 'center', gap: 8}}>+ <LogoNav activeView={activeView} setActiveView={setActiveView} />+ </div>+ <div style={{display: 'flex', alignItems: 'center', gap: 4}}>+ <XDSButton+ label="Search"+ variant="ghost"+ size="sm"+ icon={<SearchIcon />}+ />+ <XDSButton+ label="Profile"+ variant="ghost"+ size="sm"+ icon={<ProfileIcon />}+ />+ </div>+ </nav>++ {/* Scrollable content */}+ <div+ style={{+ flex: 1,+ overflowY: 'auto' as const,+ padding: '40px 48px 64px',+ }}>+ <div style={{maxWidth: 800, margin: '0 auto'}}>+ {/* Profile Header */}+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 20,+ marginBottom: 24,+ }}>+ <XDSAvatar name="Ruby Cheung" size="large" />+ <div>+ <XDSHeading level={1}>Ruby Cheung</XDSHeading>+ <XDSText type="supporting" color="secondary">+ Design Systems Engineer+ </XDSText>+ <XDSText type="supporting" color="secondary">+ Joined March 2026+ </XDSText>+ <div style={{marginTop: 8}}>+ <XDSText type="supporting" color="secondary">+ 12 used · 8 liked · 3 collections+ </XDSText>+ </div>+ </div>+ </div>++ {/* Tabs */}+ <div style={{marginBottom: 24}}>+ <XDSTabList value={profileTab} onChange={setProfileTab} size="sm">+ <XDSTab value="used" label="Used" />+ <XDSTab value="liked" label="Liked" />+ <XDSTab value="bookmarks" label="Bookmarks" />+ <XDSTab value="created" label="Created" />+ </XDSTabList>+ </div>++ {/* Tab Content: Used */}+ {profileTab === 'used' && (+ <div+ style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(4, 1fr)',+ gap: 16,+ }}>+ {PROFILE_USED_ITEMS.map(item => (+ <XDSCard key={item.name}>+ <div style={{padding: 0}}>+ <div+ style={{+ width: '100%',+ aspectRatio: '4/3',+ backgroundColor:+ 'var(--color-background-body, #f1f4f7)',+ borderRadius: '8px 8px 0 0',+ }}+ />+ <div style={{padding: 12}}>+ <XDSText type="body">{item.name}</XDSText>+ <XDSText type="supporting" color="secondary">+ {item.lastUsed}+ </XDSText>+ </div>+ </div>+ </XDSCard>+ ))}+ </div>+ )}++ {/* Tab Content: Liked */}+ {profileTab === 'liked' && (+ <div+ style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(4, 1fr)',+ gap: 16,+ }}>+ {PROFILE_LIKED_ITEMS.map(item => (+ <XDSCard key={item.name}>+ <div style={{padding: 0}}>+ <div+ style={{+ width: '100%',+ aspectRatio: '4/3',+ backgroundColor:+ 'var(--color-background-body, #f1f4f7)',+ borderRadius: '8px 8px 0 0',+ }}+ />+ <div style={{padding: 12}}>+ <XDSText type="body">{item.name}</XDSText>+ <XDSText type="supporting" color="secondary">+ {item.lastUsed}+ </XDSText>+ </div>+ </div>+ </XDSCard>+ ))}+ </div>+ )}++ {/* Tab Content: Bookmarks */}+ {profileTab === 'bookmarks' && (+ <div>+ <div style={{marginBottom: 16}}>+ <XDSButton+ label="New collection"+ variant="secondary"+ icon={<PlusIcon />}>+ New collection+ </XDSButton>+ </div>+ <div+ style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(3, 1fr)',+ gap: 16,+ marginBottom: 24,+ }}>+ {PROFILE_COLLECTIONS.map(collection => (+ <XDSCard key={collection.name}>+ <div style={{padding: 16}}>+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 8,+ marginBottom: 8,+ }}>+ <FolderIcon width={20} height={20} />+ <XDSText type="body">{collection.name}</XDSText>+ </div>+ <XDSText type="supporting" color="secondary">+ {collection.count} items+ </XDSText>+ <div+ style={{+ display: 'grid',+ gridTemplateColumns: '1fr 1fr',+ gap: 4,+ marginTop: 12,+ }}>+ {[0, 1, 2, 3].map(i => (+ <div+ key={i}+ style={{+ aspectRatio: '1',+ backgroundColor:+ 'var(--color-background-body, #f1f4f7)',+ borderRadius: 4,+ }}+ />+ ))}+ </div>+ </div>+ </XDSCard>+ ))}+ </div>++ {/* Expandable list */}+ {PROFILE_COLLECTIONS.map(collection => (+ <div key={collection.name} style={{marginBottom: 8}}>+ <XDSButton+ label={collection.name}+ variant="ghost"+ size="sm"+ icon={+ <ChevronDownIcon+ style={{+ transform:+ expandedCollection === collection.name+ ? 'rotate(180deg)'+ : 'rotate(0deg)',+ transition: 'transform 200ms',+ }}+ />+ }+ onClick={() =>+ setExpandedCollection(+ expandedCollection === collection.name+ ? null+ : collection.name,+ )+ }>+ {collection.name} ({collection.count})+ </XDSButton>+ {expandedCollection === collection.name && (+ <div style={{paddingLeft: 32, paddingTop: 8}}>+ {Array.from({length: collection.count}, (_, i) => (+ <div key={i} style={{padding: '4px 0'}}>+ <XDSText type="supporting" color="secondary">+ Item {i + 1}+ </XDSText>+ </div>+ ))}+ </div>+ )}+ </div>+ ))}+ </div>+ )}++ {/* Tab Content: Created */}+ {profileTab === 'created' && (+ <div>+ <div+ style={{+ display: 'flex',+ justifyContent: 'flex-end',+ marginBottom: 16,+ }}>+ <XDSButton+ label="Create new"+ variant="secondary"+ size="sm"+ icon={<PlusIcon />}>+ Create new+ </XDSButton>+ </div>+ <div+ style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(4, 1fr)',+ gap: 16,+ }}>+ {[+ {+ name: 'My Dashboard Theme',+ type: 'Theme',+ status: 'Published',+ downloads: '342',+ img: DUMMY_IMAGE,+ },+ {+ name: 'Custom Login Template',+ type: 'Template',+ status: 'Published',+ downloads: '128',+ img: DUMMY_IMAGE,+ },+ {+ name: 'Internal Tools Kit',+ type: 'Template',+ status: 'Draft',+ downloads: '0',+ img: DUMMY_IMAGE,+ },+ ].map((item, i) => (+ <XDSCard key={i} padding={0}>+ <img+ src={item.img}+ alt={item.name}+ style={{+ display: 'block',+ width: '100%',+ height: 140,+ objectFit: 'cover',+ }}+ />+ <div style={{padding: '12px 16px'}}>+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 8,+ marginBottom: 4,+ }}>+ <XDSText type="body" weight="bold">+ {item.name}+ </XDSText>+ </div>+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 8,+ marginBottom: 4,+ }}>+ <XDSBadge+ label={item.status}+ variant={+ item.status === 'Published' ? 'success' : 'neutral'+ }+ />+ <XDSText type="supporting" color="secondary">+ {item.type}+ </XDSText>+ </div>+ {item.status === 'Published' && (+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 4,+ marginTop: 4,+ }}>+ <DownloadIcon+ width={14}+ height={14}+ style={{opacity: 0.4}}+ />+ <XDSText type="supporting" color="secondary">+ {item.downloads} downloads+ </XDSText>+ </div>+ )}+ </div>+ </XDSCard>+ ))}+ </div>+ </div>+ )}+ </div>+ </div>+ </div>+ );+}++// ---------------------------------------------------------------------------+// Page+// ---------------------------------------------------------------------------++export default function DocsiteLandingTemplate() {+ const [activeView, setActiveView] = useState<+ 'craft' | 'docs' | 'explore' | 'profile'+ >('craft');+ const [selected, setSelected] = useState<Set<number>>(new Set());+ const [isMobile, setIsMobile] = useState(false);+ const [isTablet, setIsTablet] = useState(false);+ const [generatingSource, setGeneratingSource] = useState<number | null>(null);+ const [chatOpen, setChatOpen] = useState(false);+ const [useTarget, setUseTarget] = useState<number | null>(null);+ const [previewGenerating, setPreviewGenerating] = useState(false);+ const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);+ const previewTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);+ const simRef = useRef<BoidsSimulation | null>(null);+ const simAnimRef = useRef<number>(0);++ if (!simRef.current) {+ simRef.current = createSimulation();+ }++ // Single update loop for the shared simulation+ const simRunning = generatingSource !== null || previewGenerating;+ useEffect(() => {+ if (!simRunning) {+ cancelAnimationFrame(simAnimRef.current);+ return;+ }+ function tick() {+ simRef.current!.update();+ simAnimRef.current = requestAnimationFrame(tick);+ }+ simAnimRef.current = requestAnimationFrame(tick);+ return () => cancelAnimationFrame(simAnimRef.current);+ }, [simRunning]);++ useEffect(() => {+ const mobileMql = window.matchMedia('(max-width: 768px)');+ const tabletMql = window.matchMedia(+ '(min-width: 769px) and (max-width: 1024px)',+ );+ setIsMobile(mobileMql.matches);+ setIsTablet(tabletMql.matches);++ const mobileHandler = (e: MediaQueryListEvent) => {+ setIsMobile(e.matches);+ };+ const tabletHandler = (e: MediaQueryListEvent) => setIsTablet(e.matches);+ mobileMql.addEventListener('change', mobileHandler);+ tabletMql.addEventListener('change', tabletHandler);+ return () => {+ mobileMql.removeEventListener('change', mobileHandler);+ tabletMql.removeEventListener('change', tabletHandler);};}, []);@@ -2531,6 +3770,18 @@ export default function DocsiteLandingTemplate() {return <DocsView activeView={activeView} setActiveView={setActiveView} />;}+ if (activeView === 'explore') {+ return (+ <ExploreView activeView={activeView} setActiveView={setActiveView} />+ );+ }++ if (activeView === 'profile') {+ return (+ <ProfileView activeView={activeView} setActiveView={setActiveView} />+ );+ }+return (<divstyle={{