@reformer/ui 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import type { FormFields, GroupNodeWithControls } from '@reformer/core';
1
+ import type { FormFields, FormProxy } from '@reformer/core';
2
2
  import { FormArrayList } from './FormArrayList';
3
3
  import { FormArrayAddButton } from './FormArrayAddButton';
4
4
  import { FormArrayRemoveButton } from './FormArrayRemoveButton';
@@ -23,7 +23,7 @@ export interface FormArrayHandle<T extends FormFields> {
23
23
  /** Whether the array is empty */
24
24
  isEmpty: boolean;
25
25
  /** Get item control at specific index */
26
- at: (index: number) => GroupNodeWithControls<T> | undefined;
26
+ at: (index: number) => FormProxy<T> | undefined;
27
27
  }
28
28
  declare const FormArrayRoot: <T extends FormFields>(props: FormArrayRootProps<T> & {
29
29
  ref?: React.ForwardedRef<FormArrayHandle<T>>;
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode, ElementType } from 'react';
2
- import type { ArrayNode, FormFields, GroupNodeWithControls } from '@reformer/core';
2
+ import type { ArrayNode, FormFields, FormProxy } from '@reformer/core';
3
3
  /**
4
4
  * Props for FormArray.Root component
5
5
  */
@@ -25,7 +25,7 @@ export interface FormArrayListProps<T extends FormFields> {
25
25
  */
26
26
  export interface FormArrayItemRenderProps<T extends FormFields> {
27
27
  /** The form control for this item */
28
- control: GroupNodeWithControls<T>;
28
+ control: FormProxy<T>;
29
29
  /** Zero-based index of the item */
30
30
  index: number;
31
31
  /** Unique identifier for React key */
@@ -1,10 +1,10 @@
1
- import { type ArrayNode, type FormFields, type GroupNodeWithControls } from '@reformer/core';
1
+ import { type ArrayNode, type FormFields, type FormProxy } from '@reformer/core';
2
2
  /**
3
3
  * Represents a single item in a form array with its control, index, and actions
4
4
  */
5
5
  export interface FormArrayItem<T extends FormFields> {
6
6
  /** The form control for this item */
7
- control: GroupNodeWithControls<T>;
7
+ control: FormProxy<T>;
8
8
  /** Zero-based index of the item in the array */
9
9
  index: number;
10
10
  /** Unique identifier for React key (uses internal id or falls back to index) */
@@ -1,4 +1,4 @@
1
- import type { GroupNodeWithControls } from '@reformer/core';
1
+ import type { FormProxy } from '@reformer/core';
2
2
  /**
3
3
  * Context value for FormNavigation
4
4
  * Shares navigation state and methods with child components
@@ -19,7 +19,7 @@ export interface FormNavigationContextValue<T extends Record<string, any>> {
19
19
  /** Is form submitting */
20
20
  isSubmitting: boolean;
21
21
  /** Form instance */
22
- form: GroupNodeWithControls<T>;
22
+ form: FormProxy<T>;
23
23
  /** Go to next step (with validation) */
24
24
  goToNextStep: () => Promise<boolean>;
25
25
  /** Go to previous step */
@@ -1,15 +1,15 @@
1
1
  import type { ComponentType } from 'react';
2
- import type { GroupNodeWithControls } from '@reformer/core';
2
+ import type { FormProxy } from '@reformer/core';
3
3
  /**
4
4
  * Props for FormNavigation.Step component
5
5
  */
6
6
  export interface FormNavigationStepProps<T extends Record<string, any>> {
7
7
  /** Component to render for this step */
8
8
  component: ComponentType<{
9
- control: GroupNodeWithControls<T>;
9
+ control: FormProxy<T>;
10
10
  } & Record<string, unknown>>;
11
11
  /** Form control to pass to the component */
12
- control: GroupNodeWithControls<T>;
12
+ control: FormProxy<T>;
13
13
  /** Any additional props to pass to the component */
14
14
  [key: string]: unknown;
15
15
  }
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { GroupNodeWithControls, ValidationSchemaFn } from '@reformer/core';
2
+ import type { FormProxy, ValidationSchemaFn } from '@reformer/core';
3
3
  /**
4
4
  * Configuration for multi-step form navigation
5
5
  * Note: totalSteps is inferred from children count
@@ -40,7 +40,7 @@ export interface FormNavigationHandle<T extends Record<string, any>> {
40
40
  */
41
41
  export interface FormNavigationProps<T extends Record<string, any>> {
42
42
  /** Form instance */
43
- form: GroupNodeWithControls<T>;
43
+ form: FormProxy<T>;
44
44
  /** Step configuration (validation schemas) */
45
45
  config: FormNavigationConfig<T>;
46
46
  /** Children (Step components, Indicator, Actions, Progress, or any ReactNode) */
package/llms.txt CHANGED
@@ -81,7 +81,7 @@ import { FormArray } from '@reformer/ui/form-array';
81
81
 
82
82
  ```typescript
83
83
  interface FormArrayItemRenderProps<T> {
84
- control: GroupNodeWithControls<T>; // Form control for item
84
+ control: FormProxy<T>; // Form control for item
85
85
  index: number; // Zero-based index
86
86
  id: string | number; // Unique key
87
87
  remove: () => void; // Remove this item
@@ -116,7 +116,7 @@ interface FormArrayHandle<T> {
116
116
  removeAt: (index: number) => void;
117
117
  length: number;
118
118
  isEmpty: boolean;
119
- at: (index: number) => GroupNodeWithControls<T> | undefined;
119
+ at: (index: number) => FormProxy<T> | undefined;
120
120
  }
121
121
  ```
122
122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reformer/ui",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "Headless UI components for @reformer/core - form arrays, multi-step wizards, and more",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,6 +24,7 @@
24
24
  "scripts": {
25
25
  "generate:llms": "npx tsx scripts/generate-llms.ts",
26
26
  "build": "npm run generate:llms && vite build && tsc -p tsconfig.json",
27
+ "build:stackblitz": "vite build && tsc -p tsconfig.json",
27
28
  "dev": "vite",
28
29
  "test": "vitest",
29
30
  "test:watch": "vitest watch"