react-toolkits 2.32.14 → 2.32.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # react-toolkits
2
2
 
3
+ ## 2.32.15
4
+
5
+ ### Patch Changes
6
+
7
+ - 512207b: refactor: update useKy hook to remove UseKyOptions interface and streamline options handling
8
+
3
9
  ## 2.32.14
4
10
 
5
11
  ### Patch Changes
package/lib/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ButtonProps, SelectProps, FormInstance, DrawerProps, Button, FormProps, ModalProps } from 'antd';
2
2
  import { FC, PropsWithChildren, Key, ReactNode, ReactElement, CSSProperties, Ref, DetailedHTMLProps, ImgHTMLAttributes, ComponentProps } from 'react';
3
- import { Options, KyInstance, Hooks } from 'ky';
3
+ import { Options, KyInstance } from 'ky';
4
4
  import { ParagraphProps } from 'antd/es/typography/Paragraph';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { useLocation, PathPattern } from 'react-router';
@@ -41,11 +41,6 @@ interface KyMethods {
41
41
  }) => Promise<T>;
42
42
  instance: KyInstance;
43
43
  }
44
- /** useKy 配置选项 */
45
- interface UseKyOptions {
46
- /** 自定义 hooks(拦截器),在默认 hooks 之前执行 */
47
- hooks?: Partial<Hooks>;
48
- }
49
44
  /**
50
45
  * HTTP 客户端 Hook
51
46
  *
@@ -70,7 +65,7 @@ interface UseKyOptions {
70
65
  * })
71
66
  * ```
72
67
  */
73
- declare function useKy(options?: UseKyOptions): KyMethods;
68
+ declare function useKy(options?: Options): KyMethods;
74
69
 
75
70
  interface AuthButtonProps extends ButtonProps {
76
71
  /** 权限码,支持单个或多个 */
@@ -1497,4 +1492,4 @@ declare function useAuth(code?: string | string[], config?: RequestOptions): {
1497
1492
  declare function useMenuList(): _tanstack_react_query.UseQueryResult<MenuListItem[], Error>;
1498
1493
  declare const useGames: () => _tanstack_react_query.UseQueryResult<Game[], Error>;
1499
1494
 
1500
- export { APP_ID_HEADER, AuthButton, type AuthButtonProps, AuthMode, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FRONTEND_ROUTE_PREFIX, FilterFormWrapper, type FilterFormWrapperProps, type Game, type GameSelectConfig, type GameSelectProps, type HeaderExtra, type HeaderExtraConfig, Highlight, type HighlightProps, HttpResponseError, InfiniteList, type InfiniteListDataAdapter, type InfiniteListPayload, type InfiniteListProps, type InfiniteListRef, type InfiniteListRequestConfig, type InfiniteListRequestConfigType, type JsonResponse, KeepAlive, type KeepAliveCacheItem, KeepAliveOutlet, type KeepAliveOutletProps, type KeepAliveProps, KeepAliveProvider, type KeepAliveProviderProps, type KyMethods, Layout, type LayoutProps, Logo, type LogoProps, type MenuListItem, type NavItem, type NavMenuItemGroupType, type NavMenuItemType, type NavSubMenuType, type NavigationConfig, NotFound, OperationLogList, type PageParam, type Permission, QueryList, QueryListAction, type QueryListPayload, type QueryListProps, type QueryListRef, type RecursivePartial, type RequestOptions, RequireAuth, type RequireAuthProps, RequireGame, type ResponseType, type RouteMatchRule, SSO_URL, SelectAll, type SelectAllProps, type ShowFormOptions$1 as ShowFormDrawerOptions, type ShowFormOptions as ShowFormModalOptions, SignIn, ToolkitsProvider, type ToolkitsProviderProps, type UseDrawerOperation, type UseDrawerProps, type UseFormDrawerProps, type UseFormDrawerReturn, type UseFormModalProps, type UseFormModalReturn, type UseKeepAliveReturn, type UseKyOptions, type UseModalOperation, type UseModalProps, UserDropdown, type VisibilityState, WILDCARD, createVisibilityStoreConfig, generateId, _default$1 as menuRoutes, mixedStorage, _default as permissionRoutes, useAuth, useDrawer, useDrawerStore, useFormDrawer, useFormModal, useGames, useInfiniteListStore, useKeepAlive, useKeepAliveContext, useKy, useMenuList, useModal, useModalStore, useQueryListStore, useToolkitsStore };
1495
+ export { APP_ID_HEADER, AuthButton, type AuthButtonProps, AuthMode, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FRONTEND_ROUTE_PREFIX, FilterFormWrapper, type FilterFormWrapperProps, type Game, type GameSelectConfig, type GameSelectProps, type HeaderExtra, type HeaderExtraConfig, Highlight, type HighlightProps, HttpResponseError, InfiniteList, type InfiniteListDataAdapter, type InfiniteListPayload, type InfiniteListProps, type InfiniteListRef, type InfiniteListRequestConfig, type InfiniteListRequestConfigType, type JsonResponse, KeepAlive, type KeepAliveCacheItem, KeepAliveOutlet, type KeepAliveOutletProps, type KeepAliveProps, KeepAliveProvider, type KeepAliveProviderProps, type KyMethods, Layout, type LayoutProps, Logo, type LogoProps, type MenuListItem, type NavItem, type NavMenuItemGroupType, type NavMenuItemType, type NavSubMenuType, type NavigationConfig, NotFound, OperationLogList, type PageParam, type Permission, QueryList, QueryListAction, type QueryListPayload, type QueryListProps, type QueryListRef, type RecursivePartial, type RequestOptions, RequireAuth, type RequireAuthProps, RequireGame, type ResponseType, type RouteMatchRule, SSO_URL, SelectAll, type SelectAllProps, type ShowFormOptions$1 as ShowFormDrawerOptions, type ShowFormOptions as ShowFormModalOptions, SignIn, ToolkitsProvider, type ToolkitsProviderProps, type UseDrawerOperation, type UseDrawerProps, type UseFormDrawerProps, type UseFormDrawerReturn, type UseFormModalProps, type UseFormModalReturn, type UseKeepAliveReturn, type UseModalOperation, type UseModalProps, UserDropdown, type VisibilityState, WILDCARD, createVisibilityStoreConfig, generateId, _default$1 as menuRoutes, mixedStorage, _default as permissionRoutes, useAuth, useDrawer, useDrawerStore, useFormDrawer, useFormModal, useGames, useInfiniteListStore, useKeepAlive, useKeepAliveContext, useKy, useMenuList, useModal, useModalStore, useQueryListStore, useToolkitsStore };