Files
NapCatQQ/.pnpm-store/v3/files/7a/d8fdb804fd6410a4b25e40faed2bc97e2bdb417d10080ef9e9d653c5779e0ed0c816c1e58fbc549aa65fb7e62429838bd674fa6459a600848d0d5070abc0d2
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

56 lines
1.6 KiB
Plaintext

"use client";
import {
ProviderContext
} from "./chunk-Q3W45BN5.mjs";
// src/provider.tsx
import { I18nProvider } from "@react-aria/i18n";
import { RouterProvider } from "@react-aria/utils";
import { OverlayProvider } from "@react-aria/overlays";
import { useMemo } from "react";
import { MotionConfig, MotionGlobalConfig } from "framer-motion";
import { jsx } from "react/jsx-runtime";
var HeroUIProvider = ({
children,
navigate,
disableAnimation,
useHref,
disableRipple = false,
skipFramerMotionAnimations = disableAnimation,
reducedMotion = "never",
validationBehavior,
locale = "en-US",
defaultDates,
createCalendar,
...otherProps
}) => {
let contents = children;
if (navigate) {
contents = /* @__PURE__ */ jsx(RouterProvider, { navigate, useHref, children: contents });
}
const context = useMemo(() => {
if (disableAnimation && skipFramerMotionAnimations) {
MotionGlobalConfig.skipAnimations = true;
}
return {
createCalendar,
defaultDates,
disableAnimation,
disableRipple,
validationBehavior
};
}, [
createCalendar,
defaultDates == null ? void 0 : defaultDates.maxDate,
defaultDates == null ? void 0 : defaultDates.minDate,
disableAnimation,
disableRipple,
validationBehavior
]);
return /* @__PURE__ */ jsx(ProviderContext, { value: context, children: /* @__PURE__ */ jsx(I18nProvider, { locale, children: /* @__PURE__ */ jsx(MotionConfig, { reducedMotion, children: /* @__PURE__ */ jsx(OverlayProvider, { ...otherProps, children: contents }) }) }) });
};
export {
HeroUIProvider
};