Skip to content

Commit 52ce9df

Browse files
authored
Merge pull request #1 from fkling/master
Update with changes from fkling/astexplorer
2 parents ada77d1 + 8255900 commit 52ce9df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+3702
-3022
lines changed

.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*.js]
2+
quote_type = single

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ The AST explorer provides following code parsers:
5555
- [Pug][]
5656
- Regular Expressions:
5757
- [regexp-tree][]
58+
- [regexpp][]
5859
- [regjsparser][]
5960
- Scala
6061
- [Scalameta][]
@@ -151,6 +152,7 @@ node.
151152
[redot]: https://github.com/redotjs/redot
152153
[remark]: https://github.com/remarkjs/remark
153154
[regexp-tree]: https://github.com/DmitrySoshnikov/regexp-tree
155+
[regexpp]: https://github.com/mysticatea/regexpp
154156
[regjsparser]: https://github.com/jviereck/regjsparser
155157
[php-parser]: https://github.com/glayzzle/php-parser
156158
[pug]: https://github.com/pugjs/pug
@@ -168,7 +170,7 @@ node.
168170
[Scalameta]: http://scalameta.org/
169171
[solidity-parser-antlr]: https://github.com/federicobond/solidity-parser-antlr
170172
[vue-template-compiler]: https://github.com/vuejs/vue/tree/dev/packages/vue-template-compiler
171-
[svelte]: https://github.com/sveltejs/svelte
173+
[svelte]: https://github.com/sveltejs/svelte
172174
[hyntax]: https://github.com/nik-garmash/hyntax
173175

174176
### Contributions

website/css/style.css

Lines changed: 90 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,40 @@ html {
1010
font-family: Verdana, non-serif;
1111
}
1212

13+
body {
14+
margin: 0;
15+
}
16+
17+
#page {
18+
display: flex;
19+
flex-direction: column;
20+
height: 100vh;
21+
/* prevents the page to growing larger than the viewport*/
22+
max-height: 100vh;
23+
}
24+
25+
#container {
26+
flex: 1;
27+
/* for Firefox, otherwise it overflows the parent*/
28+
min-height: 0;
29+
}
30+
31+
#main {
32+
display: flex;
33+
flex-direction: column;
34+
height: 100%;
35+
}
36+
37+
#contribution {
38+
font-size: 0.9em;
39+
color: #555;
40+
height: 25px;
41+
text-align: center;
42+
line-height: 25px;
43+
background-color: #efefef;
44+
border-top: 1px solid #ddd;
45+
}
46+
1347
.cover {
1448
position: fixed;
1549
top: 0;
@@ -32,14 +66,6 @@ html {
3266
color: #555;
3367
}
3468

35-
.dropTarget {
36-
position: absolute;
37-
top: 0;
38-
bottom: 26px;
39-
left: 0;
40-
right: 0;
41-
}
42-
4369
.dropIndicator {
4470
position: fixed;
4571
top: 0;
@@ -69,24 +95,22 @@ html {
6995
text-align: center;
7096
}
7197

72-
73-
#root {
74-
display: flex;
75-
flex-direction: column;
76-
height: calc(100vh - 26px);
77-
}
78-
7998
#Toolbar {
80-
flex-shrink: 0;
81-
flex-grow: 0;
99+
flex: 0 0 auto;
82100
font-family: monospace;
83-
height: 32px;
84101
line-height: 32px;
85102
border-bottom: 1px solid #ddd;
86103
color: #454545;
87104
padding-left: 10px;
88-
background-color: #efefef;
105+
padding-right: 10px;
89106
z-index: 200;
107+
display:flex;
108+
flex-wrap: wrap;
109+
}
110+
111+
#Toolbar > * {
112+
flex: 0 0 auto;
113+
border-right: 1px solid #ddd;
90114
}
91115

92116
#Toolbar,
@@ -100,24 +124,15 @@ html {
100124
background-color: transparent;
101125
box-sizing: border-box;
102126
color: inherit;
103-
display: inline-block;
104127
font-family: inherit;
105128
font-size: 16px;
106-
margin: 0;
107129
min-width: 90px;
108130
outline: none;
109131
}
110132

111133
#Toolbar > .menuButton > span {
112134
cursor: default;
113-
line-height: 29px;
114-
padding: 2px 6px;
115-
}
116-
117-
#Toolbar > * {
118-
height: 32px;
119-
border-right: 1px solid #ddd;
120-
vertical-align: top;
135+
padding: 0px 6px;
121136
}
122137

123138
#Toolbar > * button {
@@ -131,35 +146,27 @@ html {
131146
padding-right: 10px;
132147
margin: 0;
133148
font-size: 18px;
134-
display: inline-block;
135-
vertical-align: top;
136149
}
137150

138151
#Toolbar > a {
139152
color: inherit;
140153
text-decoration: none;
141154
}
142155

143-
#Toolbar .menuButton {
144-
position: relative;
145-
}
146-
147156
#Toolbar .menuButton:hover > ul {
148157
display: block;
149158
}
150159

151160
#Toolbar .menuButton ul {
152-
position: absolute;
153-
left: -1px;
161+
position: fixed;
154162
padding: 0;
155163
margin: 0;
156164
list-style: none;
157165
display: none;
158166
border: 1px solid #ddd;
159-
border-top: none;
160-
min-width: 100%;
161167
max-height: calc(100vh - 65px);
162168
overflow-y: auto;
169+
z-index: 500;
163170
}
164171

165172
#Toolbar .menuButton ul li {
@@ -203,9 +210,8 @@ html {
203210
#info {
204211
color: #898989;
205212
cursor: default;
206-
float: right;
207-
padding-right: 20px;
208213
border: none;
214+
margin-left: auto;
209215
}
210216

211217
#info.small {
@@ -224,37 +230,32 @@ html {
224230
color: #CC0000;
225231
}
226232

227-
#contribution {
228-
font-size: 0.9em;
229-
color: #555;
230-
position: absolute;
231-
height: 25px;
232-
bottom: 0;
233-
left: 0;
234-
right: 0;
235-
text-align: center;
236-
line-height: 25px;
237-
background-color: #efefef;
238-
border-top: 1px solid #ddd;
239-
}
240-
241233
.splitpane-content {
242-
flex-grow: 2;
243-
position: relative;
234+
flex: 1;
235+
/* for Firefox, otherwise it overflows the parent*/
236+
min-height: 0;
237+
min-width: 0;
244238
}
245239

246240
.splitpane {
247-
position: absolute;
248-
top: 0;
249-
bottom: 0;
250-
left: 0;
251-
right: 0;
241+
flex: 1;
242+
/* for Firefox, otherwise it overflows the parent*/
243+
min-height: 0;
244+
min-width: 0;
252245
}
253246

254247
.splitpane-divider {
255248
background-color: #ddd;
256249
}
257250

251+
.splitpane-divider.horizontal {
252+
width: 5px;
253+
}
254+
255+
.splitpane-divider.vertical {
256+
height: 5px;
257+
}
258+
258259
.splitpane-divider:hover {
259260
background-color: #999;
260261
cursor: col-resize;
@@ -265,14 +266,11 @@ html {
265266
}
266267

267268
.output {
268-
box-sizing: border-box;
269-
position: absolute;
270-
top: 0;
271-
bottom: 0;
272-
left: 0;
273-
right: 0;
274-
padding: 0;
269+
flex: 1;
270+
display: flex;
271+
flex-direction: column;
275272
border: none;
273+
padding: 0;
276274
}
277275

278276
.output .toolbar {
@@ -311,11 +309,8 @@ html {
311309

312310
.output > .container {
313311
overflow: auto;
314-
position: absolute;
315-
top: 25px;
316-
left: 0;
317-
right: 0;
318-
bottom: 0;
312+
flex: 1;
313+
display: flex;
319314
}
320315

321316
.output > .no-toolbar {
@@ -332,11 +327,11 @@ html {
332327
}
333328

334329
.editor {
335-
position: absolute;
336-
left: 0;
337-
right: 0;
338-
bottom: 0;
339-
top: 0;
330+
display: flex;
331+
flex: 1;
332+
/* needed to make editor at most as wide as the parent splitpane*/
333+
min-width: 0;
334+
min-height: 0;
340335
}
341336

342337
li.entry {
@@ -352,6 +347,10 @@ li.entry {
352347
background-color: rgba(255,240,6,0.4);
353348
}
354349

350+
.entry > .value {
351+
white-space: pre-wrap;
352+
}
353+
355354
.entry > .value .s {
356355
cursor: text;
357356
-webkit-user-select: text;
@@ -398,7 +397,8 @@ li.entry {
398397
}
399398

400399
.CodeMirror {
401-
height: 100%;
400+
height: auto;
401+
flex: 1;
402402
}
403403

404404
.CodeMirror-scroll {
@@ -495,7 +495,6 @@ body .CodeMirror-Tern-tooltip {
495495
.toggleBtn {
496496
position: absolute;
497497
right: 0;
498-
height: 20px;
499498
z-index: 10;
500499
cursor: pointer;
501500
outline: none;
@@ -505,3 +504,13 @@ body .CodeMirror-Tern-tooltip {
505504
padding-left: 5px;
506505
font-size: 12px;
507506
}
507+
508+
.settings-drawer__expanded {
509+
width: 200px;
510+
border-right: 1px solid #ddd;
511+
}
512+
513+
.settings-drawer__collapsed {
514+
width: 20px;
515+
background-color: #ddd;
516+
}

0 commit comments

Comments
 (0)