react-luna-form 0.0.71 → 0.0.72

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 (85) hide show
  1. package/dist/client/cjs/index.js +1 -1
  2. package/dist/client/esm/index.js +1 -1
  3. package/dist/schema/cjs/index.js +1 -1
  4. package/dist/schema/esm/index.js +1 -1
  5. package/dist/types/luna-core/fetcher.d.ts +2 -0
  6. package/dist/types/luna-core/handle/proxy-event.d.ts +6 -0
  7. package/dist/types/luna-core/handle/source-event.d.ts +2 -0
  8. package/dist/types/luna-core/handle/state-event.d.ts +2 -0
  9. package/dist/types/luna-core/handle/value-event.d.ts +5 -0
  10. package/dist/types/luna-core/helper/input.d.ts +61 -0
  11. package/dist/types/luna-core/index.d.ts +28 -0
  12. package/dist/types/luna-core/type.d.ts +270 -0
  13. package/dist/types/luna-core/util/attributes.d.ts +6 -0
  14. package/dist/types/luna-core/util/build.d.ts +6 -0
  15. package/dist/types/luna-core/util/column.d.ts +2 -0
  16. package/dist/types/luna-core/util/condition.d.ts +2 -0
  17. package/dist/types/luna-core/util/constant.d.ts +53 -0
  18. package/dist/types/luna-core/util/date.d.ts +23 -0
  19. package/dist/types/luna-core/util/extract.d.ts +16 -0
  20. package/dist/types/luna-core/util/format.d.ts +6 -0
  21. package/dist/types/luna-core/util/is-input.d.ts +26 -0
  22. package/dist/types/luna-core/util/is-type.d.ts +7 -0
  23. package/dist/types/luna-core/util/list.d.ts +5 -0
  24. package/dist/types/luna-core/util/logger.d.ts +5 -0
  25. package/dist/types/luna-core/util/operator.d.ts +1 -0
  26. package/dist/types/luna-core/util/path.d.ts +1 -0
  27. package/dist/types/luna-core/util/prepare.d.ts +4 -0
  28. package/dist/types/luna-core/util/schema.d.ts +21 -0
  29. package/dist/types/luna-core/util/source.d.ts +2 -0
  30. package/dist/types/luna-core/util/string.d.ts +12 -0
  31. package/dist/types/luna-core/util/stringify.d.ts +1 -0
  32. package/dist/types/luna-core/util/style.d.ts +6 -0
  33. package/dist/types/luna-core/util/transform.d.ts +2 -0
  34. package/dist/types/luna-core/util/translate.d.ts +1 -0
  35. package/dist/types/luna-core/util/url.d.ts +10 -0
  36. package/dist/types/luna-react/src/client/component/field/field-list-preview-item.d.ts +1 -1
  37. package/dist/types/luna-react/src/client/component/field/field-preview-item.d.ts +1 -1
  38. package/dist/types/luna-react/src/client/component/field/field-preview.d.ts +1 -1
  39. package/dist/types/luna-react/src/client/component/field/field.d.ts +2 -2
  40. package/dist/types/luna-react/src/client/component/form-content.d.ts +1 -1
  41. package/dist/types/luna-react/src/client/component/form.d.ts +1 -1
  42. package/dist/types/luna-react/src/client/component/guard/visibility-guard.d.ts +1 -1
  43. package/dist/types/luna-react/src/client/component/input-selectable.d.ts +1 -1
  44. package/dist/types/luna-react/src/client/component/input-strategies.d.ts +1 -1
  45. package/dist/types/luna-react/src/client/component/slot/slot.d.ts +3 -3
  46. package/dist/types/luna-react/src/client/hook/use-data-source.d.ts +2 -2
  47. package/dist/types/luna-react/src/client/hook/use-fetch.d.ts +1 -1
  48. package/dist/types/luna-react/src/client/hook/use-field-list.d.ts +1 -1
  49. package/dist/types/luna-react/src/client/hook/use-form-action.d.ts +1 -1
  50. package/dist/types/luna-react/src/client/hook/use-format.d.ts +3 -3
  51. package/dist/types/luna-react/src/client/hook/use-input-core.d.ts +1 -1
  52. package/dist/types/luna-react/src/client/hook/use-input.d.ts +1 -1
  53. package/dist/types/luna-react/src/client/hook/use-schema.d.ts +1 -1
  54. package/dist/types/luna-react/src/client/hook/use-value.d.ts +1 -1
  55. package/dist/types/luna-react/src/client/hook/use-write-only-source.d.ts +1 -1
  56. package/dist/types/luna-react/src/client/index.d.ts +1 -1
  57. package/dist/types/luna-react/src/client/lib/source-store.d.ts +1 -1
  58. package/dist/types/luna-react/src/client/lib/state-store.d.ts +1 -1
  59. package/dist/types/luna-react/src/component/column.d.ts +1 -1
  60. package/dist/types/luna-react/src/component/field/field-error.d.ts +1 -1
  61. package/dist/types/luna-react/src/component/field/field-group.d.ts +1 -1
  62. package/dist/types/luna-react/src/component/field/field-list.d.ts +1 -1
  63. package/dist/types/luna-react/src/component/field/field-set-advanced.d.ts +1 -1
  64. package/dist/types/luna-react/src/component/field/field-set.d.ts +1 -1
  65. package/dist/types/luna-react/src/component/field/field.d.ts +1 -1
  66. package/dist/types/luna-react/src/component/field-description.d.ts +1 -1
  67. package/dist/types/luna-react/src/component/form.d.ts +1 -1
  68. package/dist/types/luna-react/src/component/formatted-description.d.ts +1 -1
  69. package/dist/types/luna-react/src/component/input/input-base.d.ts +1 -1
  70. package/dist/types/luna-react/src/component/input-group.d.ts +1 -1
  71. package/dist/types/luna-react/src/component/input-label.d.ts +1 -1
  72. package/dist/types/luna-react/src/component/label.d.ts +1 -1
  73. package/dist/types/luna-react/src/component/list.d.ts +1 -1
  74. package/dist/types/luna-react/src/component/slot/slot-base.d.ts +1 -1
  75. package/dist/types/luna-react/src/component/slot/slot-create.d.ts +1 -1
  76. package/dist/types/luna-react/src/component/slot/slot-list.d.ts +1 -1
  77. package/dist/types/luna-react/src/component/slot/slot.d.ts +3 -3
  78. package/dist/types/luna-react/src/config/index.d.ts +1 -1
  79. package/dist/types/luna-react/src/schema/index.d.ts +2 -2
  80. package/dist/types/luna-react/src/server/component/fallback.d.ts +1 -1
  81. package/dist/types/luna-react/src/server/component/form.d.ts +1 -1
  82. package/dist/types/luna-react/src/server/component/input.d.ts +1 -1
  83. package/dist/types/luna-react/src/server/index.d.ts +1 -1
  84. package/dist/types/luna-react/src/type.d.ts +1 -1
  85. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import { type Field, type FormStateError, type Nullable, type Schemas, type ZodSchema } from '@luna-form/core';
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 '@luna-form/core';
1
+ import { type Field } from '../../../../luna-core/index';
2
2
  export declare function useFormat(field: Field): {
3
- dateFormat: import("@luna-form/core").DateFormat | null;
4
- timeFormat: import("@luna-form/core").TimeFormat | null;
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 '@luna-form/core';
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 '@luna-form/core';
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 '@luna-form/core';
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 '@luna-form/core';
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 '@luna-form/core';
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,3 +1,3 @@
1
1
  import { Form } from './component/form';
2
2
  export { Form };
3
- export type { Sections, Source, ZodSchema } from '@luna-form/core';
3
+ export type { Sections, Source, ZodSchema } from '../../../luna-core/index';
@@ -1,4 +1,4 @@
1
- import { type DataSource } from '@luna-form/core';
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 { FieldState } from '@luna-form/core';
1
+ import type { FieldState } from '../../../../luna-core/index';
2
2
  export declare const fieldStateAtom: import("jotai").PrimitiveAtom<Record<string, FieldState>> & {
3
3
  init: Record<string, FieldState>;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { type Column } from '@luna-form/core';
1
+ import { type Column } from '../../../luna-core/index';
2
2
  import type { Config } from '../type';
3
3
  export declare function Column(props: Readonly<{
4
4
  children?: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import type { Nullable } from '@luna-form/core';
1
+ import type { Nullable } from '../../../../luna-core/index';
2
2
  export declare function FieldError(props: Readonly<{
3
3
  errors?: Nullable<string[]>;
4
4
  name?: string;
@@ -1,4 +1,4 @@
1
- import { type Field } from '@luna-form/core';
1
+ import { type Field } from '../../../../luna-core/index';
2
2
  export declare function FieldGroup(props: Readonly<{
3
3
  children: React.ReactNode;
4
4
  disabled?: boolean;
@@ -1,4 +1,4 @@
1
- import { type List, type Nullable } from '@luna-form/core';
1
+ import { type List, type Nullable } from '../../../../luna-core/index';
2
2
  export type ListProps = Readonly<{
3
3
  children: (index: number) => React.ReactNode;
4
4
  field: List;
@@ -1,4 +1,4 @@
1
- import type { Section } from '@luna-form/core';
1
+ import type { Section } from '../../../../luna-core/index';
2
2
  export declare function FieldSetAdvanced(props: Readonly<{
3
3
  section: Section;
4
4
  group: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import { type Section, type Style } from '@luna-form/core';
1
+ import { type Section, type Style } from '../../../../luna-core/index';
2
2
  export declare function FieldSet(props: Readonly<{
3
3
  advanced?: {
4
4
  step?: boolean;
@@ -1,4 +1,4 @@
1
- import { type Field, type Style } from '@luna-form/core';
1
+ import { type Field, type Style } from '../../../../luna-core/index';
2
2
  import type { Children } from '../../type';
3
3
  export type FieldProps = Readonly<{
4
4
  children: Children;
@@ -1,5 +1,5 @@
1
1
  import type { Config } from '../type';
2
- import type { Field } from '@luna-form/core';
2
+ import type { Field } from '../../../luna-core/index';
3
3
  export declare function FieldDescription(props: Readonly<{
4
4
  config?: Config;
5
5
  context?: Record<string, unknown>;
@@ -1,4 +1,4 @@
1
- import { type Definition, type Sections } from '@luna-form/core';
1
+ import { type Definition, type Sections } from '../../../luna-core/index';
2
2
  import type { Config, Control, Slot } from '../type';
3
3
  export declare function Form(props: Readonly<{
4
4
  advanced?: {
@@ -1,4 +1,4 @@
1
- import { type Description as DescriptionType } from '@luna-form/core';
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 Field } from '@luna-form/core';
1
+ import { type Field } from '../../../../luna-core/index';
2
2
  import type { Children } from '../../type';
3
3
  export declare function InputBase(props: Readonly<{
4
4
  children: Children;
@@ -1,5 +1,5 @@
1
1
  import type { Config } from '../type';
2
- import type { Field } from '@luna-form/core';
2
+ import type { Field } from '../../../luna-core/index';
3
3
  export declare function InputGroup(props: Readonly<{
4
4
  children: React.ReactNode;
5
5
  config?: Config;
@@ -1,4 +1,4 @@
1
- import { type Field } from '@luna-form/core';
1
+ import { type Field } from '../../../luna-core/index';
2
2
  import type { Config } from '../type';
3
3
  export declare function InputLabel(props: Readonly<{
4
4
  config?: Config;
@@ -1,4 +1,4 @@
1
- import { type Field, type Style } from '@luna-form/core';
1
+ import { type Field, type Style } from '../../../luna-core/index';
2
2
  export declare function Label(props: Readonly<{
3
3
  children?: React.ReactNode;
4
4
  field: Field;
@@ -1,4 +1,4 @@
1
- import type { List } from '@luna-form/core';
1
+ import type { List } from '../../../luna-core/index';
2
2
  export declare function List(props: Readonly<{
3
3
  children: React.ReactNode;
4
4
  field: List;
@@ -1,4 +1,4 @@
1
- import { type Fields, type Nullable, type Style } from '@luna-form/core';
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 '@luna-form/core';
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 '@luna-form/core';
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("@luna-form/core").Fields;
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("@luna-form/core").Style;
11
+ style?: import('../../../../luna-core/index').Style;
12
12
  translations?: Record<string, string>;
13
- value?: import("@luna-form/core").Nullable<Record<string, unknown>>;
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 '@luna-form/core';
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 '@luna-form/core';
2
- export type { AssertRule, Column, Field, Fields, List, Operator, PatternRule, Section, Sections, Validation, WhenClause, WhenRule, ZodSchema, } from '@luna-form/core';
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,5 +1,5 @@
1
1
  import type { Config } from '../../type';
2
- import type { Sections } from '@luna-form/core';
2
+ import type { Sections } from '../../../../luna-core/index';
3
3
  export declare function Fallback(props: Readonly<{
4
4
  children: React.ReactNode;
5
5
  config: Config;
@@ -1,5 +1,5 @@
1
1
  import type { Config } from '../../type';
2
- import type { Definition, Sections } from '@luna-form/core';
2
+ import type { Definition, Sections } from '../../../../luna-core/index';
3
3
  export declare function Form(props: Readonly<{
4
4
  advanced?: {
5
5
  step?: boolean;
@@ -1,4 +1,4 @@
1
- import { type AriaAttributes, type CommonProps, type DataAttributes, type Field } from '@luna-form/core';
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
1
  import { Form } from './component/form';
2
2
  import { Fallback } from './component/fallback';
3
3
  export { Form, Fallback };
4
- export type { Sections, Source } from '@luna-form/core';
4
+ export type { Sections, Source } from '../../../luna-core/index';
@@ -1,4 +1,4 @@
1
- import type { AriaAttributes, BaseConfig, CommonProps, DataAttributes, Field, Fields, FormStateError } from '@luna-form/core';
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.71",
3
+ "version": "0.0.72",
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.71"
37
+ "@luna-form/core": "0.0.72"
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
  }