node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
declare type VoidFunc = () => void;
declare type Listener = {
callback: VoidFunc;
next: Listener | null;
prev: Listener | null;
};
declare function createListenerCollection(): {
clear(): void;
notify(): void;
get(): Listener[];
subscribe(callback: () => void): () => void;
};
declare type ListenerCollection = ReturnType<typeof createListenerCollection>;
export interface Subscription {
addNestedSub: (listener: VoidFunc) => VoidFunc;
notifyNestedSubs: VoidFunc;
handleChangeWrapper: VoidFunc;
isSubscribed: () => boolean;
onStateChange?: VoidFunc | null;
trySubscribe: VoidFunc;
tryUnsubscribe: VoidFunc;
getListeners: () => ListenerCollection;
}
export declare function createSubscription(store: any, parentSub?: Subscription): Subscription;
export {};

View File

@@ -0,0 +1,158 @@
import { getBatch } from './batch'; // encapsulates the subscription logic for connecting a component to the redux store, as
// well as nesting subscriptions of descendant components, so that we can ensure the
// ancestor components re-render before descendants
function createListenerCollection() {
const batch = getBatch();
let first = null;
let last = null;
return {
clear() {
first = null;
last = null;
},
notify() {
batch(() => {
let listener = first;
while (listener) {
listener.callback();
listener = listener.next;
}
});
},
get() {
let listeners = [];
let listener = first;
while (listener) {
listeners.push(listener);
listener = listener.next;
}
return listeners;
},
subscribe(callback) {
let isSubscribed = true;
let listener = last = {
callback,
next: null,
prev: last
};
if (listener.prev) {
listener.prev.next = listener;
} else {
first = listener;
}
return function unsubscribe() {
if (!isSubscribed || first === null) return;
isSubscribed = false;
if (listener.next) {
listener.next.prev = listener.prev;
} else {
last = listener.prev;
}
if (listener.prev) {
listener.prev.next = listener.next;
} else {
first = listener.next;
}
};
}
};
}
const nullListeners = {
notify() {},
get: () => []
};
export function createSubscription(store, parentSub) {
let unsubscribe;
let listeners = nullListeners; // Reasons to keep the subscription active
let subscriptionsAmount = 0; // Is this specific subscription subscribed (or only nested ones?)
let selfSubscribed = false;
function addNestedSub(listener) {
trySubscribe();
const cleanupListener = listeners.subscribe(listener); // cleanup nested sub
let removed = false;
return () => {
if (!removed) {
removed = true;
cleanupListener();
tryUnsubscribe();
}
};
}
function notifyNestedSubs() {
listeners.notify();
}
function handleChangeWrapper() {
if (subscription.onStateChange) {
subscription.onStateChange();
}
}
function isSubscribed() {
return selfSubscribed;
}
function trySubscribe() {
subscriptionsAmount++;
if (!unsubscribe) {
unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper);
listeners = createListenerCollection();
}
}
function tryUnsubscribe() {
subscriptionsAmount--;
if (unsubscribe && subscriptionsAmount === 0) {
unsubscribe();
unsubscribe = undefined;
listeners.clear();
listeners = nullListeners;
}
}
function trySubscribeSelf() {
if (!selfSubscribed) {
selfSubscribed = true;
trySubscribe();
}
}
function tryUnsubscribeSelf() {
if (selfSubscribed) {
selfSubscribed = false;
tryUnsubscribe();
}
}
const subscription = {
addNestedSub,
notifyNestedSubs,
handleChangeWrapper,
isSubscribed,
trySubscribe: trySubscribeSelf,
tryUnsubscribe: tryUnsubscribeSelf,
getListeners: () => listeners
};
return subscription;
}

4
server/node_modules/react-redux/es/utils/batch.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
declare function defaultNoopBatch(callback: () => void): void;
export declare const setBatch: (newBatch: typeof defaultNoopBatch) => typeof defaultNoopBatch;
export declare const getBatch: () => typeof defaultNoopBatch;
export {};

10
server/node_modules/react-redux/es/utils/batch.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
// Default to a dummy "batch" implementation that just runs the callback
function defaultNoopBatch(callback) {
callback();
}
let batch = defaultNoopBatch; // Allow injecting another batching function later
export const setBatch = newBatch => batch = newBatch; // Supply a getter just to skip dealing with ESM bindings
export const getBatch = () => batch;

View File

@@ -0,0 +1,2 @@
import type { ActionCreatorsMapObject, Dispatch } from 'redux';
export default function bindActionCreators(actionCreators: ActionCreatorsMapObject, dispatch: Dispatch): ActionCreatorsMapObject;

View File

@@ -0,0 +1,13 @@
export default function bindActionCreators(actionCreators, dispatch) {
const boundActionCreators = {};
for (const key in actionCreators) {
const actionCreator = actionCreators[key];
if (typeof actionCreator === 'function') {
boundActionCreators[key] = (...args) => dispatch(actionCreator(...args));
}
}
return boundActionCreators;
}

View File

@@ -0,0 +1,5 @@
/**
* @param {any} obj The object to inspect.
* @returns {boolean} True if the argument appears to be a plain object.
*/
export default function isPlainObject(obj: unknown): boolean;

View File

@@ -0,0 +1,16 @@
/**
* @param {any} obj The object to inspect.
* @returns {boolean} True if the argument appears to be a plain object.
*/
export default function isPlainObject(obj) {
if (typeof obj !== 'object' || obj === null) return false;
let proto = Object.getPrototypeOf(obj);
if (proto === null) return true;
let baseProto = proto;
while (Object.getPrototypeOf(baseProto) !== null) {
baseProto = Object.getPrototypeOf(baseProto);
}
return proto === baseProto;
}

View File

@@ -0,0 +1 @@
export { unstable_batchedUpdates } from 'react-dom';

View File

@@ -0,0 +1 @@
export { unstable_batchedUpdates } from 'react-dom';

View File

@@ -0,0 +1,2 @@
import { unstable_batchedUpdates } from 'react-native';
export { unstable_batchedUpdates };

View File

@@ -0,0 +1,5 @@
/* eslint-disable import/namespace */
/* eslint-disable import/named */
import { unstable_batchedUpdates } from 'react-native';
export { unstable_batchedUpdates };

View File

@@ -0,0 +1 @@
export default function shallowEqual(objA: any, objB: any): boolean;

View File

@@ -0,0 +1,27 @@
function is(x, y) {
if (x === y) {
return x !== 0 || y !== 0 || 1 / x === 1 / y;
} else {
return x !== x && y !== y;
}
}
export default 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;
}

View File

@@ -0,0 +1,3 @@
import * as React from 'react';
export declare const canUseDOM: boolean;
export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;

View File

@@ -0,0 +1,12 @@
import * as React from 'react'; // React currently throws a warning when using useLayoutEffect on the server.
// To get around it, we can conditionally useEffect on the server (no-op) and
// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store
// subscription callback always has the selector from the latest render commit
// available, otherwise a store update may happen between render and the effect,
// which may cause missed updates; we also must ensure the store subscription
// is created synchronously, otherwise a store update may occur before the
// subscription is created and an inconsistent state may be observed
// Matches logic in React's `shared/ExecutionEnvironment` file
export const canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
export const useIsomorphicLayoutEffect = canUseDOM ? React.useLayoutEffect : React.useEffect;

View File

@@ -0,0 +1,2 @@
import * as React from 'react';
export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;

View File

@@ -0,0 +1,3 @@
import * as React from 'react'; // Under React Native, we know that we always want to use useLayoutEffect
export const useIsomorphicLayoutEffect = React.useLayoutEffect;

View File

@@ -0,0 +1,5 @@
import type { useSyncExternalStore } from 'use-sync-external-store';
import type { useSyncExternalStoreWithSelector } from 'use-sync-external-store/with-selector';
export declare const notInitialized: () => never;
export declare type uSES = typeof useSyncExternalStore;
export declare type uSESWS = typeof useSyncExternalStoreWithSelector;

View File

@@ -0,0 +1,3 @@
export const notInitialized = () => {
throw new Error('uSES not initialized!');
};

View File

@@ -0,0 +1 @@
export default function verifyPlainObject(value: unknown, displayName: string, methodName: string): void;

View File

@@ -0,0 +1,7 @@
import isPlainObject from './isPlainObject';
import warning from './warning';
export default function verifyPlainObject(value, displayName, methodName) {
if (!isPlainObject(value)) {
warning(`${methodName}() in ${displayName} must return a plain object. Instead received ${value}.`);
}
}

View File

@@ -0,0 +1,7 @@
/**
* Prints a warning in the console if it exists.
*
* @param {String} message The warning message.
* @returns {void}
*/
export default function warning(message: string): void;

24
server/node_modules/react-redux/es/utils/warning.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
/**
* Prints a warning in the console if it exists.
*
* @param {String} message The warning message.
* @returns {void}
*/
export default function warning(message) {
/* eslint-disable no-console */
if (typeof console !== 'undefined' && typeof console.error === 'function') {
console.error(message);
}
/* eslint-enable no-console */
try {
// This error was thrown as a convenience so that if you enable
// "break on all exceptions" in your console,
// it would pause the execution at this line.
throw new Error(message);
/* eslint-disable no-empty */
} catch (e) {}
/* eslint-enable no-empty */
}