import { type ResolvedValueType, ControlDefinition as UnifiedControlDefinition } from '@makeswift/controls'; import { type ResponsiveColor } from '../components/utils/types'; import type { Data } from '../state/read-only-state'; import { BorderDescriptor, CheckboxDescriptor, LinkDescriptor, ResolveLinkPropControllerValue, Types as PropControllerTypes, ShadowsDescriptor, ResolveShadowsPropControllerValue, ResponsiveLengthDescriptor, ResolveResponsiveLengthPropControllerValue, NumberDescriptor, ResolveNumberPropControllerValue, ResponsiveColorDescriptor, ResolveCheckboxPropControllerValue, BorderRadiusDescriptor, ResolveBorderPropControllerValue, ResolveBorderRadiusPropControllerValue, DateDescriptor, ResolveDatePropControllerValue, FontDescriptor, ResolveFontPropControllerValue, VideoDescriptor, ResolveVideoPropControllerValue, TableDescriptor, ResolveTablePropControllerValue, MarginDescriptor, ResolveMarginPropControllerValue, PaddingDescriptor, ResolvePaddingPropControllerValue, WidthDescriptor, ResolveWidthPropControllerValue, TextStyleDescriptor, ResolveTextStylePropControllerValue, NavigationLinksDescriptor, ResolveNavigationLinksPropControllerValue, TextAreaDescriptor, ResolveTextAreaPropControllerValue, GapX, ResponsiveNumber, ResponsiveSelect, ResolveGapYPropControllerValue, GapYDescriptor, ElementIDDescriptor, ResolveElementIDPropControllerValue, TableFormFieldsDescriptor, ResolveTableFormFieldsPropControllerValue, GridDescriptor, ResolveGridPropControllerValue, ImageDescriptor, ResolveImagePropControllerValue, ImagesDescriptor, ResolveImagesPropControllerValue, BackgroundsDescriptor, ResolveBackgroundsPropControllerValue, ResponsiveOpacity, ResponsiveIconRadioGroup, ResolveSocialLinksPropControllerValue, SocialLinksDescriptor, TextInputDescriptor, ResolveTextInputPropControllerValue, type Descriptor as PropDescriptor, type Value as PropValue } from '@makeswift/prop-controllers'; import { DeletedPropControllerDescriptor } from './deleted'; export type { Data }; export type Gap = { value: number; unit: 'px'; }; type PropControllerDescriptor = DeletedPropControllerDescriptor | BackgroundsDescriptor | BorderDescriptor | BorderRadiusDescriptor | CheckboxDescriptor | DateDescriptor | ElementIDDescriptor | FontDescriptor | PropDescriptor | GapYDescriptor | GridDescriptor | ImageDescriptor | ImagesDescriptor | LinkDescriptor | MarginDescriptor | NavigationLinksDescriptor | NumberDescriptor | PaddingDescriptor | ResponsiveColorDescriptor | ResponsiveLengthDescriptor | PropDescriptor | PropDescriptor | PropDescriptor | PropDescriptor | ShadowsDescriptor | SocialLinksDescriptor | TableDescriptor | TableFormFieldsDescriptor | TextAreaDescriptor | TextInputDescriptor | TextStyleDescriptor | VideoDescriptor | WidthDescriptor; export type LegacyDescriptor = PropControllerDescriptor; export type Descriptor = LegacyDescriptor | UnifiedControlDefinition; export declare function isLegacyDescriptor(control: Descriptor): control is LegacyDescriptor; export type PanelDescriptorType = typeof PropControllerTypes.Backgrounds | typeof PropControllerTypes.ResponsiveIconRadioGroup | typeof PropControllerTypes.Margin | typeof PropControllerTypes.Padding | typeof PropControllerTypes.Shadows | typeof PropControllerTypes.Border | typeof PropControllerTypes.GapY | typeof PropControllerTypes.GapX | typeof PropControllerTypes.BorderRadius | typeof PropControllerTypes.Checkbox | typeof PropControllerTypes.TextInput | typeof PropControllerTypes.Link | typeof PropControllerTypes.ResponsiveSelect | typeof PropControllerTypes.ResponsiveColor | typeof PropControllerTypes.TextStyle | typeof PropControllerTypes.Images | typeof PropControllerTypes.ResponsiveNumber | typeof PropControllerTypes.Number | typeof PropControllerTypes.Date | typeof PropControllerTypes.Font | typeof PropControllerTypes.TextArea | typeof PropControllerTypes.Table | typeof PropControllerTypes.Image | typeof PropControllerTypes.ResponsiveOpacity | typeof PropControllerTypes.SocialLinks | typeof PropControllerTypes.Video | typeof PropControllerTypes.NavigationLinks; export type PanelDescriptor = Extract, { type: PanelDescriptorType; }>; export type PropControllerDescriptorValueType = T['type'] extends typeof PropControllerTypes.ResponsiveColor ? // TODO(miguel): We're not importing a resolver type from `@makeswift/prop-controllers` because ResponsiveColor | null | undefined : T['type'] extends typeof PropControllerTypes.Backgrounds ? ResolveBackgroundsPropControllerValue> : T['type'] extends typeof PropControllerTypes.Checkbox ? ResolveCheckboxPropControllerValue> : T['type'] extends typeof PropControllerTypes.Date ? ResolveDatePropControllerValue> : T['type'] extends typeof PropControllerTypes.ElementID ? ResolveElementIDPropControllerValue> : T['type'] extends typeof PropControllerTypes.Font ? ResolveFontPropControllerValue> : T['type'] extends typeof PropControllerTypes.GapX ? PropValue | undefined : T['type'] extends typeof PropControllerTypes.GapY ? ResolveGapYPropControllerValue> : T['type'] extends typeof PropControllerTypes.Grid ? ResolveGridPropControllerValue> : T['type'] extends typeof PropControllerTypes.Image ? ResolveImagePropControllerValue> : T['type'] extends typeof PropControllerTypes.Images ? ResolveImagesPropControllerValue> : T['type'] extends typeof PropControllerTypes.ResponsiveIconRadioGroup ? PropValue | undefined : T['type'] extends typeof PropControllerTypes.ResponsiveNumber ? PropValue | undefined : T['type'] extends typeof PropControllerTypes.ResponsiveOpacity ? PropValue | undefined : T['type'] extends typeof PropControllerTypes.ResponsiveSelect ? PropValue | undefined : T['type'] extends typeof PropControllerTypes.Link ? ResolveLinkPropControllerValue> : T['type'] extends typeof PropControllerTypes.Width ? ResolveWidthPropControllerValue> : T['type'] extends typeof PropControllerTypes.Padding ? ResolvePaddingPropControllerValue> : T['type'] extends typeof PropControllerTypes.Margin ? ResolveMarginPropControllerValue> : T['type'] extends typeof PropControllerTypes.NavigationLinks ? ResolveNavigationLinksPropControllerValue> : T['type'] extends typeof PropControllerTypes.BorderRadius ? ResolveBorderRadiusPropControllerValue> : T['type'] extends typeof PropControllerTypes.Shadows ? ResolveShadowsPropControllerValue> : T['type'] extends typeof PropControllerTypes.SocialLinks ? ResolveSocialLinksPropControllerValue> : T['type'] extends typeof PropControllerTypes.ResponsiveLength ? ResolveResponsiveLengthPropControllerValue> : T['type'] extends typeof PropControllerTypes.Border ? ResolveBorderPropControllerValue> : T['type'] extends typeof PropControllerTypes.Number ? ResolveNumberPropControllerValue> : T['type'] extends typeof PropControllerTypes.Table ? ResolveTablePropControllerValue> : T['type'] extends typeof PropControllerTypes.TableFormFields ? ResolveTableFormFieldsPropControllerValue> : T['type'] extends typeof PropControllerTypes.TextStyle ? ResolveTextStylePropControllerValue> : T['type'] extends typeof PropControllerTypes.TextArea ? ResolveTextAreaPropControllerValue> : T['type'] extends typeof PropControllerTypes.TextInput ? ResolveTextInputPropControllerValue> : T['type'] extends typeof PropControllerTypes.Video ? ResolveVideoPropControllerValue> : T extends Descriptor ? U | undefined : never; export type DescriptorValueType = T extends PropControllerDescriptor ? PropControllerDescriptorValueType : T extends UnifiedControlDefinition ? ResolvedValueType : T extends Descriptor ? U | undefined : never; export type PanelDescriptorValueType = T extends PanelDescriptor ? U : never; //# sourceMappingURL=descriptors.d.ts.map