mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-26 07:39:59 -07:00
global: snapshot
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
2
modules/lean-qr/2.7.1/index.mjs
Normal file
2
modules/lean-qr/2.7.1/index.mjs
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
5000
modules/lightweight-charts/5.0.9/dist/typings.d.ts
vendored
5000
modules/lightweight-charts/5.0.9/dist/typings.d.ts
vendored
File diff suppressed because it is too large
Load Diff
1
modules/modern-screenshot/4.6.6/.gitignore
vendored
1
modules/modern-screenshot/4.6.6/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*.js
|
||||
354
modules/modern-screenshot/4.6.6/dist/index.d.ts
vendored
354
modules/modern-screenshot/4.6.6/dist/index.d.ts
vendored
@@ -1,354 +0,0 @@
|
||||
// @ts-nocheck
|
||||
interface Options {
|
||||
/**
|
||||
* Width in pixels to be applied to node before rendering.
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* Height in pixels to be applied to node before rendering.
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* A number between `0` and `1` indicating image quality (e.g. 0.92 => 92%) of the JPEG image.
|
||||
*/
|
||||
quality?: number;
|
||||
/**
|
||||
* A string indicating the image format. The default type is image/png; that type is also used if the given type isn't supported.
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The pixel ratio of captured image.
|
||||
*
|
||||
* DPI = 96 * scale
|
||||
*
|
||||
* default: 1
|
||||
*/
|
||||
scale?: number;
|
||||
/**
|
||||
* A string value for the background color, any valid CSS color value.
|
||||
*/
|
||||
backgroundColor?: string | null;
|
||||
/**
|
||||
* An object whose properties to be copied to node's style before rendering.
|
||||
*/
|
||||
style?: Partial<CSSStyleDeclaration> | null;
|
||||
/**
|
||||
* A function taking DOM node as argument. Should return `true` if passed
|
||||
* node should be included in the output. Excluding node means excluding
|
||||
* it's children as well.
|
||||
*/
|
||||
filter?: ((el: Node) => boolean) | null;
|
||||
/**
|
||||
* Maximum canvas size (pixels).
|
||||
*
|
||||
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas#maximum_canvas_size
|
||||
*/
|
||||
maximumCanvasSize?: number;
|
||||
/**
|
||||
* Load media timeout and fetch remote asset timeout (millisecond).
|
||||
*
|
||||
* default: 30000
|
||||
*/
|
||||
timeout?: number;
|
||||
/**
|
||||
* Embed assets progress.
|
||||
*/
|
||||
progress?: ((current: number, total: number) => void) | null;
|
||||
/**
|
||||
* Enable debug mode to view the execution time log.
|
||||
*/
|
||||
debug?: boolean;
|
||||
/**
|
||||
* Custom implementation to get image data for a custom URL.
|
||||
* This can be helpful for Capacitor or Cordova when using
|
||||
* native fetch to bypass CORS issues.
|
||||
*
|
||||
* If returns a string, will completely bypass any `Options.fetch`
|
||||
* settings with your custom implementation.
|
||||
*
|
||||
* If returns false, will fall back to normal fetch implementation
|
||||
*
|
||||
* @param url
|
||||
* @returns A data URL for the image
|
||||
*/
|
||||
fetchFn?: ((url: string) => Promise<string | false>) | null;
|
||||
/**
|
||||
* The options of fetch resources.
|
||||
*/
|
||||
fetch?: {
|
||||
/**
|
||||
* The second parameter of `window.fetch` RequestInit
|
||||
*
|
||||
* default: {
|
||||
* cache: 'force-cache',
|
||||
* }
|
||||
*/
|
||||
requestInit?: RequestInit;
|
||||
/**
|
||||
* Set to `true` to append the current time as a query string to URL
|
||||
* requests to enable cache busting.
|
||||
*
|
||||
* default: false
|
||||
*/
|
||||
bypassingCache?: boolean | RegExp;
|
||||
/**
|
||||
* A data URL for a placeholder image that will be used when fetching
|
||||
* an image fails. Defaults to an empty string and will render empty
|
||||
* areas for failed images.
|
||||
*
|
||||
* default: data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
*/
|
||||
placeholderImage?: string | ((cloned: HTMLImageElement | SVGImageElement) => string | Promise<string>);
|
||||
};
|
||||
/**
|
||||
* The options of fonts download and embed.
|
||||
*/
|
||||
font?: false | {
|
||||
/**
|
||||
* Font minify
|
||||
*/
|
||||
minify?: (font: ArrayBuffer, subset: string) => ArrayBuffer;
|
||||
/**
|
||||
* The preferred font format. If specified all other font formats are ignored.
|
||||
*/
|
||||
preferredFormat?: 'woff' | 'woff2' | 'truetype' | 'opentype' | 'embedded-opentype' | 'svg' | string;
|
||||
/**
|
||||
* A CSS string to specify for font embeds. If specified only this CSS will
|
||||
* be present in the resulting image.
|
||||
*/
|
||||
cssText?: string;
|
||||
};
|
||||
/**
|
||||
* All enabled features
|
||||
*
|
||||
* default: true
|
||||
*/
|
||||
features?: boolean | {
|
||||
/**
|
||||
* Copy scrollbar css styles
|
||||
*
|
||||
* default: true
|
||||
*/
|
||||
copyScrollbar?: boolean;
|
||||
/**
|
||||
* Remove abnormal attributes to cloned node (for normalize XML)
|
||||
*
|
||||
* default: true
|
||||
*/
|
||||
removeAbnormalAttributes?: boolean;
|
||||
/**
|
||||
* Remove control characters (for normalize XML)
|
||||
*
|
||||
* default: true
|
||||
*/
|
||||
removeControlCharacter?: boolean;
|
||||
/**
|
||||
* Fix svg+xml image decode (for Safari、Firefox)
|
||||
*
|
||||
* default: true
|
||||
*/
|
||||
fixSvgXmlDecode?: boolean;
|
||||
/**
|
||||
* Render scrolled children with scrolled content
|
||||
*
|
||||
* default: false
|
||||
*/
|
||||
restoreScrollPosition?: boolean;
|
||||
};
|
||||
/**
|
||||
* Canvas `drawImage` interval
|
||||
* is used to fix errors in decoding images in Safari、Firefox
|
||||
*
|
||||
* default: 100
|
||||
*/
|
||||
drawImageInterval?: number;
|
||||
/**
|
||||
* Web Worker script url
|
||||
*/
|
||||
workerUrl?: string | null;
|
||||
/**
|
||||
* Web Worker number
|
||||
*/
|
||||
workerNumber?: number;
|
||||
/**
|
||||
* Triggered after each node is cloned
|
||||
*/
|
||||
onCloneEachNode?: ((cloned: Node) => void | Promise<void>) | null;
|
||||
/**
|
||||
* Triggered after a node is cloned
|
||||
*/
|
||||
onCloneNode?: ((cloned: Node) => void | Promise<void>) | null;
|
||||
/**
|
||||
* Triggered after a node is embed
|
||||
*/
|
||||
onEmbedNode?: ((cloned: Node) => void | Promise<void>) | null;
|
||||
/**
|
||||
* Triggered after a ForeignObjectSvg is created
|
||||
*/
|
||||
onCreateForeignObjectSvg?: ((svg: SVGSVGElement) => void | Promise<void>) | null;
|
||||
/**
|
||||
* An array of style property names.
|
||||
* Can be used to manually specify which style properties are
|
||||
* included when cloning nodes.
|
||||
* This can be useful for performance-critical scenarios.
|
||||
*/
|
||||
includeStyleProperties?: string[] | null;
|
||||
}
|
||||
|
||||
interface Request {
|
||||
type: 'image' | 'text';
|
||||
resolve?: (response: string) => void;
|
||||
reject?: (error: Error) => void;
|
||||
response: Promise<string>;
|
||||
}
|
||||
interface InternalContext<T extends Node> {
|
||||
/**
|
||||
* FLAG
|
||||
*/
|
||||
__CONTEXT__: true;
|
||||
/**
|
||||
* Logger
|
||||
*/
|
||||
log: {
|
||||
time: (label: string) => void;
|
||||
timeEnd: (label: string) => void;
|
||||
warn: (...args: any[]) => void;
|
||||
};
|
||||
/**
|
||||
* Node
|
||||
*/
|
||||
node: T;
|
||||
/**
|
||||
* Owner document
|
||||
*/
|
||||
ownerDocument?: Document;
|
||||
/**
|
||||
* Owner window
|
||||
*/
|
||||
ownerWindow?: Window;
|
||||
/**
|
||||
* DPI
|
||||
*
|
||||
* scale === 1 ? null : 96 * scale
|
||||
*/
|
||||
dpi: number | null;
|
||||
/**
|
||||
* The `style` element under the root `svg` element
|
||||
*/
|
||||
svgStyleElement?: HTMLStyleElement;
|
||||
/**
|
||||
* The `defs` element under the root `svg` element
|
||||
*/
|
||||
svgDefsElement?: SVGDefsElement;
|
||||
/**
|
||||
* The `svgStyleElement` class styles
|
||||
*
|
||||
* Map<cssText, class[]>
|
||||
*/
|
||||
svgStyles: Map<string, string[]>;
|
||||
/**
|
||||
* The map of default `getComputedStyle` for all tagnames
|
||||
*/
|
||||
defaultComputedStyles: Map<string, Map<string, any>>;
|
||||
/**
|
||||
* The IFrame sandbox used to get the `defaultComputedStyles`
|
||||
*/
|
||||
sandbox?: HTMLIFrameElement;
|
||||
/**
|
||||
* Web Workers
|
||||
*/
|
||||
workers: Worker[];
|
||||
/**
|
||||
* The map of `font-family` values for all cloend elements
|
||||
*/
|
||||
fontFamilies: Map<string, Set<string>>;
|
||||
/**
|
||||
* Map<CssUrl, DataUrl>
|
||||
*/
|
||||
fontCssTexts: Map<string, string>;
|
||||
/**
|
||||
* `headers.accept` to use when `window.fetch` fetches images
|
||||
*/
|
||||
acceptOfImage: string;
|
||||
/**
|
||||
* All requests for `fetch`
|
||||
*/
|
||||
requests: Map<string, Request>;
|
||||
/**
|
||||
* Canvas multiple draw image fix svg+xml image decoding in Safari and Firefox
|
||||
*/
|
||||
drawImageCount: number;
|
||||
/**
|
||||
* Wait for all tasks embedded in
|
||||
*/
|
||||
tasks: Promise<void>[];
|
||||
/**
|
||||
* Automatically destroy context
|
||||
*/
|
||||
autoDestruct: boolean;
|
||||
/**
|
||||
* Is enable
|
||||
*
|
||||
* @param key
|
||||
*/
|
||||
isEnable: (key: string) => boolean;
|
||||
/**
|
||||
* [cloning phase] To get the node style set by the user
|
||||
*/
|
||||
currentNodeStyle?: Map<string, [string, string]>;
|
||||
currentParentNodeStyle?: Map<string, [string, string]>;
|
||||
/**
|
||||
* [cloning phase] shadowDOM root list
|
||||
*/
|
||||
shadowRoots: ShadowRoot[];
|
||||
}
|
||||
type Context<T extends Node = Node> = InternalContext<T> & Required<Options>;
|
||||
|
||||
declare function domToBlob<T extends Node>(node: T, options?: Options): Promise<Blob>;
|
||||
declare function domToBlob<T extends Node>(context: Context<T>): Promise<Blob>;
|
||||
|
||||
declare function domToCanvas<T extends Node>(node: T, options?: Options): Promise<HTMLCanvasElement>;
|
||||
declare function domToCanvas<T extends Node>(context: Context<T>): Promise<HTMLCanvasElement>;
|
||||
|
||||
declare function domToDataUrl<T extends Node>(node: T, options?: Options): Promise<string>;
|
||||
declare function domToDataUrl<T extends Node>(context: Context<T>): Promise<string>;
|
||||
|
||||
declare function domToForeignObjectSvg<T extends Node>(node: T, options?: Options): Promise<SVGElement>;
|
||||
declare function domToForeignObjectSvg<T extends Node>(context: Context<T>): Promise<SVGElement>;
|
||||
|
||||
declare function domToImage<T extends Node>(node: T, options?: Options): Promise<HTMLImageElement>;
|
||||
declare function domToImage<T extends Node>(context: Context<T>): Promise<HTMLImageElement>;
|
||||
|
||||
declare function domToJpeg<T extends Node>(node: T, options?: Options): Promise<string>;
|
||||
declare function domToJpeg<T extends Node>(context: Context<T>): Promise<string>;
|
||||
|
||||
declare function domToPixel<T extends Node>(node: T, options?: Options): Promise<Uint8ClampedArray>;
|
||||
declare function domToPixel<T extends Node>(context: Context<T>): Promise<Uint8ClampedArray>;
|
||||
|
||||
declare function domToPng<T extends Node>(node: T, options?: Options): Promise<string>;
|
||||
declare function domToPng<T extends Node>(context: Context<T>): Promise<string>;
|
||||
|
||||
declare function domToSvg<T extends Node>(node: T, options?: Options): Promise<string>;
|
||||
declare function domToSvg<T extends Node>(context: Context<T>): Promise<string>;
|
||||
|
||||
declare function domToWebp<T extends Node>(node: T, options?: Options): Promise<string>;
|
||||
declare function domToWebp<T extends Node>(context: Context<T>): Promise<string>;
|
||||
|
||||
declare function createContext<T extends Node>(node: T, options?: Options & {
|
||||
autoDestruct?: boolean;
|
||||
}): Promise<Context<T>>;
|
||||
|
||||
declare function destroyContext(context: Context): void;
|
||||
|
||||
type Media = HTMLVideoElement | HTMLImageElement | SVGImageElement;
|
||||
interface LoadMediaOptions {
|
||||
ownerDocument?: Document;
|
||||
timeout?: number;
|
||||
onError?: (error: Error) => void;
|
||||
onWarn?: (...args: any[]) => void;
|
||||
}
|
||||
declare function loadMedia<T extends Media>(media: T, options?: LoadMediaOptions): Promise<T>;
|
||||
declare function loadMedia(media: string, options?: LoadMediaOptions): Promise<HTMLImageElement>;
|
||||
declare function waitUntilLoad(node: Node, options?: LoadMediaOptions): Promise<void>;
|
||||
|
||||
export { type Context, type Options, createContext, destroyContext, domToBlob, domToCanvas, domToDataUrl, domToForeignObjectSvg, domToImage, domToJpeg, domToPixel, domToPng, domToSvg, domToWebp, loadMedia, waitUntilLoad };
|
||||
1653
modules/modern-screenshot/4.6.6/dist/index.mjs
vendored
1653
modules/modern-screenshot/4.6.6/dist/index.mjs
vendored
File diff suppressed because it is too large
Load Diff
14
modules/modern-screenshot/4.6.7/dist/index.js
vendored
14
modules/modern-screenshot/4.6.7/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,3 +1,4 @@
|
||||
// @ts-nocheck
|
||||
function changeJpegDpi(uint8Array, dpi) {
|
||||
uint8Array[13] = 1;
|
||||
uint8Array[14] = dpi >> 8;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,7 @@ export interface SignalOptions<T> {
|
||||
equals?: ((prev: T, next: T) => boolean) | false;
|
||||
pureWrite?: boolean;
|
||||
unobserved?: () => void;
|
||||
lazy?: boolean;
|
||||
}
|
||||
export interface RawSignal<T> {
|
||||
id?: string;
|
||||
@@ -64,6 +65,7 @@ export interface Computed<T> extends RawSignal<T>, Owner {
|
||||
_nextHeap: Computed<any> | undefined;
|
||||
_prevHeap: Computed<any>;
|
||||
_fn: (prev?: T) => T;
|
||||
_inFlight: Promise<T> | AsyncIterable<T> | null;
|
||||
_child: FirewallSignal<any> | null;
|
||||
_notifyQueue?: (statusFlagsChanged: boolean, prevStatusFlags: number) => void;
|
||||
}
|
||||
@@ -74,16 +76,11 @@ export interface Root extends Owner {
|
||||
}
|
||||
export declare let context: Owner | null;
|
||||
export declare function recompute(el: Computed<any>, create?: boolean): void;
|
||||
export declare function handleAsync<T>(el: Computed<T>, result: T | Promise<T> | AsyncIterable<T>, setter?: (value: T) => void): T;
|
||||
export declare function dispose(node: Computed<unknown>): void;
|
||||
export declare function getNextChildId(owner: Owner): string;
|
||||
export declare function computed<T>(fn: (prev?: T) => T): Computed<T>;
|
||||
export declare function computed<T>(fn: (prev: T) => T, initialValue?: T, options?: SignalOptions<T>): Computed<T>;
|
||||
export declare function asyncComputed<T>(asyncFn: (prev?: T, refreshing?: boolean) => T | Promise<T> | AsyncIterable<T>): Computed<T> & {
|
||||
_refresh: () => void;
|
||||
};
|
||||
export declare function asyncComputed<T>(asyncFn: (prev: T, refreshing?: boolean) => T | Promise<T> | AsyncIterable<T>, initialValue: T, options?: SignalOptions<T>): Computed<T> & {
|
||||
_refresh: () => void;
|
||||
};
|
||||
export declare function computed<T>(fn: (prev?: T) => T | Promise<T> | AsyncIterable<T>): Computed<T>;
|
||||
export declare function computed<T>(fn: (prev: T) => T | Promise<T> | AsyncIterable<T>, initialValue?: T, options?: SignalOptions<T>): Computed<T>;
|
||||
export declare function signal<T>(v: T, options?: SignalOptions<T>): Signal<T>;
|
||||
export declare function signal<T>(v: T, options?: SignalOptions<T>, firewall?: Computed<any>): FirewallSignal<T>;
|
||||
export declare function isEqual<T>(a: T, b: T): boolean;
|
||||
@@ -121,3 +118,5 @@ export declare function runWithOwner<T>(owner: Owner | null, fn: () => T): T;
|
||||
export declare function staleValues<T>(fn: () => T, set?: boolean): T;
|
||||
export declare function pending<T>(fn: () => T): T;
|
||||
export declare function isPending(fn: () => any): boolean;
|
||||
export declare function refresh<T>(fn: () => T): T;
|
||||
export declare function isRefreshing(): boolean;
|
||||
@@ -1,6 +1,6 @@
|
||||
export { ContextNotFoundError, NoOwnerError, NotReadyError } from "./error.js";
|
||||
export { createContext, getContext, setContext, type Context, type ContextRecord } from "./context.js";
|
||||
export { getObserver, isEqual, untrack, getOwner, runWithOwner, createOwner, createRoot, computed, dispose, signal, asyncComputed, read, setSignal, onCleanup, getNextChildId, isPending, pending, staleValues, type Owner, type Computed, type Root, type Signal, type SignalOptions } from "./core.js";
|
||||
export { getObserver, isEqual, untrack, getOwner, runWithOwner, createOwner, createRoot, computed, dispose, signal, read, setSignal, onCleanup, getNextChildId, isPending, pending, refresh, isRefreshing, staleValues, handleAsync, type Owner, type Computed, type Root, type Signal, type SignalOptions } from "./core.js";
|
||||
export { effect, type Effect } from "./effect.js";
|
||||
export { flush, Queue, type IQueue, type QueueCallback } from "./scheduler.js";
|
||||
export * from "./constants.js";
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { Computed, Signal } from "./core.js";
|
||||
import { type Heap } from "./heap.js";
|
||||
export declare let optimisticRun: boolean;
|
||||
export declare const dirtyQueue: Heap;
|
||||
export declare const zombieQueue: Heap;
|
||||
export declare let clock: number;
|
||||
@@ -13,7 +14,9 @@ export interface Transition {
|
||||
time: number;
|
||||
asyncNodes: Computed<any>[];
|
||||
pendingNodes: Signal<any>[];
|
||||
optimisticNodes: Signal<any>[];
|
||||
queueStash: QueueStub;
|
||||
done: boolean;
|
||||
}
|
||||
export declare function schedule(): void;
|
||||
export interface IQueue {
|
||||
@@ -43,12 +46,15 @@ export declare class Queue implements IQueue {
|
||||
export declare class GlobalQueue extends Queue {
|
||||
_running: boolean;
|
||||
_pendingNodes: Signal<any>[];
|
||||
_optimisticNodes: Signal<any>[];
|
||||
static _update: (el: Computed<unknown>) => void;
|
||||
static _dispose: (el: Computed<unknown>, self: boolean, zombie: boolean) => void;
|
||||
flush(): void;
|
||||
notify(node: Computed<any>, mask: number, flags: number): boolean;
|
||||
initTransition(node: Computed<any>): void;
|
||||
}
|
||||
export declare function notifySubs(node: Signal<any> | Computed<any>): void;
|
||||
export declare function runOptimistic(activeTransition?: Transition | null): void;
|
||||
export declare const globalQueue: GlobalQueue;
|
||||
/**
|
||||
* By default, changes are batched on the microtask queue which is an async process. You can flush
|
||||
@@ -1,4 +1,4 @@
|
||||
export { ContextNotFoundError, NoOwnerError, NotReadyError, createContext, createRoot, runWithOwner, flush, getNextChildId, getContext, setContext, getOwner, onCleanup, getObserver, isEqual, untrack, isPending, pending, SUPPORTS_PROXY } from "./core/index.js";
|
||||
export { ContextNotFoundError, NoOwnerError, NotReadyError, createContext, createRoot, runWithOwner, flush, getNextChildId, getContext, setContext, getOwner, onCleanup, getObserver, isEqual, untrack, isPending, pending, isRefreshing, refresh, SUPPORTS_PROXY } from "./core/index.js";
|
||||
export type { Owner, SignalOptions, Context, ContextRecord, IQueue } from "./core/index.js";
|
||||
export * from "./signals.js";
|
||||
export { mapArray, repeat, type Maybe } from "./map.js";
|
||||
@@ -7,7 +7,7 @@ export type Setter<in out T> = {
|
||||
<U extends T>(value: Exclude<U, Function> | ((prev: T) => U)): U;
|
||||
};
|
||||
export type Signal<T> = [get: Accessor<T>, set: Setter<T>];
|
||||
export type ComputeFunction<Prev, Next extends Prev = Prev> = (v: Prev) => Next;
|
||||
export type ComputeFunction<Prev, Next extends Prev = Prev> = (v: Prev) => Promise<Next> | AsyncIterable<Next> | Next;
|
||||
export type EffectFunction<Prev, Next extends Prev = Prev> = (v: Next, p?: Prev) => (() => void) | void;
|
||||
export type EffectBundle<Prev, Next extends Prev = Prev> = {
|
||||
effect: EffectFunction<Prev, Next>;
|
||||
@@ -65,24 +65,6 @@ export declare function createSignal<T>(fn: ComputeFunction<T>, initialValue?: T
|
||||
*/
|
||||
export declare function createMemo<Next extends Prev, Prev = Next>(compute: ComputeFunction<undefined | NoInfer<Prev>, Next>): Accessor<Next>;
|
||||
export declare function createMemo<Next extends Prev, Init = Next, Prev = Next>(compute: ComputeFunction<Init | Prev, Next>, value: Init, options?: MemoOptions<Next>): Accessor<Next>;
|
||||
/**
|
||||
* Creates a readonly derived async reactive memoized signal
|
||||
* ```typescript
|
||||
* export function createAsync<T>(
|
||||
* compute: (v: T) => Promise<T> | T,
|
||||
* value?: T,
|
||||
* options?: { name?: string, equals?: false | ((prev: T, next: T) => boolean) }
|
||||
* ): () => T;
|
||||
* ```
|
||||
* @param compute a function that receives its previous or the initial value, if set, and returns a new value used to react on a computation
|
||||
* @param value an optional initial value for the computation; if set, fn will never receive undefined as first argument
|
||||
* @param options allows to set a name in dev mode for debugging purposes and use a custom comparison function in equals
|
||||
*
|
||||
* @description https://docs.solidjs.com/reference/basic-reactivity/create-async
|
||||
*/
|
||||
export declare function createAsync<T>(compute: (prev: T | undefined, refreshing: boolean) => Promise<T> | AsyncIterable<T> | T, value?: T, options?: MemoOptions<T>): Accessor<T> & {
|
||||
refresh: () => void;
|
||||
};
|
||||
/**
|
||||
* Creates a reactive effect that runs after the render phase
|
||||
* ```typescript
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type Store, type StoreOptions } from "./store.js";
|
||||
export declare function createProjectionInternal<T extends object = {}>(fn: (draft: T) => void | T, initialValue?: T, options?: StoreOptions): {
|
||||
export declare function createProjectionInternal<T extends object = {}>(fn: (draft: T) => void | T | Promise<void | T> | AsyncIterable<void | T>, initialValue?: T, options?: StoreOptions): {
|
||||
store: Readonly<T>;
|
||||
node: any;
|
||||
};
|
||||
@@ -8,4 +8,4 @@ export declare function createProjectionInternal<T extends object = {}>(fn: (dra
|
||||
*
|
||||
* @see {@link https://github.com/solidjs/x-reactivity#createprojection}
|
||||
*/
|
||||
export declare function createProjection<T extends Object = {}>(fn: (draft: T) => void | T, initialValue?: T, options?: StoreOptions): Store<T>;
|
||||
export declare function createProjection<T extends Object = {}>(fn: (draft: T) => void | T | Promise<void | T> | AsyncIterable<void | T>, initialValue?: T, options?: StoreOptions): Store<T>;
|
||||
@@ -33,6 +33,6 @@ export declare function getPropertyDescriptor(source: Record<PropertyKey, any>,
|
||||
export declare const storeTraps: ProxyHandler<StoreNode>;
|
||||
export declare function storeSetter<T extends object>(store: Store<T>, fn: (draft: T) => T | void): void;
|
||||
export declare function createStore<T extends object = {}>(store: T | Store<T>): [get: Store<T>, set: StoreSetter<T>];
|
||||
export declare function createStore<T extends object = {}>(fn: (store: T) => void | T, store: T | Store<T>, options?: StoreOptions): [get: Store<T>, set: StoreSetter<T>];
|
||||
export declare function createStore<T extends object = {}>(fn: (store: T) => void | T | Promise<void | T> | AsyncIterable<void | T>, store: T | Store<T>, options?: StoreOptions): [get: Store<T>, set: StoreSetter<T>];
|
||||
export declare function deep<T extends object>(store: Store<T>): Store<T>;
|
||||
export {};
|
||||
Reference in New Issue
Block a user