UNPKG

@wordpress/components

Version:
1 lines • 2.07 kB
{"version":3,"file":"constants.mjs","names":[],"sources":["../../src/custom-gradient-picker/constants.ts"],"sourcesContent":["import { __ } from '@wordpress/i18n';\n\nexport const DEFAULT_GRADIENT =\n\t'linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)';\n\nexport const DEFAULT_LINEAR_GRADIENT_ANGLE = 180;\n\nexport const HORIZONTAL_GRADIENT_ORIENTATION = {\n\ttype: 'angular',\n\tvalue: '90',\n\tunit: 'deg',\n} as const;\n\nexport const GRADIENT_OPTIONS = [\n\t{ value: 'linear-gradient', label: __( 'Linear' ) },\n\t{ value: 'radial-gradient', label: __( 'Radial' ) },\n];\n\nexport const DIRECTIONAL_ORIENTATION_ANGLE_MAP = {\n\ttop: 0,\n\t'top right': 45,\n\t'right top': 45,\n\tright: 90,\n\t'right bottom': 135,\n\t'bottom right': 135,\n\tbottom: 180,\n\t'bottom left': 225,\n\t'left bottom': 225,\n\tleft: 270,\n\t'top left': 315,\n\t'left top': 315,\n};\n\n// The color spaces and hue interpolation methods that a CSS\n// `<color-interpolation-method>` accepts, e.g. `in oklch longer hue`.\n// See https://www.w3.org/TR/css-color-4/#interpolation-space.\nexport const RECTANGULAR_INTERPOLATION_COLOR_SPACES = [\n\t'srgb',\n\t'srgb-linear',\n\t'display-p3',\n\t'display-p3-linear',\n\t'a98-rgb',\n\t'prophoto-rgb',\n\t'rec2020',\n\t'lab',\n\t'oklab',\n\t'xyz',\n\t'xyz-d50',\n\t'xyz-d65',\n];\n\nexport const POLAR_INTERPOLATION_COLOR_SPACES = [\n\t'hsl',\n\t'hwb',\n\t'lch',\n\t'oklch',\n];\n\nexport const HUE_INTERPOLATION_METHODS = [\n\t'shorter',\n\t'longer',\n\t'increasing',\n\t'decreasing',\n];\n"],"mappings":";;AAEA,MAAa,mBACZ;AAED,MAAa,gCAAgC;AAE7C,MAAa,kCAAkC;CAC9C,MAAM;CACN,OAAO;CACP,MAAM;AACP;AAEA,MAAa,mBAAmB,CAC/B;CAAE,OAAO;CAAmB,OAAO,GAAI,QAAS;AAAE,GAClD;CAAE,OAAO;CAAmB,OAAO,GAAI,QAAS;AAAE,CACnD;AAEA,MAAa,oCAAoC;CAChD,KAAK;CACL,aAAa;CACb,aAAa;CACb,OAAO;CACP,gBAAgB;CAChB,gBAAgB;CAChB,QAAQ;CACR,eAAe;CACf,eAAe;CACf,MAAM;CACN,YAAY;CACZ,YAAY;AACb;AAKA,MAAa,yCAAyC;CACrD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AAEA,MAAa,mCAAmC;CAC/C;CACA;CACA;CACA;AACD;AAEA,MAAa,4BAA4B;CACxC;CACA;CACA;CACA;AACD"}