react-luna-form 0.0.33 → 0.0.35

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 (74) hide show
  1. package/dist/client/cjs/index.js +1 -1
  2. package/dist/client/esm/index.js +1 -1
  3. package/dist/config/cjs/index.js +1 -1
  4. package/dist/config/esm/index.js +1 -1
  5. package/dist/server/cjs/index.js +1 -1
  6. package/dist/server/esm/index.js +1 -1
  7. package/dist/types/luna-core/src/helper/input.d.ts +1 -1
  8. package/dist/types/luna-core/src/type.d.ts +19 -0
  9. package/dist/types/luna-core/src/util/constant.d.ts +3 -0
  10. package/dist/types/luna-core/src/util/date.d.ts +10 -0
  11. package/dist/types/luna-core/src/util/is-input.d.ts +3 -1
  12. package/package.json +2 -2
  13. package/dist/types/client/component/field/field-list.d.ts +0 -2
  14. package/dist/types/client/component/field/field-with-state.d.ts +0 -13
  15. package/dist/types/client/component/field/field.d.ts +0 -7
  16. package/dist/types/client/component/form-content.d.ts +0 -20
  17. package/dist/types/client/component/form.d.ts +0 -20
  18. package/dist/types/client/component/guard/list-guard.d.ts +0 -2
  19. package/dist/types/client/component/guard/visibility-guard.d.ts +0 -6
  20. package/dist/types/client/component/input.d.ts +0 -16
  21. package/dist/types/client/component/slot/slot.d.ts +0 -7
  22. package/dist/types/client/hook/use-data-source.d.ts +0 -3
  23. package/dist/types/client/hook/use-fetch.d.ts +0 -3
  24. package/dist/types/client/hook/use-field-list.d.ts +0 -2
  25. package/dist/types/client/hook/use-form-action.d.ts +0 -13
  26. package/dist/types/client/hook/use-input.d.ts +0 -2
  27. package/dist/types/client/hook/use-schema.d.ts +0 -2
  28. package/dist/types/client/hook/use-store.d.ts +0 -1
  29. package/dist/types/client/hook/use-timeout.d.ts +0 -1
  30. package/dist/types/client/hook/use-value.d.ts +0 -6
  31. package/dist/types/client/index.d.ts +0 -3
  32. package/dist/types/client/lib/error-store.d.ts +0 -7
  33. package/dist/types/client/lib/source-store.d.ts +0 -5
  34. package/dist/types/client/lib/state-store.d.ts +0 -5
  35. package/dist/types/client/lib/store-helper.d.ts +0 -26
  36. package/dist/types/client/lib/value-store.d.ts +0 -10
  37. package/dist/types/component/chevron-icon.d.ts +0 -3
  38. package/dist/types/component/column.d.ts +0 -5
  39. package/dist/types/component/control.d.ts +0 -5
  40. package/dist/types/component/description.d.ts +0 -3
  41. package/dist/types/component/field/field-base.d.ts +0 -12
  42. package/dist/types/component/field/field-error.d.ts +0 -5
  43. package/dist/types/component/field/field-group.d.ts +0 -8
  44. package/dist/types/component/field/field-horizontal.d.ts +0 -2
  45. package/dist/types/component/field/field-list-item.d.ts +0 -8
  46. package/dist/types/component/field/field-list.d.ts +0 -7
  47. package/dist/types/component/field/field-set-advanced.d.ts +0 -5
  48. package/dist/types/component/field/field-set-base.d.ts +0 -7
  49. package/dist/types/component/field/field-set.d.ts +0 -6
  50. package/dist/types/component/field/field-vertical.d.ts +0 -2
  51. package/dist/types/component/field/field.d.ts +0 -10
  52. package/dist/types/component/form.d.ts +0 -13
  53. package/dist/types/component/formatted-description.d.ts +0 -7
  54. package/dist/types/component/group.d.ts +0 -4
  55. package/dist/types/component/input/input-base.d.ts +0 -9
  56. package/dist/types/component/input-group.d.ts +0 -10
  57. package/dist/types/component/input-label.d.ts +0 -9
  58. package/dist/types/component/label.d.ts +0 -7
  59. package/dist/types/component/legend.d.ts +0 -4
  60. package/dist/types/component/list.d.ts +0 -5
  61. package/dist/types/component/separator.d.ts +0 -1
  62. package/dist/types/component/slot/list-slot.d.ts +0 -2
  63. package/dist/types/component/slot/slot-base.d.ts +0 -16
  64. package/dist/types/component/slot/slot-create.d.ts +0 -10
  65. package/dist/types/component/slot/slot-list.d.ts +0 -12
  66. package/dist/types/component/slot/slot.d.ts +0 -7
  67. package/dist/types/config/index.d.ts +0 -31
  68. package/dist/types/lib/render-If-exists.d.ts +0 -1
  69. package/dist/types/lib/string.d.ts +0 -1
  70. package/dist/types/server/component/fallback.d.ts +0 -7
  71. package/dist/types/server/component/form.d.ts +0 -13
  72. package/dist/types/server/component/input.d.ts +0 -13
  73. package/dist/types/server/index.d.ts +0 -4
  74. package/dist/types/type.d.ts +0 -29
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-luna-form",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "description": "A React library for building forms based on JSON",
5
5
  "main": "./dist/client/cjs/index.js",
6
6
  "module": "./dist/client/esm/index.js",
@@ -33,7 +33,7 @@
33
33
  "eslint-plugin-react": "7.37.5",
34
34
  "eslint-plugin-react-hooks": "7.0.1",
35
35
  "eslint-plugin-react-refresh": "0.5.2",
36
- "@luna-form/core": "0.0.33"
36
+ "@luna-form/core": "0.0.35"
37
37
  },
38
38
  "license": "Apache-2.0",
39
39
  "repository": {
@@ -1,2 +0,0 @@
1
- import type { ListProps } from '../../../component/field/field-list';
2
- export declare function FieldList(props: ListProps): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- export declare function withError<P extends {
2
- errors?: Record<string, string[]>;
3
- field: {
4
- name: string;
5
- };
6
- }>(Component: React.ComponentType<P>): (props: Readonly<P>) => import("react/jsx-runtime").JSX.Element | null;
7
- export declare function withState<P extends {
8
- disabled?: boolean;
9
- field: {
10
- name: string;
11
- hidden?: boolean;
12
- };
13
- }>(Component: React.ComponentType<P>): (props: Readonly<P>) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,7 +0,0 @@
1
- export declare const Field: (props: Readonly<Readonly<Readonly<{
2
- children: import("../../../type").Children;
3
- disabled?: boolean;
4
- errors?: Record<string, string[]>;
5
- field: import("@luna-form/core").Field;
6
- style?: import("@luna-form/core").Style;
7
- }>>>) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,20 +0,0 @@
1
- import { type FormState } from '../hook/use-form-action';
2
- import type { Config, Control } from '../../type';
3
- import type { Definition, Nullable, Sections, ZodSchema } from '@luna-form/core';
4
- export declare function FormContent<T extends Record<string, unknown> = Record<string, unknown>, F = Record<string, unknown>>(props: Readonly<{
5
- action?: (formData: F, schema?: ZodSchema) => Promise<FormState<T>>;
6
- children?: Control;
7
- config: Config;
8
- context?: Record<string, unknown>;
9
- definition?: Definition;
10
- lang?: string;
11
- onSuccess?: (data: T) => void;
12
- onValueChange?: (input: {
13
- name: string;
14
- value: unknown;
15
- }) => void;
16
- readOnly?: boolean;
17
- sections: Sections;
18
- translations?: Record<string, Record<string, string>>;
19
- value?: Nullable<T>;
20
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,20 +0,0 @@
1
- import type { Config, Control } from '../../type';
2
- import type { Definition, Nullable, Sections, ZodSchema } from '@luna-form/core';
3
- import type { FormState } from '../hook/use-form-action';
4
- export declare function Form<T extends Record<string, unknown> = Record<string, unknown>, F = Record<string, unknown>>(props: Readonly<{
5
- action?: (formData: F, schema?: ZodSchema) => Promise<FormState<T>>;
6
- children?: Control;
7
- config: Config;
8
- context?: Record<string, unknown>;
9
- definition?: Definition;
10
- lang?: string;
11
- onSuccess?: (data: T) => void;
12
- onValueChange?: (input: {
13
- name: string;
14
- value: unknown;
15
- }) => void;
16
- readOnly?: boolean;
17
- sections: Sections;
18
- translations?: Record<string, Record<string, string>>;
19
- value?: Nullable<T>;
20
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { ListProps } from '../../../component/field/field-list';
2
- export declare function ListGuard({ children, field, value }: ListProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import type { Field, Fields, List } from '@luna-form/core';
2
- export declare function VisibilityGuard(props: Readonly<{
3
- children: React.ReactNode;
4
- container?: Field | List;
5
- fields: Fields;
6
- }>): import("react").ReactNode;
@@ -1,16 +0,0 @@
1
- import { type AriaAttributes, type CommonProps, type DataAttributes, type Field, type Nullable, type Schema } from '@luna-form/core';
2
- import type { Config, InputChange } from '../../type';
3
- export declare function Input(props: Readonly<{
4
- ariaAttributes?: AriaAttributes;
5
- commonProps: CommonProps;
6
- config: Config;
7
- context?: Record<string, unknown>;
8
- dataAttributes?: DataAttributes;
9
- field: Field;
10
- horizontal?: boolean;
11
- onMount: (name: string, schema: Schema, field: Field) => void;
12
- onUnmount: (name: string) => void;
13
- onValueChange?: (input: InputChange) => void;
14
- translations?: Record<string, string>;
15
- value?: Nullable<Record<string, unknown>>;
16
- }>): import("react").ReactNode;
@@ -1,7 +0,0 @@
1
- export declare const Slot: (props: Readonly<{
2
- children: import("../../../type").Children;
3
- disabled?: boolean;
4
- fields?: import("@luna-form/core").Fields;
5
- style?: import("@luna-form/core").Style;
6
- value?: import("@luna-form/core").Nullable<Record<string, unknown>>;
7
- }>) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { type Field, type Nullable } from '@luna-form/core';
2
- import type { Config } from '../../type';
3
- export declare function useDataSource(field: Field, config: Config, value?: Nullable<Record<string, unknown>>): readonly [Nullable<unknown[]>, (target: string, value: import("@luna-form/core").DataSource | undefined) => void];
@@ -1,3 +0,0 @@
1
- import { type DataSource, type Nullable } from '@luna-form/core';
2
- import type { Config } from '../../type';
3
- export declare function useFetch<T>(dataSource: Nullable<DataSource | T[]> | undefined, config: Config, disabled?: boolean): Nullable<T[]>;
@@ -1,2 +0,0 @@
1
- import { type List, type Nullable } from '@luna-form/core';
2
- export declare function useFieldList(field: List, value?: Nullable<Record<string, unknown>>): readonly [number[], () => void, (index: number) => void, boolean, boolean, number];
@@ -1,13 +0,0 @@
1
- import { type Field, type FormStateError, type Nullable, type Schemas, type ZodSchema } from '@luna-form/core';
2
- export type FormState<T> = {
3
- data: Nullable<T>;
4
- error: Nullable<FormStateError>;
5
- success: boolean;
6
- };
7
- export type FormActionOptions<T> = {
8
- onSuccess?: (data: T) => void;
9
- preserveValues?: boolean;
10
- translations?: Record<string, string>;
11
- validation?: boolean;
12
- };
13
- export declare function useFormState<T, F = Record<string, unknown>>(getSchema: () => readonly [Schemas, Field[]], action?: (formData: F, schema?: ZodSchema) => Promise<FormState<T>>, options?: FormActionOptions<T>): readonly [(payload: FormData) => void, FormState<T>, boolean];
@@ -1,2 +0,0 @@
1
- import type { Field, Schema } from '@luna-form/core';
2
- export declare function useInput(field: Field, onMount: (name: string, schema: Schema, field: Field) => void, onUnmount: (name: string) => void, translations?: Record<string, string>): import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
@@ -1,2 +0,0 @@
1
- import type { Field, Schema, Schemas } from '@luna-form/core';
2
- export declare function useSchema(): readonly [() => readonly [Schemas, Field[]], (name: string, schema: Schema, field: Field) => void, (name: string) => void];
@@ -1 +0,0 @@
1
- export declare function useStore(): (names: string | string[]) => void;
@@ -1 +0,0 @@
1
- export declare function useTimeout(): (callback: () => void, delay: number) => void;
@@ -1,6 +0,0 @@
1
- import { type Field, type Nullable } from '@luna-form/core';
2
- export declare function useValue(field: Field, currentValue?: Nullable<Record<string, unknown>>): {
3
- readonly setValue: (newValue: unknown) => void;
4
- readonly shouldSkipOnChange: () => boolean;
5
- readonly value: {} | undefined;
6
- };
@@ -1,3 +0,0 @@
1
- import { Form } from './component/form';
2
- export { Form };
3
- export type { Sections, Source, ZodSchema } from '@luna-form/core';
@@ -1,7 +0,0 @@
1
- export declare const clearInputErrorAtom: import("jotai").WritableAtom<null, [names: string[]], void> & {
2
- init: null;
3
- };
4
- export declare const reportErrorAtom: import("jotai").WritableAtom<null, [newValue: Record<string, string[]>], void> & {
5
- init: null;
6
- };
7
- export declare const reportInputErrorAtom: import("jotai-family").AtomFamily<string, import("jotai").WritableAtom<string[] | undefined, [newValue: string[] | undefined], void>>;
@@ -1,5 +0,0 @@
1
- import { type DataSource } from '@luna-form/core';
2
- export declare const reportSourceAtom: import("jotai-family").AtomFamily<string, import("jotai").WritableAtom<DataSource | undefined, [target: string, value: DataSource | undefined], void>>;
3
- export declare const clearInputSourceAtom: import("jotai").WritableAtom<null, [contributorNames: string[]], void> & {
4
- init: null;
5
- };
@@ -1,5 +0,0 @@
1
- import type { FieldState } from '@luna-form/core';
2
- export declare const fieldStateAtom: import("jotai").PrimitiveAtom<Record<string, FieldState>> & {
3
- init: Record<string, FieldState>;
4
- };
5
- export declare const reportFieldStateAtom: import("jotai-family").AtomFamily<string, import("jotai").WritableAtom<FieldState | undefined, [newValue: FieldState | undefined], void>>;
@@ -1,26 +0,0 @@
1
- import { type PrimitiveAtom } from 'jotai';
2
- interface NestedAtomFamilyOptions<TInner> {
3
- merge?: (values: TInner[]) => TInner | undefined;
4
- validateTarget?: (target: string) => boolean;
5
- }
6
- export declare function omitKey<T extends Record<string, unknown>>(obj: T, key: string): T;
7
- export declare function createNestedRecordAtomFamily<TInner, TRecord extends Record<string, Record<string, TInner>> = Record<string, Record<string, TInner>>>(baseAtom: PrimitiveAtom<TRecord>, options?: NestedAtomFamilyOptions<TInner>): import("jotai-family").AtomFamily<string, import("jotai").WritableAtom<TInner | undefined, [target: string, value: TInner | undefined], void>>;
8
- export declare function createNestedClearAtom<TInner>(baseAtom: PrimitiveAtom<Record<string, Record<string, TInner>>>): import("jotai").WritableAtom<null, [contributorNames: string[]], void> & {
9
- init: null;
10
- };
11
- export declare function createAtomStore<T>(initialValue?: Record<string, T>): {
12
- atom: PrimitiveAtom<Record<string, T>> & {
13
- init: Record<string, T>;
14
- };
15
- clearAll: import("jotai").WritableAtom<null, [], void> & {
16
- init: null;
17
- };
18
- clear: import("jotai").WritableAtom<null, [names: string[]], void> & {
19
- init: null;
20
- };
21
- bulkReport: import("jotai").WritableAtom<null, [newValue: Record<string, T>], void> & {
22
- init: null;
23
- };
24
- report: import("jotai-family").AtomFamily<string, import("jotai").WritableAtom<NonNullable<T> | undefined, [newValue: T | undefined], void>>;
25
- };
26
- export {};
@@ -1,10 +0,0 @@
1
- export declare const valueAtom: import("jotai").PrimitiveAtom<Record<string, unknown>> & {
2
- init: Record<string, unknown>;
3
- };
4
- export declare const clearAllValueAtom: import("jotai").WritableAtom<null, [], void> & {
5
- init: null;
6
- };
7
- export declare const clearInputValueAtom: import("jotai").WritableAtom<null, [names: string[]], void> & {
8
- init: null;
9
- };
10
- export declare const reportValueAtom: import("jotai-family").AtomFamily<string, import("jotai").WritableAtom<{} | undefined, [newValue: unknown], void>>;
@@ -1,3 +0,0 @@
1
- export declare function ChevronIcon(props: Readonly<{
2
- expanded: boolean;
3
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { type Column } from '@luna-form/core';
2
- export declare function Column(props: Readonly<{
3
- children?: React.ReactNode;
4
- column?: Column;
5
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import type { Control } from '../type';
2
- export declare function Control(props: Readonly<{
3
- children?: Control;
4
- isPending?: boolean;
5
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- export declare function Description(props: Readonly<{
2
- children: string | React.ReactNode;
3
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- export type FieldLayoutProps = {
2
- children: React.ReactNode;
3
- disabled?: boolean;
4
- errors?: string[];
5
- isCheckbox?: boolean;
6
- isReversed?: boolean;
7
- isClickable?: boolean;
8
- };
9
- export declare function FieldBase(props: Readonly<FieldLayoutProps & {
10
- className?: string;
11
- orientation: 'horizontal' | 'vertical';
12
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import type { Nullable } from '@luna-form/core';
2
- export declare function FieldError(props: Readonly<{
3
- errors?: Nullable<string[]>;
4
- name?: string;
5
- }>): import("react/jsx-runtime").JSX.Element | null;
@@ -1,8 +0,0 @@
1
- import { type Field } from '@luna-form/core';
2
- export declare function FieldGroup(props: Readonly<{
3
- children: React.ReactNode;
4
- disabled?: boolean;
5
- errors?: string[];
6
- field: Field;
7
- horizontal?: boolean;
8
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { type FieldLayoutProps } from './field-base';
2
- export declare function FieldHorizontal(props: Readonly<FieldLayoutProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- export declare function FieldListItem(props: Readonly<{
2
- canRemove?: boolean;
3
- children: React.ReactNode;
4
- index: number;
5
- isMultiField: boolean;
6
- label: string;
7
- onRemove?: (index: number) => void;
8
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { type List, type Nullable } from '@luna-form/core';
2
- export type ListProps = Readonly<{
3
- children: (index: number) => React.ReactNode;
4
- field: List;
5
- value?: Nullable<Record<string, unknown>>;
6
- }>;
7
- export declare function FieldList(props: ListProps): import("react/jsx-runtime").JSX.Element[];
@@ -1,5 +0,0 @@
1
- import type { Section } from '@luna-form/core';
2
- export declare function FieldSetAdvanced(props: Readonly<{
3
- section: Section;
4
- group: React.ReactNode;
5
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- export declare function FieldSetBase(props: Readonly<{
2
- children?: React.ReactNode;
3
- description?: string;
4
- empty?: boolean;
5
- id?: string;
6
- title?: string;
7
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { type Section, type Style } from '@luna-form/core';
2
- export declare function FieldSet(props: Readonly<{
3
- children?: React.ReactNode;
4
- section: Section;
5
- style?: Style;
6
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { type FieldLayoutProps } from './field-base';
2
- export declare function FieldVertical(props: Readonly<FieldLayoutProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +0,0 @@
1
- import { type Field, type Style } from '@luna-form/core';
2
- import type { Children } from '../../type';
3
- export type FieldProps = Readonly<{
4
- children: Children;
5
- disabled?: boolean;
6
- errors?: Record<string, string[]>;
7
- field: Field;
8
- style?: Style;
9
- }>;
10
- export declare function Field(props: FieldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- import { type Definition, type Sections } from '@luna-form/core';
2
- import type { Config, Control, Slot } from '../type';
3
- export declare function Form(props: Readonly<{
4
- action?: (formData: FormData) => void;
5
- children: Slot;
6
- config: Config;
7
- control?: Control;
8
- definition?: Definition;
9
- isPending?: boolean;
10
- noValidate?: boolean;
11
- readOnly?: boolean;
12
- sections: Sections;
13
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import type { Config } from '../type';
2
- export declare function FormattedDescription(props: Readonly<{
3
- config?: Config;
4
- context?: Record<string, unknown>;
5
- text?: string;
6
- translations?: Record<string, string>;
7
- }>): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +0,0 @@
1
- export declare function Group(props: Readonly<{
2
- children?: React.ReactNode;
3
- compact?: boolean;
4
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- import { type Field } from '@luna-form/core';
2
- import type { Children } from '../../type';
3
- export declare function InputBase(props: Readonly<{
4
- children: Children;
5
- disabled?: boolean;
6
- errors?: string[];
7
- field: Field;
8
- horizontal?: boolean;
9
- }>): import("react").ReactNode;
@@ -1,10 +0,0 @@
1
- import type { Config } from '../type';
2
- import type { Field } from '@luna-form/core';
3
- export declare function InputGroup(props: Readonly<{
4
- children: React.ReactNode;
5
- config?: Config;
6
- context?: Record<string, unknown>;
7
- field: Field;
8
- horizontal?: boolean;
9
- translations?: Record<string, string>;
10
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- import { type Field } from '@luna-form/core';
2
- import type { Config } from '../type';
3
- export declare function InputLabel(props: Readonly<{
4
- config?: Config;
5
- context?: Record<string, unknown>;
6
- field: Field;
7
- horizontal?: boolean;
8
- translations?: Record<string, string>;
9
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { type Field, type Style } from '@luna-form/core';
2
- export declare function Label(props: Readonly<{
3
- children?: React.ReactNode;
4
- field: Field;
5
- style?: Style;
6
- translations?: Record<string, string>;
7
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- export declare function Legend(props: Readonly<{
2
- title?: string;
3
- description?: string;
4
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import type { List } from '@luna-form/core';
2
- export declare function List(props: Readonly<{
3
- children: React.ReactNode;
4
- field: List;
5
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function Separator(): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { ListProps } from '../field/field-list';
2
- export declare function ListSlot({ children, field, value }: ListProps): import("react/jsx-runtime").JSX.Element;
@@ -1,16 +0,0 @@
1
- import { type Fields, type Nullable, type Style } from '@luna-form/core';
2
- import type { Children } from '../../type';
3
- import type { FieldProps } from '../field/field';
4
- import type { ListProps } from '../field/field-list';
5
- export type SlotComponents = {
6
- field: React.ComponentType<FieldProps>;
7
- list: React.ComponentType<ListProps>;
8
- };
9
- export declare function SlotBase(props: Readonly<{
10
- children: Children;
11
- components: SlotComponents;
12
- disabled?: boolean;
13
- fields?: Fields;
14
- style?: Style;
15
- value?: Nullable<Record<string, unknown>>;
16
- }>): import("react/jsx-runtime").JSX.Element[];
@@ -1,10 +0,0 @@
1
- import type { Children } from '../../type';
2
- import type { Fields, Nullable, Style } from '@luna-form/core';
3
- import type { SlotComponents } from './slot-base';
4
- export declare function createSlot(components: SlotComponents): (props: Readonly<{
5
- children: Children;
6
- disabled?: boolean;
7
- fields?: Fields;
8
- style?: Style;
9
- value?: Nullable<Record<string, unknown>>;
10
- }>) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { type List, type Nullable, type Style } from '@luna-form/core';
2
- import { type SlotComponents } from './slot-base';
3
- import type { Children } from '../../type';
4
- export declare function SlotList(props: Readonly<{
5
- children: Children;
6
- components: SlotComponents;
7
- disabled?: boolean;
8
- field: List;
9
- index: number;
10
- style?: Style;
11
- value?: Nullable<Record<string, unknown>>;
12
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- export declare const Slot: (props: Readonly<{
2
- children: import("../../type").Children;
3
- disabled?: boolean;
4
- fields?: import("@luna-form/core").Fields;
5
- style?: import("@luna-form/core").Style;
6
- value?: import("@luna-form/core").Nullable<Record<string, unknown>>;
7
- }>) => import("react/jsx-runtime").JSX.Element;
@@ -1,31 +0,0 @@
1
- import { type Environment, type Protocol } from '@luna-form/core';
2
- import type { AlertProps, Config, InputConfig } from '../type';
3
- export declare function defineConfig<T extends React.ElementType>(options: Readonly<{
4
- alert?: React.ComponentType<AlertProps>;
5
- env?: Environment;
6
- fetcher?: {
7
- remotePatterns?: Array<{
8
- hostname?: string;
9
- port?: number;
10
- protocol?: Protocol;
11
- }>;
12
- };
13
- inputs: Array<InputConfig<T>>;
14
- style?: {
15
- compact?: boolean;
16
- horizontal?: boolean;
17
- showOptionalLabel?: boolean;
18
- };
19
- validation?: {
20
- blur?: boolean;
21
- change?: boolean;
22
- showError?: boolean;
23
- submit?: boolean;
24
- };
25
- }>): Config;
26
- export declare const defineCheckbox: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
27
- export declare const defineInput: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
28
- export declare const defineRadio: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
29
- export declare const defineSelect: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
30
- export declare const defineTextArea: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
31
- export declare function defineCustomInput<T extends React.ElementType>(types: string | string[], input: React.ComponentProps<T>): InputConfig<T>;
@@ -1 +0,0 @@
1
- export declare function renderIfExists<T>(value: T | undefined | null, render: (value: T) => React.ReactNode): React.ReactNode;
@@ -1 +0,0 @@
1
- export declare function formatMarkdown(text?: string): React.ReactNode;
@@ -1,7 +0,0 @@
1
- import type { Config } from '../../type';
2
- import type { Sections } from '@luna-form/core';
3
- export declare function Fallback(props: Readonly<{
4
- children: React.ReactNode;
5
- config: Config;
6
- sections: Sections;
7
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- import type { Config } from '../../type';
2
- import type { Definition, Sections } from '@luna-form/core';
3
- export declare function Form(props: Readonly<{
4
- children?: React.ReactNode;
5
- config: Config;
6
- context?: Record<string, unknown>;
7
- definition?: Definition;
8
- lang?: string;
9
- readOnly?: boolean;
10
- sections: Sections;
11
- translations?: Record<string, Record<string, string>>;
12
- value?: Record<string, unknown>;
13
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- import { type AriaAttributes, type CommonProps, type DataAttributes, type Field } from '@luna-form/core';
2
- import type { Config } from '../../type';
3
- export declare function Input(props: Readonly<{
4
- ariaAttributes?: AriaAttributes;
5
- commonProps: CommonProps;
6
- config: Config;
7
- context?: Record<string, unknown>;
8
- dataAttributes?: DataAttributes;
9
- field: Field;
10
- horizontal?: boolean;
11
- translations?: Record<string, string>;
12
- value?: Record<string, unknown>;
13
- }>): import("react").ReactNode;
@@ -1,4 +0,0 @@
1
- import { Form } from './component/form';
2
- import { Fallback } from './component/fallback';
3
- export { Form, Fallback };
4
- export type { Sections, Source } from '@luna-form/core';