atome 0.5.5.9.1 → 0.5.6.0.2

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 (76) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +9 -2
  3. data/documentation/deep learning/basic_infos.txt +9 -17
  4. data/exe/atome +2 -1
  5. data/lib/atome/atome.rb +5 -6
  6. data/lib/atome/extensions/atome.rb +52 -0
  7. data/lib/atome/genesis/generators/atome.rb +3 -0
  8. data/lib/atome/genesis/generators/communication.rb +7 -2
  9. data/lib/atome/genesis/generators/geometry.rb +0 -3
  10. data/lib/atome/genesis/generators/spatial.rb +19 -40
  11. data/lib/atome/genesis/generators/utility.rb +16 -12
  12. data/lib/atome/genesis/genesis.rb +2 -1
  13. data/lib/atome/genesis/sparkle.rb +5 -2
  14. data/lib/atome/helpers/essentials.rb +9 -9
  15. data/lib/atome/helpers/utilities.rb +26 -0
  16. data/lib/atome/kernel/ruby +0 -0
  17. data/lib/atome/presets/atome.rb +4 -1
  18. data/lib/atome/version.rb +2 -1
  19. data/lib/renderers/html/geometry.rb +30 -18
  20. data/lib/renderers/html/html.rb +11 -1
  21. data/lib/renderers/html/identity.rb +2 -1
  22. data/lib/renderers/html/spatial.rb +6 -7
  23. data/server/atome_server.rb +148 -0
  24. data/server/atome_server_wasm.rb +112 -0
  25. data/server/capture.rb +10 -0
  26. data/server/config.ru +13 -0
  27. data/src/css/style.css +162 -0
  28. data/src-tauri/.gitignore +4 -0
  29. data/src-tauri/Cargo.toml +27 -0
  30. data/src-tauri/build.rs +3 -0
  31. data/src-tauri/icons/128x128.png +0 -0
  32. data/src-tauri/icons/128x128@2x.png +0 -0
  33. data/src-tauri/icons/32x32.png +0 -0
  34. data/src-tauri/icons/Square107x107Logo.png +0 -0
  35. data/src-tauri/icons/Square142x142Logo.png +0 -0
  36. data/src-tauri/icons/Square150x150Logo.png +0 -0
  37. data/src-tauri/icons/Square284x284Logo.png +0 -0
  38. data/src-tauri/icons/Square30x30Logo.png +0 -0
  39. data/src-tauri/icons/Square310x310Logo.png +0 -0
  40. data/src-tauri/icons/Square44x44Logo.png +0 -0
  41. data/src-tauri/icons/Square71x71Logo.png +0 -0
  42. data/src-tauri/icons/Square89x89Logo.png +0 -0
  43. data/src-tauri/icons/StoreLogo.png +0 -0
  44. data/src-tauri/icons/icon.icns +0 -0
  45. data/src-tauri/icons/icon.ico +0 -0
  46. data/src-tauri/icons/icon.png +0 -0
  47. data/src-tauri/src/main.rs +71 -0
  48. data/src-tauri/tauri.conf.json +70 -0
  49. data/src-wasm/wasm/wasi-vfs-osx_arm +0 -0
  50. data/src-wasm/wasm/wasi-vfs-osx_x86 +0 -0
  51. data/src-wasm/wasm/wasi-vfs-unix +0 -0
  52. data/src-wasm/wasm/wasi-vfs.exe +0 -0
  53. data/vendor/assets/application/examples/center.rb +2 -3
  54. data/vendor/assets/application/examples/compute.rb +1 -1
  55. data/vendor/assets/application/examples/css.rb +6 -0
  56. data/vendor/assets/application/examples/int8.rb +4 -1
  57. data/vendor/assets/application/examples/selected.rb +6 -0
  58. data/vendor/assets/application/examples/sub_atome_manipulation.rb +19 -0
  59. data/vendor/assets/application/examples/test.rb +19 -12
  60. data/vendor/assets/application/examples/unit.rb +1 -1
  61. data/vendor/assets/application/index.rb +1 -1
  62. data/vendor/assets/server/atome_server.rb +178 -33
  63. data/vendor/assets/src/index_server.html +2 -0
  64. data/vendor/assets/src/index_server_wasm.html +1 -0
  65. data/vendor/assets/src/js/atome/atome_helpers/communication.js +2 -4
  66. metadata +37 -12
  67. data/vendor/assets/application/required_example.rb +0 -1
  68. data/vendor/assets/application/test.rb +0 -29
  69. data/vendor/assets/application/works/photos.rb +0 -672
  70. data/vendor/assets/application/works/photos2.rb +0 -218
  71. data/vendor/assets/application/works/photos3.rb +0 -343
  72. data/vendor/assets/application/works/photos4.rb +0 -34
  73. data/vendor/assets/application/works/photos6.rb +0 -6
  74. data/vendor/assets/application/works/vie.rb +0 -196
  75. /data/{vendor/assets/application/works/trigga.rb → Guardfile} +0 -0
  76. /data/vendor/assets/application/examples/{presets.rb → preset.rb} +0 -0
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ b=box({right: 45, left: :auto})
4
+ b.css[:style][:border] = '2px solid yellow'
5
+ puts b.css[:style][:border]
6
+ puts b.css
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- t = text({ int8: { english: :hello, french: :salut, deutch: :halo }, language: :deutch })
3
+ t = text({ int8: { english: :hello, french: :salut, deutch: :halo } })
4
4
 
5
5
  wait 1 do
6
6
  t.language(:french)
@@ -12,3 +12,6 @@ wait 1 do
12
12
  end
13
13
 
14
14
  puts t.data
15
+
16
+
17
+
@@ -24,6 +24,12 @@ t.touch(true) do
24
24
  b.selected(false)
25
25
  puts "3 current_user- #{grab(Universe.current_user).selection}"
26
26
  puts "3 - b selected : #{b.selected}"
27
+
28
+ grab(Universe.current_user).selection.color(:red)
29
+ grab(Universe.current_user).selection.each do |el|
30
+ puts el
31
+ end
32
+ puts grab(Universe.current_user).selection.collect
27
33
  end
28
34
 
29
35
 
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+
4
+ b=box({id: :the_box})
5
+ b.text({id: :the_text, left: 90, top: 30, data: :ok})
6
+ b.text({id: :the_text2, left: 190, top: 30, data: :hello})
7
+
8
+
9
+ wait 1 do
10
+ b.text.left(30)
11
+ wait 1 do
12
+ b.text.color(:white)
13
+ b.text.each_with_index do |el, index|
14
+
15
+ grab(el).left(30+30*index)
16
+ end
17
+ b.color(:black)
18
+ end
19
+ end
@@ -1,20 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # If you need to specify another address for the server use A.server_adress
4
+ A.server({ address: 'localhost:9292' , type: 'ws'})
5
+ user_password = {global: :all_star, read: { atome: :all_star }, write: { atome: :all_star } }
3
6
 
7
+ human({ id: :jeezs, login: true, password: user_password, data: { birthday: '10/05/2016' },selection: [], tag: { system: true } , attach: :user_view })
4
8
 
5
- new ({particle: :left}) do |params|
6
- unless params.instance_of? Hash
7
- params= {value: params, unit: :px}
8
- end
9
- params
10
- end
11
9
 
12
- new ({method: :left, renderer: :html}) do |params|
13
- js[:style][:left] = "#{params[:value]}#{params[:unit]}"
14
- end
10
+ #
11
+ # b = box({ color: :red, id: :my_box })
12
+ #
13
+ # b.touch(true) do
14
+ # b.connection('localhost:9292') do |params|
15
+ # alert " the connection is : #{params}"
16
+ # end
17
+ # end
15
18
 
19
+ b = box({ color: :yellow, left: 333 })
16
20
 
17
- b=box
18
- b.touch (true)do
19
- b.left(533)
21
+ b.touch(true) do
22
+ b.message({message: 'cd ..;cd server;ls; pwd', action: :terminal })
23
+ b.message({message: 'capture.rb', action: :file, option: :read })
24
+ b.message({message: 'tototo.rb', action: :file, option: :write, value: :hello })
25
+ # b.message({message: 'cd ..;cd server;ls; pwd'})
26
+ # c = box({ color: :red, left: 333 })
20
27
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
  box({ left: 50, id: :the_first_box, color: :blue })
5
- b1=box({ left: 25, id: :the_second_box ,top: 3, unit: {left: '%', width: '%'}, color: :red})
5
+ b1=box({ left: 12, id: :the_second_box ,top: 3, unit: {left: '%', width: '%'}, color: :red})
6
6
  box({ left: 550, id: :the_third_box , unit: {left: :px}, color: :green})
7
7
  wait 2 do
8
8
  b1.unit({left: 'cm'})
@@ -6,4 +6,4 @@ box({id: :my_box})
6
6
  # open the console in your browser ou your native app and should see the text below
7
7
  puts "hello world"
8
8
 
9
- require './required_example'
9
+ # require './required_example'
@@ -58,28 +58,175 @@ class Database
58
58
  eden = Sequel.connect("sqlite://eden.sqlite3")
59
59
  eden.create_table :atome do
60
60
  primary_key :atome_id
61
- String :aui
62
- String :id
61
+ String :creator
62
+ end
63
+
64
+ eden.create_table :communication do
65
+ primary_key :communication_id
66
+ String :connection
67
+ JSON :message
68
+ JSON :controller
69
+ end
70
+
71
+ eden.create_table :effect do
72
+ primary_key :effect_id
73
+ Int :smooth
74
+ Int :blur
75
+ end
76
+
77
+ eden.create_table :event do
78
+ primary_key :event_id
79
+ JSON :touch
80
+ Boolean :play
81
+ Boolean :pause
82
+ Int :time
83
+ Boolean :on
84
+ Boolean :fullscreen
85
+ Boolean :mute
86
+ Boolean :drag
87
+ Boolean :drop
88
+ Boolean :over
89
+ String :targets
90
+ Boolean :start
91
+ Boolean :stop
92
+ Time :begin
93
+ Time :end
94
+ Int :duration
95
+ Int :mass
96
+ Int :damping
97
+ Int :stiffness
98
+ Int :velocity
99
+ Boolean :repeat
100
+ Boolean :ease
101
+ Boolean :keyboard
102
+ Boolean :resize
103
+ Boolean :overflow
104
+ end
105
+
106
+ eden.create_table :geometry do
107
+ primary_key :geometry_id
108
+ Int :width
109
+ Int :height
110
+ Int :size
111
+ end
112
+
113
+ eden.create_table :hierarchy do
114
+ primary_key :hierarchy_id
115
+ String :attach
116
+ String :attached
117
+ String :apply
118
+ String :affect
119
+ String :detached
120
+ String :collect
121
+ end
122
+
123
+ eden.create_table :identity do
124
+ primary_key :identity_id
125
+ String :real
63
126
  String :type
127
+ Int :id
64
128
  String :name
65
- String :content
66
- String :position
67
- String :dimension
68
- String :color
69
- String :right
70
- String :effect
71
- String :shadow
72
- String :border
73
- String :fill
74
- Float :x
75
- Float :xx
76
- Float :y
77
- Float :yy
78
- Float :z
79
- Float :zz
80
- Float :width
81
- Float :height
82
- Float :depth
129
+ Boolean :active
130
+ String :markup
131
+ String :bundle
132
+ String :data
133
+ String :category
134
+ String :selection
135
+ Boolean :selected
136
+ String :format
137
+ String :alien
138
+ end
139
+
140
+ eden.create_table :material do
141
+ primary_key :material_id
142
+ String :component
143
+ Boolean :edit
144
+ String :style
145
+ Boolean :hide
146
+ Boolean :remove
147
+ JSON :classes
148
+ Boolean :remove_classes
149
+ Int :opacity
150
+ String :definition
151
+ Int :gradient
152
+ Int :border
153
+ end
154
+
155
+ eden.create_table :property do
156
+ primary_key :property_id
157
+ String :red
158
+ String :green
159
+ String :blue
160
+ String :alpha
161
+ String :diffusion
162
+ Boolean :clean
163
+ String :insert
164
+ Boolean :remove
165
+ Int :sort
166
+ end
167
+
168
+ eden.create_table :security do
169
+ primary_key :security_id
170
+ String :password
171
+ end
172
+
173
+ eden.create_table :spatial do
174
+ primary_key :spatial_id
175
+ Int :left
176
+ Int :right
177
+ Int :top
178
+ Int :bottom
179
+ Int :rotate
180
+ String :direction
181
+ String :center
182
+ Int :depth
183
+ Int :position
184
+ String :organise
185
+ String :spacing
186
+ Boolean :display
187
+ String :layout
188
+ end
189
+
190
+ eden.create_table :time do
191
+ primary_key :time_id
192
+ JSON :markers
193
+ end
194
+
195
+ eden.create_table :utility do
196
+ primary_key :utility_id
197
+ String :renderers
198
+ String :code
199
+ Boolean :run
200
+ Boolean :delete
201
+ Boolean :clear
202
+ String :path
203
+ String :schedule
204
+ String :read
205
+ String :cursor
206
+ String :preset
207
+ JSON :relations
208
+ JSON :tag
209
+ String :web
210
+ JSON :unit
211
+ String :initialize
212
+ String :login
213
+ String :hypertext
214
+ String :hyperedit
215
+ String :terminal
216
+ String :browse
217
+ String :copies
218
+ Int :temporary
219
+ String :atomes
220
+ String :match
221
+ Boolean :invert
222
+ String :option
223
+ String :duplicate
224
+ String :copy
225
+ String :paste
226
+ String :backup
227
+ String :import
228
+ String :compute
229
+ String :get
83
230
  end
84
231
 
85
232
  end
@@ -88,6 +235,7 @@ class Database
88
235
 
89
236
  end
90
237
 
238
+
91
239
  class App < Roda
92
240
 
93
241
  # comment below when test will be done
@@ -96,13 +244,13 @@ class App < Roda
96
244
  items = eden[:atome]
97
245
 
98
246
  # populate the table
99
- items.insert(name: 'abc', width: rand * 100)
100
- items.insert(name: 'def', width: rand * 100)
101
- items.insert(name: 'ghi', width: rand * 100)
247
+ items.insert(creator: 'moi')
248
+ items.insert(creator: 'toi')
249
+ items.insert(creator: 'vous')
102
250
  puts "Item count: #{items.count}"
103
- puts "The average price is: #{items.avg(:width)}"
251
+ test= "Item count: #{items.count}"
252
+ # puts "My name is: #{items(:creator)}"
104
253
  index_content = File.read("../src/index_server.html")
105
-
106
254
  opts[:root] = '../src'
107
255
  plugin :static, %w[/css /js /medias], root: '../src'
108
256
  route do |r|
@@ -117,20 +265,17 @@ class App < Roda
117
265
  ws.on(:message) do |event|
118
266
  json_string = event.data.gsub(/(\w+):/) { "\"#{$1}\":" }.gsub('=>', ':')
119
267
  full_data = JSON.parse(json_string)
120
-
121
268
  message = full_data['message']
122
269
  action_requested = full_data['action']
123
270
  value= full_data['value']
124
271
  option= full_data['option']
125
272
  current_user = full_data['user']
126
273
  user_pass = full_data['pass']['global']
127
- # if action_requested == :request
128
- # request (message)
129
- # end
274
+ if action_requested
130
275
  return_message = EDen.safe_send(action_requested, message,option,ws,value, current_user, user_pass)
131
- # else
132
- # return_message = "no action msg: #{full_data}"
133
- # end
276
+ else
277
+ return_message = "no action msg: #{test}"
278
+ end
134
279
  ws.send(return_message.to_json)
135
280
  end
136
281
 
@@ -145,4 +290,4 @@ class App < Roda
145
290
 
146
291
  end
147
292
 
148
- end
293
+ end
@@ -42,6 +42,8 @@
42
42
  <script>
43
43
  window.addEventListener('load', function () {
44
44
  Opal.eval('atome_infos')
45
+ Opal.eval('A.init_websocket')
45
46
  })
47
+
46
48
  </script>
47
49
  </html>
@@ -41,6 +41,7 @@
41
41
  require './index'
42
42
  #puts Universe.host
43
43
  atome_infos
44
+ A.init_websocket
44
45
  </script>
45
46
  <script defer src="js/atome/specific/wasm.js" type="text/javascript"></script>
46
47
  <script defer src="js/atome/atome.js" type="text/javascript"></script>
@@ -62,13 +62,11 @@ const communication = {
62
62
 
63
63
  }
64
64
  },
65
- connect: function (address) {
66
- this.websocket = new WebSocket(address);
67
-
65
+ connect: function (type, server, user, pass, atomes, particles) {
66
+ this.websocket = new WebSocket(type+'://'+server);
68
67
  this.websocket.onopen = function (event) {
69
68
  rubyVMCallback("puts 'Connected to WebSocket'")
70
69
  };
71
-
72
70
  this.websocket.onmessage = function (event) {
73
71
  rubyVMCallback("puts 'object ruby callback : " + event.data + "'")
74
72
 
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.5.9.1
4
+ version: 0.5.6.0.2
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-01-25 00:00:00.000000000 Z
11
+ date: 2024-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -343,6 +343,7 @@ files:
343
343
  - CHANGELOG.md
344
344
  - CODE_OF_CONDUCT.md
345
345
  - Gemfile
346
+ - Guardfile
346
347
  - LICENSE.txt
347
348
  - README.md
348
349
  - Rakefile
@@ -426,6 +427,7 @@ files:
426
427
  - lib/atome/helpers/security.rb
427
428
  - lib/atome/helpers/utilities.rb
428
429
  - lib/atome/kernel/black_matter.rb
430
+ - lib/atome/kernel/ruby
429
431
  - lib/atome/kernel/universe.rb
430
432
  - lib/atome/presets/atome.rb
431
433
  - lib/atome/version.rb
@@ -465,6 +467,10 @@ files:
465
467
  - lib/renderers/server/index.rb
466
468
  - lib/renderers/server/index_relative.rb
467
469
  - lib/renderers/server/utility.rb
470
+ - server/atome_server.rb
471
+ - server/atome_server_wasm.rb
472
+ - server/capture.rb
473
+ - server/config.ru
468
474
  - sig/atome.rbs
469
475
  - sig/atome_js.rbs
470
476
  - sig/batch.rbs
@@ -475,6 +481,32 @@ files:
475
481
  - sig/matrix.rbs
476
482
  - sig/object.rbs
477
483
  - sig/universe.rbs
484
+ - src-tauri/.gitignore
485
+ - src-tauri/Cargo.toml
486
+ - src-tauri/build.rs
487
+ - src-tauri/icons/128x128.png
488
+ - src-tauri/icons/128x128@2x.png
489
+ - src-tauri/icons/32x32.png
490
+ - src-tauri/icons/Square107x107Logo.png
491
+ - src-tauri/icons/Square142x142Logo.png
492
+ - src-tauri/icons/Square150x150Logo.png
493
+ - src-tauri/icons/Square284x284Logo.png
494
+ - src-tauri/icons/Square30x30Logo.png
495
+ - src-tauri/icons/Square310x310Logo.png
496
+ - src-tauri/icons/Square44x44Logo.png
497
+ - src-tauri/icons/Square71x71Logo.png
498
+ - src-tauri/icons/Square89x89Logo.png
499
+ - src-tauri/icons/StoreLogo.png
500
+ - src-tauri/icons/icon.icns
501
+ - src-tauri/icons/icon.ico
502
+ - src-tauri/icons/icon.png
503
+ - src-tauri/src/main.rs
504
+ - src-tauri/tauri.conf.json
505
+ - src-wasm/wasm/wasi-vfs-osx_arm
506
+ - src-wasm/wasm/wasi-vfs-osx_x86
507
+ - src-wasm/wasm/wasi-vfs-unix
508
+ - src-wasm/wasm/wasi-vfs.exe
509
+ - src/css/style.css
478
510
  - src/utilities/host_mode.rb
479
511
  - vendor/assets/Guardfile
480
512
  - vendor/assets/Rakefile
@@ -503,6 +535,7 @@ files:
503
535
  - vendor/assets/application/examples/convert.rb
504
536
  - vendor/assets/application/examples/copy.rb
505
537
  - vendor/assets/application/examples/copybck.rb
538
+ - vendor/assets/application/examples/css.rb
506
539
  - vendor/assets/application/examples/debug.rb
507
540
  - vendor/assets/application/examples/delete.rb
508
541
  - vendor/assets/application/examples/dig.rb
@@ -543,7 +576,7 @@ files:
543
576
  - vendor/assets/application/examples/particles.rb
544
577
  - vendor/assets/application/examples/percent_to_px.rb
545
578
  - vendor/assets/application/examples/play.rb
546
- - vendor/assets/application/examples/presets.rb
579
+ - vendor/assets/application/examples/preset.rb
547
580
  - vendor/assets/application/examples/random.rb
548
581
  - vendor/assets/application/examples/raw_html.rb
549
582
  - vendor/assets/application/examples/read.rb
@@ -562,6 +595,7 @@ files:
562
595
  - vendor/assets/application/examples/size.rb
563
596
  - vendor/assets/application/examples/smooth.rb
564
597
  - vendor/assets/application/examples/style.rb
598
+ - vendor/assets/application/examples/sub_atome_manipulation.rb
565
599
  - vendor/assets/application/examples/sync.rb
566
600
  - vendor/assets/application/examples/table.rb
567
601
  - vendor/assets/application/examples/tagged.rb
@@ -577,15 +611,6 @@ files:
577
611
  - vendor/assets/application/examples/wait.rb
578
612
  - vendor/assets/application/examples/www.rb
579
613
  - vendor/assets/application/index.rb
580
- - vendor/assets/application/required_example.rb
581
- - vendor/assets/application/test.rb
582
- - vendor/assets/application/works/photos.rb
583
- - vendor/assets/application/works/photos2.rb
584
- - vendor/assets/application/works/photos3.rb
585
- - vendor/assets/application/works/photos4.rb
586
- - vendor/assets/application/works/photos6.rb
587
- - vendor/assets/application/works/trigga.rb
588
- - vendor/assets/application/works/vie.rb
589
614
  - vendor/assets/server/atome_server.rb
590
615
  - vendor/assets/server/atome_server_wasm.rb
591
616
  - vendor/assets/server/capture.rb
@@ -1 +0,0 @@
1
- puts "required file is run"
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # my code here ..
4
-
5
- # open the console in your browser ou your native app and should see the text below
6
- cmd=text ({data: "ruby run_server.rb", left: 0, top: 0, edit: true})
7
- response_text=text ({data: "response_here", top: 444, edit: true})
8
- image(:red_planet)
9
-
10
- image({path: 'medias/images/logos/atome.svg', width: 33})
11
-
12
- commanditor=circle({left: 6,top: 255, width: 33, height: 33, color: :black})
13
- commanditor.touch(true) do
14
- cmd_to_send=cmd.data.downcase
15
- A.terminal(cmd_to_send) do |data|
16
- response_text.data(data.downcase)
17
- end
18
- end
19
-
20
- evaluator=circle({top: 255, width: 33, height: 33, color: :orange})
21
- evaluator.touch(true) do
22
- code_found=cmd.data.downcase
23
- eval(code_found)
24
- end
25
- terminator=circle({left: 190,top: 255, width: 33, height: 33, color: :red})
26
- terminator.touch(true) do
27
- JS.global[:location].reload()
28
- end
29
-