@pipelex/mthds-form 0.28.0 → 0.29.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-GHVVULHY.js +42 -0
- package/dist/chunk-GHVVULHY.js.map +1 -0
- package/dist/{chunk-4DPYGNJ3.js → chunk-IBBAJXIO.js} +3 -3
- package/dist/{chunk-4DPYGNJ3.js.map → chunk-IBBAJXIO.js.map} +1 -1
- package/dist/{chunk-II5TOORN.js → chunk-RHX7LQRL.js} +5 -36
- package/dist/chunk-RHX7LQRL.js.map +1 -0
- package/dist/core/gate.js +2 -2
- package/dist/core/humanize.d.ts +77 -0
- package/dist/core/humanize.js +3 -0
- package/dist/core/humanize.js.map +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +3 -2
- package/dist/generative/index.js +8 -4
- package/dist/generative/index.js.map +1 -1
- package/dist/react/index.d.ts +9 -14
- package/dist/react/index.js +2 -1
- package/package.json +1 -1
- package/dist/chunk-II5TOORN.js.map +0 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { PipeInputFormDescriptor, PipeIOContract } from 'mthds/protocol';
|
|
|
7
7
|
import { Readiness } from '../core/readiness.js';
|
|
8
8
|
import { ExampleSource, FormExample } from '../core/sources.js';
|
|
9
9
|
export { ExampleSourcePage, ExampleSourceQuery, FileSource, FileSourcePage, FileSourceQuery, FileSourceScope, SourceFile } from '../core/sources.js';
|
|
10
|
+
export { humanizeFieldName } from '../core/humanize.js';
|
|
10
11
|
import { SaveFiles, SaveFile, SaveResult } from '../core/save-plan.js';
|
|
11
12
|
import { StuffFileKind } from '../core/stuff-files.js';
|
|
12
13
|
import { HtmlContentView } from '../core/native-content.js';
|
|
@@ -250,17 +251,19 @@ declare function FillWithExample({ source, fields, touched, onFill, disabled, cl
|
|
|
250
251
|
* - `app`: the field's name as a human question in sans, no concept pill. Inside
|
|
251
252
|
* a method app, `full_name` and `native.Text` are implementation detail; the
|
|
252
253
|
* person filling the form has never seen the method's source. An enum value
|
|
253
|
-
* follows the label and reads as words
|
|
254
|
+
* follows the label and reads as words, worded by the kernel's rule
|
|
255
|
+
* (`enumValueLabeler` in the core entry).
|
|
254
256
|
*
|
|
255
257
|
* An enum value is the only value the two presentations show differently. A
|
|
256
258
|
* number, a text, a date and every other value render the same in both.
|
|
257
259
|
*
|
|
258
260
|
* Deliberately a context rather than a prop or a `FieldEnv` flag: only the
|
|
259
261
|
* components that own label chrome or an enum value's wording read it -
|
|
260
|
-
* `FieldShell`, `ObjectField`, `BooleanField`, `ListField`, `EnumField
|
|
261
|
-
* result view
|
|
262
|
-
* `
|
|
263
|
-
*
|
|
262
|
+
* `FieldShell`, `ObjectField`, `BooleanField`, `ListField`, `EnumField`, the
|
|
263
|
+
* result view and the generative layer's choice controls (`Select`, `Radio`,
|
|
264
|
+
* `Segmented`) - plus the file control, whose card hides a storage reference
|
|
265
|
+
* in `app`, and threading a prop would have meant editing every field control
|
|
266
|
+
* and both recursive containers.
|
|
264
267
|
*/
|
|
265
268
|
type FieldPresentation = 'studio' | 'app';
|
|
266
269
|
declare function FieldPresentationProvider({ presentation, children, }: {
|
|
@@ -268,14 +271,6 @@ declare function FieldPresentationProvider({ presentation, children, }: {
|
|
|
268
271
|
children: ReactNode;
|
|
269
272
|
}): react.JSX.Element;
|
|
270
273
|
declare function useFieldPresentation(): FieldPresentation;
|
|
271
|
-
/**
|
|
272
|
-
* `full_name` → `Full name`. Only the first word is capitalised: these are
|
|
273
|
-
* labels, not titles, and Title Case on every word reads as a form from 2009.
|
|
274
|
-
* Takes IDENTIFIERS only - snake_case or kebab-case names, where a separator
|
|
275
|
-
* is structure. An authored `title` never goes through here: it is already
|
|
276
|
-
* human-facing, and its hyphens are spelling (`E-mail address`), not structure.
|
|
277
|
-
*/
|
|
278
|
-
declare function humanizeFieldName(name: string): string;
|
|
279
274
|
|
|
280
275
|
interface FieldStrings {
|
|
281
276
|
/** Badge on an optional field's header row. */
|
|
@@ -1771,4 +1766,4 @@ declare function FieldDomIdProvider({ prefix, children, }: {
|
|
|
1771
1766
|
*/
|
|
1772
1767
|
declare function useFieldDomId(path: string): string;
|
|
1773
1768
|
|
|
1774
|
-
export { BooleanField, ConceptPill, DEFAULT_FIELD_STRINGS, DateField, type DownloadDisplay, EN_FIELD_STRINGS, EnumField, type ExamplePickerSource, ExampleSource, FIELD_STRINGS_BY_LOCALE, FR_FIELD_STRINGS, FieldDomIdProvider, FieldEnv, type FieldPresentation, FieldPresentationProvider, FieldShell, type FieldStrings, FieldStringsProvider, FilePickerSource, FillWithExample, type FillWithExampleProps, FormExample, type HtmlPdf, type HtmlPdfOptions, HtmlPreview, type HtmlPreviewProps, JsonView, ListField, Markdown, type MarkdownCitation, type MarkdownProps, type MarkupResolvers, MethodForm, type MethodFormController, type MethodFormProps, type MethodFormState, type MethodFormUploadContext, type MethodFormValues, NumberField, ObjectField, OptionalToggle, PdfDownloadButton, type PdfDownloadButtonProps, type PdfPage, ProseField, type ProseImages, type RenderPdf, type RenditionRequest, type ResolveRendition, type ResolveShareUrl, type ResolveUrl, type ResolveUrls, ResultEnvProvider, ResultField, type ResultFieldProps, RowMove, SUPPORTED_LOCALES, StuffViewer, type StuffViewerProps, type StuffViewerView, type TableLayout, TextField, UnknownField, UploadedFile, type UseMethodFormOptions, fieldControlClass, fieldStringsFor,
|
|
1769
|
+
export { BooleanField, ConceptPill, DEFAULT_FIELD_STRINGS, DateField, type DownloadDisplay, EN_FIELD_STRINGS, EnumField, type ExamplePickerSource, ExampleSource, FIELD_STRINGS_BY_LOCALE, FR_FIELD_STRINGS, FieldDomIdProvider, FieldEnv, type FieldPresentation, FieldPresentationProvider, FieldShell, type FieldStrings, FieldStringsProvider, FilePickerSource, FillWithExample, type FillWithExampleProps, FormExample, type HtmlPdf, type HtmlPdfOptions, HtmlPreview, type HtmlPreviewProps, JsonView, ListField, Markdown, type MarkdownCitation, type MarkdownProps, type MarkupResolvers, MethodForm, type MethodFormController, type MethodFormProps, type MethodFormState, type MethodFormUploadContext, type MethodFormValues, NumberField, ObjectField, OptionalToggle, PdfDownloadButton, type PdfDownloadButtonProps, type PdfPage, ProseField, type ProseImages, type RenderPdf, type RenditionRequest, type ResolveRendition, type ResolveShareUrl, type ResolveUrl, type ResolveUrls, ResultEnvProvider, ResultField, type ResultFieldProps, RowMove, SUPPORTED_LOCALES, StuffViewer, type StuffViewerProps, type StuffViewerView, type TableLayout, TextField, UnknownField, UploadedFile, type UseMethodFormOptions, fieldControlClass, fieldStringsFor, renderHtmlPdf, resolveHtmlStorageUrls, saveInBrowser, useFieldDomId, useFieldPresentation, useFieldStrings, useMethodForm, useProseImages, useResolveRendition, useResolveShareUrl, useResolveUrl, useResolvedUrl };
|
package/dist/react/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
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,
|
|
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-RHX7LQRL.js';
|
|
3
3
|
import '../chunk-4VAO6BDE.js';
|
|
4
4
|
import '../chunk-VH5CDQDR.js';
|
|
5
5
|
import '../chunk-L23R3JNQ.js';
|
|
6
6
|
import '../chunk-56WECFBD.js';
|
|
7
7
|
import '../chunk-ZX52CQJ4.js';
|
|
8
|
+
export { humanizeFieldName } from '../chunk-GHVVULHY.js';
|
|
8
9
|
import '../chunk-QQK6Y55E.js';
|
|
9
10
|
import '../chunk-ZB4RYUKV.js';
|
|
10
11
|
import '../chunk-FABY3DEY.js';
|