@nil-/xit 0.1.18 → 0.1.21
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/assets/bundler.js +2 -2
- package/assets/index.html +1 -1
- package/assets/index.js +186 -172
- package/index.d.ts +11 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export type Action<T> = (target: T) =>
|
|
2
|
-
destroy: () => void;
|
|
3
|
-
};
|
|
1
|
+
export type Action<T> = (target: T) => () => void;
|
|
4
2
|
export type Writable<T> = {
|
|
5
3
|
set: (v: T) => void;
|
|
6
4
|
subscribe: (cb: (v: T) => void) => () => void;
|
|
@@ -27,7 +25,7 @@ export type Signals = {
|
|
|
27
25
|
buffer: (t: string) => (v: Uint8Array) => void;
|
|
28
26
|
json: (t: string, encoder: CoDec["encode"]) => (v: any) => void;
|
|
29
27
|
};
|
|
30
|
-
export type
|
|
28
|
+
export type Context = {
|
|
31
29
|
values: Values;
|
|
32
30
|
signals: Signals;
|
|
33
31
|
frame_ui: (f: string, tag?: string) => Promise<Action<HTMLDivElement>>;
|
|
@@ -35,6 +33,14 @@ export type Xit = {
|
|
|
35
33
|
values: Values;
|
|
36
34
|
signals: Signals;
|
|
37
35
|
}>;
|
|
36
|
+
resub: () => void;
|
|
37
|
+
unsub: () => void;
|
|
38
|
+
};
|
|
39
|
+
export type Frame = {
|
|
40
|
+
values: Values;
|
|
41
|
+
signals: Signals;
|
|
42
|
+
resub: () => void;
|
|
43
|
+
unsub: () => void;
|
|
38
44
|
};
|
|
39
45
|
export declare const json_string: CoDec;
|
|
40
|
-
export declare const xit: () =>
|
|
46
|
+
export declare const xit: () => Context;
|