flammarion 0.0.10 → 0.0.11

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.
Files changed (35) hide show
  1. data/electron/preload.coffee +6 -0
  2. data/lib/flammarion.rb +5 -1
  3. data/lib/flammarion/about.rb +8 -0
  4. data/lib/flammarion/server.rb +0 -1
  5. data/lib/flammarion/version.rb +1 -1
  6. data/lib/flammarion/writeable.rb +27 -2
  7. data/lib/html/build/index.html +1 -1
  8. data/lib/html/build/javascripts/actions.js +48 -7
  9. data/lib/html/build/javascripts/all.js +48 -7
  10. data/lib/html/build/javascripts/map.js +2 -2
  11. data/lib/html/build/javascripts/status.js +2 -2
  12. data/lib/html/build/javascripts/websocket.js +2 -2
  13. data/lib/html/build/stylesheets/all.css +354 -294
  14. data/lib/html/build/stylesheets/ansi_colors.css +64 -16
  15. data/lib/html/build/stylesheets/buttons.css +68 -56
  16. data/lib/html/{source/stylesheets/railscasts.css → build/stylesheets/code.css} +2 -30
  17. data/lib/html/build/stylesheets/dialog.css +19 -4
  18. data/lib/html/build/stylesheets/frontend.css +23 -8
  19. data/lib/html/build/stylesheets/scrollbar.css +9 -9
  20. data/lib/html/build/stylesheets/status.css +10 -10
  21. data/lib/html/build/stylesheets/table.css +4 -3
  22. data/lib/html/source/index.html.slim +3 -2
  23. data/lib/html/source/javascripts/actions.coffee +23 -2
  24. data/lib/html/source/javascripts/status.coffee +2 -2
  25. data/lib/html/source/stylesheets/all.css +0 -1
  26. data/lib/html/source/stylesheets/ansi_colors.styl +8 -1
  27. data/lib/html/source/stylesheets/buttons.styl +6 -3
  28. data/lib/html/{build/stylesheets/railscasts.css → source/stylesheets/code.styl} +64 -59
  29. data/lib/html/source/stylesheets/colors.styl +7 -1
  30. data/lib/html/source/stylesheets/dialog.styl +26 -15
  31. data/lib/html/source/stylesheets/frontend.styl +9 -3
  32. data/lib/html/source/stylesheets/mixins.styl +15 -6
  33. data/lib/html/source/stylesheets/status.styl +3 -3
  34. data/lib/html/source/stylesheets/table.styl +3 -0
  35. metadata +20 -3
@@ -1,12 +1,27 @@
1
1
  #dialog {
2
+ width: 100%;
3
+ height: 100%;
4
+ background-color: rgba(0,0,0,0.5);
5
+ position: absolute;
6
+ left: 0;
7
+ top: 0;
8
+ -webkit-touch-callout: none;
9
+ -webkit-user-select: none;
10
+ -khtml-user-select: none;
11
+ -moz-user-select: none;
12
+ -ms-user-select: none;
13
+ user-select: none;
14
+ }
15
+ #dialog > #content {
2
16
  position: absolute;
3
17
  top: 10%;
4
18
  left: 10%;
5
19
  width: 70%;
6
20
  height: 70%;
7
21
  padding: 1em;
8
- background-color: #2d3233;
9
- border: 1px solid #a7a7a7;
22
+ background-color: #bebebe;
23
+ border: 1px solid #242424;
24
+ box-shadow: 2px 2px 4px 2px #333;
10
25
  -webkit-touch-callout: none;
11
26
  -webkit-user-select: none;
12
27
  -khtml-user-select: none;
@@ -14,7 +29,7 @@
14
29
  -ms-user-select: none;
15
30
  user-select: none;
16
31
  }
17
- #dialog > #message {
32
+ #dialog > #content > #message {
18
33
  -webkit-touch-callout: all;
19
34
  -webkit-user-select: all;
20
35
  -khtml-user-select: all;
@@ -26,6 +41,6 @@
26
41
  word-wrap: normal;
27
42
  overflow: auto;
28
43
  }
29
- #dialog > .full-button {
44
+ #dialog > #content > .full-button {
30
45
  height: 1em;
31
46
  }
@@ -1,12 +1,17 @@
1
1
  @charset "utf-8";
2
2
  body {
3
- background-color: #383e40;
4
- color: #eee;
3
+ background-color: #eee;
4
+ color: #333;
5
5
  padding: 0px;
6
6
  margin: 0px;
7
7
  height: 100%;
8
8
  width: 100%;
9
9
  overflow: hidden;
10
+ -webkit-touch-callout: none;
11
+ -webkit-user-select: none;
12
+ -khtml-user-select: none;
13
+ -moz-user-select: none;
14
+ -ms-user-select: none;
10
15
  user-select: none;
11
16
  }
12
17
  html {
@@ -20,10 +25,10 @@ a {
20
25
  }
21
26
  p a {
22
27
  text-decoration: underline;
23
- color: #9ca0a1;
28
+ color: #848484;
24
29
  }
25
30
  p a:hover {
26
- color: #a5aaac;
31
+ color: #787878;
27
32
  }
28
33
  .hidden {
29
34
  display: none;
@@ -37,17 +42,30 @@ p a:hover {
37
42
  box-sizing: border-box;
38
43
  word-wrap: break-word;
39
44
  position: relative;
45
+ -webkit-touch-callout: text;
46
+ -webkit-user-select: text;
47
+ -khtml-user-select: text;
48
+ -moz-user-select: text;
49
+ -ms-user-select: text;
50
+ user-select: text;
40
51
  }
41
52
  .pane > .pane {
42
53
  width: calc(100% + 16px);
43
54
  height: initial;
44
55
  margin: -8px;
45
56
  }
57
+ .pane > .pane.subpane-fill {
58
+ height: calc(100% + 16px);
59
+ }
46
60
  #panes {
47
61
  height: calc(98% - 15px);
48
62
  width: 100%;
49
63
  box-sizing: border-box;
50
64
  }
65
+ html {
66
+ padding-top: 2px;
67
+ box-shadow: inset 0px 0px 2px 2px #bebebe;
68
+ }
51
69
  .horizontal > .pane {
52
70
  height: 100%;
53
71
  float: left;
@@ -62,7 +80,7 @@ p a:hover {
62
80
  #plot-mouseover {
63
81
  position: absolute;
64
82
  background-color: rgba(0,0,0,0.5);
65
- color: #eee;
83
+ color: #333;
66
84
  pointer-events: none;
67
85
  font-family: Monospace;
68
86
  }
@@ -72,6 +90,3 @@ p a:hover {
72
90
  pointer-events: none;
73
91
  border: 1px solid #012;
74
92
  }
75
- .hljs {
76
- background-color: #383e40;
77
- }
@@ -7,15 +7,15 @@
7
7
  height: 1.5em;
8
8
  }
9
9
  ::-webkit-scrollbar-thumb {
10
- background: #919393;
11
- background-color: #b2b3b3;
12
- background-image: -webkit-linear-gradient(left, #b2b3b3 40%, #828585 50%);
13
- background-image: -moz-linear-gradient(left, #b2b3b3 40%, #828585 50%);
14
- background-image: -ms-linear-gradient(left, #b2b3b3 40%, #828585 50%);
15
- background-image: -o-linear-gradient(left, #b2b3b3 40%, #828585 50%);
16
- background-image: linear-gradient(left, #b2b3b3 40%, #828585 50%);
10
+ background: #858585;
11
+ background-color: #aaa;
12
+ background-image: -webkit-linear-gradient(left, #aaa 40%, #787878 50%);
13
+ background-image: -moz-linear-gradient(left, #aaa 40%, #787878 50%);
14
+ background-image: -ms-linear-gradient(left, #aaa 40%, #787878 50%);
15
+ background-image: -o-linear-gradient(left, #aaa 40%, #787878 50%);
16
+ background-image: linear-gradient(left, #aaa 40%, #787878 50%);
17
17
  }
18
18
  ::-webkit-scrollbar-track {
19
- background: #626464;
20
- box-shadow: inset 0px 0px 1px 1px #32383a;
19
+ background: #bebebe;
20
+ box-shadow: inset 0px 0px 1px 1px #d6d6d6;
21
21
  }
@@ -1,23 +1,25 @@
1
1
  #status {
2
- background-color: #000;
2
+ background-color: #aaa;
3
3
  margin: 0px;
4
4
  padding: 5px;
5
5
  padding-bottom: 10px;
6
6
  font-family: Monospace;
7
7
  height: 2%;
8
- overflow: none;
8
+ white-space: nowrap;
9
+ overflow: hidden;
10
+ text-overflow: ellipsis;
9
11
  -webkit-touch-callout: none;
10
12
  -webkit-user-select: none;
11
13
  -khtml-user-select: none;
12
14
  -moz-user-select: none;
13
15
  -ms-user-select: none;
14
16
  user-select: none;
15
- background-color: #1a1a1a;
16
- background-image: -webkit-linear-gradient(top, #1a1a1a 10%, #000 100%);
17
- background-image: -moz-linear-gradient(top, #1a1a1a 10%, #000 100%);
18
- background-image: -ms-linear-gradient(top, #1a1a1a 10%, #000 100%);
19
- background-image: -o-linear-gradient(top, #1a1a1a 10%, #000 100%);
20
- background-image: linear-gradient(top, #1a1a1a 10%, #000 100%);
17
+ background-color: #b2b2b2;
18
+ background-image: -webkit-linear-gradient(top, #b2b2b2 10%, #999 100%);
19
+ background-image: -moz-linear-gradient(top, #b2b2b2 10%, #999 100%);
20
+ background-image: -ms-linear-gradient(top, #b2b2b2 10%, #999 100%);
21
+ background-image: -o-linear-gradient(top, #b2b2b2 10%, #999 100%);
22
+ background-image: linear-gradient(top, #b2b2b2 10%, #999 100%);
21
23
  }
22
24
  #status:before {
23
25
  color: #781111;
@@ -25,12 +27,10 @@
25
27
  }
26
28
  #status > .left {
27
29
  float: left;
28
- width: 33%;
29
30
  cursor: pointer;
30
31
  }
31
32
  #status > .right {
32
33
  float: right;
33
- width: 33%;
34
34
  cursor: pointer;
35
35
  text-align: right;
36
36
  }
@@ -7,15 +7,16 @@ td {
7
7
  box-sizing: padding-box;
8
8
  }
9
9
  td.hover {
10
- background: #41484a;
10
+ background: #e2e2e2;
11
11
  }
12
12
  tr {
13
13
  padding: 0;
14
14
  }
15
15
  tr:hover {
16
- background: #41484a;
16
+ background: #e2e2e2;
17
17
  }
18
18
  tr:hover td.hover {
19
19
  outline: 1px solid #333;
20
- background: #383e40;
20
+ background: #eee;
21
+ box-shadow: inset 0px 0px 2px 2px #bebebe;
21
22
  }
@@ -22,8 +22,9 @@ html
22
22
  #panes
23
23
  pre#console-default.pane[style="height:100%"]
24
24
  #dialog.hidden
25
- pre#message Hi World
26
- a#ok.full-button[href="#"] Ok
25
+ #content
26
+ pre#message Hi World
27
+ a#ok.full-button[href="#"] Ok
27
28
  #status
28
29
  .left
29
30
  .center
@@ -33,7 +33,7 @@ $.extend WSClient.prototype.actions,
33
33
  else
34
34
  target = $('#panes')
35
35
 
36
- target.append("<pre class='pane' id='console-#{data.name}'><pre>") if target.find("#console-#{data.name}").size() is 0
36
+ target.append("<pre class='pane full-pane' id='console-#{data.name}'><pre>") if target.find("#console-#{data.name}").size() is 0
37
37
  @__parent.resize_panes(data)
38
38
 
39
39
  closepane: (data) ->
@@ -78,6 +78,7 @@ $.extend WSClient.prototype.actions,
78
78
  newblock = $("<div class='markdown'></div>")
79
79
  newblock.html(data.text)
80
80
  @__parent.add(newblock, target, data)
81
+ hljs.highlightBlock(code) for code in newblock.find('code')
81
82
 
82
83
  button: (data) ->
83
84
  target = @__parent.check_target(data)
@@ -116,7 +117,8 @@ $.extend WSClient.prototype.actions,
116
117
  target = @__parent.check_target(data)
117
118
  element = target.find("#console-#{data.name}")
118
119
  if element.size() is 0
119
- target.append("<pre id='console-#{data.name}' class='pane'></pre>")
120
+ other_classes = "subpane-fill" if data.fill
121
+ target.append("<pre id='console-#{data.name}' class='subpane pane #{other_classes}'></pre>")
120
122
 
121
123
  input: (data) ->
122
124
  target = @__parent.check_target(data)
@@ -176,6 +178,19 @@ $.extend WSClient.prototype.actions,
176
178
  @__lastChecked = element
177
179
  target.append(element)
178
180
 
181
+ dropdown: (data) ->
182
+ target = @__parent.check_target(data)
183
+ element = $("<select class='inline-dropdown' name='#{data.id}'></select>")
184
+ element.append($("<option>#{item}</option>")) for item in data.options
185
+ element.change (e) =>
186
+ @__parent.send({
187
+ id:data.id
188
+ action:'callback'
189
+ source:'dropdown'
190
+ text: element.find('option:selected').text()
191
+ })
192
+ @__parent.add(element, target, data)
193
+
179
194
  alert: (data) ->
180
195
  alert(data.text)
181
196
 
@@ -219,3 +234,9 @@ $.extend WSClient.prototype.actions,
219
234
 
220
235
  close: (data) ->
221
236
  window.close()
237
+
238
+ search: (data) ->
239
+ if window.find(data.text, 0, 0, 1)
240
+ anchor = window.getSelection().anchorNode
241
+ anchor = anchor.parentNode unless anchor.nodeType == 1
242
+ anchor.scrollIntoView()
@@ -15,9 +15,9 @@ class StatusDisplay
15
15
  show_history: ->
16
16
  console.log(@status_history)
17
17
  message = "<ul>#{("<li>#{@ws.escape(item.text, item)}</li>" for item in @status_history).join("\n")}</ul>"
18
- $('#dialog > #message').html(message)
18
+ $('#dialog > #content > #message').html(message)
19
19
  $('#dialog').show()
20
- $('#dialog > #ok').click ->
20
+ $('#dialog > #content > #ok').click ->
21
21
  $('#dialog').hide()
22
22
 
23
23
  window.StatusDisplay = StatusDisplay
@@ -1,2 +1 @@
1
- //=require railscasts.css
2
1
  //=require_tree
@@ -1,8 +1,15 @@
1
+ @import 'colors.styl'
2
+
1
3
  set-ansi(val)
2
4
  &-fg
3
- color val
5
+ if light($bg-color)
6
+ color darken(val, 60%)
7
+ else
8
+ color val
4
9
  &-bg
5
10
  background-color val
11
+ &-bg&-fg
12
+ color val
6
13
 
7
14
  .ansi-black
8
15
  set-ansi(rgb(41, 41, 41))
@@ -33,7 +33,7 @@ buttony(raised = false)
33
33
  .full-button
34
34
  buttony(true)
35
35
 
36
- .inline-text-input
36
+ .inline-text-input, .inline-dropdown
37
37
  buttony()
38
38
  text-align left
39
39
  box-sizing border-box
@@ -94,9 +94,10 @@ input:focus::-webkit-input-placeholder
94
94
  position: absolute
95
95
  top: 0.5em
96
96
  right: 0.5em
97
- margin-right: 0.5em
97
+ margin-right: 1.0em
98
98
  background-color: rgba(0, 0, 0, 0.5)
99
- padding: 0.5em
99
+ drop-shadow()
100
+ padding: 0
100
101
  z-index: 3
101
102
 
102
103
  & .full-button, .inline-text-input, .inline-checkbox
@@ -113,6 +114,8 @@ input:focus::-webkit-input-placeholder
113
114
  &:before
114
115
  border 1px solid darken($fg-color, 70%)
115
116
  height 50%
117
+ & .label-icon-left, & .label-icon-right
118
+ margin 0px 5px
116
119
 
117
120
  .inline-button
118
121
  buttony()
@@ -4,21 +4,27 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
4
4
 
5
5
  */
6
6
 
7
+ @import 'colors.styl'
7
8
 
8
- .hljs {
9
+ $normal-text-color = #e6e1dc
10
+ $comment-color = #bc9458
11
+ $keyword-color = #c26230
12
+
13
+ .hljs
9
14
  display: block;
10
15
  overflow-x: auto;
11
16
  padding: 0.5em;
12
- background: #232323;
13
- color: #e6e1dc;
17
+ background-color $code-bg-color
18
+ color: $normal-text-color;
14
19
  -webkit-text-size-adjust: none;
15
- }
20
+ border-radius 5px
21
+
16
22
 
17
23
  .hljs-comment,
18
- .hljs-shebang {
19
- color: #bc9458;
24
+ .hljs-shebang
25
+ color $comment-color
20
26
  font-style: italic;
21
- }
27
+
22
28
 
23
29
  .hljs-keyword,
24
30
  .ruby .hljs-function .hljs-keyword,
@@ -26,9 +32,9 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
26
32
  .hljs-status,
27
33
  .nginx .hljs-title,
28
34
  .method,
29
- .hljs-list .hljs-title {
30
- color: #c26230;
31
- }
35
+ .hljs-list .hljs-title
36
+ color: $keyword-color
37
+
32
38
 
33
39
  .hljs-string,
34
40
  .hljs-number,
@@ -41,13 +47,13 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
41
47
  .hljs-date,
42
48
  .tex .hljs-command,
43
49
  .asciidoc .hljs-link_label,
44
- .markdown .hljs-link_label {
50
+ .markdown .hljs-link_label
45
51
  color: #a5c261;
46
- }
47
52
 
48
- .hljs-subst {
53
+
54
+ .hljs-subst
49
55
  color: #519f50;
50
- }
56
+
51
57
 
52
58
  .hljs-tag,
53
59
  .hljs-tag .hljs-keyword,
@@ -55,25 +61,25 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
55
61
  .hljs-doctype,
56
62
  .hljs-sub .hljs-identifier,
57
63
  .hljs-pi,
58
- .input_number {
64
+ .input_number
59
65
  color: #e8bf6a;
60
- }
61
66
 
62
- .hljs-identifier {
67
+
68
+ .hljs-identifier
63
69
  color: #d0d0ff;
64
- }
70
+
65
71
 
66
72
  .hljs-class .hljs-title,
67
73
  .hljs-type,
68
74
  .smalltalk .hljs-class,
69
- .hljs-doctag {
75
+ .hljs-doctag
70
76
  text-decoration: none;
71
- }
77
+
72
78
 
73
79
  .hljs-constant,
74
- .hljs-name {
80
+ .hljs-name
75
81
  color: #da4939;
76
- }
82
+
77
83
 
78
84
 
79
85
  .hljs-symbol,
@@ -82,97 +88,97 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
82
88
  .ruby .hljs-symbol .hljs-identifier,
83
89
  .asciidoc .hljs-link_url,
84
90
  .markdown .hljs-link_url,
85
- .hljs-attribute {
91
+ .hljs-attribute
86
92
  color: #6d9cbe;
87
- }
93
+
88
94
 
89
95
  .asciidoc .hljs-link_url,
90
- .markdown .hljs-link_url {
96
+ .markdown .hljs-link_url
91
97
  text-decoration: underline;
92
- }
98
+
93
99
 
94
100
 
95
101
 
96
102
  .hljs-params,
97
103
  .hljs-variable,
98
- .clojure .hljs-attribute {
104
+ .clojure .hljs-attribute
99
105
  color: #d0d0ff;
100
- }
106
+
101
107
 
102
108
  .css .hljs-tag,
103
109
  .hljs-rule .hljs-property,
104
110
  .hljs-pseudo,
105
- .tex .hljs-special {
111
+ .tex .hljs-special
106
112
  color: #cda869;
107
- }
108
113
 
109
- .css .hljs-class {
114
+
115
+ .css .hljs-class
110
116
  color: #9b703f;
111
- }
112
117
 
113
- .hljs-rule .hljs-keyword {
118
+
119
+ .hljs-rule .hljs-keyword
114
120
  color: #c5af75;
115
- }
116
121
 
117
- .hljs-rule .hljs-value {
122
+
123
+ .hljs-rule .hljs-value
118
124
  color: #cf6a4c;
119
- }
120
125
 
121
- .css .hljs-id {
126
+
127
+ .css .hljs-id
122
128
  color: #8b98ab;
123
- }
129
+
124
130
 
125
131
  .hljs-annotation,
126
132
  .apache .hljs-sqbracket,
127
- .nginx .hljs-built_in {
133
+ .nginx .hljs-built_in
128
134
  color: #9b859d;
129
- }
135
+
130
136
 
131
137
  .hljs-preprocessor,
132
138
  .hljs-preprocessor *,
133
- .hljs-pragma {
139
+ .hljs-pragma
134
140
  color: #8996a8 !important;
135
- }
141
+
136
142
 
137
143
  .hljs-hexcolor,
138
- .css .hljs-value .hljs-number {
144
+ .css .hljs-value .hljs-number
139
145
  color: #a5c261;
140
- }
146
+
141
147
 
142
148
  .hljs-title,
143
149
  .hljs-decorator,
144
- .css .hljs-function {
150
+ .css .hljs-function
145
151
  color: #ffc66d;
146
- }
152
+
147
153
 
148
154
  .diff .hljs-header,
149
- .hljs-chunk {
155
+ .hljs-chunk
150
156
  background-color: #2f33ab;
151
- color: #e6e1dc;
157
+ color: $normal-text-color;
152
158
  display: inline-block;
153
159
  width: 100%;
154
- }
155
160
 
156
- .diff .hljs-change {
161
+
162
+ .diff .hljs-change
157
163
  background-color: #4a410d;
158
164
  color: #f8f8f8;
159
165
  display: inline-block;
160
166
  width: 100%;
161
- }
162
167
 
163
- .hljs-addition {
168
+
169
+ .hljs-addition
164
170
  background-color: #144212;
165
- color: #e6e1dc;
171
+ color: $normal-text-color;
166
172
  display: inline-block;
167
173
  width: 100%;
168
- }
169
174
 
170
- .hljs-deletion {
175
+
176
+ .hljs-deletion
171
177
  background-color: #600;
172
- color: #e6e1dc;
178
+ color: $normal-text-color;
173
179
  display: inline-block;
174
180
  width: 100%;
175
- }
181
+
176
182
 
177
183
  .coffeescript .javascript,
178
184
  .javascript .xml,
@@ -180,6 +186,5 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
180
186
  .xml .javascript,
181
187
  .xml .vbscript,
182
188
  .xml .css,
183
- .xml .hljs-cdata {
189
+ .xml .hljs-cdata
184
190
  opacity: 0.7;
185
- }