0.2.0 - Mid migration

This commit is contained in:
Daniel Mason 2022-04-25 14:47:15 +12:00
parent 139e6a915e
commit 7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions

3
web/node_modules/immer/dist/core/current.d.ts generated vendored Normal file
View file

@ -0,0 +1,3 @@
/** Takes a snapshot of the current state of a draft and finalizes it (but without freezing). This is a great utility to print the current state during debugging (no Proxies in the way). The output of current can also be safely leaked outside the producer. */
export declare function current<T>(value: T): T;
//# sourceMappingURL=current.d.ts.map

1
web/node_modules/immer/dist/core/current.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"current.d.ts","sourceRoot":"","sources":["../src/core/current.ts"],"names":[],"mappings":"AAeA,mQAAmQ;AACnQ,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAA"}

3
web/node_modules/immer/dist/core/finalize.d.ts generated vendored Normal file
View file

@ -0,0 +1,3 @@
import { ImmerScope } from "../internal";
export declare function processResult(result: any, scope: ImmerScope): any;
//# sourceMappingURL=finalize.d.ts.map

1
web/node_modules/immer/dist/core/finalize.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"finalize.d.ts","sourceRoot":"","sources":["../src/core/finalize.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EAkBV,MAAM,aAAa,CAAA;AAEpB,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,OAiC3D"}

53
web/node_modules/immer/dist/core/immerClass.d.ts generated vendored Normal file
View file

@ -0,0 +1,53 @@
import { IProduceWithPatches, IProduce, ImmerState, Drafted, Patch, Objectish, Draft, PatchListener } from "../internal";
interface ProducersFns {
produce: IProduce;
produceWithPatches: IProduceWithPatches;
}
export declare class Immer implements ProducersFns {
useProxies_: boolean;
autoFreeze_: boolean;
constructor(config?: {
useProxies?: boolean;
autoFreeze?: boolean;
});
/**
* The `produce` function takes a value and a "recipe function" (whose
* return value often depends on the base state). The recipe function is
* free to mutate its first argument however it wants. All mutations are
* only ever applied to a __copy__ of the base state.
*
* Pass only a function to create a "curried producer" which relieves you
* from passing the recipe function every time.
*
* Only plain objects and arrays are made mutable. All other objects are
* considered uncopyable.
*
* Note: This function is __bound__ to its `Immer` instance.
*
* @param {any} base - the initial state
* @param {Function} producer - function that receives a proxy of the base state as first argument and which can be freely modified
* @param {Function} patchListener - optional function that will be called with all the patches produced here
* @returns {any} a new state, or the initial state if nothing was modified
*/
produce: IProduce;
produceWithPatches: IProduceWithPatches;
createDraft<T extends Objectish>(base: T): Draft<T>;
finishDraft<D extends Draft<any>>(draft: D, patchListener?: PatchListener): D extends Draft<infer T> ? T : never;
/**
* Pass true to automatically freeze all copies created by Immer.
*
* By default, auto-freezing is enabled.
*/
setAutoFreeze(value: boolean): void;
/**
* Pass true to use the ES2015 `Proxy` class when creating drafts, which is
* always faster than using ES5 proxies.
*
* By default, feature detection is used, so calling this is rarely necessary.
*/
setUseProxies(value: boolean): void;
applyPatches<T extends Objectish>(base: T, patches: Patch[]): T;
}
export declare function createProxy<T extends Objectish>(immer: Immer, value: T, parent?: ImmerState): Drafted<T, ImmerState>;
export {};
//# sourceMappingURL=immerClass.d.ts.map

1
web/node_modules/immer/dist/core/immerClass.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"immerClass.d.ts","sourceRoot":"","sources":["../src/core/immerClass.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACV,OAAO,EAGP,KAAK,EACL,SAAS,EAET,KAAK,EACL,aAAa,EAgBb,MAAM,aAAa,CAAA;AAEpB,UAAU,YAAY;IACrB,OAAO,EAAE,QAAQ,CAAA;IACjB,kBAAkB,EAAE,mBAAmB,CAAA;CACvC;AAED,qBAAa,KAAM,YAAW,YAAY;IACzC,WAAW,EAAE,OAAO,CAAa;IAEjC,WAAW,EAAE,OAAO,CAAO;gBAEf,MAAM,CAAC,EAAE;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAC;IAOjE;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,EAAE,QAAQ,CAwDhB;IAED,kBAAkB,EAAE,mBAAmB,CAgBtC;IAED,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAUnD,WAAW,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,EAC/B,KAAK,EAAE,CAAC,EACR,aAAa,CAAC,EAAE,aAAa,GAC3B,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK;IAWvC;;;;OAIG;IACH,aAAa,CAAC,KAAK,EAAE,OAAO;IAI5B;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,OAAO;IAO5B,YAAY,CAAC,CAAC,SAAS,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC;CAsB/D;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,SAAS,EAC9C,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,CAAC,EACR,MAAM,CAAC,EAAE,UAAU,GACjB,OAAO,CAAC,CAAC,EAAE,UAAU,CAAC,CAaxB"}

38
web/node_modules/immer/dist/core/proxy.d.ts generated vendored Normal file
View file

@ -0,0 +1,38 @@
import { ImmerBaseState, ImmerState, Drafted, AnyObject, AnyArray, Objectish, ProxyType } from "../internal";
interface ProxyBaseState extends ImmerBaseState {
assigned_: {
[property: string]: boolean;
};
parent_?: ImmerState;
revoke_(): void;
}
export interface ProxyObjectState extends ProxyBaseState {
type_: ProxyType.ProxyObject;
base_: any;
copy_: any;
draft_: Drafted<AnyObject, ProxyObjectState>;
}
export interface ProxyArrayState extends ProxyBaseState {
type_: ProxyType.ProxyArray;
base_: AnyArray;
copy_: AnyArray | null;
draft_: Drafted<AnyArray, ProxyArrayState>;
}
declare type ProxyState = ProxyObjectState | ProxyArrayState;
/**
* Returns a new draft of the `base` object.
*
* The second argument is the parent draft-state (used internally).
*/
export declare function createProxyProxy<T extends Objectish>(base: T, parent?: ImmerState): Drafted<T, ProxyState>;
/**
* Object drafts
*/
export declare const objectTraps: ProxyHandler<ProxyState>;
export declare function markChanged(state: ImmerState): void;
export declare function prepareCopy(state: {
base_: any;
copy_: any;
}): void;
export {};
//# sourceMappingURL=proxy.d.ts.map

1
web/node_modules/immer/dist/core/proxy.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../src/core/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAON,cAAc,EACd,UAAU,EACV,OAAO,EACP,SAAS,EACT,QAAQ,EACR,SAAS,EAKT,SAAS,EACT,MAAM,aAAa,CAAA;AAEpB,UAAU,cAAe,SAAQ,cAAc;IAC9C,SAAS,EAAE;QACV,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;KAC3B,CAAA;IACD,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,OAAO,IAAI,IAAI,CAAA;CACf;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACvD,KAAK,EAAE,SAAS,CAAC,WAAW,CAAA;IAC5B,KAAK,EAAE,GAAG,CAAA;IACV,KAAK,EAAE,GAAG,CAAA;IACV,MAAM,EAAE,OAAO,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAA;CAC5C;AAED,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACtD,KAAK,EAAE,SAAS,CAAC,UAAU,CAAA;IAC3B,KAAK,EAAE,QAAQ,CAAA;IACf,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;IACtB,MAAM,EAAE,OAAO,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAA;CAC1C;AAED,aAAK,UAAU,GAAG,gBAAgB,GAAG,eAAe,CAAA;AAEpD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,SAAS,EACnD,IAAI,EAAE,CAAC,EACP,MAAM,CAAC,EAAE,UAAU,GACjB,OAAO,CAAC,CAAC,EAAE,UAAU,CAAC,CA0CxB;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAAY,CAAC,UAAU,CA8GhD,CAAA;AAwDD,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,QAO5C;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE;IAAC,KAAK,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,GAAG,CAAA;CAAC,QAI1D"}

18
web/node_modules/immer/dist/core/scope.d.ts generated vendored Normal file
View file

@ -0,0 +1,18 @@
import { Patch, PatchListener, Immer } from "../internal";
/** Each scope represents a `produce` call. */
export interface ImmerScope {
patches_?: Patch[];
inversePatches_?: Patch[];
canAutoFreeze_: boolean;
drafts_: any[];
parent_?: ImmerScope;
patchListener_?: PatchListener;
immer_: Immer;
unfinalizedDrafts_: number;
}
export declare function getCurrentScope(): ImmerScope;
export declare function usePatchesInScope(scope: ImmerScope, patchListener?: PatchListener): void;
export declare function revokeScope(scope: ImmerScope): void;
export declare function leaveScope(scope: ImmerScope): void;
export declare function enterScope(immer: Immer): ImmerScope;
//# sourceMappingURL=scope.d.ts.map

1
web/node_modules/immer/dist/core/scope.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/core/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,EACL,aAAa,EAEb,KAAK,EAKL,MAAM,aAAa,CAAA;AAGpB,8CAA8C;AAE9C,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAA;IAClB,eAAe,CAAC,EAAE,KAAK,EAAE,CAAA;IACzB,cAAc,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,GAAG,EAAE,CAAA;IACd,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,cAAc,CAAC,EAAE,aAAa,CAAA;IAC9B,MAAM,EAAE,KAAK,CAAA;IACb,kBAAkB,EAAE,MAAM,CAAA;CAC1B;AAID,wBAAgB,eAAe,eAG9B;AAiBD,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,UAAU,EACjB,aAAa,CAAC,EAAE,aAAa,QAQ7B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,QAK5C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,QAI3C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,cAEtC"}