@panneau/fields 5.0.0-alpha.7 → 5.0.0-alpha.8

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.
Files changed (62) hide show
  1. package/dist/boolean/BooleanField.d.ts +1 -1
  2. package/dist/boolean/index.d.ts +1 -1
  3. package/dist/color/ColorField.d.ts +2 -2
  4. package/dist/color/index.d.ts +1 -1
  5. package/dist/date/DateField.d.ts +1 -1
  6. package/dist/date/index.d.ts +1 -1
  7. package/dist/datetime/DateTimeField.d.ts +1 -1
  8. package/dist/datetime/index.d.ts +1 -1
  9. package/dist/duration/DurationField.d.ts +1 -1
  10. package/dist/duration/index.d.ts +1 -1
  11. package/dist/email/EmailField.d.ts +2 -2
  12. package/dist/email/index.d.ts +1 -1
  13. package/dist/embed/EmbedField.d.ts +2 -2
  14. package/dist/embed/index.d.ts +2 -2
  15. package/dist/file/FileField.d.ts +2 -2
  16. package/dist/file/index.d.ts +2 -2
  17. package/dist/group/GroupField.d.ts +1 -1
  18. package/dist/group/index.d.ts +1 -1
  19. package/dist/index.d.ts +18 -18
  20. package/dist/json/JsonField.d.ts +1 -1
  21. package/dist/json/index.d.ts +1 -1
  22. package/dist/localized/LocalizedField.d.ts +1 -1
  23. package/dist/localized/index.d.ts +1 -1
  24. package/dist/location/LocationField.d.ts +3 -3
  25. package/dist/location/LocationMap.d.ts +1 -1
  26. package/dist/location/index.d.ts +4 -4
  27. package/dist/location/nominatim.d.ts +1 -1
  28. package/dist/missing/MissingField.d.ts +1 -1
  29. package/dist/number/NumberField.d.ts +1 -1
  30. package/dist/number/index.d.ts +1 -1
  31. package/dist/range/RangeField.d.ts +1 -1
  32. package/dist/range/index.d.ts +1 -1
  33. package/dist/relation/RelationField.d.ts +2 -2
  34. package/dist/relation/index.d.ts +2 -2
  35. package/dist/repeater/RepeaterField.d.ts +1 -1
  36. package/dist/repeater/index.d.ts +1 -1
  37. package/dist/select/SelectField.d.ts +1 -1
  38. package/dist/select/index.d.ts +1 -1
  39. package/dist/shared/DefinitionField.d.ts +1 -1
  40. package/dist/shared/builtIn.d.ts +1 -1
  41. package/dist/shared/context.d.ts +6 -6
  42. package/dist/shared/entry.d.ts +1 -1
  43. package/dist/slug/SlugField.d.ts +2 -2
  44. package/dist/slug/index.d.ts +1 -1
  45. package/dist/tags/TagsField.d.ts +1 -1
  46. package/dist/tags/index.d.ts +1 -1
  47. package/dist/tel/TelField.d.ts +2 -2
  48. package/dist/tel/index.d.ts +1 -1
  49. package/dist/text/TextField.d.ts +1 -1
  50. package/dist/text/index.d.ts +1 -1
  51. package/dist/textarea/TextAreaField.d.ts +1 -1
  52. package/dist/textarea/index.d.ts +1 -1
  53. package/dist/time/TimeField.d.ts +1 -1
  54. package/dist/time/index.d.ts +1 -1
  55. package/dist/upload/UploadList.d.ts +1 -1
  56. package/dist/upload/useRejectionMessage.d.ts +1 -1
  57. package/dist/upload/useUploads.d.ts +1 -1
  58. package/dist/uppy/index.d.ts +2 -2
  59. package/dist/uppy/uploader.d.ts +1 -1
  60. package/dist/url/UrlField.d.ts +2 -2
  61. package/dist/url/index.d.ts +1 -1
  62. package/package.json +6 -6
@@ -1,4 +1,4 @@
1
- import type { FieldEntryProps, FieldProps } from '../shared/types';
1
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
2
2
  export interface BooleanFieldProps extends Omit<FieldProps<boolean>, 'labelClassName'> {
3
3
  /** `checkbox` (default) for a choice saved with the form, `switch` for an on and off setting. */
4
4
  widget?: 'checkbox' | 'switch';
@@ -1,2 +1,2 @@
1
- export { BooleanField, BooleanFieldEntry, type BooleanFieldProps } from './BooleanField';
1
+ export { BooleanField, BooleanFieldEntry, type BooleanFieldProps } from './BooleanField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- import type { FieldEntryProps } from '../shared/types';
2
- import { type TextFieldProps } from '../text/TextField';
1
+ import type { FieldEntryProps } from '../shared/types.js';
2
+ import { type TextFieldProps } from '../text/TextField.js';
3
3
  export type ColorFieldProps = Omit<TextFieldProps, 'type' | 'prefix' | 'maxLength'>;
4
4
  /**
5
5
  * Normalizes a hexadecimal color: `#` prefix, lowercase, and 3 digits expanded to 6. Returns the
@@ -1,2 +1,2 @@
1
- export { ColorField, ColorFieldEntry, type ColorFieldProps, normalizeColor } from './ColorField';
1
+ export { ColorField, ColorFieldEntry, type ColorFieldProps, normalizeColor } from './ColorField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { FieldEntryProps, FieldProps } from '../shared/types';
1
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
2
2
  export interface DateFieldProps extends FieldProps<string> {
3
3
  /** Earliest date (`2026-01-01`). */
4
4
  min?: string;
@@ -1,2 +1,2 @@
1
- export { DateField, DateFieldEntry, type DateFieldProps } from './DateField';
1
+ export { DateField, DateFieldEntry, type DateFieldProps } from './DateField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { FieldEntryProps, FieldProps } from '../shared/types';
1
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
2
2
  export interface DateTimeFieldProps extends FieldProps<string> {
3
3
  /**
4
4
  * Time zone the date and time are shown and typed in, for values with an offset. Defaults to
@@ -1,2 +1,2 @@
1
- export { DateTimeField, DateTimeFieldEntry, type DateTimeFieldProps } from './DateTimeField';
1
+ export { DateTimeField, DateTimeFieldEntry, type DateTimeFieldProps } from './DateTimeField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { FieldEntryProps, FieldProps } from '../shared/types';
1
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
2
2
  export interface DurationFieldProps extends FieldProps<number> {
3
3
  /** `seconds` (the default) shows hours, minutes and seconds; `minutes` hides the seconds. */
4
4
  precision?: 'seconds' | 'minutes';
@@ -1,2 +1,2 @@
1
- export { DurationField, DurationFieldEntry, type DurationFieldProps, formatDuration, splitDuration, } from './DurationField';
1
+ export { DurationField, DurationFieldEntry, type DurationFieldProps, formatDuration, splitDuration, } from './DurationField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- import type { FieldEntryProps } from '../shared/types';
2
- import { type TextFieldProps } from '../text/TextField';
1
+ import type { FieldEntryProps } from '../shared/types.js';
2
+ import { type TextFieldProps } from '../text/TextField.js';
3
3
  export type EmailFieldProps = Omit<TextFieldProps, 'type' | 'inputMode'>;
4
4
  /** An email address, with the email keyboard on phones. Spaces around it are removed on blur. */
5
5
  export declare function EmailField({ value, onChange, onBlur, ...props }: EmailFieldProps): import("react").JSX.Element;
@@ -1,2 +1,2 @@
1
- export { EmailField, EmailFieldEntry, type EmailFieldProps } from './EmailField';
1
+ export { EmailField, EmailFieldEntry, type EmailFieldProps } from './EmailField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { EmbedValue } from '@panneau/protocol';
2
- import type { EmbedSource } from '../shared/embed';
3
- import type { FieldEntryProps, FieldProps } from '../shared/types';
2
+ import type { EmbedSource } from '../shared/embed.js';
3
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
4
4
  export type { EmbedValue };
5
5
  export interface EmbedFieldProps extends FieldProps<EmbedValue> {
6
6
  placeholder?: string;
@@ -1,3 +1,3 @@
1
- export { EmbedField, EmbedFieldEntry, type EmbedFieldProps, type EmbedValue, isEmbed, } from './EmbedField';
2
- export { type EmbedAdapter, type EmbedSource, createEmbedSource } from '../shared/embed';
1
+ export { EmbedField, EmbedFieldEntry, type EmbedFieldProps, type EmbedValue, isEmbed, } from './EmbedField.js';
2
+ export { type EmbedAdapter, type EmbedSource, createEmbedSource } from '../shared/embed.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { StoredFile } from '@panneau/protocol';
2
- import type { FieldEntryProps, FieldProps } from '../shared/types';
3
- import type { UploadSource, UploadedFile } from '../upload/types';
2
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
3
+ import type { UploadSource, UploadedFile } from '../upload/types.js';
4
4
  /**
5
5
  * A file of a `file` value: a stored file, as items give it; an upload, once the browser sent the
6
6
  * file to storage; or the file itself, sent in a multipart request without direct uploads.
@@ -1,3 +1,3 @@
1
- export { type FileFieldBaseProps, FileField, FileFieldEntry, type FileFieldProps, type FileValue, type MultipleFileFieldProps, type SingleFileFieldProps, isFileValue, toFiles, } from './FileField';
2
- export type { UploadItem, UploadItemStatus, UploadSource, UploadedFile, Uploader, } from '../upload/types';
1
+ export { type FileFieldBaseProps, FileField, FileFieldEntry, type FileFieldProps, type FileValue, type MultipleFileFieldProps, type SingleFileFieldProps, isFileValue, toFiles, } from './FileField.js';
2
+ export type { UploadItem, UploadItemStatus, UploadSource, UploadedFile, Uploader, } from '../upload/types.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { Field } from '@panneau/protocol';
2
- import type { FieldEntryProps, FieldProps } from '../shared/types';
2
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
3
3
  export type GroupValue = Record<string, unknown>;
4
4
  export interface GroupFieldProps extends FieldProps<GroupValue> {
5
5
  /** The nested fields, rendered with the entries of the fields context. */
@@ -1,2 +1,2 @@
1
- export { GroupField, GroupFieldEntry, type GroupFieldProps, type GroupValue } from './GroupField';
1
+ export { GroupField, GroupFieldEntry, type GroupFieldProps, type GroupValue } from './GroupField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,19 +1,19 @@
1
- export { DefinitionField, NestedField, type NestedFieldProps } from './shared/DefinitionField';
2
- export { builtInFields, fieldsPlugin } from './shared/builtIn';
3
- export { type BoundFieldProps, type FieldBinding, type FieldBindingProps, FieldsProvider, type FieldsContextValue, type FieldsProviderProps, getParentPath, useFieldsContext, } from './shared/context';
4
- export { findRule, getAccept, getFieldProps, getMaxSize, getRuleNumber, isRequired, } from './shared/entry';
5
- export { type RelationListAdapter, type RelationReference, type RelationSource, type RelationSourceOptions, createRelationSource, toReferences, useRelationReferences, } from './shared/relation';
6
- export { type FieldCheckAdapter, type FieldCheckSource, createFieldCheckSource, } from './shared/check';
7
- export { type EmbedAdapter, type EmbedSource, createEmbedSource } from './shared/embed';
8
- export type { GeocodingResult, GeocodingSource, MapTiles, MapsConfig } from './location/types';
9
- export { type NominatimSourceOptions, createNominatimSource } from './location/nominatim';
10
- export type { FieldEntry, FieldEntryProps, FieldProps } from './shared/types';
11
- export { MissingFieldEntry } from './missing/MissingField';
12
- export { type FileFieldBaseProps, FileField, FileFieldEntry, type FileFieldProps, type FileValue, type MultipleFileFieldProps, type SingleFileFieldProps, isFileValue, toFiles, } from './file/FileField';
13
- export { FilePicker, type FilePickerProps } from './upload/FilePicker';
14
- export { UploadList, type UploadListProps } from './upload/UploadList';
15
- export { formatSize, matchesMime } from './upload/files';
16
- export { type UploadItem, type UploadItemStatus, type UploadRejection, type UploadSource, type UploadedFile, type Uploader, } from './upload/types';
17
- export { useRejectionMessage } from './upload/useRejectionMessage';
18
- export { type UseUploadsOptions, type UseUploadsResult, useUploads } from './upload/useUploads';
1
+ export { DefinitionField, NestedField, type NestedFieldProps } from './shared/DefinitionField.js';
2
+ export { builtInFields, fieldsPlugin } from './shared/builtIn.js';
3
+ export { type BoundFieldProps, type FieldBinding, type FieldBindingProps, FieldsProvider, type FieldsContextValue, type FieldsProviderProps, getParentPath, useFieldsContext, } from './shared/context.js';
4
+ export { findRule, getAccept, getFieldProps, getMaxSize, getRuleNumber, isRequired, } from './shared/entry.js';
5
+ export { type RelationListAdapter, type RelationReference, type RelationSource, type RelationSourceOptions, createRelationSource, toReferences, useRelationReferences, } from './shared/relation.js';
6
+ export { type FieldCheckAdapter, type FieldCheckSource, createFieldCheckSource, } from './shared/check.js';
7
+ export { type EmbedAdapter, type EmbedSource, createEmbedSource } from './shared/embed.js';
8
+ export type { GeocodingResult, GeocodingSource, MapTiles, MapsConfig } from './location/types.js';
9
+ export { type NominatimSourceOptions, createNominatimSource } from './location/nominatim.js';
10
+ export type { FieldEntry, FieldEntryProps, FieldProps } from './shared/types.js';
11
+ export { MissingFieldEntry } from './missing/MissingField.js';
12
+ export { type FileFieldBaseProps, FileField, FileFieldEntry, type FileFieldProps, type FileValue, type MultipleFileFieldProps, type SingleFileFieldProps, isFileValue, toFiles, } from './file/FileField.js';
13
+ export { FilePicker, type FilePickerProps } from './upload/FilePicker.js';
14
+ export { UploadList, type UploadListProps } from './upload/UploadList.js';
15
+ export { formatSize, matchesMime } from './upload/files.js';
16
+ export { type UploadItem, type UploadItemStatus, type UploadRejection, type UploadSource, type UploadedFile, type Uploader, } from './upload/types.js';
17
+ export { useRejectionMessage } from './upload/useRejectionMessage.js';
18
+ export { type UseUploadsOptions, type UseUploadsResult, useUploads } from './upload/useUploads.js';
19
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { FieldEntryProps, FieldProps } from '../shared/types';
1
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
2
2
  /** The value of a `json` field: an object or an array, or the text while it doesn't parse. */
3
3
  export type JsonValue = Record<string, unknown> | unknown[] | string;
4
4
  export interface JsonFieldProps extends FieldProps<JsonValue> {
@@ -1,2 +1,2 @@
1
- export { JsonField, JsonFieldEntry, type JsonFieldProps, type JsonValue, parseJson, } from './JsonField';
1
+ export { JsonField, JsonFieldEntry, type JsonFieldProps, type JsonValue, parseJson, } from './JsonField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { FieldEntryProps, FieldProps } from '../shared/types';
2
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
3
3
  /** A localized value: a value per locale (`{ fr: 'Été', en: 'Summer' }`). */
4
4
  export type LocalizedValue<V> = Partial<Record<string, V | null>>;
5
5
  /** What `LocalizedField` gives the input of each locale. */
@@ -1,2 +1,2 @@
1
- export { LocalizedField, LocalizedFieldEntry, type LocalizedFieldProps, type LocalizedInputProps, type LocalizedValue, useLocaleName, } from './LocalizedField';
1
+ export { LocalizedField, LocalizedFieldEntry, type LocalizedFieldProps, type LocalizedInputProps, type LocalizedValue, useLocaleName, } from './LocalizedField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import type { LocationValue } from '@panneau/protocol';
2
- import type { FieldEntryProps, FieldProps } from '../shared/types';
3
- import { type Point } from './LocationMap';
4
- import type { GeocodingSource, MapTiles } from './types';
2
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
3
+ import { type Point } from './LocationMap.js';
4
+ import type { GeocodingSource, MapTiles } from './types.js';
5
5
  export type { LocationValue };
6
6
  /** OpenStreetMap's standard tiles: fine for an admin panel, with their credit. */
7
7
  export declare const OPEN_STREET_MAP_TILES: MapTiles;
@@ -1,4 +1,4 @@
1
- import type { MapTiles } from './types';
1
+ import type { MapTiles } from './types.js';
2
2
  export interface Point {
3
3
  lat: number;
4
4
  lng: number;
@@ -1,5 +1,5 @@
1
- export { LocationField, LocationFieldEntry, type LocationFieldProps, type LocationValue, OPEN_STREET_MAP_TILES, isLocation, } from './LocationField';
2
- export { LocationMap, type LocationMapProps, type Point } from './LocationMap';
3
- export { createNominatimSource, type NominatimSourceOptions } from './nominatim';
4
- export type { GeocodingResult, GeocodingSource, MapTiles, MapsConfig } from './types';
1
+ export { LocationField, LocationFieldEntry, type LocationFieldProps, type LocationValue, OPEN_STREET_MAP_TILES, isLocation, } from './LocationField.js';
2
+ export { LocationMap, type LocationMapProps, type Point } from './LocationMap.js';
3
+ export { createNominatimSource, type NominatimSourceOptions } from './nominatim.js';
4
+ export type { GeocodingResult, GeocodingSource, MapTiles, MapsConfig } from './types.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { GeocodingSource } from './types';
1
+ import type { GeocodingSource } from './types.js';
2
2
  export interface NominatimSourceOptions {
3
3
  /** The Nominatim server. Defaults to OpenStreetMap's, whose policy allows one request a second. */
4
4
  endpoint?: string;
@@ -1,4 +1,4 @@
1
- import type { FieldEntryProps } from '../shared/types';
1
+ import type { FieldEntryProps } from '../shared/types.js';
2
2
  /**
3
3
  * The slot of a field type that no plugin provides, such as `richtext` and `media` without
4
4
  * `@panneau/editor` and `@panneau/media`: it keeps the field's place in the form and names the
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { FieldEntryProps, FieldProps } from '../shared/types';
2
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
3
3
  export interface NumberFieldProps extends FieldProps<number> {
4
4
  placeholder?: string;
5
5
  min?: number;
@@ -1,2 +1,2 @@
1
- export { NumberField, NumberFieldEntry, type NumberFieldProps } from './NumberField';
1
+ export { NumberField, NumberFieldEntry, type NumberFieldProps } from './NumberField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { FieldEntryProps, FieldProps } from '../shared/types';
2
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
3
3
  export interface RangeFieldProps extends FieldProps<number> {
4
4
  /** The start of the slider. Defaults to 0. */
5
5
  min?: number;
@@ -1,2 +1,2 @@
1
- export { RangeField, RangeFieldEntry, type RangeFieldProps } from './RangeField';
1
+ export { RangeField, RangeFieldEntry, type RangeFieldProps } from './RangeField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- import { type RelationReference, type RelationSource } from '../shared/relation';
2
- import type { FieldEntryProps, FieldProps } from '../shared/types';
1
+ import { type RelationReference, type RelationSource } from '../shared/relation.js';
2
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
3
3
  /** Results of a search in a relation source, as it types. */
4
4
  export declare function useRelationSearch(source: RelationSource | null, resource: string, query: string, { enabled, delay }?: {
5
5
  enabled?: boolean;
@@ -1,3 +1,3 @@
1
- export { type MultipleRelationFieldProps, type RelationFieldBaseProps, RelationField, RelationFieldEntry, type RelationFieldProps, type SingleRelationFieldProps, useRelationSearch, } from './RelationField';
2
- export { type RelationListAdapter, type RelationReference, type RelationSource, type RelationSourceOptions, createRelationSource, useRelationReferences, } from '../shared/relation';
1
+ export { type MultipleRelationFieldProps, type RelationFieldBaseProps, RelationField, RelationFieldEntry, type RelationFieldProps, type SingleRelationFieldProps, useRelationSearch, } from './RelationField.js';
2
+ export { type RelationListAdapter, type RelationReference, type RelationSource, type RelationSourceOptions, createRelationSource, useRelationReferences, } from '../shared/relation.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { BlockType, Field } from '@panneau/protocol';
2
- import type { FieldEntryProps, FieldProps } from '../shared/types';
2
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
3
3
  /** An item of a repeater. Typed blocks have their type in `type`. */
4
4
  export type RepeaterItem = Record<string, unknown>;
5
5
  export interface RepeaterFieldProps extends FieldProps<RepeaterItem[]> {
@@ -1,2 +1,2 @@
1
- export { RepeaterField, RepeaterFieldEntry, type RepeaterFieldProps, type RepeaterItem, } from './RepeaterField';
1
+ export { RepeaterField, RepeaterFieldEntry, type RepeaterFieldProps, type RepeaterItem, } from './RepeaterField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { Option } from '@panneau/protocol';
2
2
  import { type OptionValue } from '@panneau/ui';
3
- import type { FieldEntryProps, FieldProps } from '../shared/types';
3
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
4
4
  export type { OptionValue };
5
5
  /** Props of both single and multiple select fields. */
6
6
  export interface SelectFieldBaseProps extends Omit<FieldProps<never>, 'value' | 'onChange'> {
@@ -1,2 +1,2 @@
1
- export { type MultipleSelectFieldProps, type SelectFieldBaseProps, type OptionValue, SelectField, SelectFieldEntry, type SelectFieldProps, type SingleSelectFieldProps, } from './SelectField';
1
+ export { type MultipleSelectFieldProps, type SelectFieldBaseProps, type OptionValue, SelectField, SelectFieldEntry, type SelectFieldProps, type SingleSelectFieldProps, } from './SelectField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { Field } from '@panneau/protocol';
2
- import type { FieldEntryProps } from './types';
2
+ import type { FieldEntryProps } from './types.js';
3
3
  export interface NestedFieldProps {
4
4
  field: Field;
5
5
  /** Dot path of the field's value. */
@@ -1,4 +1,4 @@
1
- import type { FieldEntry } from './types';
1
+ import type { FieldEntry } from './types.js';
2
2
  /**
3
3
  * The entries of the built-in field types. `richtext` and `media` come with their plugins
4
4
  * (`@panneau/editor` and `@panneau/media`): without them, `DefinitionField` renders a placeholder.
@@ -1,11 +1,11 @@
1
1
  import { type ComponentType, type ReactNode } from 'react';
2
2
  import type { Field } from '@panneau/protocol';
3
- import type { MapsConfig } from '../location/types';
4
- import type { UploadSource } from '../upload/types';
5
- import type { FieldCheckSource } from './check';
6
- import type { EmbedSource } from './embed';
7
- import type { RelationSource } from './relation';
8
- import type { FieldEntry } from './types';
3
+ import type { MapsConfig } from '../location/types.js';
4
+ import type { UploadSource } from '../upload/types.js';
5
+ import type { FieldCheckSource } from './check.js';
6
+ import type { EmbedSource } from './embed.js';
7
+ import type { RelationSource } from './relation.js';
8
+ import type { FieldEntry } from './types.js';
9
9
  /** What a binding gives a field: its value, handlers and errors at a path. */
10
10
  export interface BoundFieldProps {
11
11
  value: unknown;
@@ -1,5 +1,5 @@
1
1
  import type { Field, Rule } from '@panneau/protocol';
2
- import type { FieldEntryProps, FieldProps } from './types';
2
+ import type { FieldEntryProps, FieldProps } from './types.js';
3
3
  /** The rule of a field with this name, if any. */
4
4
  export declare function findRule(field: Field, rule: Rule['rule']): Rule | undefined;
5
5
  /** The number of a `min` or `max` rule of a field, if any. */
@@ -1,6 +1,6 @@
1
1
  import type { FieldCheckResponse } from '@panneau/protocol';
2
- import type { FieldEntryProps } from '../shared/types';
3
- import { type TextFieldProps } from '../text/TextField';
2
+ import type { FieldEntryProps } from '../shared/types.js';
3
+ import { type TextFieldProps } from '../text/TextField.js';
4
4
  /**
5
5
  * Turns a text into a slug: lowercase ASCII letters and digits separated by dashes, without
6
6
  * accents (`Été à Montréal` gives `ete-a-montreal`).
@@ -1,2 +1,2 @@
1
- export { SlugField, SlugFieldEntry, type SlugCheck, type SlugFieldProps, slugify, sourceText, } from './SlugField';
1
+ export { SlugField, SlugFieldEntry, type SlugCheck, type SlugFieldProps, slugify, sourceText, } from './SlugField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { type TagSuggestion } from '@panneau/ui';
2
- import type { FieldEntryProps, FieldProps } from '../shared/types';
2
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
3
3
  export interface TagsFieldProps extends FieldProps<string[]> {
4
4
  placeholder?: string;
5
5
  /** Tags offered as the user types. */
@@ -1,2 +1,2 @@
1
- export { TagsField, TagsFieldEntry, type TagsFieldProps } from './TagsField';
1
+ export { TagsField, TagsFieldEntry, type TagsFieldProps } from './TagsField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- import type { FieldEntryProps } from '../shared/types';
2
- import { type TextFieldProps } from '../text/TextField';
1
+ import type { FieldEntryProps } from '../shared/types.js';
2
+ import { type TextFieldProps } from '../text/TextField.js';
3
3
  export type TelFieldProps = Omit<TextFieldProps, 'type' | 'inputMode'>;
4
4
  /**
5
5
  * A phone number, as typed, with the phone keyboard on phones. Spaces around it are removed on
@@ -1,2 +1,2 @@
1
- export { TelField, TelFieldEntry, type TelFieldProps } from './TelField';
1
+ export { TelField, TelFieldEntry, type TelFieldProps } from './TelField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { FieldEntryProps, FieldProps } from '../shared/types';
2
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
3
3
  export interface TextFieldProps extends FieldProps<string> {
4
4
  placeholder?: string;
5
5
  /** Shows a count of characters against this maximum. It doesn't stop typing. */
@@ -1,2 +1,2 @@
1
- export { TextField, TextFieldEntry, type TextFieldProps } from './TextField';
1
+ export { TextField, TextFieldEntry, type TextFieldProps } from './TextField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { FieldEntryProps, FieldProps } from '../shared/types';
1
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
2
2
  export interface TextAreaFieldProps extends FieldProps<string> {
3
3
  placeholder?: string;
4
4
  /** Shows a count of characters against this maximum. It doesn't stop typing. */
@@ -1,2 +1,2 @@
1
- export { TextAreaField, TextAreaFieldEntry, type TextAreaFieldProps } from './TextAreaField';
1
+ export { TextAreaField, TextAreaFieldEntry, type TextAreaFieldProps } from './TextAreaField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { FieldEntryProps, FieldProps } from '../shared/types';
1
+ import type { FieldEntryProps, FieldProps } from '../shared/types.js';
2
2
  export interface TimeFieldProps extends FieldProps<string> {
3
3
  /** Shows and writes seconds (`09:30:15`). */
4
4
  withSeconds?: boolean;
@@ -1,2 +1,2 @@
1
- export { TimeField, TimeFieldEntry, type TimeFieldProps } from './TimeField';
1
+ export { TimeField, TimeFieldEntry, type TimeFieldProps } from './TimeField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { UploadItem } from './types';
1
+ import type { UploadItem } from './types.js';
2
2
  export interface UploadListProps {
3
3
  /** The files being uploaded, from `useUploads()`. */
4
4
  items: readonly UploadItem[];
@@ -1,4 +1,4 @@
1
- import type { UploadRejection } from './types';
1
+ import type { UploadRejection } from './types.js';
2
2
  /** The message of a file refused before it was sent, for a field's errors. */
3
3
  export declare function useRejectionMessage(maxSize: number | null | undefined): (file: File, reason: UploadRejection) => string;
4
4
  //# sourceMappingURL=useRejectionMessage.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { UploadItem, UploadRejection, UploadSource, UploadedFile } from './types';
1
+ import type { UploadItem, UploadRejection, UploadSource, UploadedFile } from './types.js';
2
2
  export interface UseUploadsOptions {
3
3
  /** Where files are uploaded. Without one, `add()` gives the files themselves. */
4
4
  source: UploadSource | null;
@@ -1,3 +1,3 @@
1
- export { type PresignedUploadsLike, type UppyUploadSourceOptions, createUppyUploadSource, createUppyUploader, } from './uploader';
2
- export type { UploadItem, UploadItemStatus, UploadSource, UploadedFile, Uploader, } from '../upload/types';
1
+ export { type PresignedUploadsLike, type UppyUploadSourceOptions, createUppyUploadSource, createUppyUploader, } from './uploader.js';
2
+ export type { UploadItem, UploadItemStatus, UploadSource, UploadedFile, Uploader, } from '../upload/types.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import Uppy, { type Body, type Meta } from '@uppy/core';
2
2
  import type { Upload, UploadSignRequest } from '@panneau/protocol';
3
- import type { UploadSource, UploadedFile, Uploader } from '../upload/types';
3
+ import type { UploadSource, UploadedFile, Uploader } from '../upload/types.js';
4
4
  /**
5
5
  * Signs and completes direct uploads: `adapter.presignedUploads()` of `@panneau/data` (or
6
6
  * `createPresignedUploads()`) gives one.
@@ -1,5 +1,5 @@
1
- import type { FieldEntryProps } from '../shared/types';
2
- import { type TextFieldProps } from '../text/TextField';
1
+ import type { FieldEntryProps } from '../shared/types.js';
2
+ import { type TextFieldProps } from '../text/TextField.js';
3
3
  export interface UrlFieldProps extends Omit<TextFieldProps, 'type' | 'inputMode' | 'suffix'> {
4
4
  /** Scheme added on blur to a URL without one (`example.com`). Defaults to `https://`. */
5
5
  defaultScheme?: string;
@@ -1,2 +1,2 @@
1
- export { UrlField, UrlFieldEntry, type UrlFieldProps, withScheme } from './UrlField';
1
+ export { UrlField, UrlFieldEntry, type UrlFieldProps, withScheme } from './UrlField.js';
2
2
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/fields",
3
- "version": "5.0.0-alpha.7",
3
+ "version": "5.0.0-alpha.8",
4
4
  "description": "Controlled field components of Panneau for the protocol's built-in field types, one subpath per field, and uploads to storage (Uppy 6 in its own entry point).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -154,9 +154,9 @@
154
154
  "dist"
155
155
  ],
156
156
  "scripts": {
157
- "build": "vite build && tsc -p tsconfig.build.json",
157
+ "build": "vite build && node ../../scripts/declarations.js",
158
158
  "typecheck": "tsc --noEmit",
159
- "api": "tsc -p tsconfig.build.json && node ../../scripts/api-report.js"
159
+ "api": "node ../../scripts/declarations.js && node ../../scripts/api-report.js"
160
160
  },
161
161
  "publishConfig": {
162
162
  "access": "public"
@@ -178,9 +178,9 @@
178
178
  },
179
179
  "dependencies": {
180
180
  "@internationalized/date": "^3.12.4",
181
- "@panneau/intl": "5.0.0-alpha.7",
182
- "@panneau/protocol": "5.0.0-alpha.7",
183
- "@panneau/ui": "5.0.0-alpha.7",
181
+ "@panneau/intl": "5.0.0-alpha.8",
182
+ "@panneau/protocol": "5.0.0-alpha.8",
183
+ "@panneau/ui": "5.0.0-alpha.8",
184
184
  "leaflet": "^1.9.4",
185
185
  "lucide-react": "^1.57.0"
186
186
  },