"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.gravityTheme = exports.gravityHighlightStyle = void 0;
const language_1 = require("@codemirror/language");
const view_1 = require("@codemirror/view");
const highlight_1 = require("@lezer/highlight");
const yfm_1 = require("./yfm.js");
exports.gravityHighlightStyle = language_1.HighlightStyle.define(language_1.defaultHighlightStyle.specs.concat({ tag: highlight_1.tags.meta, color: 'var(--g-color-text-hint)' }, { tag: highlight_1.tags.link, color: 'var(--g-color-text-link)' }, { tag: highlight_1.tags.url, color: 'var(--g-color-text-link-hover)' }, { tag: highlight_1.tags.contentSeparator, color: 'var(--g-color-text-secondary)' }, { tag: [highlight_1.tags.string, highlight_1.tags.deleted], color: 'var(--g-color-text-danger)' }, { tag: highlight_1.tags.escape, color: 'var(--g-color-text-danger-heavy)' }, { tag: highlight_1.tags.typeName, color: 'var(--g-color-text-positive-heavy)' }, { tag: highlight_1.tags.atom, color: 'var(--g-color-text-info-heavy)' }, { tag: highlight_1.tags.labelName, color: 'var(--g-color-text-complementary)' }, { tag: highlight_1.tags.heading, fontWeight: 'bold' }, 
// custom tags
{ tag: yfm_1.customTags.underline, textDecoration: 'underline' }, { tag: yfm_1.customTags.monospace, fontFamily: 'monospace' }, { tag: yfm_1.customTags.marked, color: 'marktext', backgroundColor: 'mark' }));
exports.gravityTheme = view_1.EditorView.baseTheme({
    '&': {
        overflow: 'hidden',
        height: '100%',
    },
    '&.cm-focused': {
        outline: 'none',
    },
    '.cm-placeholder': {
        color: 'var(--g-color-text-secondary)',
    },
    '.cm-content': {
        color: 'var(--g-color-text-primary)',
        caretColor: 'currentColor',
        fontSize: 'var(--g-text-code-2-font-size)',
        fontWeight: 'var(--g-text-code-font-weight)',
        fontFamily: 'var(--g-font-family-monospace)',
        lineHeight: 'var(--g-text-code-2-line-height)',
    },
    '&.cm-focused .cm-cursor': {
        borderLeftColor: 'currentColor',
    },
    '&.cm-focused .cm-selectionBackground, &.cm-focused ::selection': {
        background: 'var(--g-color-base-misc-medium)',
    },
    '.cm-tooltip.cm-tooltip-autocomplete': {
        padding: '4px 0',
        lineHeight: '24px',
        color: 'var(--g-color-text-primary)',
        fontFamily: 'var(--g-font-family-monospace)',
        fontSize: 'var(--g-text-body-1-font-size)',
        backgroundColor: 'var(--g-color-base-float)',
        border: '1px solid var(--g-color-line-generic-solid)',
        borderRadius: '4px',
        '& > ul': {
            '& > completion-section': {
                color: 'var(--g-color-text-hint)',
                fontWeight: 'var(--g-text-accent-font-weight)',
                borderBottom: '1px solid var(--g-color-line-generic)',
            },
            '& > li:hover': {
                backgroundColor: 'var(--g-color-base-simple-hover)',
            },
            '& > li[aria-selected]': {
                backgroundColor: 'var(--g-color-base-selection)',
                color: 'revert',
            },
        },
    },
});
//# sourceMappingURL=gravity.js.map
