@formancy/react 0.2.0 → 0.3.0
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.mts +25 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1211 -884
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -57,6 +57,10 @@ export declare function useRepeater(path: string | Path): RepeaterBinding;
|
|
|
57
57
|
interface WizardBinding {
|
|
58
58
|
page: number;
|
|
59
59
|
pageCount: number;
|
|
60
|
+
/** Whether there is a live page after this one. Not `page < pageCount - 1`
|
|
61
|
+
* once a page can be walked past: the last live page is not always the last. */
|
|
62
|
+
canGoNext: boolean;
|
|
63
|
+
canGoBack: boolean;
|
|
60
64
|
/** Resolves true iff the page advanced; a failed validation keeps the page. */
|
|
61
65
|
next(): Promise<boolean>;
|
|
62
66
|
back(): void;
|
|
@@ -84,7 +88,13 @@ export declare function useSubmit(): () => {
|
|
|
84
88
|
errors: Record<string, string[]>;
|
|
85
89
|
};
|
|
86
90
|
//#endregion
|
|
87
|
-
//#region src/
|
|
91
|
+
//#region src/fields/internals.d.ts
|
|
92
|
+
/**
|
|
93
|
+
* The pieces every control shares: the shell it renders inside, the prop shapes, and the few helpers more than one of them needs.
|
|
94
|
+
*
|
|
95
|
+
* One file per control, because a control changes for its own reasons.
|
|
96
|
+
* These were one 2,154-line file — the largest in the repository.
|
|
97
|
+
*/
|
|
88
98
|
/**
|
|
89
99
|
* The component registry — theming mechanism number two. The schema decides
|
|
90
100
|
* WHAT a field is; the registry decides what RENDERS it, with per-path entries
|
|
@@ -126,6 +136,20 @@ interface FormancyFormProps {
|
|
|
126
136
|
submitLabel?: string;
|
|
127
137
|
onSubmit?: (outcome: SubmitOutcome) => void;
|
|
128
138
|
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/form.d.ts
|
|
141
|
+
/**
|
|
142
|
+
* The form, the list that walks it, and which component renders which type.
|
|
143
|
+
*
|
|
144
|
+
* What is left after the controls moved into `fields/`: 2,154 lines that had
|
|
145
|
+
* become the place things went. Three subjects remain here and they are one —
|
|
146
|
+
* a form renders a list, a list renders a slot, a slot may render a repeater,
|
|
147
|
+
* and a repeater renders a list. Mutual recursion is not a seam.
|
|
148
|
+
*
|
|
149
|
+
* `null` in the map is not an omission. `hidden` renders nothing by design, and
|
|
150
|
+
* `group`, `page` and `repeater` are containers the list itself walks rather
|
|
151
|
+
* than controls.
|
|
152
|
+
*/
|
|
129
153
|
/**
|
|
130
154
|
* Renders the whole form from the engine: one slot per field, resolved through
|
|
131
155
|
* the registry. Slots subscribe individually, so a keystroke re-renders one
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/context.tsx","../src/use-field.ts","../src/use-repeater.ts","../src/use-wizard.ts","../src/use-submit.ts","../src/form.tsx","../src/error-summary.tsx","../src/rich-text.tsx","../src/options-source.ts","../src/scanning.ts","../src/uploads.ts","../src/rich-text-editor.ts","../src/resume-notice.tsx"],"mappings":";;;;wBAYgB,mBAAmB,QAAQ;EAAc,QAAQ;EAAY,WAAW;oBAAW,IAAA;wBAInF,iBAAiB;;;UCXhB,qBAAqB;EACpC,SAAS;EACT;;EAEA,cAAc;;EAEd;IAAc;IAAY;;;EAE1B;IAAc;;;;;;;;;;;;;wBAaA,SAAS,eAAe,OAAO;;;UCrB9B;EACf;;EAEA;EACA;EACA,UAAU;;EAEV,QAAQ,cAAc;;;;;;;wBAQR,YAAY,eAAe,OAAO;;;UCjBjC;EACf;EACA;;EAEA,QAAQ;EACR;;EAEA,KAAK;;;;;;;wBAQS,aAAa;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/context.tsx","../src/use-field.ts","../src/use-repeater.ts","../src/use-wizard.ts","../src/use-submit.ts","../src/fields/internals.tsx","../src/form.tsx","../src/error-summary.tsx","../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