@pipelex/mthds-form 0.10.1 → 0.12.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/{chunk-W56WIIVC.js → chunk-4KX6YTLW.js} +415 -127
- package/dist/chunk-4KX6YTLW.js.map +1 -0
- package/dist/{chunk-TID7ZN63.js → chunk-CM4KVG53.js} +13 -10
- package/dist/chunk-CM4KVG53.js.map +1 -0
- package/dist/chunk-V7T4DM63.js +125 -0
- package/dist/chunk-V7T4DM63.js.map +1 -0
- package/dist/{chunk-4JQAJT7C.js → chunk-VS5JMFUV.js} +25 -38
- package/dist/chunk-VS5JMFUV.js.map +1 -0
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.js +3 -2
- package/dist/core/native-content.d.ts +6 -1
- package/dist/core/native-content.js +1 -1
- package/dist/core/save-plan.d.ts +136 -0
- package/dist/core/save-plan.js +6 -0
- package/dist/core/save-plan.js.map +1 -0
- package/dist/core/stuff-files.d.ts +19 -2
- package/dist/core/stuff-files.js +2 -2
- package/dist/field-renderer-C5Onx6qB.d.ts +65 -0
- package/dist/generative/index.d.ts +1 -1
- package/dist/generative/index.js +7 -5
- package/dist/generative/index.js.map +1 -1
- package/dist/react/index.d.ts +202 -112
- package/dist/react/index.js +4 -3
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-4JQAJT7C.js.map +0 -1
- package/dist/chunk-TID7ZN63.js.map +0 -1
- package/dist/chunk-W56WIIVC.js.map +0 -1
- package/dist/field-renderer-BSU2hMf6.d.ts +0 -34
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { RunField } from './core/descriptor.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Ambient state that any field in the tree may need, threaded unchanged through
|
|
6
|
-
* the recursion so containers don't have to re-plumb it for every child.
|
|
7
|
-
*/
|
|
8
|
-
interface FieldEnv {
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
/** A file field asks its parent to upload; the parent sets the value later. */
|
|
11
|
-
onDropFile?: (id: string, file: File) => void;
|
|
12
|
-
/** Ids currently mid-upload. */
|
|
13
|
-
uploadingIds?: ReadonlySet<string>;
|
|
14
|
-
/** Resolve a `pipelex-storage://` URI to a browser-viewable URL (for previews
|
|
15
|
-
* of already-stored files). */
|
|
16
|
-
resolveUrl?: (uri: string) => Promise<string | null>;
|
|
17
|
-
}
|
|
18
|
-
interface FieldRendererProps {
|
|
19
|
-
field: RunField;
|
|
20
|
-
value: unknown;
|
|
21
|
-
onChange: (value: unknown) => void;
|
|
22
|
-
/** Unique, stable id used for label linkage and upload tracking. */
|
|
23
|
-
id: string;
|
|
24
|
-
error?: string;
|
|
25
|
-
env?: FieldEnv;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* The single dispatch point: a normalized `RunField` → the matching control.
|
|
29
|
-
* Object and list fields recurse back through here, so the whole form is one
|
|
30
|
-
* data-driven tree with no per-type branching anywhere else.
|
|
31
|
-
*/
|
|
32
|
-
declare function FieldRenderer({ field, value, onChange, id, error, env }: FieldRendererProps): react.JSX.Element;
|
|
33
|
-
|
|
34
|
-
export { type FieldEnv as F, FieldRenderer as a, type FieldRendererProps as b };
|