@zod-to-form/core 0.6.0 → 0.6.1

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 (2) hide show
  1. package/README.md +28 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -70,11 +70,28 @@ Built-in processor registry for core Zod types.
70
70
 
71
71
  Namespace export of individual processor implementations.
72
72
 
73
+ ### `defineConfig(config)`
74
+
75
+ Type-safe config builder for `ZodFormsConfig`. Merges preset overrides into the returned config object.
76
+
77
+ ### `validateConfig(value, source?)`
78
+
79
+ Validates a raw config object against the config schema. Throws with a descriptive message on failure.
80
+
81
+ ### `resolveFieldConfig(globalFields, schemaFields)`
82
+
83
+ Merges global and per-schema field configs with schema-level overrides taking priority.
84
+
73
85
  ### Utility Exports
74
86
 
75
87
  - `inferLabel(key: string)`
76
88
  - `joinPath(...parts: string[])`
77
89
  - `createBaseField(key: string, zodType: string)`
90
+ - `getEmptyDefault(schema)` — schema-inferred type-safe empty value
91
+ - `normalizeFieldKey(key)` — normalize dot-path field keys
92
+ - `collectFieldSections(fields)` — group fields by section name
93
+ - `registerDeep(registry, schema, meta)` — register metadata on a schema and its children
94
+ - `registerFlat(registry, schema, fieldConfigs)` — register flat field configs onto schema shapes
78
95
 
79
96
  ## Types
80
97
 
@@ -84,11 +101,21 @@ Core public types:
84
101
  - `FormFieldOption`
85
102
  - `FormFieldConstraints`
86
103
  - `FormMeta`
104
+ - `FieldConfig`
87
105
  - `FormProcessor`
88
106
  - `FormProcessorContext`
89
107
  - `ProcessParams`
90
108
  - `WalkOptions`
91
109
  - `ZodFormRegistry`
110
+ - `ComponentOverride`
111
+ - `ComponentPreset`
112
+ - `ComponentsConfig`
113
+ - `FormPrimitivesConfig`
114
+ - `TypedFieldConfig`
115
+ - `ZodFormsConfig`
116
+ - `ZodTypeConfig`
117
+ - `ConfigDefaults`
118
+ - `StripIndexSignature`
92
119
 
93
120
  ## Form Metadata via Zod Registry
94
121
 
@@ -107,7 +134,7 @@ const schema = z.object({
107
134
  });
108
135
 
109
136
  formRegistry.add(schema.shape.bio, {
110
- fieldType: 'textarea',
137
+ component: 'Textarea',
111
138
  order: 1,
112
139
  gridColumn: 'span 2'
113
140
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zod-to-form/core",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Schema walker and processor registry for Zod v4 form generation",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/pradeepmouli/zod-to-form#readme",