@synergy-design-system/components
Version:
This package provides the base of the Synergy Design System as native web components. It uses [lit](https://www.lit.dev) and parts of [shoelace](https://shoelace.style/). Synergy officially supports the latest two versions of all major browsers (as define
42 lines (41 loc) • 2.22 kB
TypeScript
import type SynergyElement from '../../internal/synergy-element.js';
import { type ComponentNamesWithDefaultValues, type ExtractSettingsForElement, type GlobalSettingsEnabledElement, type RecursivePartial, type SynDefaultSettings } from './base.js';
/**
* Enables or disables the experimental setting to emit events when the default settings change
* @param enabled Whether to enable or disable the experimental setting
*/
export declare const enableExperimentalSettingEmitEvents: (enabled?: boolean) => void;
/**
* Adds an element to the global event notification map
* Does not have any effect when SYNERGY_EXPERIMENTAL_SETTING_EMIT_EVENTS is false
* @param element The element to add
*/
export declare const addGlobalEventNotification: (element: GlobalSettingsEnabledElement) => void;
/**
* Removes an element from the global event notification map
* Does not have any effect when SYNERGY_EXPERIMENTAL_SETTING_EMIT_EVENTS is false
* @param element The element to remove
*/
export declare const removeGlobalEventNotification: (element: GlobalSettingsEnabledElement) => void;
/**
* Extracts all available default settings for a given component
* @param component The name of the component to get the settings for
* @param from The source to get the settings from
* @returns key value pair of found settings for the given component
*/
export declare const extractDefaultSettingsForElement: (component: ComponentNamesWithDefaultValues, from?: "default" | "initial") => Record<string, unknown>;
/**
* Set the default values for a given component
* @param component The component to set the defaults for
* @param newValues Map of new values to set
*/
export declare const setDefaultSettingsForElement: <C extends SynergyElement>(component: ComponentNamesWithDefaultValues, newValues: Partial<ExtractSettingsForElement<C>>) => SynDefaultSettings;
/**
* Set the global default settings
* @param newSettings The new settings to set
*/
export declare const setGlobalDefaultSettings: (newSettings: RecursivePartial<SynDefaultSettings>) => SynDefaultSettings;
/**
* Reset the global default settings to synergies initial values
*/
export declare const resetGlobalDefaultSettings: () => SynDefaultSettings;