atome 0.5.6.5.6 → 0.5.6.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/atome/atome.rb +27 -2
- data/lib/atome/extensions/atome.rb +9 -4
- data/lib/atome/genesis/atomes.rb +4 -0
- data/lib/atome/genesis/particles/atome.rb +1 -1
- data/lib/atome/genesis/particles/hierarchy.rb +0 -2
- data/lib/atome/genesis/particles/property.rb +5 -0
- data/lib/atome/genesis/particles/utility.rb +9 -34
- data/lib/atome/genesis/sparkle.rb +4 -1
- data/lib/atome/kernel/universe.rb +19 -17
- data/lib/atome/utilities/utilities.rb +45 -27
- data/lib/atome/version.rb +1 -1
- data/lib/atome.rb +1 -2
- data/lib/atome_relative.rb +1 -2
- data/lib/molecules/intuition/toolbox.rb +274 -272
- data/lib/renderers/html/hierarchy.rb +5 -0
- data/lib/renderers/html/html.rb +8 -3
- data/lib/renderers/html/property.rb +9 -0
- data/lib/renderers/html/utility.rb +2 -2
- data/vendor/assets/application/examples/border.rb +26 -19
- data/vendor/assets/application/examples/duplicate.rb +6 -2
- data/vendor/assets/application/examples/history.rb +16 -15
- data/vendor/assets/application/examples/layout.rb +0 -13
- data/vendor/assets/application/examples/matrix.rb +5 -3
- data/vendor/assets/application/examples/preset.rb +1 -1
- data/vendor/assets/application/examples/sub_atome_manipulation.rb +5 -2
- data/vendor/assets/application/examples/sync.rb +16 -17
- data/vendor/assets/application/examples/table.rb +2 -2
- data/vendor/assets/application/examples/test.rb +1 -2
- data/vendor/assets/src/css/style.css +1 -0
- metadata +2 -3
- data/vendor/assets/application/examples/callback.rb +0 -20
@@ -52,13 +52,17 @@
|
|
52
52
|
# new({ after: :duplicate }) do |params|
|
53
53
|
# @duplicate[@duplicate.keys[@duplicate.keys.length - 1]]
|
54
54
|
# end
|
55
|
+
# c=circle
|
56
|
+
# c.color({red: 1, id: :titi})
|
57
|
+
# # b=box({apply: [:titi], left: 123})
|
55
58
|
|
56
|
-
|
59
|
+
|
60
|
+
b = circle({ id: :the_circle })
|
57
61
|
b.text(:hello)
|
58
62
|
bb = b.duplicate({ width: 33, left: 234, top: 222 })
|
59
63
|
bb.color(:red)
|
60
64
|
wait 1 do
|
61
|
-
bb2 = b.duplicate({ width: 33, left: 12 })
|
65
|
+
bb2 = b.duplicate({ width: 33, left: 12, top: 99 })
|
62
66
|
bb3 = b.duplicate({ width: 33, left: 444 })
|
63
67
|
bb3.color(:green)
|
64
68
|
bb2.color(:orange)
|
@@ -9,23 +9,24 @@ b.rotate(12)
|
|
9
9
|
b.rotate(6)
|
10
10
|
b.data
|
11
11
|
b.touch(true) do
|
12
|
-
b.
|
13
|
-
b.data
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
puts b.history
|
13
|
+
# b.data(:super)
|
14
|
+
# b.data
|
15
|
+
# box_data_write_history=b.history({ operation: :write, id: :the_box, particle: :data })
|
16
|
+
# puts "get data write operation : #{box_data_write_history}"
|
17
|
+
# box_data_read_history=b.history({ operation: :read, id: :the_box, particle: :data })
|
18
|
+
# puts "get data read operation : #{box_data_read_history}"
|
18
19
|
end
|
19
20
|
|
20
21
|
|
21
22
|
|
22
|
-
box_rotate_history=b.history({ operation: :write, id: :the_box, particle: :rotate })
|
23
|
-
puts "get all all rotate write operation : #{box_rotate_history}"
|
24
|
-
|
25
|
-
# we check if an operation synced (that means saved on atome's server)
|
26
|
-
puts "first rotate operation state : #{box_rotate_history[0]}"
|
27
|
-
|
28
|
-
box_data_history=b.history({ operation: :write, id: :the_box, particle: :data })
|
29
|
-
puts "get data write operation : #{box_data_history}"
|
30
|
-
|
23
|
+
# box_rotate_history=b.history({ operation: :write, id: :the_box, particle: :rotate })
|
24
|
+
# puts "get all all rotate write operation : #{box_rotate_history}"
|
25
|
+
#
|
26
|
+
# # we check if an operation synced (that means saved on atome's server)
|
27
|
+
# puts "first rotate operation state : #{box_rotate_history[0]}"
|
28
|
+
#
|
29
|
+
# box_data_history=b.history({ operation: :write, id: :the_box, particle: :data })
|
30
|
+
# puts "get data write operation : #{box_data_history}"
|
31
|
+
#
|
31
32
|
|
@@ -18,19 +18,6 @@ selected_items.each do |atome_found|
|
|
18
18
|
atomes_found << atome_found
|
19
19
|
end
|
20
20
|
|
21
|
-
# random_found = atomes_found.sample(17)
|
22
|
-
#
|
23
|
-
# random_found.each do |atome_id|
|
24
|
-
# atome_found = grab(atome_id)
|
25
|
-
# if atome_found.type == :shape
|
26
|
-
# atome_found.left(rand(700))
|
27
|
-
# atome_found.width(rand(200))
|
28
|
-
# atome_found.height(rand(200))
|
29
|
-
# # atome_found.rotate(rand(90))
|
30
|
-
# atome_found.smooth(rand(120))
|
31
|
-
# atome_found.color({ red: rand, green: rand, blue: rand })
|
32
|
-
# end
|
33
|
-
# end
|
34
21
|
|
35
22
|
selected_items.layout({ mode: :default, width: 500, height: 22 })
|
36
23
|
|
@@ -22,7 +22,8 @@ def matrix(id, horizontal_nb, vertical_nb, spacing, size)
|
|
22
22
|
end
|
23
23
|
box_width = available_width / horizontal_nb
|
24
24
|
box_height = available_height / vertical_nb
|
25
|
-
background=box({id:
|
25
|
+
background=box({id: "#{id}_background", width: 666, height: 666, color:{alpha: 0}})
|
26
|
+
|
26
27
|
vertical_nb.times do |y|
|
27
28
|
horizontal_nb.times do |x|
|
28
29
|
id_generated = "#{id}_#{x}_#{y}"
|
@@ -147,7 +148,8 @@ wait 1 do
|
|
147
148
|
@current_matrix.width(33)
|
148
149
|
end
|
149
150
|
@current_matrix.drag(true)
|
151
|
+
# alert @current_matrix.id
|
150
152
|
wait 2 do
|
151
|
-
grab(:
|
152
|
-
grab(:
|
153
|
+
grab(:vie_0_background).left(666)
|
154
|
+
grab(:vie_0_background).drag(true)
|
153
155
|
end
|
@@ -20,7 +20,7 @@ c=circle
|
|
20
20
|
puts " c is : #{c.inspect }"
|
21
21
|
# this print : [Log] c is : #<Atome: @type=:shape, @smooth="100%", @width=99, @id=:circle_16, @renderers=[:html], @height=99, @broadcast={}, @callback={}, @tag={}, @attached=[], @unit={}, @collected={}, @html=#<HTML:0x06579be8 @element=[object HTMLDivElement], @id="circle_16", @original_atome=#<Atome: @type=:shape, @smooth="100%", @width=99, @id=:circle_16, @renderers=[:html], @height=99, @broadcast={}, @callback={}, @tag={}, @attached=[], @unit={}, @collected={}, @html=#<HTML:0x06579be8 ...>, @top=100, @attach=[:view], @left=100, @apply=[:circle_color], @clones=[], @preset={:circle=>{:width=>99, :height=>99, :smooth=>"100%", :apply=>[:circle_color], :left=>100, :top=>100, :clones=>[]}}>, @element_type="div">, @top=100, @attach=[:view], @left=100, @apply=[:circle_color], @clones=[], @preset={:circle=>{:width=>99, :height=>99, :smooth=>"100%", :apply=>[:circle_color], :left=>100, :top=>100, :clones=>[]}}> (browser.script.iife.min.js, line 13)
|
22
22
|
# it's pôssible to alter basic preset using the particle .preset
|
23
|
-
my_box.preset({ circle: {type: :shape, :width=>99, :height=>99, :smooth=>"100%", color: :red, :left=>100, :top=>100
|
23
|
+
my_box.preset({ circle: {type: :shape, :width=>99, :height=>99, :smooth=>"100%", color: :red, :left=>100, :top=>100 }})
|
24
24
|
puts " my_box preset is now : #{my_box.preset}"
|
25
25
|
# now the preset circle is : [Log] my_box preset is now : {:circle=>{:type=>:shape, :width=>99, :height=>99, :smooth=>"100%", :color=>:red, :left=>100, :top=>100, :clones=>[]}} (browser.script.iife.min.js, line 13)
|
26
26
|
|
@@ -6,12 +6,15 @@ b.text({id: :the_text, left: 90, top: 30, data: :ok})
|
|
6
6
|
b.text({id: :the_text2, left: 190, top: 30, data: :hello})
|
7
7
|
|
8
8
|
|
9
|
+
|
9
10
|
wait 1 do
|
10
|
-
b.text.
|
11
|
+
b.text.each_with_index do |el, _index|
|
12
|
+
grab(el).left(30)
|
13
|
+
end
|
14
|
+
# b.text.left(30)
|
11
15
|
wait 1 do
|
12
16
|
b.text.color(:white)
|
13
17
|
b.text.each_with_index do |el, index|
|
14
|
-
|
15
18
|
grab(el).left(30+30*index)
|
16
19
|
end
|
17
20
|
b.color(:black)
|
@@ -9,31 +9,30 @@ b.rotate(6)
|
|
9
9
|
b.data
|
10
10
|
b.touch(true) do
|
11
11
|
b.data(:super)
|
12
|
-
b.data
|
12
|
+
puts b.data
|
13
13
|
# operation has two option write or read, it filter the history on those two options, write retrieve all alteration
|
14
14
|
# of the particle , read list everytime a particle was get
|
15
15
|
# id retrieve all operation on a given ID
|
16
16
|
# particle retrieve all operation on a given particle
|
17
|
-
# alert b.retrieve({ operation: :write, id: :the_box, particle: :data })
|
18
17
|
end
|
19
18
|
|
20
19
|
|
21
20
|
# alert b.instance_variable_get('@history')
|
22
|
-
box_rotate_history=b.history({ operation: :write, id: :the_box, particle: :rotate })
|
23
|
-
puts "get all all rotate write operation : #{box_rotate_history}"
|
24
|
-
first_rotate_operation_state=b.history({ operation: :write, id: :the_box, particle: :rotate })[0][:sync]
|
25
|
-
|
26
|
-
# we check if an operation synced (that means saved on atome's server)
|
27
|
-
puts "first rotate operation state : #{box_rotate_history[0]}"
|
28
|
-
|
29
|
-
# we check if an operation synced (that means saved on atome's server)
|
30
|
-
puts "first rotate operation initial state : #{box_rotate_history[0]}"
|
31
|
-
puts "synced : #{first_rotate_operation_state}"
|
32
|
-
first_rotate_operation_number=b.history({ operation: :write, id: :the_box, particle: :rotate })[0][:operation]
|
33
|
-
puts "first rotate 'write' operation number is: #{first_rotate_operation_number}"
|
21
|
+
# box_rotate_history=b.history({ operation: :write, id: :the_box, particle: :rotate })
|
22
|
+
# puts "get all all rotate write operation : #{box_rotate_history}"
|
23
|
+
# first_rotate_operation_state=b.history({ operation: :write, id: :the_box, particle: :rotate })[0][:sync]
|
24
|
+
#
|
25
|
+
# # we check if an operation synced (that means saved on atome's server)
|
26
|
+
# puts "first rotate operation state : #{box_rotate_history[0]}"
|
27
|
+
#
|
28
|
+
# # we check if an operation synced (that means saved on atome's server)
|
29
|
+
# puts "first rotate operation initial state : #{box_rotate_history[0]}"
|
30
|
+
# puts "synced : #{first_rotate_operation_state}"
|
31
|
+
# first_rotate_operation_number=b.history({ operation: :write, id: :the_box, particle: :rotate })[0][:operation]
|
32
|
+
# puts "first rotate 'write' operation number is: #{first_rotate_operation_number}"
|
34
33
|
|
35
34
|
# now we sync the state
|
36
|
-
Universe.synchronised(first_rotate_operation_number, :star_wars)
|
35
|
+
# Universe.synchronised(first_rotate_operation_number, :star_wars)
|
37
36
|
# now we check if it's synced
|
38
|
-
box_rotate_history=b.history({ operation: :write, id: :the_box, particle: :rotate })
|
39
|
-
puts "new state for first rotate operation : #{box_rotate_history[0]}"
|
37
|
+
# box_rotate_history=b.history({ operation: :write, id: :the_box, particle: :rotate })
|
38
|
+
# puts "new state for first rotate operation : #{box_rotate_history[0]}"
|
@@ -9,7 +9,7 @@ end
|
|
9
9
|
m = matrix({ renderers: [:html], attach: :view, id: :my_test_box, type: :matrix, apply: [:shape_color],
|
10
10
|
left: 333, top: 0, width: 900, smooth: 15, height: 900, overflow: :scroll, option: { header: true },
|
11
11
|
component: {
|
12
|
-
border: { thickness: 5, color:
|
12
|
+
border: { thickness: 5, color: :blue, pattern: :dotted },
|
13
13
|
overflow: :auto,
|
14
14
|
color: "white",
|
15
15
|
shadow: {
|
@@ -34,7 +34,7 @@ m = matrix({ renderers: [:html], attach: :view, id: :my_test_box, type: :matrix,
|
|
34
34
|
|
35
35
|
# tests
|
36
36
|
m.color(:orange)
|
37
|
-
m.border({ thickness: 5, color:
|
37
|
+
m.border({ thickness: 5, color: :blue, pattern: :dotted })
|
38
38
|
|
39
39
|
puts m.get({ cell: [1, 2] })
|
40
40
|
wait 2 do
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
puts Universe.particle_list
|
1
|
+
# frozen_string_literal: true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.6.
|
4
|
+
version: 0.5.6.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Eric Godard
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: artoo
|
@@ -526,7 +526,6 @@ files:
|
|
526
526
|
- vendor/assets/application/examples/blur.rb
|
527
527
|
- vendor/assets/application/examples/border.rb
|
528
528
|
- vendor/assets/application/examples/browse.rb
|
529
|
-
- vendor/assets/application/examples/callback.rb
|
530
529
|
- vendor/assets/application/examples/categories.rb
|
531
530
|
- vendor/assets/application/examples/category.rb
|
532
531
|
- vendor/assets/application/examples/center.rb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
|
4
|
-
# here is how callbock is used with atome
|
5
|
-
test_box = box({left: -20})
|
6
|
-
|
7
|
-
test_box.blur(9) do |params_back|
|
8
|
-
puts "here is the callback : #{params_back}"
|
9
|
-
end
|
10
|
-
# per example it's possible to set back params like this
|
11
|
-
test_box.callback({ blur: 'I am the callback content!!' })
|
12
|
-
# now we call the callback for blur
|
13
|
-
test_box.call(:blur)
|
14
|
-
|
15
|
-
circle({id: :the_c})
|
16
|
-
# here is a callback with event params
|
17
|
-
test_box.drag(true) do |event|
|
18
|
-
grab(:the_c).left(150+event[:pageX].to_i)
|
19
|
-
end
|
20
|
-
|