@manyducks.co/dolla 2.0.0-alpha.30 → 2.0.0-alpha.31
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/core/dolla.d.ts +6 -5
- package/dist/core/symbols.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +810 -793
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.js +2 -2
- package/dist/jsx-runtime.js +2 -2
- package/dist/{passthrough-d2lcM0cd.js → markup-D1i09ddt.js} +151 -151
- package/dist/markup-D1i09ddt.js.map +1 -0
- package/dist/modules/router.d.ts +14 -4
- package/package.json +1 -1
- package/dist/passthrough-d2lcM0cd.js.map +0 -1
package/dist/core/dolla.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTTP } from "../modules/http.js";
|
|
2
2
|
import { I18n } from "../modules/i18n.js";
|
|
3
|
-
import { Router } from "../modules/router.js";
|
|
3
|
+
import { type Router } from "../modules/router.js";
|
|
4
4
|
import { type CrashViewProps } from "../views/default-crash-view.js";
|
|
5
5
|
import { Batch } from "./batch.js";
|
|
6
6
|
import { ContextEvent, type StorableContext } from "./context.js";
|
|
@@ -48,7 +48,6 @@ export declare class Dolla implements StorableContext {
|
|
|
48
48
|
private readonly stats;
|
|
49
49
|
readonly http: HTTP;
|
|
50
50
|
readonly i18n: I18n;
|
|
51
|
-
readonly router: Router;
|
|
52
51
|
constructor();
|
|
53
52
|
watch: <I extends import("./state.js").MaybeState<any>[]>(states: [...I], fn: (...currentValues: import("./state.js").StateValues<I>) => void) => import("./state.js").StopFunction;
|
|
54
53
|
createState: typeof createState;
|
|
@@ -81,7 +80,7 @@ export declare class Dolla implements StorableContext {
|
|
|
81
80
|
/**
|
|
82
81
|
* Returns the HTMLElement Dolla is mounted to. This will return undefined until Dolla.mount() is called.
|
|
83
82
|
*/
|
|
84
|
-
getRootElement():
|
|
83
|
+
getRootElement(): Element | undefined;
|
|
85
84
|
/**
|
|
86
85
|
* Returns the top level view Dolla is rendering inside the root element. This will return undefined until Dolla.mount() is called.
|
|
87
86
|
*/
|
|
@@ -121,8 +120,10 @@ export declare class Dolla implements StorableContext {
|
|
|
121
120
|
* Gets the nearest instance of a store. Throws an error if the store isn't provided higher in the tree.
|
|
122
121
|
*/
|
|
123
122
|
useStore<Value>(factory: StoreFactory<any, Value>): Value;
|
|
124
|
-
mount(selector: string,
|
|
125
|
-
mount(
|
|
123
|
+
mount(selector: string, router: Router): Promise<void>;
|
|
124
|
+
mount(selector: string, view: ViewFunction<any>): Promise<void>;
|
|
125
|
+
mount(element: Element, router: Router): Promise<void>;
|
|
126
|
+
mount(element: Element, view: ViewFunction<any>): Promise<void>;
|
|
126
127
|
unmount(): Promise<void>;
|
|
127
128
|
/**
|
|
128
129
|
* Registers a `callback` to run after `Dolla.mount` is called, before the app is mounted. If `callback` returns a Promise,
|
package/dist/core/symbols.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { createState, derive, isState, toState, toValue } from "./core/state.js";
|
|
2
2
|
export type { MaybeState, Setter, State, StopFunction } from "./core/state.js";
|
|
3
3
|
export { createRef, isRef, type Ref } from "./core/ref.js";
|
|
4
|
-
export { createStore, type Store, type
|
|
4
|
+
export { createStore, type Store, type StoreFactory, type StoreFunction } from "./core/store.js";
|
|
5
|
+
export { createRouter, type Router, type RouterOptions } from "./modules/router.js";
|
|
5
6
|
export { deepEqual, shallowEqual, strictEqual } from "./utils.js";
|
|
6
7
|
export { cond, createMarkup, html, portal, repeat } from "./core/markup.js";
|
|
7
8
|
export type { Markup, MarkupElement } from "./core/markup.js";
|