"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.euiCodeSyntaxTokens = exports.euiCodeSyntaxColors = void 0; var _services = require("../../services"); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0 and the Server Side Public License, v 1; you may not use this file except * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ var visColors = (0, _services.euiPaletteColorBlind)(); var euiCodeSyntaxColors = function euiCodeSyntaxColors(euiThemeContext) { var euiTheme = euiThemeContext.euiTheme; var backgroundColor = euiTheme.colors.lightestShade; return { backgroundColor: backgroundColor, color: (0, _services.makeHighContrastColor)(euiTheme.colors.text)(backgroundColor), inlineCodeColor: (0, _services.makeHighContrastColor)(visColors[3])(backgroundColor), selectedBackgroundColor: 'inherit', commentColor: (0, _services.makeHighContrastColor)(euiTheme.colors.subduedText)(backgroundColor), selectorTagColor: 'inherit', stringColor: (0, _services.makeHighContrastColor)(visColors[2])(backgroundColor), tagColor: (0, _services.makeHighContrastColor)(visColors[1])(backgroundColor), nameColor: (0, _services.makeHighContrastColor)(visColors[1])(backgroundColor), numberColor: (0, _services.makeHighContrastColor)(visColors[0])(backgroundColor), keywordColor: (0, _services.makeHighContrastColor)(visColors[3])(backgroundColor), functionTitleColor: 'inherit', typeColor: (0, _services.makeHighContrastColor)(visColors[1])(backgroundColor), attributeColor: 'inherit', symbolColor: (0, _services.makeHighContrastColor)(visColors[9])(backgroundColor), paramsColor: 'inherit', metaColor: (0, _services.makeHighContrastColor)(euiTheme.colors.subduedText)(backgroundColor), titleColor: (0, _services.makeHighContrastColor)(visColors[7])(backgroundColor), sectionColor: (0, _services.makeHighContrastColor)(visColors[9])(backgroundColor), additionColor: (0, _services.makeHighContrastColor)(visColors[0])(backgroundColor), deletionColor: (0, _services.makeHighContrastColor)(euiTheme.colors.danger)(backgroundColor), selectorClassColor: 'inherit', selectorIdColor: 'inherit' }; }; exports.euiCodeSyntaxColors = euiCodeSyntaxColors; var euiCodeSyntaxTokens = function euiCodeSyntaxTokens(euiThemeContext) { var euiTheme = euiThemeContext.euiTheme; var euiCodeBlock = euiCodeSyntaxColors(euiThemeContext); return "\n .token.punctuation:not(.interpolation-punctuation):not([class*='attr-']) {\n opacity: .7;\n }\n \n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata,\n .token.coord,\n .token.blockquote {\n color: ".concat(euiCodeBlock.commentColor, ";\n font-style: italic;\n }\n \n .token.selector {\n color: ").concat(euiCodeBlock.selectorTagColor, ";\n }\n \n .token.string,\n .token.interpolation,\n .token.interpolation-punctuation,\n .token.doc-comment .token.keyword,\n .token.attr-value,\n .token.url .token.content {\n color: ").concat(euiCodeBlock.stringColor, ";\n }\n \n .token.number,\n .token.boolean,\n .token.keyword.nil,\n .token.regex,\n .token.variable,\n .token.unit,\n .token.hexcode,\n .token.attr-name,\n .token.attr-equals {\n color: ").concat(euiCodeBlock.numberColor, ";\n }\n \n .token.atrule .token.rule,\n .token.keyword {\n color: ").concat(euiCodeBlock.keywordColor, ";\n }\n \n .token.function {\n color: ").concat(euiCodeBlock.functionTitleColor, ";\n }\n \n .token.tag {\n color: ").concat(euiCodeBlock.tagColor, ";\n }\n \n .token.class-name {\n color: ").concat(euiCodeBlock.typeColor, ";\n }\n \n .token.property {\n color: ").concat(euiCodeBlock.attributeColor, ";\n }\n \n .token.console,\n .token.list-punctuation,\n .token.url-reference,\n .token.url .token.url {\n color: ").concat(euiCodeBlock.symbolColor, ";\n }\n \n .token.paramater {\n color: ").concat(euiCodeBlock.paramsColor, ";\n }\n \n .token.meta,\n .token.important {\n color: ").concat(euiCodeBlock.metaColor, ";\n }\n \n .token.title {\n color: ").concat(euiCodeBlock.titleColor, ";\n }\n \n .token.section {\n color: ").concat(euiCodeBlock.sectionColor, ";\n }\n \n .token.prefix.inserted,\n .token.prefix.deleted {\n padding-inline-start: -").concat(euiTheme.size.xs, ";\n margin-inline-start: -").concat(euiTheme.size.xs, ";\n }\n \n .token.prefix.inserted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(euiCodeBlock.additionColor, ";\n color: ").concat(euiCodeBlock.additionColor, ";\n }\n \n .token.prefix.deleted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(euiCodeBlock.deletionColor, ";\n color: ").concat(euiCodeBlock.deletionColor, ";\n }\n \n .token.selector .token.class {\n color: ").concat(euiCodeBlock.selectorClassColor, ";\n }\n \n .token.selector .token.id {\n color: ").concat(euiCodeBlock.selectorIdColor, ";\n }\n \n .token.italic {\n font-style: italic;\n }\n \n .token.important,\n .token.bold {\n font-weight: ").concat(euiTheme.font.weight.bold, ";\n }\n \n .token.url-reference,\n .token.url .token.url {\n text-decoration: underline;\n }\n \n .token.entity {\n cursor: help;\n }\n "); }; exports.euiCodeSyntaxTokens = euiCodeSyntaxTokens;