attaform 0.17.1 → 0.17.2

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.
@@ -1579,12 +1579,16 @@ function useForm(configuration) {
1579
1579
  const abstractSchema = isZodType(schema) ? zodAdapter(schema) : schema;
1580
1580
  return useFormContext.useAbstractForm({
1581
1581
  ...configuration,
1582
- // The v3 adapter widens the read-side type through
1583
- // `TypeWithNullableDynamicKeys<Schema>` (records/arrays/DUs get
1584
- // `| undefined` markers); useAbstractForm's parameter expects the
1585
- // exact `GetValueFormType` (defaults to `Form`). The runtime
1586
- // accepts the widened shape unchanged — cast across the gap so
1587
- // the structural disagreement doesn't reach the caller.
1582
+ // `zodAdapter`'s constraint on its third generic is
1583
+ // `GetValueFormType extends TypeWithNullableDynamicKeys<FormSchema>`,
1584
+ // and `Schema` at this implementation overload is only constrained
1585
+ // by `extends z.ZodSchema<unknown>` too loose for
1586
+ // `z.output<UnwrapZodObject<typeof schema>>` to resolve concretely.
1587
+ // Pass `TypeWithNullableDynamicKeys<typeof schema>` here purely to
1588
+ // satisfy the adapter's constraint at the structural-cast layer.
1589
+ // The PUBLIC signature's `GetValueFormType` default (line 67) is
1590
+ // what consumers see — that's `z.output<UnwrapZodObject<Schema>>`,
1591
+ // matching the docstring promise. Runtime is unaffected either way.
1588
1592
  schema: abstractSchema,
1589
1593
  defaultValues: configuration.defaultValues
1590
1594
  });
@@ -1595,4 +1599,4 @@ exports.isZodSchemaType = isZodSchemaType;
1595
1599
  exports.useForm = useForm;
1596
1600
  exports.withMeta = withMeta;
1597
1601
  exports.zodAdapter = zodAdapter;
1598
- //# sourceMappingURL=attaform.B5qiXQwN.cjs.map
1602
+ //# sourceMappingURL=attaform.BPRHR3Zs.cjs.map