@manyducks.co/dolla 0.67.0 → 0.68.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/lib/state.d.ts CHANGED
@@ -60,7 +60,7 @@ export declare function observe<T>(readable: Readable<T>, callback: (currentValu
60
60
  * with this observer to prevent memory leaks.
61
61
  */
62
62
  export declare function observe<T extends Readable<any>[]>(readables: [...T], callback: (currentValues: ReadableValues<T>, previousValues: ReadableValues<T>) => void): StopFunction;
63
- export declare function computed<I, O>(readable: Readable<I>, compute: (currentValue: I, previousValue?: I) => O): Readable<O>;
63
+ export declare function computed<I, O>(readable: Readable<I>, compute: (currentValue: I, previousValue?: I) => O | Readable<O>): Readable<O>;
64
64
  export declare function computed<I extends Readable<any>[], O>(readables: [...I], compute: (currentValues: ReadableValues<I>, previousValues?: ReadableValues<I>) => O): Readable<O>;
65
65
  interface ProxyConfig<Source, Value> {
66
66
  get(source: Source): Value;
package/lib/store.d.ts CHANGED
@@ -55,7 +55,7 @@ interface StoreConfig<O> {
55
55
  store: Store<O, any>;
56
56
  appContext: AppContext;
57
57
  elementContext: ElementContext;
58
- options: O;
58
+ options?: O;
59
59
  }
60
60
  export declare function initStore<O>(config: StoreConfig<O>): {
61
61
  readonly name: string;
@@ -1,10 +1,13 @@
1
1
  import { Store } from "../store.js";
2
2
  import { ViewContext } from "../view.js";
3
- export interface StoreScopeProps<O, E> {
3
+ export interface StoreConfig<O, E> {
4
4
  store: Store<O, E>;
5
5
  options?: O;
6
6
  }
7
+ export interface StoreScopeProps {
8
+ stores: (StoreConfig<unknown, unknown> | Store<unknown, unknown>)[];
9
+ }
7
10
  /**
8
11
  * Creates an instance of a store available only to children of this StoreScope.
9
12
  */
10
- export declare function StoreScope<O, E>(props: StoreScopeProps<O, E>, ctx: ViewContext): import("../markup.js").Markup;
13
+ export declare function StoreScope(props: StoreScopeProps, ctx: ViewContext): import("../markup.js").Markup;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manyducks.co/dolla",
3
- "version": "0.67.0",
3
+ "version": "0.68.1",
4
4
  "description": "Front-end components, routing and state management.",
5
5
  "main": "lib/index.js",
6
6
  "types": "./index.d.ts",