@pipelex/mthds-form 0.32.0 → 0.33.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/README.md +1 -1
- package/dist/{chunk-VBXFGUCG.js → chunk-4SRSGZWM.js} +333 -107
- package/dist/chunk-4SRSGZWM.js.map +1 -0
- package/dist/{chunk-PCNFELNT.js → chunk-UKTYADY3.js} +2 -2
- package/dist/{chunk-PCNFELNT.js.map → chunk-UKTYADY3.js.map} +1 -1
- package/dist/{field-renderer-Dz03dpig.d.ts → field-renderer-BYN6YrU-.d.ts} +6 -6
- package/dist/generative/headless/index.d.ts +47 -16
- package/dist/generative/headless/index.js +1 -1
- package/dist/generative/index.d.ts +56 -25
- package/dist/generative/index.js +424 -145
- package/dist/generative/index.js.map +1 -1
- package/dist/react/index.d.ts +27 -27
- package/dist/react/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-VBXFGUCG.js.map +0 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as FieldEnv, R as RowMove, a as FilePickerSource, U as UploadedFile } from '../field-renderer-
|
|
2
|
-
export { D as DocumentField, b as FieldRenderer, c as FieldRendererProps, d as FilePicker, e as FilePickerEntry, f as FilePickerEntryProps, g as FilePickerProps, h as FileValue, I as ImageField } from '../field-renderer-
|
|
3
|
-
import * as
|
|
1
|
+
import { F as FieldEnv, R as RowMove, a as FilePickerSource, U as UploadedFile } from '../field-renderer-BYN6YrU-.js';
|
|
2
|
+
export { D as DocumentField, b as FieldRenderer, c as FieldRendererProps, d as FilePicker, e as FilePickerEntry, f as FilePickerEntryProps, g as FilePickerProps, h as FileValue, I as ImageField } from '../field-renderer-BYN6YrU-.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { BooleanRunField, DateRunField, EnumRunField, ListRunField, NumberRunField, ObjectRunField, ProseRunField, TextRunField, UnknownRunField, RunField, ConceptCategory } from '../core/descriptor.js';
|
|
6
6
|
import { PipeInputFormDescriptor, PipeIOContract } from 'mthds/protocol';
|
|
@@ -26,7 +26,7 @@ interface BooleanFieldProps {
|
|
|
26
26
|
* single hairline row - a boolean reads better as a switchable statement than as
|
|
27
27
|
* a labelled box.
|
|
28
28
|
*/
|
|
29
|
-
declare function BooleanField({ field, value, onChange, id, disabled }: BooleanFieldProps):
|
|
29
|
+
declare function BooleanField({ field, value, onChange, id, disabled }: BooleanFieldProps): React.JSX.Element;
|
|
30
30
|
|
|
31
31
|
interface DateFieldProps {
|
|
32
32
|
field: DateRunField;
|
|
@@ -41,7 +41,7 @@ interface DateFieldProps {
|
|
|
41
41
|
* hours/seconds); for a `date-time` concept it stores midnight-UTC so the value
|
|
42
42
|
* still satisfies the API's `date-time` format.
|
|
43
43
|
*/
|
|
44
|
-
declare function DateField({ field, value, onChange, id, error, disabled }: DateFieldProps):
|
|
44
|
+
declare function DateField({ field, value, onChange, id, error, disabled }: DateFieldProps): React.JSX.Element;
|
|
45
45
|
|
|
46
46
|
interface EnumFieldProps {
|
|
47
47
|
field: EnumRunField;
|
|
@@ -64,7 +64,7 @@ interface EnumFieldProps {
|
|
|
64
64
|
* when two options would read the same. The segmented rule measures the label
|
|
65
65
|
* it shows, which is the text that has to fit on the row.
|
|
66
66
|
*/
|
|
67
|
-
declare function EnumField({ field, value, onChange, id, error, disabled }: EnumFieldProps):
|
|
67
|
+
declare function EnumField({ field, value, onChange, id, error, disabled }: EnumFieldProps): React.JSX.Element;
|
|
68
68
|
|
|
69
69
|
interface ListFieldProps {
|
|
70
70
|
field: ListRunField;
|
|
@@ -102,7 +102,7 @@ interface ListFieldProps {
|
|
|
102
102
|
* logs each move in `FieldEnv.rowMoves`, as `useMethodForm` does, and the list
|
|
103
103
|
* replays the log on its keys (see `useRowKeys`).
|
|
104
104
|
*/
|
|
105
|
-
declare function ListField({ field, value, onChange, id, error, env }: ListFieldProps):
|
|
105
|
+
declare function ListField({ field, value, onChange, id, error, env }: ListFieldProps): React.JSX.Element;
|
|
106
106
|
|
|
107
107
|
interface NumberFieldProps {
|
|
108
108
|
field: NumberRunField;
|
|
@@ -113,7 +113,7 @@ interface NumberFieldProps {
|
|
|
113
113
|
disabled?: boolean;
|
|
114
114
|
}
|
|
115
115
|
/** Numeric input with steppers and min/max clamping. */
|
|
116
|
-
declare function NumberField({ field, value, onChange, id, error, disabled }: NumberFieldProps):
|
|
116
|
+
declare function NumberField({ field, value, onChange, id, error, disabled }: NumberFieldProps): React.JSX.Element;
|
|
117
117
|
|
|
118
118
|
interface ObjectFieldProps {
|
|
119
119
|
field: ObjectRunField;
|
|
@@ -140,7 +140,7 @@ interface ObjectFieldProps {
|
|
|
140
140
|
* offers to close it. An open optional structure renders like any other: its
|
|
141
141
|
* label, description and card, with no badge.
|
|
142
142
|
*/
|
|
143
|
-
declare function ObjectField({ field, value, onChange, id, error, env }: ObjectFieldProps):
|
|
143
|
+
declare function ObjectField({ field, value, onChange, id, error, env }: ObjectFieldProps): React.JSX.Element;
|
|
144
144
|
|
|
145
145
|
interface TextFieldProps {
|
|
146
146
|
field: TextRunField;
|
|
@@ -151,7 +151,7 @@ interface TextFieldProps {
|
|
|
151
151
|
disabled?: boolean;
|
|
152
152
|
}
|
|
153
153
|
/** Single-line string input (short native.Text or a plain string property). */
|
|
154
|
-
declare function TextField({ field, value, onChange, id, error, disabled }: TextFieldProps):
|
|
154
|
+
declare function TextField({ field, value, onChange, id, error, disabled }: TextFieldProps): React.JSX.Element;
|
|
155
155
|
interface ProseFieldProps {
|
|
156
156
|
field: ProseRunField;
|
|
157
157
|
value: string | undefined;
|
|
@@ -165,7 +165,7 @@ interface ProseFieldProps {
|
|
|
165
165
|
* prompts don't trap the user in a tiny scrollbox - the field that carries most
|
|
166
166
|
* of a method's intent should feel roomy.
|
|
167
167
|
*/
|
|
168
|
-
declare function ProseField({ field, value, onChange, id, error, disabled }: ProseFieldProps):
|
|
168
|
+
declare function ProseField({ field, value, onChange, id, error, disabled }: ProseFieldProps): React.JSX.Element;
|
|
169
169
|
|
|
170
170
|
interface UnknownFieldProps {
|
|
171
171
|
field: UnknownRunField;
|
|
@@ -180,7 +180,7 @@ interface UnknownFieldProps {
|
|
|
180
180
|
* than block the run, we let the user hand-write the value as JSON - rare, but it
|
|
181
181
|
* keeps every method runnable instead of dead-ending on an unusual input.
|
|
182
182
|
*/
|
|
183
|
-
declare function UnknownField({ field, value, onChange, id, error, disabled }: UnknownFieldProps):
|
|
183
|
+
declare function UnknownField({ field, value, onChange, id, error, disabled }: UnknownFieldProps): React.JSX.Element;
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
186
|
* An example source as the control set takes it: the kernel's `ExampleSource`,
|
|
@@ -241,7 +241,7 @@ interface FillWithExampleProps {
|
|
|
241
241
|
* open. Without `hideWhenEmpty`, the control is always offered and an empty
|
|
242
242
|
* list says how to make one.
|
|
243
243
|
*/
|
|
244
|
-
declare function FillWithExample({ source, fields, touched, onFill, disabled, className, }: FillWithExampleProps):
|
|
244
|
+
declare function FillWithExample({ source, fields, touched, onFill, disabled, className, }: FillWithExampleProps): React.JSX.Element | null;
|
|
245
245
|
|
|
246
246
|
/**
|
|
247
247
|
* How a field's LABEL chrome, and the enum values a person reads, should read.
|
|
@@ -273,7 +273,7 @@ type FieldPresentation = 'studio' | 'app';
|
|
|
273
273
|
declare function FieldPresentationProvider({ presentation, children, }: {
|
|
274
274
|
presentation: FieldPresentation;
|
|
275
275
|
children: ReactNode;
|
|
276
|
-
}):
|
|
276
|
+
}): React.JSX.Element;
|
|
277
277
|
declare function useFieldPresentation(): FieldPresentation;
|
|
278
278
|
|
|
279
279
|
interface FieldStrings {
|
|
@@ -617,7 +617,7 @@ declare function FieldStringsProvider({ locale, strings, children, }: {
|
|
|
617
617
|
locale?: string;
|
|
618
618
|
strings?: Partial<FieldStrings>;
|
|
619
619
|
children: ReactNode;
|
|
620
|
-
}):
|
|
620
|
+
}): React.JSX.Element;
|
|
621
621
|
/** The strings the nearest provider supplies (English defaults when none does). */
|
|
622
622
|
declare function useFieldStrings(): FieldStrings;
|
|
623
623
|
|
|
@@ -888,7 +888,7 @@ interface MethodFormProps {
|
|
|
888
888
|
* disclosure folds and opens exactly as the one inside a structure does,
|
|
889
889
|
* optional structures included.
|
|
890
890
|
*/
|
|
891
|
-
declare function MethodForm({ locale, strings, presentation, framed, ...props }: MethodFormProps):
|
|
891
|
+
declare function MethodForm({ locale, strings, presentation, framed, ...props }: MethodFormProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
892
892
|
|
|
893
893
|
interface ResultFieldProps {
|
|
894
894
|
field: RunField;
|
|
@@ -909,7 +909,7 @@ interface ResultFieldProps {
|
|
|
909
909
|
* has: a file's own download button names the file by its place in the result,
|
|
910
910
|
* and the place starts here. Every nested one finds the root already there.
|
|
911
911
|
*/
|
|
912
|
-
declare function ResultField(props: ResultFieldProps):
|
|
912
|
+
declare function ResultField(props: ResultFieldProps): React.JSX.Element;
|
|
913
913
|
|
|
914
914
|
/**
|
|
915
915
|
* The `pipelex-storage://` references inside an HTML page, exchanged for URLs a
|
|
@@ -1275,7 +1275,7 @@ interface ResultEnv {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
declare function ResultEnvProvider({ resolveUrl, resolveUrls, resolveRendition, resolveShareUrl, proseImages, tableColumns, tableLayout, saveFiles, downloads, renderPdf, children, }: ResultEnv & {
|
|
1277
1277
|
children: ReactNode;
|
|
1278
|
-
}):
|
|
1278
|
+
}): React.JSX.Element;
|
|
1279
1279
|
/**
|
|
1280
1280
|
* The resolver, already applied.
|
|
1281
1281
|
*
|
|
@@ -1422,8 +1422,8 @@ interface StuffViewerProps {
|
|
|
1422
1422
|
*/
|
|
1423
1423
|
declare function JsonView({ value }: {
|
|
1424
1424
|
value: unknown;
|
|
1425
|
-
}):
|
|
1426
|
-
declare function StuffViewer({ downloads, tableLayout, ...props }: StuffViewerProps):
|
|
1425
|
+
}): React.JSX.Element;
|
|
1426
|
+
declare function StuffViewer({ downloads, tableLayout, ...props }: StuffViewerProps): React.JSX.Element;
|
|
1427
1427
|
|
|
1428
1428
|
/**
|
|
1429
1429
|
* The default delivery: the planned files, saved by this browser tab.
|
|
@@ -1498,7 +1498,7 @@ interface HtmlPreviewProps {
|
|
|
1498
1498
|
*/
|
|
1499
1499
|
fill?: boolean;
|
|
1500
1500
|
}
|
|
1501
|
-
declare function HtmlPreview({ content, maxHeight, imgSrc, fontSrc, downloadPdf, pdfFileName, bare, fill, }: HtmlPreviewProps):
|
|
1501
|
+
declare function HtmlPreview({ content, maxHeight, imgSrc, fontSrc, downloadPdf, pdfFileName, bare, fill, }: HtmlPreviewProps): React.JSX.Element;
|
|
1502
1502
|
|
|
1503
1503
|
/**
|
|
1504
1504
|
* A page's print stylesheet, applied on screen: what the PDF copy needs before
|
|
@@ -1639,7 +1639,7 @@ interface PdfDownloadButtonProps {
|
|
|
1639
1639
|
* raster; a PDF that could not be made or saved turns the control into a
|
|
1640
1640
|
* warning, described to assistive technology, until the reader tries again.
|
|
1641
1641
|
*/
|
|
1642
|
-
declare function PdfDownloadButton({ content, fileName, path, imgSrc, fontSrc, primary, className, }: PdfDownloadButtonProps):
|
|
1642
|
+
declare function PdfDownloadButton({ content, fileName, path, imgSrc, fontSrc, primary, className, }: PdfDownloadButtonProps): React.JSX.Element;
|
|
1643
1643
|
|
|
1644
1644
|
interface MarkdownProps {
|
|
1645
1645
|
text: string;
|
|
@@ -1669,7 +1669,7 @@ interface MarkdownCitation {
|
|
|
1669
1669
|
/** The source's name, shown on hover over the citation: its title, or its address. */
|
|
1670
1670
|
label: string;
|
|
1671
1671
|
}
|
|
1672
|
-
declare function Markdown({ text, className, proseImages, citations }: MarkdownProps):
|
|
1672
|
+
declare function Markdown({ text, className, proseImages, citations }: MarkdownProps): React.JSX.Element;
|
|
1673
1673
|
|
|
1674
1674
|
interface FieldShellProps {
|
|
1675
1675
|
name: string;
|
|
@@ -1690,7 +1690,7 @@ interface FieldShellProps {
|
|
|
1690
1690
|
* Every field type composes this so the form reads as one consistent column -
|
|
1691
1691
|
* the control itself is the only thing that varies.
|
|
1692
1692
|
*/
|
|
1693
|
-
declare function FieldShell({ name, title, conceptRef, category, description, required, error, htmlFor, children, className, }: FieldShellProps):
|
|
1693
|
+
declare function FieldShell({ name, title, conceptRef, category, description, required, error, htmlFor, children, className, }: FieldShellProps): React.JSX.Element;
|
|
1694
1694
|
|
|
1695
1695
|
interface ConceptPillProps {
|
|
1696
1696
|
/** The concept identifier, e.g. `native.Document`, `demo.Invoice`. */
|
|
@@ -1703,7 +1703,7 @@ interface ConceptPillProps {
|
|
|
1703
1703
|
* (never a colored chip) keeps the technical Pipelex voice without spending a
|
|
1704
1704
|
* chromatic accent - the concept *type* is information, not a status.
|
|
1705
1705
|
*/
|
|
1706
|
-
declare function ConceptPill({ conceptRef, category, className }: ConceptPillProps):
|
|
1706
|
+
declare function ConceptPill({ conceptRef, category, className }: ConceptPillProps): React.JSX.Element;
|
|
1707
1707
|
|
|
1708
1708
|
interface OptionalToggleProps {
|
|
1709
1709
|
/** How many empty optional entries are currently hidden. */
|
|
@@ -1721,7 +1721,7 @@ interface OptionalToggleProps {
|
|
|
1721
1721
|
* structure folds behind it too, and opens and closes with it: see
|
|
1722
1722
|
* `openOptionalStructures` / `closeOptionalStructures` in the core.
|
|
1723
1723
|
*/
|
|
1724
|
-
declare function OptionalToggle({ count, expanded, onToggle, noun }: OptionalToggleProps):
|
|
1724
|
+
declare function OptionalToggle({ count, expanded, onToggle, noun }: OptionalToggleProps): React.JSX.Element;
|
|
1725
1725
|
|
|
1726
1726
|
declare const fieldControlClass: string;
|
|
1727
1727
|
|
|
@@ -1773,7 +1773,7 @@ declare function FieldDomIdProvider({ prefix, children, }: {
|
|
|
1773
1773
|
*/
|
|
1774
1774
|
prefix?: string;
|
|
1775
1775
|
children: ReactNode;
|
|
1776
|
-
}):
|
|
1776
|
+
}): React.JSX.Element;
|
|
1777
1777
|
/**
|
|
1778
1778
|
* The DOM id for a field path - the ONE place a path becomes an attribute.
|
|
1779
1779
|
*
|
package/dist/react/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { BooleanField, ConceptPill, DEFAULT_FIELD_STRINGS, DateField, DocumentField, EN_FIELD_STRINGS, EnumField, FIELD_STRINGS_BY_LOCALE, FR_FIELD_STRINGS, FieldDomIdProvider, FieldPresentationProvider, FieldRenderer, FieldShell, FieldStringsProvider, FilePicker, FilePickerEntry, FillWithExample, HtmlPreview, ImageField, JsonView, ListField, Markdown, MethodForm, NumberField, ObjectField, OptionalToggle, PdfDownloadButton, ProseField, ResultEnvProvider, ResultField, SUPPORTED_LOCALES, StuffViewer, TextField, UnknownField, fieldControlClass, fieldStringsFor, renderHtmlPdf, resolveHtmlStorageUrls, saveInBrowser, useFieldDomId, useFieldPresentation, useFieldStrings, useMethodForm, useProseImages, useResolveRendition, useResolveShareUrl, useResolveUrl, useResolvedUrl } from '../chunk-
|
|
2
|
+
export { BooleanField, ConceptPill, DEFAULT_FIELD_STRINGS, DateField, DocumentField, EN_FIELD_STRINGS, EnumField, FIELD_STRINGS_BY_LOCALE, FR_FIELD_STRINGS, FieldDomIdProvider, FieldPresentationProvider, FieldRenderer, FieldShell, FieldStringsProvider, FilePicker, FilePickerEntry, FillWithExample, HtmlPreview, ImageField, JsonView, ListField, Markdown, MethodForm, NumberField, ObjectField, OptionalToggle, PdfDownloadButton, ProseField, ResultEnvProvider, ResultField, SUPPORTED_LOCALES, StuffViewer, TextField, UnknownField, fieldControlClass, fieldStringsFor, renderHtmlPdf, resolveHtmlStorageUrls, saveInBrowser, useFieldDomId, useFieldPresentation, useFieldStrings, useMethodForm, useProseImages, useResolveRendition, useResolveShareUrl, useResolveUrl, useResolvedUrl } from '../chunk-UKTYADY3.js';
|
|
3
3
|
import '../chunk-4VAO6BDE.js';
|
|
4
4
|
import '../chunk-VH5CDQDR.js';
|
|
5
5
|
import '../chunk-L23R3JNQ.js';
|