Skip to content

Commit

Permalink
more exports
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Sep 19, 2021
1 parent ff6431c commit 9ebcc1a
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 3 deletions.
76 changes: 75 additions & 1 deletion dist/index.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -13946,6 +13946,80 @@ const defaultHighlightStyle = /*@__PURE__*/HighlightStyle.define([
{ tag: tags.invalid,
color: "#f00" }
]);
/**
This is a highlight style that adds stable, predictable classes to
tokens, for styling with external CSS.

These tags are mapped to their name prefixed with `"cmt-"` (for
example `"cmt-comment"`):

* [`link`](https://codemirror.net/6/docs/ref/#highlight.tags.link)
* [`heading`](https://codemirror.net/6/docs/ref/#highlight.tags.heading)
* [`emphasis`](https://codemirror.net/6/docs/ref/#highlight.tags.emphasis)
* [`strong`](https://codemirror.net/6/docs/ref/#highlight.tags.strong)
* [`keyword`](https://codemirror.net/6/docs/ref/#highlight.tags.keyword)
* [`atom`](https://codemirror.net/6/docs/ref/#highlight.tags.atom) [`bool`](https://codemirror.net/6/docs/ref/#highlight.tags.bool)
* [`url`](https://codemirror.net/6/docs/ref/#highlight.tags.url)
* [`labelName`](https://codemirror.net/6/docs/ref/#highlight.tags.labelName)
* [`inserted`](https://codemirror.net/6/docs/ref/#highlight.tags.inserted)
* [`deleted`](https://codemirror.net/6/docs/ref/#highlight.tags.deleted)
* [`literal`](https://codemirror.net/6/docs/ref/#highlight.tags.literal)
* [`string`](https://codemirror.net/6/docs/ref/#highlight.tags.string)
* [`number`](https://codemirror.net/6/docs/ref/#highlight.tags.number)
* [`variableName`](https://codemirror.net/6/docs/ref/#highlight.tags.variableName)
* [`typeName`](https://codemirror.net/6/docs/ref/#highlight.tags.typeName)
* [`namespace`](https://codemirror.net/6/docs/ref/#highlight.tags.namespace)
* [`macroName`](https://codemirror.net/6/docs/ref/#highlight.tags.macroName)
* [`propertyName`](https://codemirror.net/6/docs/ref/#highlight.tags.propertyName)
* [`operator`](https://codemirror.net/6/docs/ref/#highlight.tags.operator)
* [`comment`](https://codemirror.net/6/docs/ref/#highlight.tags.comment)
* [`meta`](https://codemirror.net/6/docs/ref/#highlight.tags.meta)
* [`punctuation`](https://codemirror.net/6/docs/ref/#highlight.tags.puncutation)
* [`invalid`](https://codemirror.net/6/docs/ref/#highlight.tags.invalid)

In addition, these mappings are provided:

* [`regexp`](https://codemirror.net/6/docs/ref/#highlight.tags.regexp),
[`escape`](https://codemirror.net/6/docs/ref/#highlight.tags.escape), and
[`special`](https://codemirror.net/6/docs/ref/#highlight.tags.special)[`(string)`](https://codemirror.net/6/docs/ref/#highlight.tags.string)
are mapped to `"cmt-string2"`
* [`special`](https://codemirror.net/6/docs/ref/#highlight.tags.special)[`(variableName)`](https://codemirror.net/6/docs/ref/#highlight.tags.variableName)
to `"cmt-variableName2"`
* [`local`](https://codemirror.net/6/docs/ref/#highlight.tags.local)[`(variableName)`](https://codemirror.net/6/docs/ref/#highlight.tags.variableName)
to `"cmt-variableName cmt-local"`
* [`definition`](https://codemirror.net/6/docs/ref/#highlight.tags.definition)[`(variableName)`](https://codemirror.net/6/docs/ref/#highlight.tags.variableName)
to `"cmt-variableName cmt-definition"`
*/
/*@__PURE__*/HighlightStyle.define([
{ tag: tags.link, class: "cmt-link" },
{ tag: tags.heading, class: "cmt-heading" },
{ tag: tags.emphasis, class: "cmt-emphasis" },
{ tag: tags.strong, class: "cmt-strong" },
{ tag: tags.keyword, class: "cmt-keyword" },
{ tag: tags.atom, class: "cmt-atom" },
{ tag: tags.bool, class: "cmt-bool" },
{ tag: tags.url, class: "cmt-url" },
{ tag: tags.labelName, class: "cmt-labelName" },
{ tag: tags.inserted, class: "cmt-inserted" },
{ tag: tags.deleted, class: "cmt-deleted" },
{ tag: tags.literal, class: "cmt-literal" },
{ tag: tags.string, class: "cmt-string" },
{ tag: tags.number, class: "cmt-number" },
{ tag: [tags.regexp, tags.escape, /*@__PURE__*/tags.special(tags.string)], class: "cmt-string2" },
{ tag: tags.variableName, class: "cmt-variableName" },
{ tag: /*@__PURE__*/tags.local(tags.variableName), class: "cmt-variableName cmt-local" },
{ tag: /*@__PURE__*/tags.definition(tags.variableName), class: "cmt-variableName cmt-definition" },
{ tag: /*@__PURE__*/tags.special(tags.variableName), class: "cmt-variableName2" },
{ tag: tags.typeName, class: "cmt-typeName" },
{ tag: tags.namespace, class: "cmt-namespace" },
{ tag: tags.macroName, class: "cmt-macroName" },
{ tag: tags.propertyName, class: "cmt-propertyName" },
{ tag: tags.operator, class: "cmt-operator" },
{ tag: tags.comment, class: "cmt-comment" },
{ tag: tags.meta, class: "cmt-meta" },
{ tag: tags.invalid, class: "cmt-invalid" },
{ tag: tags.punctuation, class: "cmt-punctuation" }
]);

// Counts the column offset in a string, taking tabs into account.
// Used mostly to find indentation.
Expand Down Expand Up @@ -21718,4 +21792,4 @@ function changeLineComment(option, ranges, state) {
return null;
}

export { Compartment, Decoration, EditorSelection, EditorState, EditorView, HighlightStyle, SelectionRange, StreamLanguage, TreeCursor, ViewPlugin, ViewUpdate, WidgetType, autocompletion, bracketMatching, closeBrackets, closeBracketsKeymap, commentKeymap, completionKeymap, defaultHighlightStyle, defaultKeymap, drawSelection, foldGutter, foldKeymap, highlightSelectionMatches, highlightSpecialChars, history, historyKeymap, indentLess, indentMore, indentOnInput, julia as julia_andrey, julia$1 as julia_legacy, keymap, lineNumbers, placeholder, rectangularSelection, searchKeymap, syntaxTree, tags };
export { Compartment, Decoration, EditorSelection, EditorState, EditorView, Facet, HighlightStyle, SelectionRange, StateEffect, StateField, StreamLanguage, Transaction, TreeCursor, ViewPlugin, ViewUpdate, WidgetType, autocompletion, bracketMatching, closeBrackets, closeBracketsKeymap, commentKeymap, completionKeymap, defaultHighlightStyle, defaultKeymap, drawSelection, foldGutter, foldKeymap, highlightSelectionMatches, highlightSpecialChars, history, historyKeymap, indentLess, indentMore, indentOnInput, indentUnit, julia as julia_andrey, julia$1 as julia_legacy, keymap, lineNumbers, placeholder, rectangularSelection, searchKeymap, syntaxTree, tags };
9 changes: 7 additions & 2 deletions src/basic-setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EditorState, EditorSelection, Compartment, SelectionRange } from "@codemirror/state"
import { EditorState, EditorSelection, Compartment, SelectionRange, Facet, StateField, StateEffect, Transaction } from "@codemirror/state"
import { StreamLanguage } from "@codemirror/stream-parser"
import { julia as julia_legacy } from "@codemirror/legacy-modes/mode/julia"
import { julia as julia_andrey } from "lang-julia"
Expand All @@ -18,7 +18,7 @@ import {
import { historyKeymap, history } from "@codemirror/history"
import { defaultKeymap, indentMore, indentLess } from "@codemirror/commands"
import { defaultHighlightStyle, tags, HighlightStyle } from "@codemirror/highlight"
import { indentOnInput, syntaxTree } from "@codemirror/language"
import { indentOnInput, indentUnit, syntaxTree } from "@codemirror/language"
import { rectangularSelection } from "@codemirror/rectangular-selection"
import { foldGutter, foldKeymap } from "@codemirror/fold"
import { bracketMatching } from "@codemirror/matchbrackets"
Expand All @@ -30,6 +30,11 @@ import { commentKeymap } from "@codemirror/comment"
import { TreeCursor } from "@lezer/common"

export {
Facet,
StateField,
StateEffect,
Transaction,
indentUnit,
EditorState,
EditorSelection,
Compartment,
Expand Down

0 comments on commit 9ebcc1a

Please sign in to comment.