@matdata/yasqe 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +121 -0
- package/build/ts/grammar/tokenizer.d.ts +37 -0
- package/build/ts/src/CodeMirror.d.ts +21 -0
- package/build/ts/src/autocompleters/classes.d.ts +3 -0
- package/build/ts/src/autocompleters/index.d.ts +39 -0
- package/build/ts/src/autocompleters/prefixes.d.ts +3 -0
- package/build/ts/src/autocompleters/properties.d.ts +3 -0
- package/build/ts/src/autocompleters/variables.d.ts +3 -0
- package/build/ts/src/defaults.d.ts +75 -0
- package/build/ts/src/imgs.d.ts +7 -0
- package/build/ts/src/index.d.ts +303 -0
- package/build/ts/src/prefixFold.d.ts +8 -0
- package/build/ts/src/prefixUtils.d.ts +9 -0
- package/build/ts/src/sparql.d.ts +20 -0
- package/build/ts/src/tokenUtils.d.ts +4 -0
- package/build/ts/src/tooltip.d.ts +2 -0
- package/build/ts/src/trie.d.ts +13 -0
- package/build/yasqe.html +108 -0
- package/build/yasqe.min.css +2 -0
- package/build/yasqe.min.css.map +1 -0
- package/build/yasqe.min.js +3 -0
- package/build/yasqe.min.js.LICENSE.txt +3 -0
- package/build/yasqe.min.js.map +1 -0
- package/grammar/README.md +12 -0
- package/grammar/_tokenizer-table.js +4776 -0
- package/grammar/build.sh +2 -0
- package/grammar/sparql11-grammar.pl +834 -0
- package/grammar/sparqljs-browser-min.js +4535 -0
- package/grammar/tokenizer.ts +729 -0
- package/grammar/util/gen_ll1.pl +37 -0
- package/grammar/util/gen_sparql11.pl +11 -0
- package/grammar/util/ll1.pl +175 -0
- package/grammar/util/output_to_javascript.pl +75 -0
- package/grammar/util/prune.pl +49 -0
- package/grammar/util/rewrite.pl +104 -0
- package/package.json +40 -0
- package/src/CodeMirror.ts +54 -0
- package/src/autocompleters/classes.ts +32 -0
- package/src/autocompleters/index.ts +346 -0
- package/src/autocompleters/prefixes.ts +130 -0
- package/src/autocompleters/properties.ts +28 -0
- package/src/autocompleters/show-hint.scss +38 -0
- package/src/autocompleters/variables.ts +52 -0
- package/src/defaults.ts +149 -0
- package/src/imgs.ts +14 -0
- package/src/index.ts +1089 -0
- package/src/prefixFold.ts +93 -0
- package/src/prefixUtils.ts +65 -0
- package/src/scss/buttons.scss +275 -0
- package/src/scss/codemirrorMods.scss +36 -0
- package/src/scss/yasqe.scss +89 -0
- package/src/sparql.ts +215 -0
- package/src/tokenUtils.ts +121 -0
- package/src/tooltip.ts +31 -0
- package/src/trie.ts +238 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { default as Yasqe, Position } from "./";
|
|
2
|
+
import CodeMirror from "codemirror";
|
|
3
|
+
import * as TokenUtils from "./tokenUtils";
|
|
4
|
+
const PREFIX_KEYWORD = "PREFIX ";
|
|
5
|
+
|
|
6
|
+
export function findFirstPrefixLine(yasqe: Yasqe) {
|
|
7
|
+
var lastLine = yasqe.getDoc().lastLine();
|
|
8
|
+
for (var i = 0; i <= lastLine; ++i) {
|
|
9
|
+
const firstPrefix = findFirstPrefix(yasqe, i);
|
|
10
|
+
if (firstPrefix != null && firstPrefix >= 0) {
|
|
11
|
+
return i;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function findFirstPrefix(yasqe: Yasqe, line: number, startFromCharIndex = 0, lineText?: string) {
|
|
17
|
+
if (!lineText) lineText = yasqe.getDoc().getLine(line);
|
|
18
|
+
lineText = lineText.toUpperCase();
|
|
19
|
+
const charIndex = lineText.indexOf(PREFIX_KEYWORD, startFromCharIndex);
|
|
20
|
+
if (charIndex >= 0) {
|
|
21
|
+
const tokenType = yasqe.getTokenTypeAt(CodeMirror.Pos(line, charIndex + 1));
|
|
22
|
+
if (tokenType === "keyword") {
|
|
23
|
+
return charIndex;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export default function (yasqe: Yasqe, start: Position) {
|
|
28
|
+
var line = start.line,
|
|
29
|
+
lineText = yasqe.getDoc().getLine(line);
|
|
30
|
+
|
|
31
|
+
// var startCh, tokenType;
|
|
32
|
+
|
|
33
|
+
function hasPreviousPrefix() {
|
|
34
|
+
var hasPreviousPrefix = false;
|
|
35
|
+
for (var i = line - 1; i >= 0; i--) {
|
|
36
|
+
if (yasqe.getDoc().getLine(i).toUpperCase().indexOf(PREFIX_KEYWORD) >= 0) {
|
|
37
|
+
hasPreviousPrefix = true;
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return hasPreviousPrefix;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
var getLastPrefixPos = function (line: number, ch: number) {
|
|
45
|
+
var prefixKeywordToken = yasqe.getTokenAt(CodeMirror.Pos(line, ch + 1));
|
|
46
|
+
if (!prefixKeywordToken || prefixKeywordToken.type != "keyword") return -1;
|
|
47
|
+
var prefixShortname = TokenUtils.getNextNonWsToken(yasqe, line, prefixKeywordToken.end + 1);
|
|
48
|
+
if (!prefixShortname || prefixShortname.type != "string-2") return -1; //missing prefix keyword shortname
|
|
49
|
+
var prefixUri = TokenUtils.getNextNonWsToken(yasqe, line, prefixShortname.end + 1);
|
|
50
|
+
if (!prefixUri || prefixUri.type != "variable-3") return -1; //missing prefix uri
|
|
51
|
+
return prefixUri.end;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
//only use opening prefix declaration
|
|
55
|
+
if (hasPreviousPrefix()) return;
|
|
56
|
+
var prefixStart = findFirstPrefix(yasqe, line, start.ch, lineText);
|
|
57
|
+
|
|
58
|
+
if (prefixStart == null) return;
|
|
59
|
+
var stopAt = "{"; //if this char is there, we won't have a chance of finding more prefixes
|
|
60
|
+
var stopAtNextLine = false;
|
|
61
|
+
var lastLine = yasqe.getDoc().lastLine(),
|
|
62
|
+
endCh;
|
|
63
|
+
var prefixEndChar = getLastPrefixPos(line, prefixStart);
|
|
64
|
+
var prefixEndLine = line;
|
|
65
|
+
|
|
66
|
+
// outer:
|
|
67
|
+
for (var i = line; i <= lastLine; ++i) {
|
|
68
|
+
if (stopAtNextLine) break;
|
|
69
|
+
var text = yasqe.getDoc().getLine(i),
|
|
70
|
+
pos = i == line ? prefixStart + 1 : 0;
|
|
71
|
+
|
|
72
|
+
for (;;) {
|
|
73
|
+
if (!stopAtNextLine && text.indexOf(stopAt) >= 0) stopAtNextLine = true;
|
|
74
|
+
|
|
75
|
+
var nextPrefixDeclaration = text.toUpperCase().indexOf(PREFIX_KEYWORD, pos);
|
|
76
|
+
|
|
77
|
+
if (nextPrefixDeclaration >= 0) {
|
|
78
|
+
if ((endCh = getLastPrefixPos(i, nextPrefixDeclaration)) > 0) {
|
|
79
|
+
prefixEndChar = endCh;
|
|
80
|
+
prefixEndLine = i;
|
|
81
|
+
pos = prefixEndChar;
|
|
82
|
+
}
|
|
83
|
+
pos++;
|
|
84
|
+
} else {
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
from: CodeMirror.Pos(line, prefixStart + PREFIX_KEYWORD.length),
|
|
91
|
+
to: CodeMirror.Pos(prefixEndLine, prefixEndChar),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { default as Yasqe, Token } from "./";
|
|
2
|
+
export type Prefixes = { [prefixLabel: string]: string };
|
|
3
|
+
export function addPrefixes(yasqe: Yasqe, prefixes: string | Prefixes) {
|
|
4
|
+
var existingPrefixes = yasqe.getPrefixesFromQuery();
|
|
5
|
+
//for backwards compatability, we stil support prefixes value as string (e.g. 'rdf: <http://fbfgfgf>'
|
|
6
|
+
if (typeof prefixes == "string") {
|
|
7
|
+
addPrefixAsString(yasqe, prefixes);
|
|
8
|
+
} else {
|
|
9
|
+
for (var pref in prefixes) {
|
|
10
|
+
if (!(pref in existingPrefixes)) addPrefixAsString(yasqe, pref + ": <" + prefixes[pref] + ">");
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
yasqe.collapsePrefixes(false);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function addPrefixAsString(yasqe: Yasqe, prefixString: string) {
|
|
17
|
+
yasqe.getDoc().replaceRange("PREFIX " + prefixString + "\n", {
|
|
18
|
+
line: 0,
|
|
19
|
+
ch: 0,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
yasqe.collapsePrefixes(false);
|
|
23
|
+
}
|
|
24
|
+
export function removePrefixes(yasqe: Yasqe, prefixes: Prefixes) {
|
|
25
|
+
var escapeRegex = function (string: string) {
|
|
26
|
+
//taken from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript/3561711#3561711
|
|
27
|
+
return string.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
28
|
+
};
|
|
29
|
+
for (var pref in prefixes) {
|
|
30
|
+
yasqe.setValue(
|
|
31
|
+
yasqe
|
|
32
|
+
.getValue()
|
|
33
|
+
.replace(new RegExp("PREFIX\\s*" + pref + ":\\s*" + escapeRegex("<" + prefixes[pref] + ">") + "\\s*", "ig"), "")
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
yasqe.collapsePrefixes(false);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Get defined prefixes from query as array, in format {"prefix:" "uri"}
|
|
41
|
+
*
|
|
42
|
+
* @param cm
|
|
43
|
+
* @returns {Array}
|
|
44
|
+
*/
|
|
45
|
+
export function getPrefixesFromQuery(yasqe: Yasqe): Token["state"]["prefixes"] {
|
|
46
|
+
//Use precise here. We want to be sure we use the most up to date state. If we're
|
|
47
|
+
//not, we might get outdated prefixes from the current query (creating loops such
|
|
48
|
+
//as https://github.com/TriplyDB/YASGUI/issues/84)
|
|
49
|
+
return yasqe.getTokenAt(
|
|
50
|
+
{ line: yasqe.getDoc().lastLine(), ch: yasqe.getDoc().getLine(yasqe.getDoc().lastLine()).length },
|
|
51
|
+
true
|
|
52
|
+
).state.prefixes;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function getIndentFromLine(yasqe: Yasqe, line: number, charNumber: number = 1): string {
|
|
56
|
+
var token = yasqe.getTokenAt({
|
|
57
|
+
line: line,
|
|
58
|
+
ch: charNumber,
|
|
59
|
+
});
|
|
60
|
+
if (token == null || token == undefined || token.type != "ws") {
|
|
61
|
+
return "";
|
|
62
|
+
} else {
|
|
63
|
+
return token.string + getIndentFromLine(yasqe, line, token.end + 1);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
.yasqe {
|
|
2
|
+
$queryButtonWidth: 40px;
|
|
3
|
+
$queryButtonHeight: 40px;
|
|
4
|
+
|
|
5
|
+
.yasqe_btn {
|
|
6
|
+
color: #333;
|
|
7
|
+
border: 1px solid transparent;
|
|
8
|
+
background-color: #fff;
|
|
9
|
+
border-color: #ccc;
|
|
10
|
+
border-width: 1px;
|
|
11
|
+
display: inline-block;
|
|
12
|
+
text-align: center;
|
|
13
|
+
vertical-align: middle;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
padding: 6px 12px;
|
|
17
|
+
border-radius: 2px;
|
|
18
|
+
user-select: none;
|
|
19
|
+
overflow: visible;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
|
|
22
|
+
&.btn_icon {
|
|
23
|
+
padding: 4px 8px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&[disabled],
|
|
27
|
+
&.disabled {
|
|
28
|
+
cursor: default;
|
|
29
|
+
opacity: 0.5;
|
|
30
|
+
filter: alpha(opacity=50);
|
|
31
|
+
box-shadow: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
outline: 0;
|
|
36
|
+
background-color: #ebebeb;
|
|
37
|
+
border-color: #adadad;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:focus,
|
|
41
|
+
&.selected {
|
|
42
|
+
color: #fff;
|
|
43
|
+
outline: 0;
|
|
44
|
+
background-color: #337ab7;
|
|
45
|
+
border-color: #337ab7;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.btn_icon:focus {
|
|
49
|
+
color: #333;
|
|
50
|
+
border: 1px solid transparent;
|
|
51
|
+
background-color: #fff;
|
|
52
|
+
border-color: #ccc;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.yasqe_btn-sm {
|
|
56
|
+
padding: 1px 5px;
|
|
57
|
+
font-size: 12px;
|
|
58
|
+
line-height: 1.5;
|
|
59
|
+
border-radius: 3px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.yasqe_buttons {
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 10px;
|
|
66
|
+
right: 20px;
|
|
67
|
+
|
|
68
|
+
svg {
|
|
69
|
+
fill: #505050;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
z-index: 5;
|
|
73
|
+
|
|
74
|
+
.yasqe_share {
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
margin-top: 3px;
|
|
77
|
+
display: inline-block;
|
|
78
|
+
border: none;
|
|
79
|
+
background: none;
|
|
80
|
+
svg {
|
|
81
|
+
height: 25px;
|
|
82
|
+
width: 25px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
button {
|
|
87
|
+
vertical-align: top;
|
|
88
|
+
margin-left: 5px;
|
|
89
|
+
}
|
|
90
|
+
.yasqe_sharePopup {
|
|
91
|
+
position: absolute;
|
|
92
|
+
padding: 4px;
|
|
93
|
+
margin-left: 0px;
|
|
94
|
+
background-color: #fff;
|
|
95
|
+
border: 1px solid #e3e3e3;
|
|
96
|
+
border-radius: 2px;
|
|
97
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
|
98
|
+
width: 600px;
|
|
99
|
+
height: auto;
|
|
100
|
+
display: flex;
|
|
101
|
+
|
|
102
|
+
.inputWrapper {
|
|
103
|
+
flex-grow: 100;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
input {
|
|
107
|
+
float: left;
|
|
108
|
+
width: 100%;
|
|
109
|
+
border: 0px;
|
|
110
|
+
-ms-box-sizing: border-box;
|
|
111
|
+
/* ie8 */
|
|
112
|
+
-khtml-box-sizing: border-box;
|
|
113
|
+
/* konqueror */
|
|
114
|
+
-webkit-box-sizing: border-box;
|
|
115
|
+
/* Safari/Chrome, other WebKit */
|
|
116
|
+
-moz-box-sizing: border-box;
|
|
117
|
+
/* Firefox, other Gecko */
|
|
118
|
+
box-sizing: border-box;
|
|
119
|
+
/* Opera/IE 8+ */
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
/* css3 rec */
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
button {
|
|
125
|
+
float: right;
|
|
126
|
+
margin-left: 5px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
textarea {
|
|
130
|
+
width: 100%;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
.yasqe_queryButton {
|
|
134
|
+
display: inline-block;
|
|
135
|
+
position: relative;
|
|
136
|
+
border: none;
|
|
137
|
+
background: none;
|
|
138
|
+
padding: 0;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
width: $queryButtonWidth;
|
|
141
|
+
height: $queryButtonHeight;
|
|
142
|
+
|
|
143
|
+
.queryIcon {
|
|
144
|
+
display: block;
|
|
145
|
+
svg {
|
|
146
|
+
width: $queryButtonWidth;
|
|
147
|
+
height: $queryButtonHeight;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
.svgImg {
|
|
151
|
+
position: absolute;
|
|
152
|
+
height: inherit;
|
|
153
|
+
top: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&.busy {
|
|
157
|
+
svg {
|
|
158
|
+
#loadingIcon {
|
|
159
|
+
stroke-dasharray: 100;
|
|
160
|
+
animation: dash 1.5s linear infinite;
|
|
161
|
+
stroke-width: 8px;
|
|
162
|
+
stroke: white;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@keyframes dash {
|
|
168
|
+
to {
|
|
169
|
+
stroke-dashoffset: 200;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@keyframes rotate {
|
|
174
|
+
100% {
|
|
175
|
+
transform: rotate(360deg);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.warningIcon {
|
|
180
|
+
display: none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&.query_error {
|
|
184
|
+
.warningIcon {
|
|
185
|
+
display: block;
|
|
186
|
+
top: 5px;
|
|
187
|
+
right: 0px;
|
|
188
|
+
|
|
189
|
+
svg {
|
|
190
|
+
width: 15px;
|
|
191
|
+
height: 15px;
|
|
192
|
+
|
|
193
|
+
g {
|
|
194
|
+
fill: red;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
&.query_disabled {
|
|
201
|
+
cursor: not-allowed;
|
|
202
|
+
.queryIcon {
|
|
203
|
+
opacity: 0.5;
|
|
204
|
+
filter: alpha(opacity=50);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@-webkit-keyframes spin {
|
|
209
|
+
100% {
|
|
210
|
+
transform: rotate(360deg);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.yasqe_fullscreenButton {
|
|
216
|
+
display: inline-block;
|
|
217
|
+
border: none;
|
|
218
|
+
background: none;
|
|
219
|
+
cursor: pointer;
|
|
220
|
+
padding: 0;
|
|
221
|
+
margin-left: 5px;
|
|
222
|
+
|
|
223
|
+
svg {
|
|
224
|
+
height: 25px;
|
|
225
|
+
width: 25px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.fullscreenExitIcon {
|
|
229
|
+
display: none;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&:hover {
|
|
233
|
+
svg {
|
|
234
|
+
fill: #337ab7;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&.fullscreen {
|
|
241
|
+
position: fixed;
|
|
242
|
+
top: 0;
|
|
243
|
+
left: 0;
|
|
244
|
+
right: 0;
|
|
245
|
+
bottom: 0;
|
|
246
|
+
z-index: 9998;
|
|
247
|
+
background: white;
|
|
248
|
+
margin: 0;
|
|
249
|
+
padding-top: 100px;
|
|
250
|
+
|
|
251
|
+
.CodeMirror-wrap {
|
|
252
|
+
padding-top: 10px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.yasqe_buttons {
|
|
256
|
+
position: fixed;
|
|
257
|
+
top: 110px;
|
|
258
|
+
right: 20px;
|
|
259
|
+
z-index: 10000;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.yasqe_fullscreenButton {
|
|
263
|
+
.fullscreenIcon {
|
|
264
|
+
display: none;
|
|
265
|
+
}
|
|
266
|
+
.fullscreenExitIcon {
|
|
267
|
+
display: block;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.CodeMirror {
|
|
272
|
+
height: calc(100vh - 150px) !important;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.yasqe {
|
|
2
|
+
.CodeMirror {
|
|
3
|
+
line-height: 1.5em;
|
|
4
|
+
font-size: 14px;
|
|
5
|
+
border: 1px solid #d1d1d1;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
span.cm-error {
|
|
9
|
+
border-bottom: 2px dotted red;
|
|
10
|
+
}
|
|
11
|
+
.gutterErrorBar {
|
|
12
|
+
width: 4px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.CodeMirror-foldmarker {
|
|
16
|
+
color: #6e2500;
|
|
17
|
+
text-shadow: #ff935e 1px 1px 2px, #ff935e -1px -1px 2px, #ff935e 1px -1px 2px, #ff935e -1px 1px 2px;
|
|
18
|
+
font-size: 19px;
|
|
19
|
+
}
|
|
20
|
+
.cm-matchhighlight {
|
|
21
|
+
background-color: #dbdeed;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
// Put these outside of yasqe as the root element can be changed
|
|
25
|
+
.CodeMirror-hints.default {
|
|
26
|
+
max-width: 1000px;
|
|
27
|
+
}
|
|
28
|
+
.CodeMirror-hints.default li {
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
}
|
|
32
|
+
@media only screen and (max-width: 1000px) {
|
|
33
|
+
.CodeMirror-hints.default {
|
|
34
|
+
max-width: 800px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
.yasqe {
|
|
2
|
+
.CodeMirror {
|
|
3
|
+
min-height: 60px;
|
|
4
|
+
}
|
|
5
|
+
.svgImg {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
}
|
|
8
|
+
span.shortlinkErr {
|
|
9
|
+
font-size: small;
|
|
10
|
+
color: red;
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
float: left;
|
|
13
|
+
}
|
|
14
|
+
.CodeMirror-hint {
|
|
15
|
+
max-width: 30em;
|
|
16
|
+
}
|
|
17
|
+
.notificationContainer {
|
|
18
|
+
width: 100%;
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
position: absolute;
|
|
22
|
+
bottom: 0;
|
|
23
|
+
}
|
|
24
|
+
.notification {
|
|
25
|
+
z-index: 4;
|
|
26
|
+
padding: 0 5px;
|
|
27
|
+
max-height: 0px;
|
|
28
|
+
color: #999;
|
|
29
|
+
background-color: #eee;
|
|
30
|
+
font-size: 90%;
|
|
31
|
+
text-align: center;
|
|
32
|
+
transition: max-height 0.2s ease-in;
|
|
33
|
+
border-top-right-radius: 2px;
|
|
34
|
+
border-top-left-radius: 2px;
|
|
35
|
+
}
|
|
36
|
+
.notification.active {
|
|
37
|
+
max-height: 3rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.parseErrorIcon {
|
|
41
|
+
width: 13px;
|
|
42
|
+
height: 13px;
|
|
43
|
+
margin-top: 2px;
|
|
44
|
+
margin-left: 2px;
|
|
45
|
+
svg {
|
|
46
|
+
g {
|
|
47
|
+
fill: red;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.yasqe_tooltip {
|
|
53
|
+
background: #333;
|
|
54
|
+
background: rgba(0, 0, 0, 0.8);
|
|
55
|
+
border-radius: 5px;
|
|
56
|
+
color: #fff;
|
|
57
|
+
padding: 5px 15px;
|
|
58
|
+
width: 220px;
|
|
59
|
+
white-space: pre-wrap;
|
|
60
|
+
white-space: normal;
|
|
61
|
+
margin-top: 5px;
|
|
62
|
+
}
|
|
63
|
+
.notificationLoader {
|
|
64
|
+
width: 18px;
|
|
65
|
+
height: 18px;
|
|
66
|
+
vertical-align: middle;
|
|
67
|
+
}
|
|
68
|
+
.resizeWrapper {
|
|
69
|
+
width: 100%;
|
|
70
|
+
height: 10px;
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
cursor: row-resize;
|
|
75
|
+
}
|
|
76
|
+
.resizeChip {
|
|
77
|
+
width: 20%;
|
|
78
|
+
height: 4px;
|
|
79
|
+
background-color: #d1d1d1;
|
|
80
|
+
visibility: hidden;
|
|
81
|
+
border-radius: 2px;
|
|
82
|
+
}
|
|
83
|
+
// Show resizeChip when yasqe is hovered
|
|
84
|
+
&:hover {
|
|
85
|
+
.resizeChip {
|
|
86
|
+
visibility: visible;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|