bleam 0.0.5 → 0.0.6
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/ai.cjs +187 -0
- package/dist/ai.d.cts +52 -0
- package/dist/ai.d.ts +52 -0
- package/dist/ai.js +182 -0
- package/dist/animated.cjs +286 -0
- package/dist/animated.d.cts +47 -0
- package/dist/animated.d.ts +47 -0
- package/dist/animated.js +281 -0
- package/dist/app.d.cts +1 -2
- package/dist/app.d.ts +1 -2
- package/dist/app.js +1 -2
- package/dist/bundler.d.cts +1 -2
- package/dist/bundler.d.ts +1 -2
- package/dist/chrome.cjs +265 -0
- package/dist/chrome.d.cts +19 -0
- package/dist/chrome.d.ts +19 -0
- package/dist/chrome.js +262 -0
- package/dist/cli.cjs +768 -31
- package/dist/cli.js +767 -34
- package/dist/config-Bb6SULnR.cjs +46 -0
- package/dist/config-CfWa3q-k.js +28 -0
- package/dist/config-ClDGHNb3.d.ts +39 -0
- package/dist/config-D3gPaVMb.d.cts +39 -0
- package/dist/config.cjs +4 -25
- package/dist/config.d.cts +2 -28
- package/dist/config.d.ts +2 -28
- package/dist/config.js +2 -24
- package/dist/crypto-BB92-Upx.js +7 -0
- package/dist/crypto-CT3VZ7lF.cjs +13 -0
- package/dist/crypto.cjs +2 -2
- package/dist/crypto.d.cts +8 -1
- package/dist/crypto.d.ts +8 -1
- package/dist/crypto.js +2 -2
- package/dist/dev-protocol.d.cts +3 -3
- package/dist/dev-protocol.d.ts +3 -3
- package/dist/dev-protocol.js +1 -2
- package/dist/fs.cjs +12 -2
- package/dist/fs.d.cts +7 -1
- package/dist/fs.d.ts +7 -1
- package/dist/fs.js +10 -1
- package/dist/index.cjs +4 -5
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -4
- package/dist/native-macos-D6p2SmUj.js +20 -0
- package/dist/native-macos-DLwo_ii9.cjs +31 -0
- package/dist/native-runtime-C85Nuc4F.js +10 -0
- package/dist/native-runtime-CbPzrs8j.d.cts +33 -0
- package/dist/{native-runtime-CdeT0JyQ.cjs → native-runtime-CsXnXkQn.cjs} +1 -14
- package/dist/native-runtime-DxHSrsTX.d.ts +33 -0
- package/dist/native.cjs +35 -32
- package/dist/native.d.cts +4 -34
- package/dist/native.d.ts +3 -33
- package/dist/native.js +36 -34
- package/dist/runtime.d.cts +1 -2
- package/dist/runtime.d.ts +1 -2
- package/dist/schema-BOuUHcqo.d.cts +58 -0
- package/dist/schema-DVmoD9JL.js +90 -0
- package/dist/schema-bxeeCyLn.cjs +102 -0
- package/dist/schema-ipsECAso.d.ts +58 -0
- package/dist/schema.cjs +4 -0
- package/dist/schema.d.cts +2 -0
- package/dist/schema.d.ts +2 -0
- package/dist/schema.js +3 -0
- package/dist/state.cjs +765 -0
- package/dist/state.d.cts +129 -0
- package/dist/state.d.ts +129 -0
- package/dist/state.js +747 -0
- package/dist/styles.cjs +742 -0
- package/dist/styles.d.cts +701 -0
- package/dist/styles.d.ts +701 -0
- package/dist/styles.js +739 -0
- package/dist/ui.cjs +113 -0
- package/dist/ui.d.cts +30 -0
- package/dist/ui.d.ts +30 -0
- package/dist/ui.js +110 -0
- package/metro-config.cjs +18 -13
- package/package.json +47 -13
- package/templates/basic/app/index.tsx +130 -12
- package/templates/basic/app.config.ts +4 -2
- package/dist/app.d.cts.map +0 -1
- package/dist/app.d.ts.map +0 -1
- package/dist/app.js.map +0 -1
- package/dist/bundler.d.cts.map +0 -1
- package/dist/bundler.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/crypto-BNhWeXMj.cjs +0 -15
- package/dist/crypto-Bg8cD8wX.d.cts +0 -8
- package/dist/crypto-Bg8cD8wX.d.cts.map +0 -1
- package/dist/crypto-CCA_hvao.js +0 -11
- package/dist/crypto-CCA_hvao.js.map +0 -1
- package/dist/crypto-IOzbNoJD.d.ts +0 -8
- package/dist/crypto-IOzbNoJD.d.ts.map +0 -1
- package/dist/dev-protocol.d.cts.map +0 -1
- package/dist/dev-protocol.d.ts.map +0 -1
- package/dist/dev-protocol.js.map +0 -1
- package/dist/fs-BK7joD1g.js +0 -13
- package/dist/fs-BK7joD1g.js.map +0 -1
- package/dist/fs-CEhcjuN6.d.ts +0 -9
- package/dist/fs-CEhcjuN6.d.ts.map +0 -1
- package/dist/fs-CfE8CHf_.d.cts +0 -9
- package/dist/fs-CfE8CHf_.d.cts.map +0 -1
- package/dist/fs-DKHYTPua.cjs +0 -18
- package/dist/native-runtime-BoqybBBf.js +0 -18
- package/dist/native-runtime-BoqybBBf.js.map +0 -1
- package/dist/native.d.cts.map +0 -1
- package/dist/native.d.ts.map +0 -1
- package/dist/native.js.map +0 -1
- package/dist/runtime.d.cts.map +0 -1
- package/dist/runtime.d.ts.map +0 -1
package/dist/state.d.cts
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { f as SchemaOutput, l as SchemaInput, m as SchemaShape, t as BleamSchema } from "./schema-BOuUHcqo.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/state/atom.d.ts
|
|
4
|
+
type Listener = () => void;
|
|
5
|
+
interface Store<Value> {
|
|
6
|
+
get(): Value;
|
|
7
|
+
subscribe(listener: Listener): () => void;
|
|
8
|
+
}
|
|
9
|
+
interface WritableStore<Value> extends Store<Value> {
|
|
10
|
+
set(value: Value): void;
|
|
11
|
+
update(updater: (value: Value) => Value): void;
|
|
12
|
+
}
|
|
13
|
+
declare class LiveStore<Value> implements WritableStore<Value> {
|
|
14
|
+
private value;
|
|
15
|
+
private listeners;
|
|
16
|
+
constructor(value: Value);
|
|
17
|
+
get(): Value;
|
|
18
|
+
set(value: Value): void;
|
|
19
|
+
update(updater: (value: Value) => Value): void;
|
|
20
|
+
subscribe(listener: Listener): () => void;
|
|
21
|
+
}
|
|
22
|
+
type Atom<Value> = WritableStore<Value>;
|
|
23
|
+
declare function atom<Value>(initialValue: Value): Atom<Value>;
|
|
24
|
+
declare function useStore<Value>(store: Store<Value>): Value;
|
|
25
|
+
declare function useAtom<Value>(value: Atom<Value>): Value;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/state/collection.d.ts
|
|
28
|
+
type CollectionFields<Shape extends SchemaShape> = SchemaOutput<Shape>;
|
|
29
|
+
type CollectionInput<Shape extends SchemaShape> = SchemaInput<Shape>;
|
|
30
|
+
type CollectionData<Shape extends SchemaShape> = CollectionFields<Shape> | undefined;
|
|
31
|
+
type CollectionRecord<Shape extends SchemaShape> = CollectionFields<Shape> & {
|
|
32
|
+
readonly id: string;
|
|
33
|
+
data(): CollectionData<Shape>;
|
|
34
|
+
delete(): Promise<void>;
|
|
35
|
+
readonly set: (patch: Partial<CollectionInput<Shape>>) => Promise<void>;
|
|
36
|
+
with(name: string): unknown | undefined;
|
|
37
|
+
with<OtherShape extends SchemaShape>(collection: Collection<OtherShape>): CollectionRecord<OtherShape>[];
|
|
38
|
+
};
|
|
39
|
+
type CollectionReference = {
|
|
40
|
+
readonly name: string;
|
|
41
|
+
get(id: string): Promise<unknown>;
|
|
42
|
+
refreshQueries(): Promise<void>;
|
|
43
|
+
pin(record: object | string, name: string, target: object | CollectionReference, targetId?: string): Promise<void>;
|
|
44
|
+
unpin(record: object | string, name: string): Promise<void>;
|
|
45
|
+
};
|
|
46
|
+
type AnyRecord = object;
|
|
47
|
+
type JoinFilter = {
|
|
48
|
+
kind: 'record';
|
|
49
|
+
record: AnyRecord;
|
|
50
|
+
} | {
|
|
51
|
+
kind: 'id';
|
|
52
|
+
collection: CollectionReference;
|
|
53
|
+
id: string;
|
|
54
|
+
};
|
|
55
|
+
type JoinInclude = {
|
|
56
|
+
collection: CollectionReference;
|
|
57
|
+
};
|
|
58
|
+
type PinInclude = {
|
|
59
|
+
name: string;
|
|
60
|
+
target: CollectionReference;
|
|
61
|
+
};
|
|
62
|
+
declare class Collection<Shape extends SchemaShape> {
|
|
63
|
+
readonly name: string;
|
|
64
|
+
readonly shape: Shape;
|
|
65
|
+
readonly validator: BleamSchema<SchemaInput<Shape>, SchemaOutput<Shape>>;
|
|
66
|
+
private queries;
|
|
67
|
+
private store;
|
|
68
|
+
constructor(name: string, shape: Shape);
|
|
69
|
+
private initialize;
|
|
70
|
+
private load;
|
|
71
|
+
private notifyRecordListeners;
|
|
72
|
+
private currentRecords;
|
|
73
|
+
refreshQueries(): Promise<void>;
|
|
74
|
+
insert(value: CollectionInput<Shape>): Promise<CollectionRecord<Shape>>;
|
|
75
|
+
update(record: CollectionFields<Shape> | string, value: Partial<CollectionInput<Shape>>): Promise<void>;
|
|
76
|
+
delete(record: CollectionFields<Shape> | string): Promise<void>;
|
|
77
|
+
all(): Promise<CollectionRecord<Shape>[]>;
|
|
78
|
+
get(id: string): Promise<CollectionRecord<Shape> | undefined>;
|
|
79
|
+
pin(record: CollectionFields<Shape> | string, name: string, target: object | CollectionReference, targetId?: string): Promise<void>;
|
|
80
|
+
unpin(record: CollectionFields<Shape> | string, name: string): Promise<void>;
|
|
81
|
+
subscribeRecord(record: CollectionFields<Shape>, listener: Listener): () => void;
|
|
82
|
+
queryStore(query?: {
|
|
83
|
+
joins: JoinFilter[];
|
|
84
|
+
joinIncludes: JoinInclude[];
|
|
85
|
+
pinIncludes: PinInclude[];
|
|
86
|
+
}): Store<CollectionRecord<Shape>[]>;
|
|
87
|
+
private executeQuery;
|
|
88
|
+
private deleteLinksForRecord;
|
|
89
|
+
private deletePinsForRecord;
|
|
90
|
+
}
|
|
91
|
+
declare function collection<Shape extends SchemaShape>(name: string, shape: Shape): Collection<Shape>;
|
|
92
|
+
declare function link(first: object, second: object): Promise<void>;
|
|
93
|
+
declare function link<FirstShape extends SchemaShape, SecondShape extends SchemaShape>(firstCollection: Collection<FirstShape>, firstId: string, secondCollection: Collection<SecondShape>, secondId: string): Promise<void>;
|
|
94
|
+
declare function unlink(first: object, second: object): Promise<void>;
|
|
95
|
+
declare function unlink<FirstShape extends SchemaShape, SecondShape extends SchemaShape>(firstCollection: Collection<FirstShape>, firstId: string, secondCollection: Collection<SecondShape>, secondId: string): Promise<void>;
|
|
96
|
+
declare function isLinked(first: object, second: object): Promise<boolean>;
|
|
97
|
+
declare function isLinked<FirstShape extends SchemaShape, SecondShape extends SchemaShape>(firstCollection: Collection<FirstShape>, firstId: string, secondCollection: Collection<SecondShape>, secondId: string): Promise<boolean>;
|
|
98
|
+
declare function pin(source: object, name: string, target: object): Promise<void>;
|
|
99
|
+
declare function pin<SourceShape extends SchemaShape, TargetShape extends SchemaShape>(sourceCollection: Collection<SourceShape>, sourceId: string, name: string, targetCollection: Collection<TargetShape>, targetId: string): Promise<void>;
|
|
100
|
+
declare function unpin(source: object, name: string): Promise<void>;
|
|
101
|
+
declare function unpin<SourceShape extends SchemaShape>(sourceCollection: Collection<SourceShape>, sourceId: string, name: string): Promise<void>;
|
|
102
|
+
declare function isPinned(source: object, name: string, target: object): Promise<boolean>;
|
|
103
|
+
declare function isPinned<SourceShape extends SchemaShape, TargetShape extends SchemaShape>(sourceCollection: Collection<SourceShape>, sourceId: string, name: string, targetCollection: Collection<TargetShape>, targetId: string): Promise<boolean>;
|
|
104
|
+
declare class CollectionQuery<Shape extends SchemaShape> implements Store<CollectionRecord<Shape>[]> {
|
|
105
|
+
private readonly collection;
|
|
106
|
+
private joins;
|
|
107
|
+
private joinIncludes;
|
|
108
|
+
private pinIncludes;
|
|
109
|
+
private cachedStore?;
|
|
110
|
+
constructor(collection: Collection<Shape>);
|
|
111
|
+
join(record: object): this;
|
|
112
|
+
join<OtherShape extends SchemaShape>(collection: Collection<OtherShape>): this;
|
|
113
|
+
join<OtherShape extends SchemaShape>(collection: Collection<OtherShape>, id: string): this;
|
|
114
|
+
with<OtherShape extends SchemaShape>(name: string, target: Collection<OtherShape>): this;
|
|
115
|
+
get(): CollectionRecord<Shape>[];
|
|
116
|
+
subscribe(listener: Listener): () => void;
|
|
117
|
+
store(): Store<CollectionRecord<Shape>[]>;
|
|
118
|
+
}
|
|
119
|
+
declare class QueryBuilder {
|
|
120
|
+
from<Shape extends SchemaShape>(collection: Collection<Shape>): CollectionQuery<Shape>;
|
|
121
|
+
}
|
|
122
|
+
declare function useQuery<Output>(query: (builder: QueryBuilder) => Store<Output>): Output;
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/state/setting.d.ts
|
|
125
|
+
type Setting<Value> = WritableStore<Value>;
|
|
126
|
+
declare function setting<Value extends string | number | boolean>(key: string, initialValue: Value): Setting<Value>;
|
|
127
|
+
declare function useSetting<Value>(value: Setting<Value>): Value;
|
|
128
|
+
//#endregion
|
|
129
|
+
export { Atom, Collection, CollectionRecord, Listener, LiveStore, QueryBuilder, Setting, Store, WritableStore, atom, collection, isLinked, isPinned, link, pin, setting, unlink, unpin, useAtom, useQuery, useSetting, useStore };
|
package/dist/state.d.ts
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { f as SchemaOutput, l as SchemaInput, m as SchemaShape, t as BleamSchema } from "./schema-ipsECAso.js";
|
|
2
|
+
|
|
3
|
+
//#region src/state/atom.d.ts
|
|
4
|
+
type Listener = () => void;
|
|
5
|
+
interface Store<Value> {
|
|
6
|
+
get(): Value;
|
|
7
|
+
subscribe(listener: Listener): () => void;
|
|
8
|
+
}
|
|
9
|
+
interface WritableStore<Value> extends Store<Value> {
|
|
10
|
+
set(value: Value): void;
|
|
11
|
+
update(updater: (value: Value) => Value): void;
|
|
12
|
+
}
|
|
13
|
+
declare class LiveStore<Value> implements WritableStore<Value> {
|
|
14
|
+
private value;
|
|
15
|
+
private listeners;
|
|
16
|
+
constructor(value: Value);
|
|
17
|
+
get(): Value;
|
|
18
|
+
set(value: Value): void;
|
|
19
|
+
update(updater: (value: Value) => Value): void;
|
|
20
|
+
subscribe(listener: Listener): () => void;
|
|
21
|
+
}
|
|
22
|
+
type Atom<Value> = WritableStore<Value>;
|
|
23
|
+
declare function atom<Value>(initialValue: Value): Atom<Value>;
|
|
24
|
+
declare function useStore<Value>(store: Store<Value>): Value;
|
|
25
|
+
declare function useAtom<Value>(value: Atom<Value>): Value;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/state/collection.d.ts
|
|
28
|
+
type CollectionFields<Shape extends SchemaShape> = SchemaOutput<Shape>;
|
|
29
|
+
type CollectionInput<Shape extends SchemaShape> = SchemaInput<Shape>;
|
|
30
|
+
type CollectionData<Shape extends SchemaShape> = CollectionFields<Shape> | undefined;
|
|
31
|
+
type CollectionRecord<Shape extends SchemaShape> = CollectionFields<Shape> & {
|
|
32
|
+
readonly id: string;
|
|
33
|
+
data(): CollectionData<Shape>;
|
|
34
|
+
delete(): Promise<void>;
|
|
35
|
+
readonly set: (patch: Partial<CollectionInput<Shape>>) => Promise<void>;
|
|
36
|
+
with(name: string): unknown | undefined;
|
|
37
|
+
with<OtherShape extends SchemaShape>(collection: Collection<OtherShape>): CollectionRecord<OtherShape>[];
|
|
38
|
+
};
|
|
39
|
+
type CollectionReference = {
|
|
40
|
+
readonly name: string;
|
|
41
|
+
get(id: string): Promise<unknown>;
|
|
42
|
+
refreshQueries(): Promise<void>;
|
|
43
|
+
pin(record: object | string, name: string, target: object | CollectionReference, targetId?: string): Promise<void>;
|
|
44
|
+
unpin(record: object | string, name: string): Promise<void>;
|
|
45
|
+
};
|
|
46
|
+
type AnyRecord = object;
|
|
47
|
+
type JoinFilter = {
|
|
48
|
+
kind: 'record';
|
|
49
|
+
record: AnyRecord;
|
|
50
|
+
} | {
|
|
51
|
+
kind: 'id';
|
|
52
|
+
collection: CollectionReference;
|
|
53
|
+
id: string;
|
|
54
|
+
};
|
|
55
|
+
type JoinInclude = {
|
|
56
|
+
collection: CollectionReference;
|
|
57
|
+
};
|
|
58
|
+
type PinInclude = {
|
|
59
|
+
name: string;
|
|
60
|
+
target: CollectionReference;
|
|
61
|
+
};
|
|
62
|
+
declare class Collection<Shape extends SchemaShape> {
|
|
63
|
+
readonly name: string;
|
|
64
|
+
readonly shape: Shape;
|
|
65
|
+
readonly validator: BleamSchema<SchemaInput<Shape>, SchemaOutput<Shape>>;
|
|
66
|
+
private queries;
|
|
67
|
+
private store;
|
|
68
|
+
constructor(name: string, shape: Shape);
|
|
69
|
+
private initialize;
|
|
70
|
+
private load;
|
|
71
|
+
private notifyRecordListeners;
|
|
72
|
+
private currentRecords;
|
|
73
|
+
refreshQueries(): Promise<void>;
|
|
74
|
+
insert(value: CollectionInput<Shape>): Promise<CollectionRecord<Shape>>;
|
|
75
|
+
update(record: CollectionFields<Shape> | string, value: Partial<CollectionInput<Shape>>): Promise<void>;
|
|
76
|
+
delete(record: CollectionFields<Shape> | string): Promise<void>;
|
|
77
|
+
all(): Promise<CollectionRecord<Shape>[]>;
|
|
78
|
+
get(id: string): Promise<CollectionRecord<Shape> | undefined>;
|
|
79
|
+
pin(record: CollectionFields<Shape> | string, name: string, target: object | CollectionReference, targetId?: string): Promise<void>;
|
|
80
|
+
unpin(record: CollectionFields<Shape> | string, name: string): Promise<void>;
|
|
81
|
+
subscribeRecord(record: CollectionFields<Shape>, listener: Listener): () => void;
|
|
82
|
+
queryStore(query?: {
|
|
83
|
+
joins: JoinFilter[];
|
|
84
|
+
joinIncludes: JoinInclude[];
|
|
85
|
+
pinIncludes: PinInclude[];
|
|
86
|
+
}): Store<CollectionRecord<Shape>[]>;
|
|
87
|
+
private executeQuery;
|
|
88
|
+
private deleteLinksForRecord;
|
|
89
|
+
private deletePinsForRecord;
|
|
90
|
+
}
|
|
91
|
+
declare function collection<Shape extends SchemaShape>(name: string, shape: Shape): Collection<Shape>;
|
|
92
|
+
declare function link(first: object, second: object): Promise<void>;
|
|
93
|
+
declare function link<FirstShape extends SchemaShape, SecondShape extends SchemaShape>(firstCollection: Collection<FirstShape>, firstId: string, secondCollection: Collection<SecondShape>, secondId: string): Promise<void>;
|
|
94
|
+
declare function unlink(first: object, second: object): Promise<void>;
|
|
95
|
+
declare function unlink<FirstShape extends SchemaShape, SecondShape extends SchemaShape>(firstCollection: Collection<FirstShape>, firstId: string, secondCollection: Collection<SecondShape>, secondId: string): Promise<void>;
|
|
96
|
+
declare function isLinked(first: object, second: object): Promise<boolean>;
|
|
97
|
+
declare function isLinked<FirstShape extends SchemaShape, SecondShape extends SchemaShape>(firstCollection: Collection<FirstShape>, firstId: string, secondCollection: Collection<SecondShape>, secondId: string): Promise<boolean>;
|
|
98
|
+
declare function pin(source: object, name: string, target: object): Promise<void>;
|
|
99
|
+
declare function pin<SourceShape extends SchemaShape, TargetShape extends SchemaShape>(sourceCollection: Collection<SourceShape>, sourceId: string, name: string, targetCollection: Collection<TargetShape>, targetId: string): Promise<void>;
|
|
100
|
+
declare function unpin(source: object, name: string): Promise<void>;
|
|
101
|
+
declare function unpin<SourceShape extends SchemaShape>(sourceCollection: Collection<SourceShape>, sourceId: string, name: string): Promise<void>;
|
|
102
|
+
declare function isPinned(source: object, name: string, target: object): Promise<boolean>;
|
|
103
|
+
declare function isPinned<SourceShape extends SchemaShape, TargetShape extends SchemaShape>(sourceCollection: Collection<SourceShape>, sourceId: string, name: string, targetCollection: Collection<TargetShape>, targetId: string): Promise<boolean>;
|
|
104
|
+
declare class CollectionQuery<Shape extends SchemaShape> implements Store<CollectionRecord<Shape>[]> {
|
|
105
|
+
private readonly collection;
|
|
106
|
+
private joins;
|
|
107
|
+
private joinIncludes;
|
|
108
|
+
private pinIncludes;
|
|
109
|
+
private cachedStore?;
|
|
110
|
+
constructor(collection: Collection<Shape>);
|
|
111
|
+
join(record: object): this;
|
|
112
|
+
join<OtherShape extends SchemaShape>(collection: Collection<OtherShape>): this;
|
|
113
|
+
join<OtherShape extends SchemaShape>(collection: Collection<OtherShape>, id: string): this;
|
|
114
|
+
with<OtherShape extends SchemaShape>(name: string, target: Collection<OtherShape>): this;
|
|
115
|
+
get(): CollectionRecord<Shape>[];
|
|
116
|
+
subscribe(listener: Listener): () => void;
|
|
117
|
+
store(): Store<CollectionRecord<Shape>[]>;
|
|
118
|
+
}
|
|
119
|
+
declare class QueryBuilder {
|
|
120
|
+
from<Shape extends SchemaShape>(collection: Collection<Shape>): CollectionQuery<Shape>;
|
|
121
|
+
}
|
|
122
|
+
declare function useQuery<Output>(query: (builder: QueryBuilder) => Store<Output>): Output;
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/state/setting.d.ts
|
|
125
|
+
type Setting<Value> = WritableStore<Value>;
|
|
126
|
+
declare function setting<Value extends string | number | boolean>(key: string, initialValue: Value): Setting<Value>;
|
|
127
|
+
declare function useSetting<Value>(value: Setting<Value>): Value;
|
|
128
|
+
//#endregion
|
|
129
|
+
export { Atom, Collection, CollectionRecord, Listener, LiveStore, QueryBuilder, Setting, Store, WritableStore, atom, collection, isLinked, isPinned, link, pin, setting, unlink, unpin, useAtom, useQuery, useSetting, useStore };
|