march-hare 0.7.0 → 0.7.1
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/dist/{src/library/action → action}/index.d.ts +2 -2
- package/dist/{src/library/action → action}/utils.d.ts +2 -2
- package/dist/{src/library/boundary → boundary}/components/broadcast/index.d.ts +2 -2
- package/dist/{src/library/boundary → boundary}/components/broadcast/types.d.ts +1 -1
- package/dist/{src/library/boundary → boundary}/components/consumer/components/partition/index.d.ts +1 -1
- package/dist/{src/library/boundary → boundary}/components/consumer/components/partition/types.d.ts +1 -1
- package/dist/{src/library/boundary → boundary}/components/consumer/index.d.ts +5 -5
- package/dist/{src/library/boundary → boundary}/components/consumer/types.d.ts +1 -1
- package/dist/{src/library/boundary → boundary}/components/consumer/utils.d.ts +1 -1
- package/dist/{src/library/boundary → boundary}/components/scope/index.d.ts +3 -3
- package/dist/{src/library/boundary → boundary}/components/scope/types.d.ts +2 -2
- package/dist/{src/library/boundary → boundary}/components/scope/utils.d.ts +2 -2
- package/dist/{src/library/boundary → boundary}/components/store/index.d.ts +2 -2
- package/dist/{src/library/boundary → boundary}/components/store/types.d.ts +2 -2
- package/dist/{src/library/boundary → boundary}/components/store/utils.d.ts +1 -1
- package/dist/{src/library/boundary → boundary}/components/tasks/index.d.ts +2 -2
- package/dist/{src/library/boundary → boundary}/components/tasks/utils.d.ts +1 -1
- package/dist/{src/library/boundary → boundary}/index.d.ts +1 -1
- package/dist/{src/library/boundary → boundary}/types.d.ts +1 -1
- package/dist/{src/library/cache → cache}/index.d.ts +2 -2
- package/dist/{src/library/cache → cache}/types.d.ts +1 -1
- package/dist/{src/library/error → error}/types.d.ts +1 -1
- package/dist/{src/library/error → error}/utils.d.ts +1 -1
- package/dist/{src/library/hooks → hooks}/index.d.ts +3 -3
- package/dist/{src/library/hooks → hooks}/types.d.ts +3 -3
- package/dist/{src/library/hooks → hooks}/utils.d.ts +3 -3
- package/dist/index.d.ts +19 -0
- package/dist/{src/library/resource → resource}/index.d.ts +4 -4
- package/dist/{src/library/resource → resource}/types.d.ts +1 -1
- package/dist/{src/library/resource → resource}/utils.d.ts +3 -3
- package/dist/{src/library/types → types}/index.d.ts +3 -3
- package/dist/{src/library/utils → utils}/index.d.ts +3 -3
- package/dist/{src/library/utils → utils}/types.d.ts +1 -1
- package/dist/{src/library/utils → utils}/utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/src/library/index.d.ts +0 -19
- /package/dist/{src/library/annotate → annotate}/index.d.ts +0 -0
- /package/dist/{src/library/boundary → boundary}/components/broadcast/utils.d.ts +0 -0
- /package/dist/{src/library/boundary → boundary}/components/tasks/types.d.ts +0 -0
- /package/dist/{src/library/error → error}/index.d.ts +0 -0
- /package/dist/{src/library/utils.d.ts → utils.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HandlerPayload, BroadcastPayload, MulticastPayload, Distribution, Filter } from '../types/index
|
|
2
|
-
export { getActionSymbol, getLifecycleType, isBroadcastAction, isMulticastAction, getName, isChanneledAction, } from './utils
|
|
1
|
+
import { HandlerPayload, BroadcastPayload, MulticastPayload, Distribution, Filter } from '../types/index';
|
|
2
|
+
export { getActionSymbol, getLifecycleType, isBroadcastAction, isMulticastAction, getName, isChanneledAction, } from './utils';
|
|
3
3
|
/**
|
|
4
4
|
* Interface for the Action factory function.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChanneledAction, AnyAction } from '../types/index
|
|
2
|
-
import { ActionId } from '../boundary/components/tasks/types
|
|
1
|
+
import { ChanneledAction, AnyAction } from '../types/index';
|
|
2
|
+
import { ActionId } from '../boundary/components/tasks/types';
|
|
3
3
|
/**
|
|
4
4
|
* Extracts the underlying symbol from an action or channeled action.
|
|
5
5
|
* This symbol is used as the event emitter key for dispatching.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Props } from './types
|
|
1
|
+
import { Props } from './types';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
export { useBroadcast, BroadcastEmitter } from './utils
|
|
3
|
+
export { useBroadcast, BroadcastEmitter } from './utils';
|
|
4
4
|
/**
|
|
5
5
|
* Creates a new broadcast context for distributed actions. Only needed if you
|
|
6
6
|
* want to isolate a broadcast context, useful for libraries that want to provide
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Props } from './types
|
|
1
|
+
import { Props } from './types';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
export { useConsumer } from './utils
|
|
4
|
-
export { Partition } from './components/partition/index
|
|
5
|
-
export type { Props as PartitionProps } from './components/partition/types
|
|
6
|
-
export type { ConsumerRenderer, Entry, ConsumerContext } from './types
|
|
3
|
+
export { useConsumer } from './utils';
|
|
4
|
+
export { Partition } from './components/partition/index';
|
|
5
|
+
export type { Props as PartitionProps } from './components/partition/types';
|
|
6
|
+
export type { ConsumerRenderer, Entry, ConsumerContext } from './types';
|
|
7
7
|
/**
|
|
8
8
|
* Creates a new consumer context for storing distributed action values. Only needed if you
|
|
9
9
|
* want to isolate a consumer context, useful for libraries that want to provide
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MulticastPayload } from '../../../types/index
|
|
1
|
+
import { MulticastPayload } from '../../../types/index';
|
|
2
2
|
import { ComponentType, ReactNode } from 'react';
|
|
3
|
-
export { useScope, getScope } from './utils
|
|
4
|
-
export type { ScopeEntry, ScopeContext } from './types
|
|
3
|
+
export { useScope, getScope } from './utils';
|
|
4
|
+
export type { ScopeEntry, ScopeContext } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* Higher-order component that opens a multicast scope keyed by the supplied
|
|
7
7
|
* multicast action. Components rendered inside the wrapped tree (and any
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BroadcastEmitter } from '../broadcast/utils
|
|
2
|
-
import { ActionId } from '../tasks/types
|
|
1
|
+
import { BroadcastEmitter } from '../broadcast/utils';
|
|
2
|
+
import { ActionId } from '../tasks/types';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a single scope in the ancestor chain. The scope key is the
|
|
5
5
|
* action id of the multicast action that opens the scope; each multicast
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScopeContext, ScopeEntry } from './types
|
|
2
|
-
import { ActionId } from '../tasks/types
|
|
1
|
+
import { ScopeContext, ScopeEntry } from './types';
|
|
2
|
+
import { ActionId } from '../tasks/types';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
/**
|
|
5
5
|
* React context for the scope chain.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Props } from './types
|
|
1
|
+
import { Props } from './types';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
export { useStore } from './utils
|
|
3
|
+
export { useStore } from './utils';
|
|
4
4
|
/**
|
|
5
5
|
* App-wide store of cross-cutting, mutable state. The interface is
|
|
6
6
|
* declared empty here and **augmented** by consumer code via module
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { Store } from './index
|
|
3
|
-
export type { Store } from './index
|
|
2
|
+
import { Store } from './index';
|
|
3
|
+
export type { Store } from './index';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the Store provider component. Accepts the initial Store
|
|
6
6
|
* value that satisfies the augmented {@link Store} interface.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Props } from './types
|
|
1
|
+
import { Props } from './types';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
export type { Task } from './types
|
|
3
|
+
export type { Task } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Creates a new tasks context for action control. Only needed if you
|
|
6
6
|
* want to isolate a tasks context, useful for libraries that want to provide
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Adapter, Stored } from './types
|
|
2
|
-
export type { Adapter, Encoded } from './types
|
|
1
|
+
import { Adapter, Stored } from './types';
|
|
2
|
+
export type { Adapter, Encoded } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Persistence-aware cache for a single {@link Resource}. Wraps a
|
|
5
5
|
* synchronous {@link Adapter} (localStorage, MMKV, chrome.storage with a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Data } from './types
|
|
2
|
-
import { Model, Props, Actions, UseActions } from '../types/index
|
|
3
|
-
export { With } from './utils
|
|
1
|
+
import { Data } from './types';
|
|
2
|
+
import { Model, Props, Actions, UseActions } from '../types/index';
|
|
3
|
+
export { With } from './utils';
|
|
4
4
|
/**
|
|
5
5
|
* A hook for managing state with actions.
|
|
6
6
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { RefObject } from 'react';
|
|
3
|
-
import { Model, HandlerContext, Actions, Props, Tasks, ActionId, Phase, Filter } from '../types/index
|
|
4
|
-
import { BroadcastEmitter } from '../boundary/components/broadcast/utils
|
|
5
|
-
import { ScopeContext } from '../boundary/components/scope/types
|
|
3
|
+
import { Model, HandlerContext, Actions, Props, Tasks, ActionId, Phase, Filter } from '../types/index';
|
|
4
|
+
import { BroadcastEmitter } from '../boundary/components/broadcast/utils';
|
|
5
|
+
import { ScopeContext } from '../boundary/components/scope/types';
|
|
6
6
|
/**
|
|
7
7
|
* Function signature for action handlers registered via `useAction`.
|
|
8
8
|
* Receives the reactive context and payload, returning void or a promise/generator.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import { Props, Model, Actions, Filter, ActionId, HandlerPayload, ChanneledAction, HandlerContext } from '../types/index
|
|
2
|
+
import { Props, Model, Actions, Filter, ActionId, HandlerPayload, ChanneledAction, HandlerContext } from '../types/index';
|
|
3
3
|
import { default as EventEmitter } from 'eventemitter3';
|
|
4
|
-
import { Dispatchers, LifecycleConfig, Scope } from './types
|
|
5
|
-
import { isChanneledAction, getActionSymbol } from '../action/index
|
|
4
|
+
import { Dispatchers, LifecycleConfig, Scope } from './types';
|
|
5
|
+
import { isChanneledAction, getActionSymbol } from '../action/index';
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
/**
|
|
8
8
|
* Creates a new object with getters for each property of the input object.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { Action } from './action/index';
|
|
2
|
+
export { Distribution, Lifecycle } from './types/index';
|
|
3
|
+
export { Reason, AbortError, TimeoutError } from './error/index';
|
|
4
|
+
export { Operation, Op, State } from 'immertation';
|
|
5
|
+
export { annotate } from './annotate/index';
|
|
6
|
+
export { Boundary } from './boundary/index';
|
|
7
|
+
export { withScope } from './boundary/components/scope/index';
|
|
8
|
+
export { useStore } from './boundary/components/store/index';
|
|
9
|
+
export type { Store } from './boundary/components/store/index';
|
|
10
|
+
export { useActions, With } from './hooks/index';
|
|
11
|
+
export { Resource } from './resource/index';
|
|
12
|
+
export type { Fetcher } from './resource/index';
|
|
13
|
+
export { Cache } from './cache/index';
|
|
14
|
+
export type { Adapter, Encoded } from './cache/index';
|
|
15
|
+
export * as utils from './utils/index';
|
|
16
|
+
export type { Stored, Unset } from './utils/index';
|
|
17
|
+
export type { Box } from 'immertation';
|
|
18
|
+
export type { Fault } from './error/index';
|
|
19
|
+
export type { Pk, Task, Tasks, Handlers, Handler, LeafActions, Dispatchable, Subscribable, } from './types/index';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Fetcher } from './types
|
|
2
|
-
import { Cache } from './utils
|
|
3
|
-
import { Store } from '../boundary/components/store/index
|
|
4
|
-
export type { Fetcher } from './types
|
|
1
|
+
import { Fetcher } from './types';
|
|
2
|
+
import { Cache } from './utils';
|
|
3
|
+
import { Store } from '../boundary/components/store/index';
|
|
4
|
+
export type { Fetcher } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* Snapshot of the most recent resource invocation. `cat(params)` writes
|
|
7
7
|
* one of these into a module-scope slot; the next
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Cache } from '../cache/index
|
|
2
|
-
import { unset } from '../utils/index
|
|
3
|
-
export { Cache } from '../cache/index
|
|
1
|
+
import { Cache } from '../cache/index';
|
|
2
|
+
import { unset } from '../utils/index';
|
|
3
|
+
export { Cache } from '../cache/index';
|
|
4
4
|
/**
|
|
5
5
|
* Default in-memory `Cache` used when {@link Resource} is constructed
|
|
6
6
|
* without an explicit one. Each fetcher gets its own slot via the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Operation, Process, Inspect, Box } from 'immertation';
|
|
2
|
-
import { ActionId, Task, Tasks } from '../boundary/components/tasks/types
|
|
3
|
-
import { Fault } from '../error/types
|
|
4
|
-
import { Store } from '../boundary/components/store/index
|
|
2
|
+
import { ActionId, Task, Tasks } from '../boundary/components/tasks/types';
|
|
3
|
+
import { Fault } from '../error/types';
|
|
4
|
+
import { Store } from '../boundary/components/store/index';
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
export type { ActionId, Box, Task, Tasks };
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Pk } from '../types/index
|
|
2
|
-
export { unset } from './utils
|
|
3
|
-
export type { Stored, Unset } from './types
|
|
1
|
+
import { Pk } from '../types/index';
|
|
2
|
+
export { unset } from './utils';
|
|
3
|
+
export type { Stored, Unset } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Returns a promise that resolves after the specified number of
|
|
6
6
|
* milliseconds, or rejects with an {@link AbortError} when the signal is
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { Action } from './action/index.ts';
|
|
2
|
-
export { Distribution, Lifecycle } from './types/index.ts';
|
|
3
|
-
export { Reason, AbortError, TimeoutError } from './error/index.ts';
|
|
4
|
-
export { Operation, Op, State } from 'immertation';
|
|
5
|
-
export { annotate } from './annotate/index.ts';
|
|
6
|
-
export { Boundary } from './boundary/index.tsx';
|
|
7
|
-
export { withScope } from './boundary/components/scope/index.tsx';
|
|
8
|
-
export { useStore } from './boundary/components/store/index.tsx';
|
|
9
|
-
export type { Store } from './boundary/components/store/index.tsx';
|
|
10
|
-
export { useActions, With } from './hooks/index.ts';
|
|
11
|
-
export { Resource } from './resource/index.ts';
|
|
12
|
-
export type { Fetcher } from './resource/index.ts';
|
|
13
|
-
export { Cache } from './cache/index.ts';
|
|
14
|
-
export type { Adapter, Encoded } from './cache/index.ts';
|
|
15
|
-
export * as utils from './utils/index.ts';
|
|
16
|
-
export type { Stored, Unset } from './utils/index.ts';
|
|
17
|
-
export type { Box } from 'immertation';
|
|
18
|
-
export type { Fault } from './error/index.ts';
|
|
19
|
-
export type { Pk, Task, Tasks, Handlers, Handler, LeafActions, Dispatchable, Subscribable, } from './types/index.ts';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|