// @ts-nocheck // This file is generated by Umi automatically // DO NOT CHANGE IT MANUALLY! import React, { useState, useEffect, useRef } from 'react'; import { useOutlet, history } from 'dumi'; import { warning } from '/Users/donghym/Desktop/day/UI/Pika/node_modules/.pnpm/rc-util@5.44.4_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/rc-util'; import { SiteContext, type ISiteContext } from '/Users/donghym/Desktop/day/UI/Pika/node_modules/.pnpm/dumi@2.4.28_@babel+core@7.29.7_@types+node@25.9.1_@types+react@19.2.15_eslint@10.4.0_ji_4b5099ce8b49e6def696b2efaf0f9b24/node_modules/dumi/dist/client/theme-api/context.js'; import { components } from '../meta/atoms'; import { locales } from '../locales/config'; import * as entryMemberExports from '/Users/donghym/Desktop/day/UI/Pika/src/index.ts'; const entryExports = { ...entryMemberExports, }; // Static content const pkg = {"name":"@Pika/ui","description":"AI-Native component library for modern visualization","version":"0.0.1","license":"MIT","author":""}; const historyType = "browser"; const hostname = undefined; const themeConfig = {"footer":"Copyright © 2026 | Powered by dumi","prefersColor":{"default":"light","switch":true},"nprogress":true,"lastUpdated":true,"name":"Nova","logo":false,"nav":[{"title":"指南","link":"/guide"},{"title":"组件","link":"/components"}],"socialLinks":{"github":"https://github.com/donghym/PikaUI"},"sidebarGroupModePath":true}; const _2_level_nav_available = true; export default function DumiContextWrapper() { const outlet = useOutlet(); const [loading, setLoading] = useState(false); const prev = useRef(history.location.pathname); useEffect(() => { return history.listen((next) => { if (next.location.pathname !== prev.current) { prev.current = next.location.pathname; // scroll to top when route changed document.documentElement.scrollTo(0, 0); } }); }, []); const context: ISiteContext = React.useMemo(() => { const ctx = { pkg, historyType, entryExports, demos: null, components, locales, loading, setLoading, hostname, themeConfig, _2_level_nav_available, }; // Proxy do not warning since `Object.keys` will get nothing to loop Object.defineProperty(ctx, 'demos', { get: () => { warning(false, '`demos` return empty in latest version, please use `useDemo` instead.'); return {}; }, }); return ctx; }, [ pkg, historyType, entryExports, components, locales, loading, setLoading, hostname, themeConfig, _2_level_nav_available, ]); return ( {outlet} ); }