As of Arduino ESP32 Release v3.0.x based on ESP-IDF v5.1.4 some DAC definitions are declared deprecated or were removed and new definitions have been added. For example DAC_CHAN_0 substitutes DAC_CHANNEL_1, DAC_CHAN0_GPIO_NUM substitutes DAC_CHANNEL_1_GPIO_NUM etc. The typedef dac_cw_scale_t might even get removed sometime in the future. Have a look here.
This version 1.1.1 of the DacESP32 lib still uses the (now) deprecated definitions because the Espressif 32 platform on PlatformIO is still based on Arduino ESP32 release V2.0.16. However, it has seen some minor changes and for the time being will allow successful builds on ArduinoIDE. It might produce a lot of 'deprecated' warnings though.