vedeu 0.4.32 → 0.4.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/vedeu +3 -0
- data/docs/dsl.md +36 -2
- data/examples/borders_app.rb +5 -0
- data/examples/colours_app.rb +5 -0
- data/examples/configuration_app.rb +5 -0
- data/examples/drb_app.rb +4 -0
- data/examples/focus_app.rb +5 -0
- data/examples/geometry_app.rb +4 -0
- data/examples/hello_world.rb +5 -0
- data/examples/material_colours_app.rb +15 -8
- data/examples/panel_app.rb +5 -0
- data/examples/typed_commands/typed_commands_app.rb +4 -4
- data/examples/view_templates_app/view_templates_app.rb +4 -4
- data/lib/vedeu/application.rb +2 -0
- data/lib/vedeu/bindings.rb +1 -0
- data/lib/vedeu/buffers/buffer.rb +2 -0
- data/lib/vedeu/buffers/display_buffer.rb +1 -0
- data/lib/vedeu/configuration/api.rb +2 -0
- data/lib/vedeu/configuration/cli.rb +2 -0
- data/lib/vedeu/configuration/configuration.rb +1 -0
- data/lib/vedeu/cursor/cursor.rb +2 -0
- data/lib/vedeu/cursor/move.rb +2 -0
- data/lib/vedeu/cursor/refresh_cursor.rb +2 -0
- data/lib/vedeu/debug.rb +1 -0
- data/lib/vedeu/distributed/uri.rb +2 -0
- data/lib/vedeu/dsl/all.rb +1 -0
- data/lib/vedeu/dsl/border.rb +3 -0
- data/lib/vedeu/dsl/composition.rb +1 -0
- data/lib/vedeu/dsl/geometry.rb +1 -0
- data/lib/vedeu/dsl/group.rb +2 -0
- data/lib/vedeu/dsl/interface.rb +22 -1
- data/lib/vedeu/dsl/presentation.rb +0 -1
- data/lib/vedeu/dsl/text.rb +1 -0
- data/lib/vedeu/dsl/use.rb +3 -1
- data/lib/vedeu/events/event.rb +2 -0
- data/lib/vedeu/events/trigger.rb +2 -0
- data/lib/vedeu/geometry/area.rb +2 -0
- data/lib/vedeu/geometry/coordinate.rb +2 -0
- data/lib/vedeu/geometry/dimension.rb +2 -0
- data/lib/vedeu/geometry/geometry.rb +1 -0
- data/lib/vedeu/geometry/grid.rb +2 -0
- data/lib/vedeu/geometry/index_position.rb +2 -0
- data/lib/vedeu/geometry/position.rb +2 -0
- data/lib/vedeu/geometry/position_index.rb +2 -0
- data/lib/vedeu/geometry/position_validator.rb +2 -0
- data/lib/vedeu/input/input.rb +2 -0
- data/lib/vedeu/input/key.rb +2 -0
- data/lib/vedeu/input/keymap.rb +2 -0
- data/lib/vedeu/input/mapper.rb +2 -0
- data/lib/vedeu/main_loop.rb +1 -0
- data/lib/vedeu/models/cell.rb +2 -0
- data/lib/vedeu/models/char.rb +2 -0
- data/lib/vedeu/models/composition.rb +2 -0
- data/lib/vedeu/models/escape_char.rb +2 -0
- data/lib/vedeu/models/focus.rb +1 -0
- data/lib/vedeu/models/group.rb +2 -0
- data/lib/vedeu/models/interface.rb +2 -0
- data/lib/vedeu/models/line.rb +2 -0
- data/lib/vedeu/models/menu.rb +2 -0
- data/lib/vedeu/models/panel.rb +2 -0
- data/lib/vedeu/models/stream.rb +2 -0
- data/lib/vedeu/null/all.rb +2 -0
- data/lib/vedeu/null/border.rb +2 -0
- data/lib/vedeu/null/buffer.rb +2 -0
- data/lib/vedeu/null/generic.rb +2 -0
- data/lib/vedeu/null/geometry.rb +2 -0
- data/lib/vedeu/null/interface.rb +2 -0
- data/lib/vedeu/output/background.rb +2 -0
- data/lib/vedeu/output/border.rb +2 -0
- data/lib/vedeu/output/clear.rb +2 -0
- data/lib/vedeu/output/colour.rb +1 -0
- data/lib/vedeu/output/compressor.rb +2 -0
- data/lib/vedeu/output/esc.rb +1 -0
- data/lib/vedeu/output/foreground.rb +2 -0
- data/lib/vedeu/output/html_char.rb +2 -0
- data/lib/vedeu/output/output.rb +2 -0
- data/lib/vedeu/output/presentation.rb +1 -0
- data/lib/vedeu/output/refresh.rb +1 -0
- data/lib/vedeu/output/renderers/all.rb +3 -0
- data/lib/vedeu/output/renderers/escape_sequence.rb +2 -0
- data/lib/vedeu/output/renderers/file.rb +2 -0
- data/lib/vedeu/output/renderers/html.rb +2 -0
- data/lib/vedeu/output/renderers/json.rb +2 -0
- data/lib/vedeu/output/renderers/null.rb +2 -0
- data/lib/vedeu/output/renderers/terminal.rb +2 -0
- data/lib/vedeu/output/renderers/text.rb +2 -0
- data/lib/vedeu/output/style.rb +1 -0
- data/lib/vedeu/output/text.rb +2 -0
- data/lib/vedeu/output/translator.rb +2 -0
- data/lib/vedeu/output/viewport.rb +2 -0
- data/lib/vedeu/output/virtual_terminal.rb +2 -0
- data/lib/vedeu/output/wordwrap.rb +2 -0
- data/lib/vedeu/repositories/collection.rb +2 -0
- data/lib/vedeu/repositories/collections/all.rb +12 -0
- data/lib/vedeu/repositories/model.rb +2 -0
- data/lib/vedeu/repositories/registerable.rb +2 -0
- data/lib/vedeu/repositories/repositories/background_colours.rb +2 -0
- data/lib/vedeu/repositories/repositories/borders.rb +2 -0
- data/lib/vedeu/repositories/repositories/buffers.rb +2 -0
- data/lib/vedeu/repositories/repositories/colours.rb +2 -0
- data/lib/vedeu/repositories/repositories/cursors.rb +2 -0
- data/lib/vedeu/repositories/repositories/events_repository.rb +2 -0
- data/lib/vedeu/repositories/repositories/foreground_colours.rb +2 -0
- data/lib/vedeu/repositories/repositories/geometries.rb +2 -0
- data/lib/vedeu/repositories/repositories/groups.rb +2 -0
- data/lib/vedeu/repositories/repositories/interfaces_repository.rb +2 -0
- data/lib/vedeu/repositories/repositories/keymaps.rb +2 -0
- data/lib/vedeu/repositories/repositories/menus.rb +2 -0
- data/lib/vedeu/repositories/repository.rb +3 -3
- data/lib/vedeu/storage/associative_store.rb +2 -0
- data/lib/vedeu/storage/conveyor_store.rb +2 -0
- data/lib/vedeu/storage/fifo_store.rb +2 -0
- data/lib/vedeu/storage/store.rb +1 -0
- data/lib/vedeu/support/common.rb +1 -0
- data/lib/vedeu/support/log.rb +3 -0
- data/lib/vedeu/support/options.rb +2 -0
- data/lib/vedeu/support/template.rb +2 -0
- data/lib/vedeu/support/terminal.rb +1 -0
- data/lib/vedeu/support/timer.rb +2 -1
- data/lib/vedeu/support/visibility.rb +2 -0
- data/lib/vedeu/templating/directive.rb +3 -0
- data/lib/vedeu/templating/helpers.rb +2 -0
- data/lib/vedeu/templating/preprocessor.rb +4 -0
- data/lib/vedeu/traps.rb +1 -0
- data/lib/vedeu/version.rb +2 -1
- data/test/lib/vedeu/dsl/border_test.rb +19 -0
- data/test/lib/vedeu/dsl/geometry_test.rb +19 -0
- data/test/lib/vedeu/dsl/interface_test.rb +19 -0
- metadata +2 -2
data/lib/vedeu/output/output.rb
CHANGED
data/lib/vedeu/output/refresh.rb
CHANGED
@@ -9,6 +9,8 @@ require_relative 'text'
|
|
9
9
|
module Vedeu
|
10
10
|
|
11
11
|
# Provides a single interface to all registered renderers.
|
12
|
+
#
|
13
|
+
# @api private
|
12
14
|
module Renderers
|
13
15
|
|
14
16
|
extend Enumerable
|
@@ -16,6 +18,7 @@ module Vedeu
|
|
16
18
|
|
17
19
|
# Provides access to the list of renderers.
|
18
20
|
#
|
21
|
+
# @api public
|
19
22
|
# @return [Module]
|
20
23
|
def renderers
|
21
24
|
self
|
@@ -5,6 +5,8 @@ module Vedeu
|
|
5
5
|
# Converts a grid of {Vedeu::Char} objects into a stream of escape sequences
|
6
6
|
# and content suitable for a terminal, and writes them to a file in the /tmp
|
7
7
|
# directory.
|
8
|
+
#
|
9
|
+
# @api private
|
8
10
|
class File
|
9
11
|
|
10
12
|
# @param output [Array<Array<Vedeu::Char>>]
|
data/lib/vedeu/output/style.rb
CHANGED
data/lib/vedeu/output/text.rb
CHANGED
@@ -3,31 +3,43 @@ require 'vedeu/repositories/collection'
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
5
|
# A collection of {Vedeu::Char} instances.
|
6
|
+
#
|
7
|
+
# @api private
|
6
8
|
class Chars < Vedeu::Collection
|
7
9
|
|
8
10
|
end # Chars
|
9
11
|
|
10
12
|
# A collection of {Vedeu::Event} instances.
|
13
|
+
#
|
14
|
+
# @api private
|
11
15
|
class Events < Vedeu::Collection
|
12
16
|
|
13
17
|
end # Events
|
14
18
|
|
15
19
|
# A collection of {Vedeu::Interface} instances.
|
20
|
+
#
|
21
|
+
# @api private
|
16
22
|
class Interfaces < Vedeu::Collection
|
17
23
|
|
18
24
|
end # Interfaces
|
19
25
|
|
20
26
|
# A collection of {Vedeu::Key} instances.
|
27
|
+
#
|
28
|
+
# @api private
|
21
29
|
class Keys < Vedeu::Collection
|
22
30
|
|
23
31
|
end # Keys
|
24
32
|
|
25
33
|
# A collection of {Vedeu::Line} instances.
|
34
|
+
#
|
35
|
+
# @api private
|
26
36
|
class Lines < Vedeu::Collection
|
27
37
|
|
28
38
|
end # Lines
|
29
39
|
|
30
40
|
# A collection of {Vedeu::Stream} instances.
|
41
|
+
#
|
42
|
+
# @api private
|
31
43
|
class Streams < Vedeu::Collection
|
32
44
|
|
33
45
|
end # Streams
|
@@ -8,6 +8,8 @@ module Vedeu
|
|
8
8
|
# { 'models' => [Model, Model, Model] }
|
9
9
|
#
|
10
10
|
# { 'models' => [Model] }
|
11
|
+
#
|
12
|
+
# @api private
|
11
13
|
class Repository
|
12
14
|
|
13
15
|
include Vedeu::Common
|
@@ -41,11 +43,9 @@ module Vedeu
|
|
41
43
|
|
42
44
|
# @return [Array<void>] An array containing each stored model.
|
43
45
|
def all
|
44
|
-
return [] if empty?
|
45
46
|
return storage.values if storage.is_a?(Hash)
|
46
|
-
return storage.to_a if storage.is_a?(Set)
|
47
47
|
|
48
|
-
|
48
|
+
registered
|
49
49
|
end
|
50
50
|
|
51
51
|
# @param name [String] The name of the stored model.
|
data/lib/vedeu/storage/store.rb
CHANGED