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';
|
|
|
|
|
import { warning } from '/Users/donghym/Desktop/day/UI/Nova/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';
|
2026-05-31 09:36:23 +08:00
|
|
|
import { SiteContext, type ISiteContext } from '/Users/donghym/Desktop/day/UI/Nova/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';
|
|
|
|
|
|
|
|
|
|
import * as entryMemberExports from '/Users/donghym/Desktop/day/UI/Nova/src/index.ts';
|
|
|
|
|
|
|
|
|
|
const entryExports = {
|
|
|
|
|
...entryMemberExports,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Static content
|
|
|
|
|
const pkg = {"name":"@nova/ui","description":"AI-Native component library for modern visualization","version":"0.0.1","license":"MIT","author":""};
|
|
|
|
|
const historyType = "browser";
|
|
|
|
|
const hostname = undefined;
|
2026-05-31 09:36:23 +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":"https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg","nav":{"zh-CN":[{"title":"指南","link":"/guide/introduce"},{"title":"组件","link":"/components"}],"en-US":[{"title":"Guide","link":"/guide/introduce-en"},{"title":"Components","link":"/components-en"}]},"github":"https://github.com/user/novaui","localesEnhance":[{"id":"zh-CN","switchPrefix":"中"},{"id":"en-US","switchPrefix":"En"}],"sidebarGroupModePath":true,"title":"Nova UI","description":{"zh-CN":"AI-Native 组件库,为现代可视化应用构建而生","en-US":"AI-Native component library for modern visualization"},"actions":{"zh-CN":[{"type":"primary","text":"开始使用","link":"/guide/introduce"},{"text":"组件总览","link":"/components"}],"en-US":[{"type":"primary","text":"Get Started","link":"/guide/introduce-en"},{"text":"Components","link":"/components-en"}]},"features":{"zh-CN":[{"title":"AI-First","details":"专为 AI 代码生成设计的零歧义 API,让 AI 准确理解每个组件的行为与边界"},{"title":"类型安全","details":"基于 TypeScript 的完整类型推导,提供编译时校验与 IDE 智能提示"},{"title":"主题灵活","details":"基于 CSS 变量的全量主题定制,支持亮色/暗色一键切换"},{"title":"按需加载","details":"支持 Tree Shaking 的模块化架构,只打包你使用的组件"},{"title":"Accessibility","details":"遵循 WAI-ARIA 规范,确保无障碍访问体验"},{"title":"现代风格","details":"融合 Apple HIG 与 Material Design 的最佳实践,打造精致的视觉语言"}],"en-US":[{"title":"AI-First","details":"Zero-ambiguity APIs designed for AI code generation"},{"title":"Type Safe","details":"Full type inference with TypeScript for compile-time checking"},{"title":"Flexible Theme","details":"Full theme customization via CSS variables, light/dark toggle"},{"title":"Tree Shaking","details":"Modular architecture, only bundle what you use"},{"title":"Accessibility","details":"WAI-ARIA compliant for inclusive user experiences"},{"title":"Modern Design","details":"Polished visual language blending Apple HIG and Material Design"}]},"loading":{"skeleton":["/guide","/config"]}};
|
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>
|
|
|
|
|
);
|
|
|
|
|
}
|