@graffiticode/l0000-view 0.1.2 → 0.1.3
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/index.d.ts +11 -1
- package/dist/index.js +365 -355
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,15 @@ export declare const Form: ({ state }: FormProps) => JSX_2.Element;
|
|
|
11
11
|
|
|
12
12
|
export declare type FormComponent = ComponentType<FormProps>;
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Which model the Form renders from.
|
|
16
|
+
*
|
|
17
|
+
* `live` — everything, including the Form's own edits coming back (a controlled Form).
|
|
18
|
+
* `loaded` — only the model as last loaded from outside the Form (an uncontrolled Form that
|
|
19
|
+
* seeds itself from the model and owns its editing state thereafter).
|
|
20
|
+
*/
|
|
21
|
+
export declare type FormModel = "live" | "loaded";
|
|
22
|
+
|
|
14
23
|
export declare interface FormProps {
|
|
15
24
|
state: {
|
|
16
25
|
data: any;
|
|
@@ -30,9 +39,10 @@ export declare interface StateAction {
|
|
|
30
39
|
args?: any;
|
|
31
40
|
}
|
|
32
41
|
|
|
33
|
-
export declare const View: ({ Form, reduce }: {
|
|
42
|
+
export declare const View: ({ Form, reduce, formModel, }: {
|
|
34
43
|
Form: FormComponent;
|
|
35
44
|
reduce?: LanguageReducer;
|
|
45
|
+
formModel?: FormModel;
|
|
36
46
|
}) => JSX_2.Element;
|
|
37
47
|
|
|
38
48
|
export { }
|