Version 1.0.2 mit node_modules Verzeichnis

This commit is contained in:
ISA
2024-10-02 07:58:24 +02:00
parent f353a06b1b
commit 62b6e55a0a
68228 changed files with 4548477 additions and 651 deletions

21
node_modules/react-redux/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-present Dan Abramov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

63
node_modules/react-redux/README.md generated vendored Normal file
View File

@@ -0,0 +1,63 @@
# React Redux
Official React bindings for [Redux](https://github.com/reduxjs/redux).
Performant and flexible.
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/reduxjs/react-redux/test.yml?style=flat-square) [![npm version](https://img.shields.io/npm/v/react-redux.svg?style=flat-square)](https://www.npmjs.com/package/react-redux)
[![npm downloads](https://img.shields.io/npm/dm/react-redux.svg?style=flat-square)](https://www.npmjs.com/package/react-redux)
[![#redux channel on Discord](https://img.shields.io/badge/discord-redux@reactiflux-61DAFB.svg?style=flat-square)](http://www.reactiflux.com)
## Installation
### Create a React Redux App
The recommended way to start new apps with React and Redux is by using [our official Redux+TS template for Vite](https://github.com/reduxjs/redux-templates), or by creating a new Next.js project using [Next's `with-redux` template](https://github.com/vercel/next.js/tree/canary/examples/with-redux).
Both of these already have Redux Toolkit and React-Redux configured appropriately for that build tool, and come with a small example app that demonstrates how to use several of Redux Toolkit's features.
```bash
# Vite with our Redux+TS template
# (using the `degit` tool to clone and extract the template)
npx degit reduxjs/redux-templates/packages/vite-template-redux my-app
# Next.js using the `with-redux` template
npx create-next-app --example with-redux my-app
```
### An Existing React App
React Redux 8.0 requires **React 16.8.3 or later** (or React Native 0.59 or later).
To use React Redux with your React app, install it as a dependency:
```bash
# If you use npm:
npm install react-redux
# Or if you use Yarn:
yarn add react-redux
```
You'll also need to [install Redux](https://redux.js.org/introduction/installation) and [set up a Redux store](https://redux.js.org/recipes/configuring-your-store/) in your app.
This assumes that youre using [npm](http://npmjs.com/) package manager
with a module bundler like [Webpack](https://webpack.js.org/) or
[Browserify](http://browserify.org/) to consume [CommonJS
modules](https://webpack.js.org/api/module-methods/#commonjs).
If you dont yet use [npm](http://npmjs.com/) or a modern module bundler, and would rather prefer a single-file [UMD](https://github.com/umdjs/umd) build that makes `ReactRedux` available as a global object, you can grab a pre-built version from [cdnjs](https://cdnjs.com/libraries/react-redux). We _dont_ recommend this approach for any serious application, as most of the libraries complementary to Redux are only available on [npm](http://npmjs.com/).
## Documentation
The React Redux docs are published at **https://react-redux.js.org** .
## How Does It Work?
The post [The History and Implementation of React-Redux](https://blog.isquaredsoftware.com/2018/11/react-redux-history-implementation/)
explains what it does, how it works, and how the API and implementation have evolved over time.
There's also a [Deep Dive into React-Redux](https://blog.isquaredsoftware.com/2019/06/presentation-react-redux-deep-dive/) talk that covers some of the same material at a higher level.
## License
[MIT](LICENSE.md)

6
node_modules/react-redux/dist/cjs/index.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./react-redux.production.min.cjs')
} else {
module.exports = require('./react-redux.development.cjs')
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

566
node_modules/react-redux/dist/react-redux.d.ts generated vendored Normal file
View File

@@ -0,0 +1,566 @@
import * as React$1 from 'react';
import { Context, ReactNode, ComponentType, ComponentClass, ClassAttributes, JSX, FunctionComponent } from 'react';
import { Action, UnknownAction, Store, Dispatch } from 'redux';
/**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
declare const REACT_STATICS: {
readonly childContextTypes: true;
readonly contextType: true;
readonly contextTypes: true;
readonly defaultProps: true;
readonly displayName: true;
readonly getDefaultProps: true;
readonly getDerivedStateFromError: true;
readonly getDerivedStateFromProps: true;
readonly mixins: true;
readonly propTypes: true;
readonly type: true;
};
declare const KNOWN_STATICS: {
readonly name: true;
readonly length: true;
readonly prototype: true;
readonly caller: true;
readonly callee: true;
readonly arguments: true;
readonly arity: true;
};
declare const FORWARD_REF_STATICS: {
readonly $$typeof: true;
readonly render: true;
readonly defaultProps: true;
readonly displayName: true;
readonly propTypes: true;
};
declare const MEMO_STATICS: {
readonly $$typeof: true;
readonly compare: true;
readonly defaultProps: true;
readonly displayName: true;
readonly propTypes: true;
readonly type: true;
};
type NonReactStatics<S extends React$1.ComponentType<any>, C extends {
[key: string]: true;
} = {}> = {
[key in Exclude<keyof S, S extends React$1.MemoExoticComponent<any> ? keyof typeof MEMO_STATICS | keyof C : S extends React$1.ForwardRefExoticComponent<any> ? keyof typeof FORWARD_REF_STATICS | keyof C : keyof typeof REACT_STATICS | keyof typeof KNOWN_STATICS | keyof C>]: S[key];
};
type VoidFunc = () => void;
type Listener = {
callback: VoidFunc;
next: Listener | null;
prev: Listener | null;
};
declare function createListenerCollection(): {
clear(): void;
notify(): void;
get(): Listener[];
subscribe(callback: () => void): () => void;
};
type ListenerCollection = ReturnType<typeof createListenerCollection>;
interface Subscription {
addNestedSub: (listener: VoidFunc) => VoidFunc;
notifyNestedSubs: VoidFunc;
handleChangeWrapper: VoidFunc;
isSubscribed: () => boolean;
onStateChange?: VoidFunc | null;
trySubscribe: VoidFunc;
tryUnsubscribe: VoidFunc;
getListeners: () => ListenerCollection;
}
interface ProviderProps<A extends Action<string> = UnknownAction, S = unknown> {
/**
* The single Redux store in your application.
*/
store: Store<S, A>;
/**
* An optional server state snapshot. Will be used during initial hydration render if available, to ensure that the UI output is consistent with the HTML generated on the server.
*/
serverState?: S;
/**
* Optional context to be used internally in react-redux. Use React.createContext() to create a context to be used.
* If this is used, you'll need to customize `connect` by supplying the same context provided to the Provider.
* Set the initial value to null, and the hooks will error
* if this is not overwritten by Provider.
*/
context?: Context<ReactReduxContextValue<S, A> | null>;
/**
* Determines the frequency of stability checks for all selectors.
* This setting overrides the global configuration for
* the `useSelector` stability check, allowing you to specify how often
* these checks should occur in development mode.
*
* @since 8.1.0
*/
stabilityCheck?: DevModeCheckFrequency;
/**
* Determines the frequency of identity function checks for all selectors.
* This setting overrides the global configuration for
* the `useSelector` identity function check, allowing you to specify how often
* these checks should occur in development mode.
*
* **Note**: Previously referred to as `noopCheck`.
*
* @since 9.0.0
*/
identityFunctionCheck?: DevModeCheckFrequency;
children: ReactNode;
}
declare function Provider<A extends Action<string> = UnknownAction, S = unknown>({ store, context, children, serverState, stabilityCheck, identityFunctionCheck, }: ProviderProps<A, S>): React$1.JSX.Element;
interface ReactReduxContextValue<SS = any, A extends Action<string> = UnknownAction> extends Pick<ProviderProps, 'stabilityCheck' | 'identityFunctionCheck'> {
store: Store<SS, A>;
subscription: Subscription;
getServerState?: () => SS;
}
declare const ReactReduxContext: Context<ReactReduxContextValue<any, UnknownAction> | null>;
type ReactReduxContextInstance = typeof ReactReduxContext;
/**
* The frequency of development mode checks.
*
* @since 8.1.0
* @internal
*/
type DevModeCheckFrequency = 'never' | 'once' | 'always';
/**
* Represents the configuration for development mode checks.
*
* @since 9.0.0
* @internal
*/
interface DevModeChecks {
/**
* Overrides the global stability check for the selector.
* - `once` - Run only the first time the selector is called.
* - `always` - Run every time the selector is called.
* - `never` - Never run the stability check.
*
* @default 'once'
*
* @since 8.1.0
*/
stabilityCheck: DevModeCheckFrequency;
/**
* Overrides the global identity function check for the selector.
* - `once` - Run only the first time the selector is called.
* - `always` - Run every time the selector is called.
* - `never` - Never run the identity function check.
*
* **Note**: Previously referred to as `noopCheck`.
*
* @default 'once'
*
* @since 9.0.0
*/
identityFunctionCheck: DevModeCheckFrequency;
}
interface UseSelectorOptions<Selected = unknown> {
equalityFn?: EqualityFn<Selected>;
/**
* `useSelector` performs additional checks in development mode to help
* identify and warn about potential issues in selector behavior. This
* option allows you to customize the behavior of these checks per selector.
*
* @since 9.0.0
*/
devModeChecks?: Partial<DevModeChecks>;
}
/**
* Represents a custom hook that allows you to extract data from the
* Redux store state, using a selector function. The selector function
* takes the current state as an argument and returns a part of the state
* or some derived data. The hook also supports an optional equality
* function or options object to customize its behavior.
*
* @template StateType - The specific type of state this hook operates on.
*
* @public
*/
interface UseSelector<StateType = unknown> {
/**
* A function that takes a selector function as its first argument.
* The selector function is responsible for selecting a part of
* the Redux store's state or computing derived data.
*
* @param selector - A function that receives the current state and returns a part of the state or some derived data.
* @param equalityFnOrOptions - An optional equality function or options object for customizing the behavior of the selector.
* @returns The selected part of the state or derived data.
*
* @template TState - The specific type of state this hook operates on.
* @template Selected - The type of the value that the selector function will return.
*/
<TState extends StateType = StateType, Selected = unknown>(selector: (state: TState) => Selected, equalityFnOrOptions?: EqualityFn<Selected> | UseSelectorOptions<Selected>): Selected;
/**
* Creates a "pre-typed" version of {@linkcode useSelector useSelector}
* where the `state` type is predefined.
*
* This allows you to set the `state` type once, eliminating the need to
* specify it with every {@linkcode useSelector useSelector} call.
*
* @returns A pre-typed `useSelector` with the state type already defined.
*
* @example
* ```ts
* export const useAppSelector = useSelector.withTypes<RootState>()
* ```
*
* @template OverrideStateType - The specific type of state this hook operates on.
*
* @since 9.1.0
*/
withTypes: <OverrideStateType extends StateType>() => UseSelector<OverrideStateType>;
}
/**
* Hook factory, which creates a `useSelector` hook bound to a given context.
*
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
* @returns {Function} A `useSelector` hook bound to the specified context.
*/
declare function createSelectorHook(context?: React.Context<ReactReduxContextValue<any, any> | null>): UseSelector;
/**
* A hook to access the redux store's state. This hook takes a selector function
* as an argument. The selector is called with the store state.
*
* This hook takes an optional equality comparison function as the second parameter
* that allows you to customize the way the selected state is compared to determine
* whether the component needs to be re-rendered.
*
* @param {Function} selector the selector function
* @param {Function=} equalityFn the function that will be used to determine equality
*
* @returns {any} the selected state
*
* @example
*
* import React from 'react'
* import { useSelector } from 'react-redux'
*
* export const CounterComponent = () => {
* const counter = useSelector(state => state.counter)
* return <div>{counter}</div>
* }
*/
declare const useSelector: UseSelector<unknown>;
type FixTypeLater = any;
type EqualityFn<T> = (a: T, b: T) => boolean;
type ExtendedEqualityFn<T, P> = (a: T, b: T, c: P, d: P) => boolean;
type AnyIfEmpty<T extends object> = keyof T extends never ? any : T;
type DistributiveOmit<T, K extends keyof T> = T extends unknown ? Omit<T, K> : never;
interface DispatchProp<A extends Action<string> = UnknownAction> {
dispatch: Dispatch<A>;
}
/**
* A property P will be present if:
* - it is present in DecorationTargetProps
*
* Its value will be dependent on the following conditions
* - if property P is present in InjectedProps and its definition extends the definition
* in DecorationTargetProps, then its definition will be that of DecorationTargetProps[P]
* - if property P is not present in InjectedProps then its definition will be that of
* DecorationTargetProps[P]
* - if property P is present in InjectedProps but does not extend the
* DecorationTargetProps[P] definition, its definition will be that of InjectedProps[P]
*/
type Matching<InjectedProps, DecorationTargetProps> = {
[P in keyof DecorationTargetProps]: P extends keyof InjectedProps ? InjectedProps[P] extends DecorationTargetProps[P] ? DecorationTargetProps[P] : InjectedProps[P] : DecorationTargetProps[P];
};
/**
* a property P will be present if :
* - it is present in both DecorationTargetProps and InjectedProps
* - InjectedProps[P] can satisfy DecorationTargetProps[P]
* ie: decorated component can accept more types than decorator is injecting
*
* For decoration, inject props or ownProps are all optionally
* required by the decorated (right hand side) component.
* But any property required by the decorated component must be satisfied by the injected property.
*/
type Shared<InjectedProps, DecorationTargetProps> = {
[P in Extract<keyof InjectedProps, keyof DecorationTargetProps>]?: InjectedProps[P] extends DecorationTargetProps[P] ? DecorationTargetProps[P] : never;
};
type GetProps<C> = C extends ComponentType<infer P> ? C extends ComponentClass<P> ? ClassAttributes<InstanceType<C>> & P : P : never;
type GetLibraryManagedProps<C> = JSX.LibraryManagedAttributes<C, GetProps<C>>;
type ConnectedComponent<C extends ComponentType<any>, P> = FunctionComponent<P> & NonReactStatics<C> & {
WrappedComponent: C;
};
type ConnectPropsMaybeWithoutContext<TActualOwnProps> = TActualOwnProps extends {
context: any;
} ? Omit<ConnectProps, 'context'> : ConnectProps;
type Identity<T> = T;
type Mapped<T> = Identity<{
[k in keyof T]: T[k];
}>;
type InferableComponentEnhancerWithProps<TInjectedProps, TNeedsProps> = <C extends ComponentType<Matching<TInjectedProps, GetProps<C>>>>(component: C) => ConnectedComponent<C, Mapped<DistributiveOmit<GetLibraryManagedProps<C>, keyof Shared<TInjectedProps, GetLibraryManagedProps<C>>> & TNeedsProps & ConnectPropsMaybeWithoutContext<TNeedsProps & GetProps<C>>>>;
type InferableComponentEnhancer<TInjectedProps> = InferableComponentEnhancerWithProps<TInjectedProps, {}>;
type InferThunkActionCreatorType<TActionCreator extends (...args: any[]) => any> = TActionCreator extends (...args: infer TParams) => (...args: any[]) => infer TReturn ? (...args: TParams) => TReturn : TActionCreator;
type HandleThunkActionCreator<TActionCreator> = TActionCreator extends (...args: any[]) => any ? InferThunkActionCreatorType<TActionCreator> : TActionCreator;
type ResolveThunks<TDispatchProps> = TDispatchProps extends {
[key: string]: any;
} ? {
[C in keyof TDispatchProps]: HandleThunkActionCreator<TDispatchProps[C]>;
} : TDispatchProps;
/**
* This interface allows you to easily create a hook that is properly typed for your
* store's root state.
*
* @example
*
* interface RootState {
* property: string;
* }
*
* const useTypedSelector: TypedUseSelectorHook<RootState> = useSelector;
*/
interface TypedUseSelectorHook<TState> {
<TSelected>(selector: (state: TState) => TSelected, equalityFn?: EqualityFn<NoInfer<TSelected>>): TSelected;
<Selected = unknown>(selector: (state: TState) => Selected, options?: UseSelectorOptions<Selected>): Selected;
}
type NoInfer<T> = [T][T extends any ? 0 : never];
type SelectorFactory<S, TProps, TOwnProps, TFactoryOptions> = (dispatch: Dispatch<Action<string>>, factoryOptions: TFactoryOptions) => Selector<S, TProps, TOwnProps>;
type Selector<S, TProps, TOwnProps = null> = TOwnProps extends null | undefined ? (state: S) => TProps : (state: S, ownProps: TOwnProps) => TProps;
type MapStateToProps<TStateProps, TOwnProps, State> = (state: State, ownProps: TOwnProps) => TStateProps;
type MapStateToPropsFactory<TStateProps, TOwnProps, State> = (initialState: State, ownProps: TOwnProps) => MapStateToProps<TStateProps, TOwnProps, State>;
type MapStateToPropsParam<TStateProps, TOwnProps, State> = MapStateToPropsFactory<TStateProps, TOwnProps, State> | MapStateToProps<TStateProps, TOwnProps, State> | null | undefined;
type MapDispatchToPropsFunction<TDispatchProps, TOwnProps> = (dispatch: Dispatch<Action<string>>, ownProps: TOwnProps) => TDispatchProps;
type MapDispatchToProps<TDispatchProps, TOwnProps> = MapDispatchToPropsFunction<TDispatchProps, TOwnProps> | TDispatchProps;
type MapDispatchToPropsFactory<TDispatchProps, TOwnProps> = (dispatch: Dispatch<Action<string>>, ownProps: TOwnProps) => MapDispatchToPropsFunction<TDispatchProps, TOwnProps>;
type MapDispatchToPropsParam<TDispatchProps, TOwnProps> = MapDispatchToPropsFactory<TDispatchProps, TOwnProps> | MapDispatchToProps<TDispatchProps, TOwnProps>;
type MapDispatchToPropsNonObject<TDispatchProps, TOwnProps> = MapDispatchToPropsFactory<TDispatchProps, TOwnProps> | MapDispatchToPropsFunction<TDispatchProps, TOwnProps>;
type MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps> = (stateProps: TStateProps, dispatchProps: TDispatchProps, ownProps: TOwnProps) => TMergedProps;
interface ConnectProps {
/** A custom Context instance that the component can use to access the store from an alternate Provider using that same Context instance */
context?: ReactReduxContextInstance;
/** A Redux store instance to be used for subscriptions instead of the store from a Provider */
store?: Store;
}
/**
* Infers the type of props that a connector will inject into a component.
*/
type ConnectedProps<TConnector> = TConnector extends InferableComponentEnhancerWithProps<infer TInjectedProps, any> ? unknown extends TInjectedProps ? TConnector extends InferableComponentEnhancer<infer TInjectedProps> ? TInjectedProps : never : TInjectedProps : never;
interface ConnectOptions<State = unknown, TStateProps = {}, TOwnProps = {}, TMergedProps = {}> {
forwardRef?: boolean;
context?: typeof ReactReduxContext;
areStatesEqual?: (nextState: State, prevState: State, nextOwnProps: TOwnProps, prevOwnProps: TOwnProps) => boolean;
areOwnPropsEqual?: (nextOwnProps: TOwnProps, prevOwnProps: TOwnProps) => boolean;
areStatePropsEqual?: (nextStateProps: TStateProps, prevStateProps: TStateProps) => boolean;
areMergedPropsEqual?: (nextMergedProps: TMergedProps, prevMergedProps: TMergedProps) => boolean;
}
/**
* Connects a React component to a Redux store.
*
* - Without arguments, just wraps the component, without changing the behavior / props
*
* - If 2 params are passed (3rd param, mergeProps, is skipped), default behavior
* is to override ownProps (as stated in the docs), so what remains is everything that's
* not a state or dispatch prop
*
* - When 3rd param is passed, we don't know if ownProps propagate and whether they
* should be valid component props, because it depends on mergeProps implementation.
* As such, it is the user's responsibility to extend ownProps interface from state or
* dispatch props or both when applicable
*
* @param mapStateToProps
* @param mapDispatchToProps
* @param mergeProps
* @param options
*/
interface Connect<DefaultState = unknown> {
(): InferableComponentEnhancer<DispatchProp>;
/** mapState only */
<TStateProps = {}, no_dispatch = {}, TOwnProps = {}, State = DefaultState>(mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>): InferableComponentEnhancerWithProps<TStateProps & DispatchProp, TOwnProps>;
/** mapDispatch only (as a function) */
<no_state = {}, TDispatchProps = {}, TOwnProps = {}>(mapStateToProps: null | undefined, mapDispatchToProps: MapDispatchToPropsNonObject<TDispatchProps, TOwnProps>): InferableComponentEnhancerWithProps<TDispatchProps, TOwnProps>;
/** mapDispatch only (as an object) */
<no_state = {}, TDispatchProps = {}, TOwnProps = {}>(mapStateToProps: null | undefined, mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>): InferableComponentEnhancerWithProps<ResolveThunks<TDispatchProps>, TOwnProps>;
/** mapState and mapDispatch (as a function)*/
<TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>, mapDispatchToProps: MapDispatchToPropsNonObject<TDispatchProps, TOwnProps>): InferableComponentEnhancerWithProps<TStateProps & TDispatchProps, TOwnProps>;
/** mapState and mapDispatch (nullish) */
<TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>, mapDispatchToProps: null | undefined): InferableComponentEnhancerWithProps<TStateProps, TOwnProps>;
/** mapState and mapDispatch (as an object) */
<TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>, mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>): InferableComponentEnhancerWithProps<TStateProps & ResolveThunks<TDispatchProps>, TOwnProps>;
/** mergeProps only */
<no_state = {}, no_dispatch = {}, TOwnProps = {}, TMergedProps = {}>(mapStateToProps: null | undefined, mapDispatchToProps: null | undefined, mergeProps: MergeProps<undefined, DispatchProp, TOwnProps, TMergedProps>): InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>;
/** mapState and mergeProps */
<TStateProps = {}, no_dispatch = {}, TOwnProps = {}, TMergedProps = {}, State = DefaultState>(mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>, mapDispatchToProps: null | undefined, mergeProps: MergeProps<TStateProps, DispatchProp, TOwnProps, TMergedProps>): InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>;
/** mapDispatch (as a object) and mergeProps */
<no_state = {}, TDispatchProps = {}, TOwnProps = {}, TMergedProps = {}>(mapStateToProps: null | undefined, mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>, mergeProps: MergeProps<undefined, TDispatchProps, TOwnProps, TMergedProps>): InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>;
/** mapState and options */
<TStateProps = {}, no_dispatch = {}, TOwnProps = {}, State = DefaultState>(mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>, mapDispatchToProps: null | undefined, mergeProps: null | undefined, options: ConnectOptions<State, TStateProps, TOwnProps>): InferableComponentEnhancerWithProps<DispatchProp & TStateProps, TOwnProps>;
/** mapDispatch (as a function) and options */
<TStateProps = {}, TDispatchProps = {}, TOwnProps = {}>(mapStateToProps: null | undefined, mapDispatchToProps: MapDispatchToPropsNonObject<TDispatchProps, TOwnProps>, mergeProps: null | undefined, options: ConnectOptions<{}, TStateProps, TOwnProps>): InferableComponentEnhancerWithProps<TDispatchProps, TOwnProps>;
/** mapDispatch (as an object) and options*/
<TStateProps = {}, TDispatchProps = {}, TOwnProps = {}>(mapStateToProps: null | undefined, mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>, mergeProps: null | undefined, options: ConnectOptions<{}, TStateProps, TOwnProps>): InferableComponentEnhancerWithProps<ResolveThunks<TDispatchProps>, TOwnProps>;
/** mapState, mapDispatch (as a function), and options */
<TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>, mapDispatchToProps: MapDispatchToPropsNonObject<TDispatchProps, TOwnProps>, mergeProps: null | undefined, options: ConnectOptions<State, TStateProps, TOwnProps>): InferableComponentEnhancerWithProps<TStateProps & TDispatchProps, TOwnProps>;
/** mapState, mapDispatch (as an object), and options */
<TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>, mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>, mergeProps: null | undefined, options: ConnectOptions<State, TStateProps, TOwnProps>): InferableComponentEnhancerWithProps<TStateProps & ResolveThunks<TDispatchProps>, TOwnProps>;
/** mapState, mapDispatch, mergeProps, and options */
<TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, TMergedProps = {}, State = DefaultState>(mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>, mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>, mergeProps: MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps>, options?: ConnectOptions<State, TStateProps, TOwnProps, TMergedProps>): InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>;
}
declare const _default: Connect<unknown>;
declare function shallowEqual(objA: any, objB: any): boolean;
declare function defaultNoopBatch(callback: () => void): void;
/**
* Represents a custom hook that provides a dispatch function
* from the Redux store.
*
* @template DispatchType - The specific type of the dispatch function.
*
* @since 9.1.0
* @public
*/
interface UseDispatch<DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>> {
/**
* Returns the dispatch function from the Redux store.
*
* @returns The dispatch function from the Redux store.
*
* @template AppDispatch - The specific type of the dispatch function.
*/
<AppDispatch extends DispatchType = DispatchType>(): AppDispatch;
/**
* Creates a "pre-typed" version of {@linkcode useDispatch useDispatch}
* where the type of the `dispatch` function is predefined.
*
* This allows you to set the `dispatch` type once, eliminating the need to
* specify it with every {@linkcode useDispatch useDispatch} call.
*
* @returns A pre-typed `useDispatch` with the dispatch type already defined.
*
* @example
* ```ts
* export const useAppDispatch = useDispatch.withTypes<AppDispatch>()
* ```
*
* @template OverrideDispatchType - The specific type of the dispatch function.
*
* @since 9.1.0
*/
withTypes: <OverrideDispatchType extends DispatchType>() => UseDispatch<OverrideDispatchType>;
}
/**
* Hook factory, which creates a `useDispatch` hook bound to a given context.
*
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
* @returns {Function} A `useDispatch` hook bound to the specified context.
*/
declare function createDispatchHook<StateType = unknown, ActionType extends Action = UnknownAction>(context?: Context<ReactReduxContextValue<StateType, ActionType> | null>): UseDispatch<Dispatch<ActionType>>;
/**
* A hook to access the redux `dispatch` function.
*
* @returns {any|function} redux store's `dispatch` function
*
* @example
*
* import React, { useCallback } from 'react'
* import { useDispatch } from 'react-redux'
*
* export const CounterComponent = ({ value }) => {
* const dispatch = useDispatch()
* const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), [])
* return (
* <div>
* <span>{value}</span>
* <button onClick={increaseCounter}>Increase counter</button>
* </div>
* )
* }
*/
declare const useDispatch: UseDispatch<Dispatch<UnknownAction>>;
/**
* Represents a type that extracts the action type from a given Redux store.
*
* @template StoreType - The specific type of the Redux store.
*
* @since 9.1.0
* @internal
*/
type ExtractStoreActionType<StoreType extends Store> = StoreType extends Store<any, infer ActionType> ? ActionType : never;
/**
* Represents a custom hook that provides access to the Redux store.
*
* @template StoreType - The specific type of the Redux store that gets returned.
*
* @since 9.1.0
* @public
*/
interface UseStore<StoreType extends Store> {
/**
* Returns the Redux store instance.
*
* @returns The Redux store instance.
*/
(): StoreType;
/**
* Returns the Redux store instance with specific state and action types.
*
* @returns The Redux store with the specified state and action types.
*
* @template StateType - The specific type of the state used in the store.
* @template ActionType - The specific type of the actions used in the store.
*/
<StateType extends ReturnType<StoreType['getState']> = ReturnType<StoreType['getState']>, ActionType extends Action = ExtractStoreActionType<Store>>(): Store<StateType, ActionType>;
/**
* Creates a "pre-typed" version of {@linkcode useStore useStore}
* where the type of the Redux `store` is predefined.
*
* This allows you to set the `store` type once, eliminating the need to
* specify it with every {@linkcode useStore useStore} call.
*
* @returns A pre-typed `useStore` with the store type already defined.
*
* @example
* ```ts
* export const useAppStore = useStore.withTypes<AppStore>()
* ```
*
* @template OverrideStoreType - The specific type of the Redux store that gets returned.
*
* @since 9.1.0
*/
withTypes: <OverrideStoreType extends StoreType>() => UseStore<OverrideStoreType>;
}
/**
* Hook factory, which creates a `useStore` hook bound to a given context.
*
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
* @returns {Function} A `useStore` hook bound to the specified context.
*/
declare function createStoreHook<StateType = unknown, ActionType extends Action = Action>(context?: Context<ReactReduxContextValue<StateType, ActionType> | null>): UseStore<Store<StateType, ActionType, {}>>;
/**
* A hook to access the redux store.
*
* @returns {any} the redux store
*
* @example
*
* import React from 'react'
* import { useStore } from 'react-redux'
*
* export const ExampleComponent = () => {
* const store = useStore()
* return <div>{store.getState()}</div>
* }
*/
declare const useStore: UseStore<Store<unknown, Action, {}>>;
/**
* @deprecated As of React 18, batching is enabled by default for ReactDOM and React Native.
* This is now a no-op that immediately runs the callback.
*/
declare const batch: typeof defaultNoopBatch;
export { AnyIfEmpty, Connect, ConnectProps, ConnectPropsMaybeWithoutContext, ConnectedComponent, ConnectedProps, DispatchProp, DistributiveOmit, EqualityFn, ExtendedEqualityFn, FixTypeLater, GetLibraryManagedProps, GetProps, HandleThunkActionCreator, InferThunkActionCreatorType, InferableComponentEnhancer, InferableComponentEnhancerWithProps, MapDispatchToProps, MapDispatchToPropsFactory, MapDispatchToPropsFunction, MapDispatchToPropsNonObject, MapDispatchToPropsParam, MapStateToProps, MapStateToPropsFactory, MapStateToPropsParam, Mapped, Matching, MergeProps, NoInfer, Provider, ProviderProps, ReactReduxContext, ReactReduxContextValue, ResolveThunks, Selector, SelectorFactory, Shared, Subscription, TypedUseSelectorHook, UseDispatch, UseSelector, UseStore, batch, _default as connect, createDispatchHook, createSelectorHook, createStoreHook, shallowEqual, useDispatch, useSelector, useStore };

1155
node_modules/react-redux/dist/react-redux.legacy-esm.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

1121
node_modules/react-redux/dist/react-redux.mjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
node_modules/react-redux/dist/react-redux.mjs.map generated vendored Normal file

File diff suppressed because one or more lines are too long

47
node_modules/react-redux/dist/rsc.mjs generated vendored Normal file
View File

@@ -0,0 +1,47 @@
// src/utils/shallowEqual.ts
function is(x, y) {
if (x === y) {
return x !== 0 || y !== 0 || 1 / x === 1 / y;
} else {
return x !== x && y !== y;
}
}
function shallowEqual(objA, objB) {
if (is(objA, objB))
return true;
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
return false;
}
const keysA = Object.keys(objA);
const keysB = Object.keys(objB);
if (keysA.length !== keysB.length)
return false;
for (let i = 0; i < keysA.length; i++) {
if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
return false;
}
}
return true;
}
// src/index-rsc.ts
function throwNotSupportedError(...args) {
throw new Error(
"This function is not supported in React Server Components. Please only use this export in a Client Component."
);
}
var ReactReduxContext = {};
export {
throwNotSupportedError as Provider,
ReactReduxContext,
throwNotSupportedError as batch,
throwNotSupportedError as connect,
throwNotSupportedError as createDispatchHook,
throwNotSupportedError as createSelectorHook,
throwNotSupportedError as createStoreHook,
shallowEqual,
throwNotSupportedError as useDispatch,
throwNotSupportedError as useSelector,
throwNotSupportedError as useStore
};
//# sourceMappingURL=rsc.mjs.map

1
node_modules/react-redux/dist/rsc.mjs.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/shallowEqual.ts","../src/index-rsc.ts"],"sourcesContent":["function is(x: unknown, y: unknown) {\r\n if (x === y) {\r\n return x !== 0 || y !== 0 || 1 / x === 1 / y\r\n } else {\r\n return x !== x && y !== y\r\n }\r\n}\r\n\r\nexport default function shallowEqual(objA: any, objB: any) {\r\n if (is(objA, objB)) return true\r\n\r\n if (\r\n typeof objA !== 'object' ||\r\n objA === null ||\r\n typeof objB !== 'object' ||\r\n objB === null\r\n ) {\r\n return false\r\n }\r\n\r\n const keysA = Object.keys(objA)\r\n const keysB = Object.keys(objB)\r\n\r\n if (keysA.length !== keysB.length) return false\r\n\r\n for (let i = 0; i < keysA.length; i++) {\r\n if (\r\n !Object.prototype.hasOwnProperty.call(objB, keysA[i]) ||\r\n !is(objA[keysA[i]], objB[keysA[i]])\r\n ) {\r\n return false\r\n }\r\n }\r\n\r\n return true\r\n}\r\n","import type * as normal from './index'\nimport type * as rsc from './index-rsc'\n\n// checks to make sure we didn't forgot to replicate any exports\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst _check: typeof normal = {} as typeof rsc\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst _check2: typeof rsc = {} as typeof normal\n\n// -------------------------------------------------------------------------------------\n\nfunction throwNotSupportedError(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ...args: any[]\n): any {\n throw new Error(\n 'This function is not supported in React Server Components. Please only use this export in a Client Component.',\n )\n}\n\nexport {\n throwNotSupportedError as batch,\n throwNotSupportedError as Provider,\n throwNotSupportedError as connect,\n throwNotSupportedError as useSelector,\n throwNotSupportedError as useDispatch,\n throwNotSupportedError as useStore,\n throwNotSupportedError as createDispatchHook,\n throwNotSupportedError as createSelectorHook,\n throwNotSupportedError as createStoreHook,\n}\nexport const ReactReduxContext = {} as any\nexport { default as shallowEqual } from './utils/shallowEqual'\n"],"mappings":";AAAA,SAAS,GAAG,GAAY,GAAY;AAClC,MAAI,MAAM,GAAG;AACX,WAAO,MAAM,KAAK,MAAM,KAAK,IAAI,MAAM,IAAI;AAAA,EAC7C,OAAO;AACL,WAAO,MAAM,KAAK,MAAM;AAAA,EAC1B;AACF;AAEe,SAAR,aAA8B,MAAW,MAAW;AACzD,MAAI,GAAG,MAAM,IAAI;AAAG,WAAO;AAE3B,MACE,OAAO,SAAS,YAChB,SAAS,QACT,OAAO,SAAS,YAChB,SAAS,MACT;AACA,WAAO;AAAA,EACT;AAEA,QAAM,QAAQ,OAAO,KAAK,IAAI;AAC9B,QAAM,QAAQ,OAAO,KAAK,IAAI;AAE9B,MAAI,MAAM,WAAW,MAAM;AAAQ,WAAO;AAE1C,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,QACE,CAAC,OAAO,UAAU,eAAe,KAAK,MAAM,MAAM,CAAC,CAAC,KACpD,CAAC,GAAG,KAAK,MAAM,CAAC,CAAC,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,GAClC;AACA,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;;;ACvBA,SAAS,0BAEJ,MACE;AACL,QAAM,IAAI;AAAA,IACR;AAAA,EACF;AACF;AAaO,IAAM,oBAAoB,CAAC;","names":[]}

111
node_modules/react-redux/package.json generated vendored Normal file
View File

@@ -0,0 +1,111 @@
{
"name": "react-redux",
"version": "9.1.2",
"description": "Official React bindings for Redux",
"keywords": [
"react",
"reactjs",
"redux"
],
"license": "MIT",
"author": "Dan Abramov <dan.abramov@me.com> (https://github.com/gaearon)",
"homepage": "https://github.com/reduxjs/react-redux",
"repository": "github:reduxjs/react-redux",
"bugs": "https://github.com/reduxjs/react-redux/issues",
"module": "dist/react-redux.legacy-esm.js",
"main": "dist/cjs/index.js",
"react-native": "./dist/react-redux.legacy-esm.js",
"types": "dist/react-redux.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-redux.d.ts",
"react-server": "./dist/rsc.mjs",
"react-native": "./dist/react-redux.legacy-esm.js",
"import": "./dist/react-redux.mjs",
"default": "./dist/cjs/index.js"
},
"./alternate-renderers": {
"types": "./dist/react-redux.d.ts",
"import": "./dist/react-redux.mjs",
"default": "./dist/cjs/index.js"
}
},
"sideEffects": false,
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"clean": "rimraf lib dist es coverage",
"api-types": "api-extractor run --local",
"format": "prettier --write \"{src,test}/**/*.{js,ts,tsx}\" \"docs/**/*.md\"",
"lint": "eslint src test",
"lint:fix": "eslint src test --fix",
"prepare": "yarn clean && yarn build",
"pretest": "yarn lint",
"test": "vitest --run",
"test:watch": "vitest --watch",
"type-tests": "yarn tsc -p test/typetests/tsconfig.json",
"coverage": "codecov"
},
"peerDependencies": {
"@types/react": "^18.2.25",
"react": "^18.0",
"redux": "^5.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"redux": {
"optional": true
}
},
"dependencies": {
"@types/use-sync-external-store": "^0.0.3",
"use-sync-external-store": "^1.0.0"
},
"devDependencies": {
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@babel/plugin-proposal-decorators": "^7.12.1",
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/plugin-transform-flow-strip-types": "^7.22.5",
"@babel/plugin-transform-react-display-name": "^7.12.1",
"@babel/plugin-transform-react-jsx": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/preset-typescript": "^7.14.5",
"@microsoft/api-extractor": "^7.18.1",
"@reduxjs/toolkit": "^2.0.0-beta.4",
"@testing-library/jest-dom": "^6.3.0",
"@testing-library/react": "^14.1.2",
"@testing-library/react-hooks": "^8.0.1",
"@types/node": "^20.11.6",
"@types/prop-types": "^15.7.12",
"@types/react": "18.2.25",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"babel-eslint": "^10.1.0",
"codecov": "^3.8.0",
"cross-env": "^7.0.2",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-react": "^7.33.2",
"glob": "^7.1.6",
"jsdom": "^24.0.0",
"prettier": "^3.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-test-renderer": "18.0.0",
"redux": "^5.0.0",
"rimraf": "^3.0.2",
"tsup": "^7.0.0",
"typescript": "^5.4.2",
"vitest": "^1.2.1"
},
"packageManager": "yarn@4.1.0"
}