HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux vm8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: afleverb (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //var/www/drakkar_site_dev/wp-content/themes/blocksy/static/js/customizer/customizer-variables.js
import { handleVariablesFor } from 'customizer-sync-helpers/dist/simplified'

export const listenToVariables = () => {
	handleVariablesFor({
		colorPalette: (value) =>
			Object.keys(value).reduce(
				(acc, key) => [
					...acc,
					{
						variable: value[key].variable
							? value[key].variable
							: `theme-palette-color-${key.replace('color', '')}`,
						type: `color:${key}`,
					},
				],
				[]
			),

		fontColor: {
			selector: ':root',
			variable: 'theme-text-color',
			type: 'color',
		},

		linkColor: [
			{
				selector: ':root',
				variable: 'theme-link-initial-color',
				type: 'color:default',
			},

			{
				selector: ':root',
				variable: 'theme-link-hover-color',
				type: 'color:hover',
			},
		],

		formTextColor: [
			{
				selector: ':root',
				variable: 'theme-form-text-initial-color',
				type: 'color:default',
			},

			{
				selector: ':root',
				variable: 'theme-form-text-focus-color',
				type: 'color:focus',
			},
		],

		formBorderColor: [
			{
				selector: ':root',
				variable: 'theme-form-field-border-initial-color',
				type: 'color:default',
			},

			{
				selector: ':root',
				variable: 'theme-form-field-border-focus-color',
				type: 'color:focus',
			},
		],

		formBackgroundColor: [
			{
				selector: ':root',
				variable: 'theme-form-field-background-initial-color',
				type: 'color:default',
			},

			{
				selector: ':root',
				variable: 'theme-form-field-background-focus-color',
				type: 'color:focus',
			},
		],

		border_color: {
			selector: ':root',
			variable: 'theme-border-color',
			type: 'color',
		},

		headingColor: {
			selector: ':root',
			variable: 'theme-headings-color',
			type: 'color',
		},

		heading_1_color: {
			selector: ':root',
			variable: 'theme-heading-1-color',
			type: 'color',
		},

		heading_2_color: {
			selector: ':root',
			variable: 'theme-heading-2-color',
			type: 'color',
		},

		heading_3_color: {
			selector: ':root',
			variable: 'theme-heading-3-color',
			type: 'color',
		},

		heading_4_color: {
			selector: ':root',
			variable: 'theme-heading-4-color',
			type: 'color',
		},

		heading_5_color: {
			selector: ':root',
			variable: 'theme-heading-5-color',
			type: 'color',
		},

		heading_6_color: {
			selector: ':root',
			variable: 'theme-heading-6-color',
			type: 'color',
		},

		buttonTextColor: [
			{
				selector: ':root',
				variable: 'theme-button-text-initial-color',
				type: 'color:default',
			},

			{
				selector: ':root',
				variable: 'theme-button-text-hover-color',
				type: 'color:hover',
			},
		],

		buttonColor: [
			{
				selector: ':root',
				variable: 'theme-button-background-initial-color',
				type: 'color:default',
			},

			{
				selector: ':root',
				variable: 'theme-button-background-hover-color',
				type: 'color:hover',
			},
		],

		global_quantity_color: [
			{
				selector: ':root',
				variable: 'quantity-initial-color',
				type: 'color:default',
			},

			{
				selector: ':root',
				variable: 'quantity-hover-color',
				type: 'color:hover',
			},
		],

		global_quantity_arrows: [
			{
				selector: ':root',
				variable: 'quantity-arrows-initial-color',
				type: 'color:default',
			},

			{
				selector: ':root',
				variable: 'quantity-arrows-initial-color',
				type: 'color:default_type_2',
			},

			{
				selector: ':root',
				variable: 'quantity-arrows-hover-color',
				type: 'color:hover',
			},
		],
	})
}