@schematichq/schematic-react 0.1.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.
@@ -0,0 +1,34 @@
1
+ import { default as React_2 } from 'react';
2
+ import { ReactNode } from 'react';
3
+ import * as SchematicJS from '@schematichq/schematic-js';
4
+
5
+ declare interface SchematicContextProps {
6
+ client?: SchematicJS.Schematic;
7
+ flagValues: Record<string, boolean>;
8
+ }
9
+
10
+ export declare interface SchematicFlags {
11
+ [key: string]: boolean;
12
+ }
13
+
14
+ export declare const SchematicProvider: React_2.FC<SchematicProviderProps>;
15
+
16
+ declare interface SchematicProviderProps {
17
+ children: ReactNode;
18
+ publishableKey?: string;
19
+ }
20
+
21
+ export declare const useSchematic: () => SchematicContextProps;
22
+
23
+ export declare const useSchematicContext: () => {
24
+ setContext: ((context: SchematicJS.SchematicContext) => Promise<void>) | undefined;
25
+ };
26
+
27
+ export declare const useSchematicEvents: () => {
28
+ track: ((body: SchematicJS.EventBodyTrack) => void) | undefined;
29
+ identify: ((body: SchematicJS.EventBodyIdentify) => void) | undefined;
30
+ };
31
+
32
+ export declare const useSchematicFlag: (key: string, fallback?: boolean) => boolean;
33
+
34
+ export { }