react-luna-form 0.0.71 → 0.0.73
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/client/cjs/index.js +1 -1
- package/dist/client/esm/index.js +1 -1
- package/dist/schema/cjs/index.js +1 -1
- package/dist/schema/esm/index.js +1 -1
- package/dist/types/luna-core/fetcher.d.ts +2 -0
- package/dist/types/luna-core/handle/proxy-event.d.ts +6 -0
- package/dist/types/luna-core/handle/source-event.d.ts +2 -0
- package/dist/types/luna-core/handle/state-event.d.ts +2 -0
- package/dist/types/luna-core/handle/value-event.d.ts +5 -0
- package/dist/types/luna-core/helper/input.d.ts +61 -0
- package/dist/types/luna-core/index.d.ts +28 -0
- package/dist/types/luna-core/type.d.ts +267 -0
- package/dist/types/luna-core/util/attributes.d.ts +6 -0
- package/dist/types/luna-core/util/build.d.ts +6 -0
- package/dist/types/luna-core/util/column.d.ts +2 -0
- package/dist/types/luna-core/util/condition.d.ts +2 -0
- package/dist/types/luna-core/util/constant.d.ts +53 -0
- package/dist/types/luna-core/util/date.d.ts +23 -0
- package/dist/types/luna-core/util/extract.d.ts +16 -0
- package/dist/types/luna-core/util/format.d.ts +6 -0
- package/dist/types/luna-core/util/is-input.d.ts +26 -0
- package/dist/types/luna-core/util/is-type.d.ts +7 -0
- package/dist/types/luna-core/util/list.d.ts +5 -0
- package/dist/types/luna-core/util/logger.d.ts +5 -0
- package/dist/types/luna-core/util/operator.d.ts +1 -0
- package/dist/types/luna-core/util/path.d.ts +1 -0
- package/dist/types/luna-core/util/prepare.d.ts +4 -0
- package/dist/types/luna-core/util/schema.d.ts +21 -0
- package/dist/types/luna-core/util/source.d.ts +2 -0
- package/dist/types/luna-core/util/string.d.ts +12 -0
- package/dist/types/luna-core/util/stringify.d.ts +1 -0
- package/dist/types/luna-core/util/style.d.ts +6 -0
- package/dist/types/luna-core/util/transform.d.ts +2 -0
- package/dist/types/luna-core/util/translate.d.ts +1 -0
- package/dist/types/luna-core/util/url.d.ts +10 -0
- package/dist/types/luna-react/src/client/component/field/field-list-preview-item.d.ts +1 -1
- package/dist/types/luna-react/src/client/component/field/field-preview-item.d.ts +1 -1
- package/dist/types/luna-react/src/client/component/field/field-preview.d.ts +1 -1
- package/dist/types/luna-react/src/client/component/field/field.d.ts +2 -2
- package/dist/types/luna-react/src/client/component/form-content.d.ts +1 -1
- package/dist/types/luna-react/src/client/component/form.d.ts +1 -1
- package/dist/types/luna-react/src/client/component/guard/visibility-guard.d.ts +1 -1
- package/dist/types/luna-react/src/client/component/input-selectable.d.ts +1 -1
- package/dist/types/luna-react/src/client/component/input-strategies.d.ts +1 -1
- package/dist/types/luna-react/src/client/component/slot/slot.d.ts +3 -3
- package/dist/types/luna-react/src/client/hook/use-data-source.d.ts +2 -2
- package/dist/types/luna-react/src/client/hook/use-fetch.d.ts +1 -1
- package/dist/types/luna-react/src/client/hook/use-field-list.d.ts +1 -1
- package/dist/types/luna-react/src/client/hook/use-form-action.d.ts +1 -1
- package/dist/types/luna-react/src/client/hook/use-format.d.ts +3 -3
- package/dist/types/luna-react/src/client/hook/use-input-core.d.ts +1 -1
- package/dist/types/luna-react/src/client/hook/use-input.d.ts +1 -1
- package/dist/types/luna-react/src/client/hook/use-schema.d.ts +1 -1
- package/dist/types/luna-react/src/client/hook/use-value.d.ts +1 -1
- package/dist/types/luna-react/src/client/hook/use-write-only-source.d.ts +1 -1
- package/dist/types/luna-react/src/client/index.d.ts +1 -1
- package/dist/types/luna-react/src/client/lib/source-store.d.ts +1 -1
- package/dist/types/luna-react/src/client/lib/state-store.d.ts +1 -1
- package/dist/types/luna-react/src/component/column.d.ts +1 -1
- package/dist/types/luna-react/src/component/field/field-error.d.ts +1 -1
- package/dist/types/luna-react/src/component/field/field-group.d.ts +1 -1
- package/dist/types/luna-react/src/component/field/field-list.d.ts +1 -1
- package/dist/types/luna-react/src/component/field/field-set-advanced.d.ts +1 -1
- package/dist/types/luna-react/src/component/field/field-set.d.ts +1 -1
- package/dist/types/luna-react/src/component/field/field.d.ts +1 -1
- package/dist/types/luna-react/src/component/field-description.d.ts +1 -1
- package/dist/types/luna-react/src/component/form.d.ts +1 -1
- package/dist/types/luna-react/src/component/formatted-description.d.ts +1 -1
- package/dist/types/luna-react/src/component/input/input-base.d.ts +1 -1
- package/dist/types/luna-react/src/component/input-group.d.ts +1 -1
- package/dist/types/luna-react/src/component/input-label.d.ts +1 -1
- package/dist/types/luna-react/src/component/label.d.ts +1 -1
- package/dist/types/luna-react/src/component/list.d.ts +1 -1
- package/dist/types/luna-react/src/component/slot/slot-base.d.ts +1 -1
- package/dist/types/luna-react/src/component/slot/slot-create.d.ts +1 -1
- package/dist/types/luna-react/src/component/slot/slot-list.d.ts +1 -1
- package/dist/types/luna-react/src/component/slot/slot.d.ts +3 -3
- package/dist/types/luna-react/src/config/index.d.ts +1 -1
- package/dist/types/luna-react/src/schema/index.d.ts +2 -2
- package/dist/types/luna-react/src/server/component/fallback.d.ts +1 -1
- package/dist/types/luna-react/src/server/component/form.d.ts +1 -1
- package/dist/types/luna-react/src/server/component/input.d.ts +1 -1
- package/dist/types/luna-react/src/server/index.d.ts +1 -1
- package/dist/types/luna-react/src/type.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Field, type FormStateError, type Nullable, type Schemas, type ZodSchema } from '
|
|
1
|
+
import { type Field, type FormStateError, type Nullable, type Schemas, type ZodSchema } from '../../../../luna-core/index';
|
|
2
2
|
export type FormState<T> = {
|
|
3
3
|
data: Nullable<T>;
|
|
4
4
|
error: Nullable<FormStateError>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Field } from '
|
|
1
|
+
import { type Field } from '../../../../luna-core/index';
|
|
2
2
|
export declare function useFormat(field: Field): {
|
|
3
|
-
dateFormat: import(
|
|
4
|
-
timeFormat: import(
|
|
3
|
+
dateFormat: import('../../../../luna-core/index').DateFormat | null;
|
|
4
|
+
timeFormat: import('../../../../luna-core/index').TimeFormat | null;
|
|
5
5
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AriaAttributes, type CommonProps, type DataAttributes, type DataSource, type Field, type Nullable, type Schema, type Schemas } from '
|
|
1
|
+
import { type AriaAttributes, type CommonProps, type DataAttributes, type DataSource, type Field, type Nullable, type Schema, type Schemas } from '../../../../luna-core/index';
|
|
2
2
|
import type { Config, InputChange } from '../../type';
|
|
3
3
|
export type InputCoreProps = Readonly<{
|
|
4
4
|
ariaAttributes?: AriaAttributes;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Field, Schema } from '
|
|
1
|
+
import type { Field, Schema } from '../../../../luna-core/index';
|
|
2
2
|
export declare function useInput(field: Field, onMount: (name: string, schema: Schema, field: Field) => void, onUnmount: (name: string, options?: {
|
|
3
3
|
keepValue?: boolean;
|
|
4
4
|
}) => void, translations?: Record<string, string>): import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Field, Schema, Schemas } from '
|
|
1
|
+
import type { Field, Schema, Schemas } from '../../../../luna-core/index';
|
|
2
2
|
export declare function useSchema(): readonly [() => readonly [Schemas, Field[]], (name: string, schema: Schema, field: Field) => void, (name: string, options?: {
|
|
3
3
|
keepValue?: boolean;
|
|
4
4
|
}) => void];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Field, type Nullable } from '
|
|
1
|
+
import { type Field, type Nullable } from '../../../../luna-core/index';
|
|
2
2
|
export declare function useValue(field: Field, currentValue?: Nullable<Record<string, unknown>>): {
|
|
3
3
|
readonly setValue: (newValue: unknown) => void;
|
|
4
4
|
readonly shouldSkipOnChange: () => boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataSource, Field, Nullable } from '
|
|
1
|
+
import type { DataSource, Field, Nullable } from '../../../../luna-core/index';
|
|
2
2
|
export declare function useWriteOnlySource(field: Field): {
|
|
3
3
|
data: Nullable<unknown[]>;
|
|
4
4
|
setSource: (target: string, source?: DataSource) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DataSource } from '
|
|
1
|
+
import { type DataSource } from '../../../../luna-core/index';
|
|
2
2
|
export declare const reportSourceAtom: import("jotai-family").AtomFamily<string, import("jotai").WritableAtom<DataSource | undefined, [target: string, value: DataSource | undefined], void>>;
|
|
3
3
|
export declare const clearInputSourceAtom: import("jotai").WritableAtom<null, [contributorNames: string[]], void> & {
|
|
4
4
|
init: null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Description as DescriptionType } from '
|
|
1
|
+
import { type Description as DescriptionType } from '../../../luna-core/index';
|
|
2
2
|
import type { Config } from '../type';
|
|
3
3
|
export declare function FormattedDescription(props: Readonly<{
|
|
4
4
|
config?: Config;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Fields, type Nullable, type Style } from '
|
|
1
|
+
import { type Fields, type Nullable, type Style } from '../../../../luna-core/index';
|
|
2
2
|
import type { Children, Config } from '../../type';
|
|
3
3
|
import type { FieldProps } from '../field/field';
|
|
4
4
|
import type { ListProps } from '../field/field-list';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Children, Config } from '../../type';
|
|
2
|
-
import type { Fields, Nullable, Style } from '
|
|
2
|
+
import type { Fields, Nullable, Style } from '../../../../luna-core/index';
|
|
3
3
|
import type { SlotComponents } from './slot-base';
|
|
4
4
|
export declare function createSlot(components: SlotComponents): (props: Readonly<{
|
|
5
5
|
children: Children;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type List, type Nullable, type Style } from '
|
|
1
|
+
import { type List, type Nullable, type Style } from '../../../../luna-core/index';
|
|
2
2
|
import { type SlotComponents } from './slot-base';
|
|
3
3
|
import type { Children, Config } from '../../type';
|
|
4
4
|
export declare function SlotList(props: Readonly<{
|
|
@@ -3,12 +3,12 @@ export declare const Slot: (props: Readonly<{
|
|
|
3
3
|
config: import("../../type").Config;
|
|
4
4
|
context?: Record<string, unknown>;
|
|
5
5
|
disabled?: boolean;
|
|
6
|
-
fields?: import(
|
|
6
|
+
fields?: import('../../../../luna-core/index').Fields;
|
|
7
7
|
onValueChange?: (input: {
|
|
8
8
|
name: string;
|
|
9
9
|
value: unknown;
|
|
10
10
|
}) => void;
|
|
11
|
-
style?: import(
|
|
11
|
+
style?: import('../../../../luna-core/index').Style;
|
|
12
12
|
translations?: Record<string, string>;
|
|
13
|
-
value?: import(
|
|
13
|
+
value?: import('../../../../luna-core/index').Nullable<Record<string, unknown>>;
|
|
14
14
|
}>) => import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Environment, type Protocol } from '
|
|
1
|
+
import { type Environment, type Protocol } from '../../../luna-core/index';
|
|
2
2
|
import type { AlertProps, Config, InputConfig } from '../type';
|
|
3
3
|
export declare function defineConfig<T extends React.ElementType>(options: Readonly<{
|
|
4
4
|
alert?: React.ComponentType<AlertProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { buildFormSchema, collectIssues } from '
|
|
2
|
-
export type { AssertRule, Column, Field, Fields, List, Operator, PatternRule, Section, Sections, Validation, WhenClause, WhenRule, ZodSchema, } from '
|
|
1
|
+
export { buildFormSchema, collectIssues } from '../../../luna-core/index';
|
|
2
|
+
export type { AssertRule, Column, Field, Fields, List, Operator, PatternRule, Section, Sections, Validation, WhenClause, WhenRule, ZodSchema, } from '../../../luna-core/index';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AriaAttributes, type CommonProps, type DataAttributes, type Field } from '
|
|
1
|
+
import { type AriaAttributes, type CommonProps, type DataAttributes, type Field } from '../../../../luna-core/index';
|
|
2
2
|
import type { Config } from '../../type';
|
|
3
3
|
export declare function Input(props: Readonly<{
|
|
4
4
|
ariaAttributes?: AriaAttributes;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AriaAttributes, BaseConfig, CommonProps, DataAttributes, Field, Fields, FormStateError } from '
|
|
1
|
+
import type { AriaAttributes, BaseConfig, CommonProps, DataAttributes, Field, Fields, FormStateError } from '../../luna-core/index';
|
|
2
2
|
export type Slot = (props: {
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
fields?: Fields;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-luna-form",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.73",
|
|
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",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"eslint-plugin-react": "7.37.5",
|
|
35
35
|
"eslint-plugin-react-hooks": "7.1.1",
|
|
36
36
|
"eslint-plugin-react-refresh": "0.5.3",
|
|
37
|
-
"@luna-form/core": "0.0.
|
|
37
|
+
"@luna-form/core": "0.0.73"
|
|
38
38
|
},
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"repository": {
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"lint": "eslint . --cache",
|
|
76
76
|
"prettier:check": "prettier --check .",
|
|
77
77
|
"prettier:fix": "prettier --write .",
|
|
78
|
-
"types": "tsc --project tsconfig.json --declaration --emitDeclarationOnly --declarationDir dist/types",
|
|
78
|
+
"types": "tsc --project tsconfig.json --declaration --emitDeclarationOnly --declarationDir dist/types && node scripts/bundle-types.mjs",
|
|
79
79
|
"typescript": "tsc --noEmit"
|
|
80
80
|
}
|
|
81
81
|
}
|