import { NodeType, NodeProp, IterMode, Tree, TreeFragment, Parser, NodeSet } from '@lezer/common'; import { Facet, EditorState, StateEffect, StateField, countColumn, RangeSet, combineConfig, RangeSetBuilder, Prec } from '@codemirror/state'; import { ViewPlugin, logException, EditorView, Decoration, WidgetType, gutter, GutterMarker } from '@codemirror/view'; import { tags, styleTags, tagHighlighter, highlightTree } from '@lezer/highlight'; const C = "\u037c"; const COUNT = typeof Symbol == "undefined" ? "__" + C : Symbol.for(C); const SET = typeof Symbol == "undefined" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"); const top = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : {}; // :: - Style modules encapsulate a set of CSS rules defined from // JavaScript. Their definitions are only available in a given DOM // root after it has been _mounted_ there with `StyleModule.mount`. // // Style modules should be created once and stored somewhere, as // opposed to re-creating them every time you need them. The amount of // CSS rules generated for a given DOM root is bounded by the amount // of style modules that were used. So to avoid leaking rules, don't // create these dynamically, but treat them as one-time allocations. class StyleModule { // :: (Object