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.
Files changed (41) hide show
  1. package/dist/{src/library/action → action}/index.d.ts +2 -2
  2. package/dist/{src/library/action → action}/utils.d.ts +2 -2
  3. package/dist/{src/library/boundary → boundary}/components/broadcast/index.d.ts +2 -2
  4. package/dist/{src/library/boundary → boundary}/components/broadcast/types.d.ts +1 -1
  5. package/dist/{src/library/boundary → boundary}/components/consumer/components/partition/index.d.ts +1 -1
  6. package/dist/{src/library/boundary → boundary}/components/consumer/components/partition/types.d.ts +1 -1
  7. package/dist/{src/library/boundary → boundary}/components/consumer/index.d.ts +5 -5
  8. package/dist/{src/library/boundary → boundary}/components/consumer/types.d.ts +1 -1
  9. package/dist/{src/library/boundary → boundary}/components/consumer/utils.d.ts +1 -1
  10. package/dist/{src/library/boundary → boundary}/components/scope/index.d.ts +3 -3
  11. package/dist/{src/library/boundary → boundary}/components/scope/types.d.ts +2 -2
  12. package/dist/{src/library/boundary → boundary}/components/scope/utils.d.ts +2 -2
  13. package/dist/{src/library/boundary → boundary}/components/store/index.d.ts +2 -2
  14. package/dist/{src/library/boundary → boundary}/components/store/types.d.ts +2 -2
  15. package/dist/{src/library/boundary → boundary}/components/store/utils.d.ts +1 -1
  16. package/dist/{src/library/boundary → boundary}/components/tasks/index.d.ts +2 -2
  17. package/dist/{src/library/boundary → boundary}/components/tasks/utils.d.ts +1 -1
  18. package/dist/{src/library/boundary → boundary}/index.d.ts +1 -1
  19. package/dist/{src/library/boundary → boundary}/types.d.ts +1 -1
  20. package/dist/{src/library/cache → cache}/index.d.ts +2 -2
  21. package/dist/{src/library/cache → cache}/types.d.ts +1 -1
  22. package/dist/{src/library/error → error}/types.d.ts +1 -1
  23. package/dist/{src/library/error → error}/utils.d.ts +1 -1
  24. package/dist/{src/library/hooks → hooks}/index.d.ts +3 -3
  25. package/dist/{src/library/hooks → hooks}/types.d.ts +3 -3
  26. package/dist/{src/library/hooks → hooks}/utils.d.ts +3 -3
  27. package/dist/index.d.ts +19 -0
  28. package/dist/{src/library/resource → resource}/index.d.ts +4 -4
  29. package/dist/{src/library/resource → resource}/types.d.ts +1 -1
  30. package/dist/{src/library/resource → resource}/utils.d.ts +3 -3
  31. package/dist/{src/library/types → types}/index.d.ts +3 -3
  32. package/dist/{src/library/utils → utils}/index.d.ts +3 -3
  33. package/dist/{src/library/utils → utils}/types.d.ts +1 -1
  34. package/dist/{src/library/utils → utils}/utils.d.ts +1 -1
  35. package/package.json +1 -1
  36. package/dist/src/library/index.d.ts +0 -19
  37. /package/dist/{src/library/annotate → annotate}/index.d.ts +0 -0
  38. /package/dist/{src/library/boundary → boundary}/components/broadcast/utils.d.ts +0 -0
  39. /package/dist/{src/library/boundary → boundary}/components/tasks/types.d.ts +0 -0
  40. /package/dist/{src/library/error → error}/index.d.ts +0 -0
  41. /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.ts';
2
- export { getActionSymbol, getLifecycleType, isBroadcastAction, isMulticastAction, getName, isChanneledAction, } from './utils.ts';
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.ts';
2
- import { ActionId } from '../boundary/components/tasks/types.ts';
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.ts';
1
+ import { Props } from './types';
2
2
  import * as React from "react";
3
- export { useBroadcast, BroadcastEmitter } from './utils.ts';
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,4 +1,4 @@
1
- import { BroadcastEmitter } from './utils.ts';
1
+ import { BroadcastEmitter } from './utils';
2
2
  import * as React from "react";
3
3
  /**
4
4
  * The broadcast context is a BroadcastEmitter used for distributed actions across components.
@@ -1,4 +1,4 @@
1
- import { Props } from './types.ts';
1
+ import { Props } from './types';
2
2
  import * as React from "react";
3
3
  /**
4
4
  * Renders output for the `stream()` method by subscribing to distributed action events.
@@ -1,4 +1,4 @@
1
- import { ConsumerRenderer } from '../../types.ts';
1
+ import { ConsumerRenderer } from '../../types';
2
2
  /**
3
3
  * Props for the Partition component.
4
4
  * @internal
@@ -1,9 +1,9 @@
1
- import { Props } from './types.ts';
1
+ import { Props } from './types';
2
2
  import * as React from "react";
3
- export { useConsumer } from './utils.ts';
4
- export { Partition } from './components/partition/index.tsx';
5
- export type { Props as PartitionProps } from './components/partition/types.ts';
6
- export type { ConsumerRenderer, Entry, ConsumerContext } from './types.ts';
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,5 +1,5 @@
1
1
  import { Inspect, State } from 'immertation';
2
- import { ActionId } from '../tasks/types.ts';
2
+ import { ActionId } from '../tasks/types';
3
3
  import * as React from "react";
4
4
  /**
5
5
  * Callback function for the stream() method.
@@ -1,4 +1,4 @@
1
- import { ConsumerContext } from './types.ts';
1
+ import { ConsumerContext } from './types';
2
2
  import * as React from "react";
3
3
  /**
4
4
  * React context for the consumer store.
@@ -1,7 +1,7 @@
1
- import { MulticastPayload } from '../../../types/index.ts';
1
+ import { MulticastPayload } from '../../../types/index';
2
2
  import { ComponentType, ReactNode } from 'react';
3
- export { useScope, getScope } from './utils.ts';
4
- export type { ScopeEntry, ScopeContext } from './types.ts';
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.ts';
2
- import { ActionId } from '../tasks/types.ts';
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.ts';
2
- import { ActionId } from '../tasks/types.ts';
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.ts';
1
+ import { Props } from './types';
2
2
  import * as React from "react";
3
- export { useStore } from './utils.ts';
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.tsx';
3
- export type { Store } from './index.tsx';
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,5 +1,5 @@
1
1
  import { RefObject } from 'react';
2
- import { Store } from './index.tsx';
2
+ import { Store } from './index';
3
3
  import * as React from "react";
4
4
  /**
5
5
  * React context exposing the per-Boundary Store ref. The ref itself is
@@ -1,6 +1,6 @@
1
- import { Props } from './types.ts';
1
+ import { Props } from './types';
2
2
  import * as React from "react";
3
- export type { Task } from './types.ts';
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,4 +1,4 @@
1
- import { Tasks } from './types.ts';
1
+ import { Tasks } from './types';
2
2
  import * as React from "react";
3
3
  /**
4
4
  * React context for the shared tasks Set.
@@ -1,4 +1,4 @@
1
- import { Props } from './types.ts';
1
+ import { Props } from './types';
2
2
  import * as React from "react";
3
3
  /**
4
4
  * Creates a unified context boundary for all March Hare features.
@@ -1,4 +1,4 @@
1
- import { Store } from './components/store/types.ts';
1
+ import { Store } from './components/store/types';
2
2
  import type * as React from "react";
3
3
  export type Props = {
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { Adapter, Stored } from './types.ts';
2
- export type { Adapter, Encoded } from './types.ts';
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,4 +1,4 @@
1
- export type { Stored } from '../utils/types.ts';
1
+ export type { Stored } from '../utils/types';
2
2
  /**
3
3
  * On-disk JSON shape of a `Stored` envelope. The Cache wrapper
4
4
  * encodes a populated Stored as `{ data, at: at.toString() }` so the
@@ -1,4 +1,4 @@
1
- import { Task } from '../boundary/components/tasks/types.ts';
1
+ import { Task } from '../boundary/components/tasks/types';
2
2
  /**
3
3
  * Reasons why an action error occurred.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { Reason } from './types.ts';
1
+ import { Reason } from './types';
2
2
  /**
3
3
  * Determines the error reason based on what was thrown.
4
4
  *
@@ -1,6 +1,6 @@
1
- import { Data } from './types.ts';
2
- import { Model, Props, Actions, UseActions } from '../types/index.ts';
3
- export { With } from './utils.ts';
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.ts';
4
- import { BroadcastEmitter } from '../boundary/components/broadcast/utils.ts';
5
- import { ScopeContext } from '../boundary/components/scope/types.ts';
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.ts';
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.ts';
5
- import { isChanneledAction, getActionSymbol } from '../action/index.ts';
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.
@@ -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.ts';
2
- import { Cache } from './utils.ts';
3
- import { Store } from '../boundary/components/store/index.tsx';
4
- export type { Fetcher } from './types.ts';
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,4 +1,4 @@
1
- import { Store } from '../boundary/components/store/index.tsx';
1
+ import { Store } from '../boundary/components/store/index';
2
2
  /**
3
3
  * Args object passed to every {@link Fetcher}. The fetcher destructures
4
4
  * whatever it needs; unused fields can be omitted.
@@ -1,6 +1,6 @@
1
- import { Cache } from '../cache/index.ts';
2
- import { unset } from '../utils/index.ts';
3
- export { Cache } from '../cache/index.ts';
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.ts';
3
- import { Fault } from '../error/types.ts';
4
- import { Store } from '../boundary/components/store/index.tsx';
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.ts';
2
- export { unset } from './utils.ts';
3
- export type { Stored, Unset } from './types.ts';
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
@@ -1,4 +1,4 @@
1
- import { unset } from './utils.ts';
1
+ import { unset } from './utils';
2
2
  /** Nominal type of the {@link unset} sentinel. */
3
3
  export type Unset = typeof unset;
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { Stored } from './types.ts';
1
+ import { Stored } from './types';
2
2
  /**
3
3
  * Sentinel symbol marking "no value present yet". Shared by the Resource
4
4
  * cache and by storage handles so callers can distinguish "nothing has been
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "march-hare",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "packageManager": "yarn@1.22.22",
@@ -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