declare type TypeNameToSdkType = { Avatar: $w.Avatar; AvatarGroup: $w.AvatarGroup; Breadcrumbs: $w.Breadcrumbs; Chatbox: $w.Chatbox; CollapsibleText: $w.CollapsibleText; DashboardIconButton: $w.DashboardIconButton; DashboardInfoIcon: $w.DashboardInfoIcon; DashboardInput: $w.DashboardInput; DashboardNumberInput: $w.DashboardNumberInput; DashboardText: $w.DashboardText; DashboardTextButton: $w.DashboardTextButton; HamburgerCloseButton: $w.HamburgerCloseButton; HamburgerMenuContainer: $w.HamburgerMenuContainer; HamburgerOpenButton: $w.HamburgerOpenButton; HamburgerOverlay: $w.HamburgerOverlay; Lottie: $w.Lottie; ReactComponent: $w.ReactComponent; RichContentViewer: $w.RichContentViewer; Section: $w.Section; TextMarquee: $w.TextMarquee; TextMask: $w.TextMask; TextParticles: $w.TextParticles; AccountNavBar: $w.AccountNavBar; Anchor: $w.Anchor; AppointmentField: $w.AppointmentField; Box: $w.Box; Button: $w.Button; Checkbox: $w.Checkbox; CheckboxGroup: $w.CheckboxGroup; Column: $w.Column; ColumnStrip: $w.ColumnStrip; Container: $w.Container; DatePicker: $w.DatePicker; Document: $w.Document; Dropdown: $w.Dropdown; Footer: $w.Footer; Gallery: $w.Gallery; GoogleMap: $w.GoogleMap; Header: $w.Header; HtmlComponent: $w.HtmlComponent; IFrame: $w.IFrame; Image: $w.Image; MediaBox: $w.MediaBox; Menu: $w.Menu; MenuContainer: $w.MenuContainer; MobileDatePicker: $w.MobileDatePicker; MultiStateBox: $w.MultiStateBox; Page: $w.Page; QuickActionBar: $w.QuickActionBar; RadioButtonGroup: $w.RadioButtonGroup; Repeater: $w.Repeater; Slide: $w.Slide; Slideshow: $w.Slideshow; Table: $w.Table; Tabs: $w.Tabs; Text: $w.Text; TextBox: $w.TextBox; TextEffects: $w.TextEffects; TextInput: $w.TextInput; UploadButton: $w.UploadButton; VectorImage: $w.VectorImage; Video: $w.Video; VideoBox: $w.VideoBox; MobileButton: $w.MobileButton; MobileContainer: $w.MobileContainer; MobileImage: $w.MobileImage; MobilePicker: $w.MobilePicker; MobileRepeater: $w.MobileRepeater; MobileSwitch: $w.MobileSwitch; MobileText: $w.MobileText; MobileTextInput: $w.MobileTextInput; PanelButton: $w.PanelButton; PanelCheckboxGroup: $w.PanelCheckboxGroup; PanelColorPicker: $w.PanelColorPicker; PanelDropdown: $w.PanelDropdown; PanelFontAndColorPicker: $w.PanelFontAndColorPicker; PanelRadioButtonGroup: $w.PanelRadioButtonGroup; PanelRichText: $w.PanelRichText; PanelSectionDivider: $w.PanelSectionDivider; PanelSlider: $w.PanelSlider; PanelTextInput: $w.PanelTextInput; PanelThumbnails: $w.PanelThumbnails; PanelToggleSwitch: $w.PanelToggleSwitch; AddressInput: $w.AddressInput; AudioPlayer: $w.AudioPlayer; Captcha: $w.Captcha; MobileVideoPlayer: $w.MobileVideoPlayer; Pagination: $w.Pagination; ProgressBar: $w.ProgressBar; RangeSlider: $w.RangeSlider; RatingsDisplay: $w.RatingsDisplay; RatingsInput: $w.RatingsInput; RichTextBox: $w.RichTextBox; Slider: $w.Slider; SlideshowButton: $w.SlideshowButton; Switch: $w.Switch; TimePicker: $w.TimePicker; VideoPlayer: $w.VideoPlayer; }; // the first part of this file is being generated by => scripts/selector-declaration-builder.js // Run `npm run generate-dts` to generate it declare type IntersectionArrayAndBase = { [K in keyof T]: K extends P ? T[K] : T[K] & T[K][]; }; declare type TypeSelectorMap = IntersectionArrayAndBase< TypeNameToSdkType, "Document" >; declare type WixElements = PageElementsMap & TypeSelectorMap; declare type NicknameSelector = keyof PageElementsMap; declare type TypeSelector = keyof TypeSelectorMap; declare type WixElementSelector = NicknameSelector | TypeSelector; declare type IsWixElementSelector = S extends WixElementSelector ? WixElements[S] : never; /** * Selects and returns elements from a page. */ declare function $w( selector: T | (S & IsWixElementSelector), ): S extends keyof WixElements ? WixElements[S] : any; /** * The `$w` namespace contains everything you need in order to work with your site's components. */ declare namespace $w { /** * Gets a selector function for a specific context. */ function at(context: $w.Event.EventContext): $w.$w; /** * Sets the function that runs when all the page elements have finished loading. */ function onReady(initFunction: $w.ReadyHandler): void; /** * Selects and returns elements from a page. */ type $w = ( selector: T | (S & IsWixElementSelector), ) => S extends keyof WixElements ? WixElements[S] : any; }