@pipelex/mthds-form 0.12.0 → 0.13.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 +9 -0
- package/dist/{chunk-V7T4DM63.js → chunk-7KQXGG6J.js} +6 -4
- package/dist/chunk-7KQXGG6J.js.map +1 -0
- package/dist/{chunk-4KX6YTLW.js → chunk-D2EQVWGN.js} +113 -21
- package/dist/chunk-D2EQVWGN.js.map +1 -0
- package/dist/{chunk-4KGQ65TQ.js → chunk-G6SFMTL4.js} +3 -3
- package/dist/{chunk-4KGQ65TQ.js.map → chunk-G6SFMTL4.js.map} +1 -1
- package/dist/{chunk-IUWLOSAM.js → chunk-IR3OFSGD.js} +3 -3
- package/dist/{chunk-IUWLOSAM.js.map → chunk-IR3OFSGD.js.map} +1 -1
- package/dist/{chunk-PM55AHRO.js → chunk-MJQ7CXUB.js} +6 -3
- package/dist/chunk-MJQ7CXUB.js.map +1 -0
- package/dist/{chunk-VS5JMFUV.js → chunk-RRTI7AIR.js} +2 -2
- package/dist/chunk-RRTI7AIR.js.map +1 -0
- package/dist/core/gate.js +2 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +5 -5
- package/dist/core/readiness.d.ts +9 -1
- package/dist/core/readiness.js +1 -1
- package/dist/core/save-plan.d.ts +13 -4
- package/dist/core/save-plan.js +2 -2
- package/dist/core/stuff-files.d.ts +7 -1
- package/dist/core/stuff-files.js +1 -1
- package/dist/core/values.js +2 -2
- package/dist/generative/index.js +4 -4
- package/dist/generative/index.js.map +1 -1
- package/dist/react/index.d.ts +58 -7
- package/dist/react/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-4KX6YTLW.js.map +0 -1
- package/dist/chunk-PM55AHRO.js.map +0 -1
- package/dist/chunk-V7T4DM63.js.map +0 -1
- package/dist/chunk-VS5JMFUV.js.map +0 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -441,9 +441,13 @@ interface StuffViewerProps {
|
|
|
441
441
|
/** Which view opens first. Rendered, unless a host has a reason. */
|
|
442
442
|
defaultView?: StuffViewerView;
|
|
443
443
|
/**
|
|
444
|
-
* Names the saved files
|
|
445
|
-
*
|
|
446
|
-
*
|
|
444
|
+
* Names the saved files, whichever control saved them: the base name names
|
|
445
|
+
* the whole stuff, so the JSON copy is `<baseName>.json`, a file inside the
|
|
446
|
+
* stuff that carries no name of its own is `<baseName>-<place>`, and a stuff
|
|
447
|
+
* that is one file saves as `<baseName>.<ext>`. Defaults to the field's name,
|
|
448
|
+
* which is what the header shows. Give each stuff a distinct base name, as
|
|
449
|
+
* the default already is: two panels handed the same one save their unnamed
|
|
450
|
+
* files under the same names.
|
|
447
451
|
*/
|
|
448
452
|
downloadBaseName?: string;
|
|
449
453
|
/**
|
|
@@ -707,15 +711,62 @@ interface FieldStrings {
|
|
|
707
711
|
optionalFieldsCount: (count: number) => string;
|
|
708
712
|
optionalInputsCount: (count: number) => string;
|
|
709
713
|
}
|
|
714
|
+
/** The English strings, which every control falls back to. Kept under this name for existing hosts. */
|
|
710
715
|
declare const DEFAULT_FIELD_STRINGS: FieldStrings;
|
|
711
|
-
/**
|
|
712
|
-
|
|
713
|
-
|
|
716
|
+
/**
|
|
717
|
+
* Set the strings every control below speaks. `locale` picks a language pack by its code (`fr`,
|
|
718
|
+
* `fr-FR`, `en-GB`…; an unknown one falls back to English), and `strings` overrides single keys
|
|
719
|
+
* on top of it. Both are optional: with neither, the controls speak English.
|
|
720
|
+
*/
|
|
721
|
+
declare function FieldStringsProvider({ locale, strings, children, }: {
|
|
722
|
+
locale?: string;
|
|
723
|
+
strings?: Partial<FieldStrings>;
|
|
714
724
|
children: ReactNode;
|
|
715
725
|
}): react.JSX.Element;
|
|
716
726
|
/** The strings the nearest provider supplies (English defaults when none does). */
|
|
717
727
|
declare function useFieldStrings(): FieldStrings;
|
|
718
728
|
|
|
729
|
+
/**
|
|
730
|
+
* The controls' strings in English: the package's defaults, and the pack every unknown or missing
|
|
731
|
+
* locale falls back to (see `fieldStringsFor` in `./index.ts`).
|
|
732
|
+
*/
|
|
733
|
+
|
|
734
|
+
declare const EN_FIELD_STRINGS: FieldStrings;
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* The controls' strings in French: a complete `FieldStrings`, for a host that
|
|
738
|
+
* serves French and has no message catalogue of its own to bridge. Mounted as
|
|
739
|
+
* `<FieldStringsProvider strings={FR_FIELD_STRINGS}>`, or spread under a host's
|
|
740
|
+
* own overrides (`{ ...FR_FIELD_STRINGS, addItem: 'Ajouter une ligne' }`).
|
|
741
|
+
*
|
|
742
|
+
* The count-bearing messages apply French plural rules, where zero and one both
|
|
743
|
+
* take the singular (`0 élément`, `1 élément`, `2 éléments`), and a size is
|
|
744
|
+
* written the French way: `ko` and `Mo`, a decimal comma, a space before them.
|
|
745
|
+
* Both come from `Intl` (`PluralRules`, `NumberFormat`), not hand-written rules.
|
|
746
|
+
* A colon takes the no-break space French typography puts before it, so it
|
|
747
|
+
* never wraps onto a line of its own.
|
|
748
|
+
*
|
|
749
|
+
* Typed as `FieldStrings` rather than `Partial`, so a key added to the contract
|
|
750
|
+
* fails the build here until it is translated.
|
|
751
|
+
*/
|
|
752
|
+
|
|
753
|
+
declare const FR_FIELD_STRINGS: FieldStrings;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* The language packs, by locale code, and the switch that picks one. A new language is one file in
|
|
757
|
+
* this folder, typed as a whole `FieldStrings`, added to `FIELD_STRINGS_BY_LOCALE` below.
|
|
758
|
+
*/
|
|
759
|
+
|
|
760
|
+
/** Every language pack the package ships, keyed by its primary language subtag. */
|
|
761
|
+
declare const FIELD_STRINGS_BY_LOCALE: Readonly<Record<string, FieldStrings>>;
|
|
762
|
+
/** The locale codes a pack exists for. */
|
|
763
|
+
declare const SUPPORTED_LOCALES: string[];
|
|
764
|
+
/**
|
|
765
|
+
* The pack for a locale code, read as BCP 47: its primary language subtag decides, so `fr`,
|
|
766
|
+
* `fr-FR`, `fr_CA` and `FR` all give French. A missing or unknown locale gives English.
|
|
767
|
+
*/
|
|
768
|
+
declare function fieldStringsFor(locale?: string | null): FieldStrings;
|
|
769
|
+
|
|
719
770
|
declare function FieldDomIdProvider({ prefix, children, }: {
|
|
720
771
|
/**
|
|
721
772
|
* Omit to mint one from `useId`; `''` writes the path unprefixed. An explicit
|
|
@@ -773,4 +824,4 @@ declare function useFieldPresentation(): FieldPresentation;
|
|
|
773
824
|
*/
|
|
774
825
|
declare function humanizeFieldName(name: string): string;
|
|
775
826
|
|
|
776
|
-
export { BooleanField, ConceptPill, DEFAULT_FIELD_STRINGS, DateField, DocumentField, type DownloadDisplay, EnumField, FieldDomIdProvider, FieldEnv, type FieldPresentation, FieldPresentationProvider, FieldShell, type FieldStrings, FieldStringsProvider, type FileValue, HtmlPreview, type HtmlPreviewProps, ImageField, JsonView, ListField, Markdown, type MarkdownProps, NumberField, ObjectField, OptionalToggle, ProseField, type ProseImages, type ResolveShareUrl, type ResolveUrl, ResultEnvProvider, ResultField, type ResultFieldProps, StuffViewer, type StuffViewerProps, type StuffViewerView, TextField, UnknownField, fieldControlClass, humanizeFieldName, saveInBrowser, useFieldDomId, useFieldPresentation, useFieldStrings, useProseImages, useResolveShareUrl, useResolveUrl, useResolvedUrl };
|
|
827
|
+
export { BooleanField, ConceptPill, DEFAULT_FIELD_STRINGS, DateField, DocumentField, type DownloadDisplay, EN_FIELD_STRINGS, EnumField, FIELD_STRINGS_BY_LOCALE, FR_FIELD_STRINGS, FieldDomIdProvider, FieldEnv, type FieldPresentation, FieldPresentationProvider, FieldShell, type FieldStrings, FieldStringsProvider, type FileValue, HtmlPreview, type HtmlPreviewProps, ImageField, JsonView, ListField, Markdown, type MarkdownProps, NumberField, ObjectField, OptionalToggle, ProseField, type ProseImages, type ResolveShareUrl, type ResolveUrl, ResultEnvProvider, ResultField, type ResultFieldProps, SUPPORTED_LOCALES, StuffViewer, type StuffViewerProps, type StuffViewerView, TextField, UnknownField, fieldControlClass, fieldStringsFor, humanizeFieldName, saveInBrowser, useFieldDomId, useFieldPresentation, useFieldStrings, useProseImages, useResolveShareUrl, useResolveUrl, useResolvedUrl };
|
package/dist/react/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { BooleanField, ConceptPill, DEFAULT_FIELD_STRINGS, DateField, DocumentField, EnumField, FieldDomIdProvider, FieldPresentationProvider, FieldRenderer, FieldShell, FieldStringsProvider, HtmlPreview, ImageField, JsonView, ListField, Markdown, NumberField, ObjectField, OptionalToggle, ProseField, ResultEnvProvider, ResultField, StuffViewer, TextField, UnknownField, fieldControlClass, humanizeFieldName, saveInBrowser, useFieldDomId, useFieldPresentation, useFieldStrings, useProseImages, useResolveShareUrl, useResolveUrl, useResolvedUrl } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../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, HtmlPreview, ImageField, JsonView, ListField, Markdown, NumberField, ObjectField, OptionalToggle, ProseField, ResultEnvProvider, ResultField, SUPPORTED_LOCALES, StuffViewer, TextField, UnknownField, fieldControlClass, fieldStringsFor, humanizeFieldName, saveInBrowser, useFieldDomId, useFieldPresentation, useFieldStrings, useProseImages, useResolveShareUrl, useResolveUrl, useResolvedUrl } from '../chunk-D2EQVWGN.js';
|
|
3
|
+
import '../chunk-7KQXGG6J.js';
|
|
4
|
+
import '../chunk-RRTI7AIR.js';
|
|
5
5
|
import '../chunk-CM4KVG53.js';
|
|
6
6
|
import '../chunk-FABY3DEY.js';
|
|
7
7
|
import '../chunk-XCO6GTEC.js';
|
|
8
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-MJQ7CXUB.js';
|
|
9
9
|
import '../chunk-GKV77RAS.js';
|
|
10
10
|
import '../chunk-V3OV2XQT.js';
|
|
11
11
|
//# sourceMappingURL=index.js.map
|