2026-05-31 09:36:07 +08:00
|
|
|
// @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';
|
2026-06-01 17:07:08 +08:00
|
|
|
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';
|
2026-05-31 09:36:07 +08:00
|
|
|
import { components } from '../meta/atoms';
|
|
|
|
|
import { locales } from '../locales/config';
|
|
|
|
|
|
2026-06-01 17:07:08 +08:00
|
|
|
import * as entryMemberExports from '/Users/donghym/Desktop/day/UI/Pika/src/index.ts';
|
2026-05-31 09:36:07 +08:00
|
|
|
|
|
|
|
|
const entryExports = {
|
|
|
|
|
...entryMemberExports,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Static content
|
2026-06-01 17:07:08 +08:00
|
|
|
const pkg = {"name":"@Pika/ui","description":"AI-Native component library for modern visualization","version":"0.0.1","license":"MIT","author":""};
|
2026-05-31 09:36:07 +08:00
|
|
|
const historyType = "browser";
|
|
|
|
|
const hostname = undefined;
|
2026-06-01 17:07:08 +08:00
|
|
|
const themeConfig = {"footer":"Copyright © 2026 | Powered by <a href=\"https://d.umijs.org\" target=\"_blank\" rel=\"noreferrer\">dumi</a>","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};
|
2026-05-31 09:36:07 +08:00
|
|
|
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 (
|
|
|
|
|
<SiteContext.Provider value={context}>
|
|
|
|
|
{outlet}
|
|
|
|
|
</SiteContext.Provider>
|
|
|
|
|
);
|
|
|
|
|
}
|