@manyducks.co/dolla 2.0.0-alpha.25 → 2.0.0-alpha.27
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 +3 -1
- package/dist/core/markup.d.ts +10 -10
- package/dist/core/nodes/dom.d.ts +13 -0
- package/dist/core/nodes/html.d.ts +5 -3
- package/dist/core/nodes/observer.d.ts +7 -8
- package/dist/core/nodes/outlet.d.ts +3 -3
- package/dist/core/nodes/portal.d.ts +2 -2
- package/dist/core/nodes/repeat.d.ts +3 -4
- package/dist/core/nodes/view.d.ts +12 -7
- package/dist/core/ref.d.ts +29 -0
- package/dist/core/state.d.ts +11 -44
- package/dist/core/stats.d.ts +31 -0
- package/dist/core/symbols.d.ts +4 -5
- package/dist/index.d.ts +3 -2
- package/dist/index.js +558 -535
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.js +2 -2
- package/dist/jsx-runtime.js +2 -2
- package/dist/modules/http.d.ts +3 -5
- package/dist/passthrough-D9NjRov5.js +1319 -0
- package/dist/passthrough-D9NjRov5.js.map +1 -0
- package/dist/types.d.ts +1 -2
- package/package.json +2 -1
- package/dist/core/nodes/cond.d.ts +0 -28
- package/dist/core/nodes/text.d.ts +0 -21
- package/dist/passthrough-D_L3EUe_.js +0 -1350
- package/dist/passthrough-D_L3EUe_.js.map +0 -1
package/dist/core/dolla.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import { type CrashViewProps } from "../views/default-crash-view.js";
|
|
|
2
2
|
import { Batch } from "./batch.js";
|
|
3
3
|
import { type Markup, type MarkupElement } from "./markup.js";
|
|
4
4
|
import { type ViewElement, type ViewFunction } from "./nodes/view.js";
|
|
5
|
-
import { createRef,
|
|
5
|
+
import { createRef, isRef } from "./ref.js";
|
|
6
|
+
import { createState, createWatcher, derive, isState, toState, toValue } from "./state.js";
|
|
6
7
|
import { HTTP } from "../modules/http.js";
|
|
7
8
|
import { I18n } from "../modules/i18n.js";
|
|
8
9
|
import { Router } from "../modules/router.js";
|
|
@@ -46,6 +47,7 @@ export interface DollaModuleConfig<Options = never> {
|
|
|
46
47
|
export declare class Dolla {
|
|
47
48
|
#private;
|
|
48
49
|
readonly batch: Batch;
|
|
50
|
+
private readonly stats;
|
|
49
51
|
readonly http: HTTP;
|
|
50
52
|
readonly i18n: I18n;
|
|
51
53
|
readonly router: Router;
|
package/dist/core/markup.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Renderable
|
|
1
|
+
import type { Renderable } from "../types.js";
|
|
2
2
|
import type { Dolla } from "./dolla.js";
|
|
3
3
|
import { type ViewContext, type ViewFunction, type ViewResult } from "./nodes/view.js";
|
|
4
|
-
import { MaybeState, type State } from "./state.js";
|
|
4
|
+
import { type MaybeState, type State } from "./state.js";
|
|
5
5
|
export interface ElementContext {
|
|
6
6
|
/**
|
|
7
7
|
* The root Dolla instance this element belongs to.
|
|
@@ -19,6 +19,10 @@ export interface ElementContext {
|
|
|
19
19
|
* Whether to create DOM nodes in the SVG namespace. An `<svg>` element will set this to true and pass it down to children.
|
|
20
20
|
*/
|
|
21
21
|
isSVG?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The name of the nearest parent view.
|
|
24
|
+
*/
|
|
25
|
+
viewName?: string;
|
|
22
26
|
}
|
|
23
27
|
/**
|
|
24
28
|
* Markup is a set of element metadata that hasn't been constructed into a MarkupElement yet.
|
|
@@ -47,6 +51,7 @@ export interface MarkupElement {
|
|
|
47
51
|
mount(parent: Node, after?: Node): void;
|
|
48
52
|
/**
|
|
49
53
|
* Disconnect from the DOM and clean up. If parentIsUnmounting, DOM operations are skipped.
|
|
54
|
+
* parentIsUnmounting is set for all children by HTML nodes when they unmount.
|
|
50
55
|
*/
|
|
51
56
|
unmount(parentIsUnmounting?: boolean): void;
|
|
52
57
|
}
|
|
@@ -55,12 +60,7 @@ export declare function isMarkupElement(value: any): value is MarkupElement;
|
|
|
55
60
|
export declare function toMarkup(renderables: Renderable | Renderable[]): Markup[];
|
|
56
61
|
export interface MarkupAttributes {
|
|
57
62
|
$text: {
|
|
58
|
-
value:
|
|
59
|
-
};
|
|
60
|
-
$cond: {
|
|
61
|
-
$predicate: State<any>;
|
|
62
|
-
thenContent?: Renderable;
|
|
63
|
-
elseContent?: Renderable;
|
|
63
|
+
value: any;
|
|
64
64
|
};
|
|
65
65
|
$repeat: {
|
|
66
66
|
$items: State<any[]>;
|
|
@@ -68,7 +68,7 @@ export interface MarkupAttributes {
|
|
|
68
68
|
renderFn: ($item: State<any>, $index: State<number>, c: ViewContext) => ViewResult;
|
|
69
69
|
};
|
|
70
70
|
$observer: {
|
|
71
|
-
|
|
71
|
+
sources: MaybeState<any>[];
|
|
72
72
|
renderFn: (...items: any) => Renderable;
|
|
73
73
|
};
|
|
74
74
|
$outlet: {
|
|
@@ -99,7 +99,7 @@ export declare function cond(predicate: MaybeState<any>, thenContent?: Renderabl
|
|
|
99
99
|
*/
|
|
100
100
|
export declare function repeat<T>(items: MaybeState<T[]>, keyFn: (value: T, index: number) => string | number | symbol, renderFn: ($value: State<T>, $index: State<number>, ctx: ViewContext) => ViewResult): Markup;
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
102
|
+
* Renders `content` into a `parent` node anywhere in the page, rather than its usual position in the view.
|
|
103
103
|
*/
|
|
104
104
|
export declare function portal(parent: Node, content: Renderable): Markup;
|
|
105
105
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MarkupElement } from "../markup";
|
|
2
|
+
import { IS_MARKUP_ELEMENT } from "../symbols";
|
|
3
|
+
/**
|
|
4
|
+
* Wraps any plain DOM node in a MarkupElement interface.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DOMNode implements MarkupElement {
|
|
7
|
+
[IS_MARKUP_ELEMENT]: boolean;
|
|
8
|
+
node: Node;
|
|
9
|
+
get isMounted(): boolean;
|
|
10
|
+
constructor(node: Node);
|
|
11
|
+
mount(parent: Node, after?: Node): void;
|
|
12
|
+
unmount(parentIsUnmounting?: boolean): void;
|
|
13
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ElementContext, type Markup, type MarkupElement } from "../markup.js";
|
|
2
|
-
import { type Ref
|
|
3
|
-
import {
|
|
2
|
+
import { type Ref } from "../ref.js";
|
|
3
|
+
import { type State, type StopFunction } from "../state.js";
|
|
4
|
+
import { IS_MARKUP_ELEMENT } from "../symbols.js";
|
|
4
5
|
type HTMLOptions = {
|
|
5
6
|
elementContext: ElementContext;
|
|
6
7
|
tag: string;
|
|
@@ -8,9 +9,10 @@ type HTMLOptions = {
|
|
|
8
9
|
children?: Markup[];
|
|
9
10
|
};
|
|
10
11
|
export declare class HTML implements MarkupElement {
|
|
11
|
-
[
|
|
12
|
+
[IS_MARKUP_ELEMENT]: boolean;
|
|
12
13
|
node: HTMLElement | SVGElement;
|
|
13
14
|
props: Record<string, any>;
|
|
15
|
+
childMarkup: Markup[];
|
|
14
16
|
children: MarkupElement[];
|
|
15
17
|
stopCallbacks: StopFunction[];
|
|
16
18
|
elementContext: ElementContext;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Renderable } from "../../types.js";
|
|
2
2
|
import { type ElementContext, type MarkupElement } from "../markup.js";
|
|
3
|
-
import { type
|
|
4
|
-
import {
|
|
3
|
+
import { type MaybeState } from "../state.js";
|
|
4
|
+
import { IS_MARKUP_ELEMENT } from "../symbols.js";
|
|
5
5
|
interface ObserverOptions {
|
|
6
6
|
elementContext: ElementContext;
|
|
7
|
-
|
|
7
|
+
sources: MaybeState<any>[];
|
|
8
8
|
renderFn: (...values: any) => Renderable;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
@@ -12,16 +12,15 @@ interface ObserverOptions {
|
|
|
12
12
|
* Used when a State is passed as a child in a view template.
|
|
13
13
|
*/
|
|
14
14
|
export declare class Observer implements MarkupElement {
|
|
15
|
-
[
|
|
16
|
-
node:
|
|
17
|
-
endNode: Node;
|
|
15
|
+
[IS_MARKUP_ELEMENT]: boolean;
|
|
16
|
+
node: Text;
|
|
18
17
|
children: MarkupElement[];
|
|
19
18
|
renderFn: (...values: any) => Renderable;
|
|
20
19
|
elementContext: ElementContext;
|
|
21
20
|
watcher: import("../state.js").StateWatcher;
|
|
22
|
-
sources:
|
|
21
|
+
sources: MaybeState<any>[];
|
|
23
22
|
get isMounted(): boolean;
|
|
24
|
-
constructor({
|
|
23
|
+
constructor({ sources, renderFn, elementContext }: ObserverOptions);
|
|
25
24
|
mount(parent: Node, after?: Node): void;
|
|
26
25
|
unmount(parentIsUnmounting?: boolean): void;
|
|
27
26
|
cleanup(parentIsUnmounting: boolean): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type MarkupElement } from "../markup.js";
|
|
2
|
-
import { MaybeState, type StopFunction } from "../state.js";
|
|
3
|
-
import {
|
|
2
|
+
import { type MaybeState, type StopFunction } from "../state.js";
|
|
3
|
+
import { IS_MARKUP_ELEMENT } from "../symbols.js";
|
|
4
4
|
/**
|
|
5
5
|
* Manages several MarkupElements as one.
|
|
6
6
|
*/
|
|
7
7
|
export declare class Outlet implements MarkupElement {
|
|
8
|
-
[
|
|
8
|
+
[IS_MARKUP_ELEMENT]: boolean;
|
|
9
9
|
node: Text;
|
|
10
10
|
isMounted: boolean;
|
|
11
11
|
source: MaybeState<MarkupElement[]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Renderable } from "../../types.js";
|
|
2
2
|
import { type ElementContext, type MarkupElement } from "../markup.js";
|
|
3
|
-
import {
|
|
3
|
+
import { IS_MARKUP_ELEMENT } from "../symbols.js";
|
|
4
4
|
interface PortalConfig {
|
|
5
5
|
content: Renderable;
|
|
6
6
|
parent: Node;
|
|
@@ -10,7 +10,7 @@ interface PortalConfig {
|
|
|
10
10
|
* Renders content into a specified parent node.
|
|
11
11
|
*/
|
|
12
12
|
export declare class Portal implements MarkupElement {
|
|
13
|
-
[
|
|
13
|
+
[IS_MARKUP_ELEMENT]: boolean;
|
|
14
14
|
config: PortalConfig;
|
|
15
15
|
element?: MarkupElement;
|
|
16
16
|
get isMounted(): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ElementContext, type MarkupElement } from "../markup.js";
|
|
2
2
|
import { type Setter, type State, type StopFunction } from "../state.js";
|
|
3
|
-
import {
|
|
3
|
+
import { IS_MARKUP_ELEMENT } from "../symbols.js";
|
|
4
4
|
import { type ViewContext, type ViewResult } from "./view.js";
|
|
5
5
|
interface RepeatOptions<T> {
|
|
6
6
|
elementContext: ElementContext;
|
|
@@ -17,9 +17,8 @@ type ConnectedItem<T> = {
|
|
|
17
17
|
element: MarkupElement;
|
|
18
18
|
};
|
|
19
19
|
export declare class Repeat<T> implements MarkupElement {
|
|
20
|
-
[
|
|
21
|
-
node:
|
|
22
|
-
endNode: Node;
|
|
20
|
+
[IS_MARKUP_ELEMENT]: boolean;
|
|
21
|
+
node: Text;
|
|
23
22
|
$items: State<T[]>;
|
|
24
23
|
stopCallback?: StopFunction;
|
|
25
24
|
connectedItems: ConnectedItem<T>[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Logger } from "../dolla.js";
|
|
2
2
|
import { type ElementContext, type Markup, type MarkupElement } from "../markup.js";
|
|
3
3
|
import { type MaybeState, type State, type StateValues, type StopFunction } from "../state.js";
|
|
4
|
-
import {
|
|
4
|
+
import { IS_MARKUP_ELEMENT } from "../symbols.js";
|
|
5
|
+
import { Emitter } from "@manyducks.co/emitter";
|
|
5
6
|
/**
|
|
6
7
|
* Any valid value that a View can return.
|
|
7
8
|
*/
|
|
@@ -63,8 +64,14 @@ export interface ViewContext extends Logger {
|
|
|
63
64
|
*/
|
|
64
65
|
outlet(): Markup;
|
|
65
66
|
}
|
|
67
|
+
type ViewEvents = {
|
|
68
|
+
beforeMount: [];
|
|
69
|
+
mounted: [];
|
|
70
|
+
beforeUnmount: [];
|
|
71
|
+
unmounted: [];
|
|
72
|
+
};
|
|
66
73
|
export declare class View<P> implements ViewElement {
|
|
67
|
-
[
|
|
74
|
+
[IS_MARKUP_ELEMENT]: boolean;
|
|
68
75
|
uniqueId: string;
|
|
69
76
|
_elementContext: ElementContext;
|
|
70
77
|
_logger: Logger;
|
|
@@ -75,15 +82,13 @@ export declare class View<P> implements ViewElement {
|
|
|
75
82
|
_$children: State<MarkupElement[]>;
|
|
76
83
|
_setChildren: import("../state.js").Setter<MarkupElement[], MarkupElement[]>;
|
|
77
84
|
_watcher: import("../state.js").StateWatcher;
|
|
78
|
-
|
|
79
|
-
_onMountCallbacks: (() => any)[];
|
|
80
|
-
_beforeUnmountCallbacks: (() => any)[];
|
|
81
|
-
_onUnmountCallbacks: (() => any)[];
|
|
85
|
+
_emitter: Emitter<ViewEvents>;
|
|
82
86
|
constructor(elementContext: ElementContext, view: ViewFunction<P>, props: P, children?: Markup[]);
|
|
83
87
|
get node(): Node;
|
|
84
88
|
isMounted: boolean;
|
|
85
89
|
mount(parent: Node, after?: Node): void;
|
|
86
90
|
unmount(parentIsUnmounting?: boolean): void;
|
|
87
91
|
setChildView(fn: ViewFunction<{}>): View<{}>;
|
|
88
|
-
|
|
92
|
+
private _initialize;
|
|
89
93
|
}
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A `Ref` is a function that stores a value when called with a single argument,
|
|
3
|
+
* and returns the most recently stored value when called with no arguments.
|
|
4
|
+
*/
|
|
5
|
+
export interface Ref<T> {
|
|
6
|
+
/**
|
|
7
|
+
* Get: returns the current value stored in the ref (or undefined).
|
|
8
|
+
*/
|
|
9
|
+
(): T | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Set: stores a new `value` in the ref.
|
|
12
|
+
*/
|
|
13
|
+
<T>(value: T | undefined): void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A Ref is a function that returns the last argument it was called with.
|
|
17
|
+
* Calling it with no arguments will simply return the latest value.
|
|
18
|
+
* Calling it with an argument will store that value and immediately return it.
|
|
19
|
+
*
|
|
20
|
+
* @param value - An (optional) initial value to store.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* const ref = createRef(5);
|
|
24
|
+
* ref(); // 5
|
|
25
|
+
* ref(500);
|
|
26
|
+
* ref(); // 500
|
|
27
|
+
*/
|
|
28
|
+
export declare function createRef<T>(value?: T): Ref<T>;
|
|
29
|
+
export declare function isRef<T extends Node>(value: any): value is Ref<T>;
|
package/dist/core/state.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { strictEqual } from "../utils";
|
|
2
|
-
import {
|
|
2
|
+
import { IS_STATE } from "./symbols";
|
|
3
3
|
/**
|
|
4
4
|
* Stops the observer that created it when called.
|
|
5
5
|
*/
|
|
@@ -25,7 +25,7 @@ export interface CreateStateOptions<T> {
|
|
|
25
25
|
export interface WatchOptions<T> {
|
|
26
26
|
/**
|
|
27
27
|
* If true the watch callback will be called for the first time on the next change.
|
|
28
|
-
*
|
|
28
|
+
* Callback is immediately called with the state's current value by default.
|
|
29
29
|
*/
|
|
30
30
|
lazy?: boolean;
|
|
31
31
|
}
|
|
@@ -49,34 +49,7 @@ export type SetFunction<I, O = I> = (current: I) => O;
|
|
|
49
49
|
/** Callback that updates the value of a state. */
|
|
50
50
|
export type Setter<I, O = I> = (value: SetAction<I, O>) => void;
|
|
51
51
|
export type MaybeState<T> = State<T> | T;
|
|
52
|
-
/**
|
|
53
|
-
* A state and setter in one. Useful for passing states that are intended to be updated by subviews.
|
|
54
|
-
*/
|
|
55
|
-
export interface SettableState<I, O = I> extends State<I> {
|
|
56
|
-
/**
|
|
57
|
-
* Updates the state's value.
|
|
58
|
-
*/
|
|
59
|
-
set(next: O): void;
|
|
60
|
-
/**
|
|
61
|
-
* Takes a callback that recieves the state's current value and returns a new one.
|
|
62
|
-
*/
|
|
63
|
-
set(callback: (current: I) => O): void;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
*/
|
|
68
|
-
export interface Ref<T> {
|
|
69
|
-
/**
|
|
70
|
-
* Get: returns the current value stored in the ref (or undefined).
|
|
71
|
-
*/
|
|
72
|
-
(): T | undefined;
|
|
73
|
-
/**
|
|
74
|
-
* Set: stores a new `value` in the ref.
|
|
75
|
-
*/
|
|
76
|
-
<T>(value: T | undefined): void;
|
|
77
|
-
}
|
|
78
52
|
export declare function isState<T>(value: any): value is State<T>;
|
|
79
|
-
export declare function isRef<T extends Node>(value: any): value is Ref<T>;
|
|
80
53
|
/**
|
|
81
54
|
* Retrieves a plain value from a variable that may be a state.
|
|
82
55
|
*/
|
|
@@ -85,6 +58,11 @@ export declare function toValue<T>(source: MaybeState<T>): T;
|
|
|
85
58
|
* Ensures a variable that may be a state or plain value is a state.
|
|
86
59
|
*/
|
|
87
60
|
export declare function toState<T>(value: MaybeState<T>): State<T>;
|
|
61
|
+
/**
|
|
62
|
+
* ValueHolder implements the core functionality of a State.
|
|
63
|
+
* It holds a value, which can be retrieved with `get`, updated with `set` and observed with `watch`.
|
|
64
|
+
* The user-facing API splits up access into a read-only State and a setter function.
|
|
65
|
+
*/
|
|
88
66
|
export declare class ValueHolder<T> implements State<T> {
|
|
89
67
|
value: T;
|
|
90
68
|
watchers: ((value: T) => void)[];
|
|
@@ -94,8 +72,11 @@ export declare class ValueHolder<T> implements State<T> {
|
|
|
94
72
|
set(action: T | SetFunction<T>): void;
|
|
95
73
|
watch(callback: (value: T) => void, options?: WatchOptions<T>): () => void;
|
|
96
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Signal is the implementation of a read-only State.
|
|
77
|
+
*/
|
|
97
78
|
export declare class Signal<T> implements State<T> {
|
|
98
|
-
[
|
|
79
|
+
[IS_STATE]: boolean;
|
|
99
80
|
__value: State<T>;
|
|
100
81
|
constructor(value: State<T>);
|
|
101
82
|
get(): T;
|
|
@@ -128,20 +109,6 @@ export interface DeriveOptions {
|
|
|
128
109
|
* const $hello = derive([$greeting, name], (greeting, name) => `${greeting}, ${name}!`);
|
|
129
110
|
*/
|
|
130
111
|
export declare function derive<Sources extends MaybeState<any>[], T>(sources: [...Sources], fn: (...values: StateValues<Sources>) => T | State<T>, options?: DeriveOptions): State<T>;
|
|
131
|
-
/**
|
|
132
|
-
* A Ref is a function that returns the last argument it was called with.
|
|
133
|
-
* Calling it with no arguments will simply return the latest value.
|
|
134
|
-
* Calling it with an argument will store that value and immediately return it.
|
|
135
|
-
*
|
|
136
|
-
* @param value - An (optional) initial value to store.
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* const ref = createRef(5);
|
|
140
|
-
* ref(); // 5
|
|
141
|
-
* ref(500);
|
|
142
|
-
* ref(); // 500
|
|
143
|
-
*/
|
|
144
|
-
export declare function createRef<T>(value?: T): Ref<T>;
|
|
145
112
|
export interface StateWatcher {
|
|
146
113
|
/**
|
|
147
114
|
* Watch one or more states, calling the provided `fn` each time one of their values changes.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Emitter } from "@manyducks.co/emitter";
|
|
2
|
+
import type { Dolla } from "./dolla";
|
|
3
|
+
interface StatsStore {
|
|
4
|
+
emitter: Emitter<StatsStoreEvents>;
|
|
5
|
+
stats: {
|
|
6
|
+
watcherCount: number;
|
|
7
|
+
viewCount: number;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
type StatsStoreEvents = {
|
|
11
|
+
/**
|
|
12
|
+
* Emitted when any stats are updated in the store.
|
|
13
|
+
*/
|
|
14
|
+
statsChanged: [];
|
|
15
|
+
_incrementWatcherCount: [amount: number];
|
|
16
|
+
_incrementViewCount: [amount: number];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Tracks runtime statistics.
|
|
20
|
+
*/
|
|
21
|
+
export declare class Stats {
|
|
22
|
+
#private;
|
|
23
|
+
constructor(dolla: Dolla);
|
|
24
|
+
}
|
|
25
|
+
export declare function _createStore(): StatsStore;
|
|
26
|
+
export declare function _getStore(): StatsStore;
|
|
27
|
+
export declare function _onWatcherAdded(): void;
|
|
28
|
+
export declare function _onWatcherRemoved(): void;
|
|
29
|
+
export declare function _onViewMounted(): void;
|
|
30
|
+
export declare function _onViewUnmounted(): void;
|
|
31
|
+
export {};
|
package/dist/core/symbols.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const TYPE_MARKUP_ELEMENT: unique symbol;
|
|
1
|
+
export declare const IS_STATE: unique symbol;
|
|
2
|
+
export declare const IS_REF: unique symbol;
|
|
3
|
+
export declare const IS_MARKUP: unique symbol;
|
|
4
|
+
export declare const IS_MARKUP_ELEMENT: unique symbol;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type { MaybeState,
|
|
1
|
+
export { createState, derive, isState, toState, toValue } from "./core/state.js";
|
|
2
|
+
export type { MaybeState, Setter, State, StopFunction } from "./core/state.js";
|
|
3
|
+
export { createRef, isRef, type Ref } from "./core/ref.js";
|
|
3
4
|
export { deepEqual, shallowEqual, strictEqual } from "./utils.js";
|
|
4
5
|
export { cond, createMarkup, html, portal, repeat } from "./core/markup.js";
|
|
5
6
|
export type { Markup, MarkupElement } from "./core/markup.js";
|