atome 0.5.7.3.9 → 0.5.7.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/lib/atome/atome.rb +24 -56
  3. data/lib/atome/extensions/atome.rb +21 -57
  4. data/lib/atome/extensions/sha.rb +7 -7
  5. data/lib/atome/genesis/genesis.rb +0 -89
  6. data/lib/atome/genesis/particles/communication.rb +1 -1
  7. data/lib/atome/genesis/particles/event.rb +0 -8
  8. data/lib/atome/genesis/particles/geometry.rb +0 -1
  9. data/lib/atome/genesis/particles/hierarchy.rb +0 -34
  10. data/lib/atome/genesis/particles/identity.rb +0 -30
  11. data/lib/atome/genesis/particles/material.rb +0 -11
  12. data/lib/atome/genesis/particles/property.rb +14 -16
  13. data/lib/atome/genesis/particles/security.rb +0 -45
  14. data/lib/atome/genesis/particles/utility.rb +17 -185
  15. data/lib/atome/genesis/sparkle.rb +3 -12
  16. data/lib/atome/kernel/black_matter.rb +0 -1
  17. data/lib/atome/kernel/universe.rb +5 -45
  18. data/lib/atome/presets/atome.rb +0 -22
  19. data/lib/atome/version.rb +1 -1
  20. data/lib/molecules/init.rb +0 -14
  21. data/lib/molecules/intuition/tools.rb +3 -22
  22. data/lib/molecules/intuition/utilities.rb +166 -82
  23. data/lib/platform_specific/opal/atome_opal_extensions.rb +0 -1
  24. data/lib/platform_specific/opal/extensions/color.rb +0 -5
  25. data/lib/platform_specific/opal/extensions/geolocation.rb +5 -5
  26. data/lib/platform_specific/opal/extensions/ping.rb +11 -20
  27. data/lib/renderers/html/atome_html.rb +16 -0
  28. data/lib/renderers/html/effect.rb +0 -11
  29. data/lib/renderers/html/event.rb +0 -7
  30. data/lib/renderers/html/geometry.rb +0 -31
  31. data/lib/renderers/html/html.rb +13 -134
  32. data/lib/renderers/html/material.rb +0 -22
  33. data/lib/renderers/html/spatial.rb +0 -9
  34. data/lib/renderers/html/utility.rb +5 -8
  35. data/lib/renderers/renderer.rb +0 -1
  36. data/vendor/assets/application/examples/applications.rb +24 -71
  37. data/vendor/assets/application/examples/buttons.rb +5 -4
  38. data/vendor/assets/application/examples/to_px.rb +9 -0
  39. data/vendor/assets/application/examples/unfasten.rb +15 -9
  40. data/vendor/assets/application/index.rb +1 -1
  41. data/vendor/assets/server/capture.rb +0 -1
  42. data/vendor/assets/server/database.rb +0 -1
  43. data/vendor/assets/server/eDen.rb +5 -80
  44. data/vendor/assets/src/index_server_wasm.html +0 -3
  45. data/vendor/assets/src/index_wasm.html +0 -6
  46. metadata +3 -6
  47. data/lib/molecules/_deprecated_examples/site.rb +0 -34
  48. data/lib/molecules/intuition/_deprecated_inputs.rb +0 -111
  49. data/lib/molecules/intuition/_deprecated_toolbox.rb +0 -282
  50. data/lib/platform_specific/opal/extensions/sha.rb +0 -25
@@ -1,282 +0,0 @@
1
- # # frozen_string_literal: true
2
- # text(:hello)
3
- # class Atome
4
- #
5
- # def build_tool(&bloc)
6
- # # alert params[:tool]
7
- # a = Atome.instance_exec(&bloc)
8
- # puts "===> a is : #{a[:action]}"
9
- # # check below
10
- # wait 2 do
11
- # send a[:action]
12
- # end
13
- # grab(:toolbox).box({color: :white, width: 33, height: 33})
14
- # end
15
- # end
16
- #
17
- # class Object
18
- # def new(params, &bloc)
19
- # # Genesis = Genesis.Genesis
20
- # if params.key?(:atome)
21
- # Universe.add_atomes_specificities params[:atome]
22
- # Genesis.build_atome(params[:atome], &bloc)
23
- # elsif params.key?(:particle)
24
- # Atome.instance_variable_set("@main_#{params[:particle]}", bloc)
25
- # # render indicate if the particle needs to be rendered
26
- # # store tell the system if it need to store the particle value
27
- # # type help the system what type of type the particle will receive and store
28
- # Genesis.build_particle(params[:particle], { render: params[:render], return: params[:return],
29
- # store: params[:store], type: params[:type] }, &bloc)
30
- # elsif params.key?(:sanitizer)
31
- # Genesis.build_sanitizer(params[:sanitizer], &bloc)
32
- # elsif params.key?(:pre)
33
- # Atome.instance_variable_set("@pre_#{params[:pre]}", bloc)
34
- # elsif params.key?(:post)
35
- # Atome.instance_variable_set("@post_#{params[:post]}", bloc)
36
- # elsif params.key?(:after)
37
- # @startup='coool!!!'
38
- # alert 'after is set'
39
- # Atome.instance_variable_set("@after_#{params[:after]}", bloc)
40
- # elsif params.key?(:read)
41
- # Atome.instance_variable_set("@read_#{params[:read]}", bloc)
42
- # elsif params[:renderer]
43
- # renderer_found = params[:renderer]
44
- # if params[:specific]
45
- # Universe.set_atomes_specificities(params)
46
- # params[:specific] = "#{params[:specific]}_"
47
- # end
48
- # render_method = "#{renderer_found}_#{params[:specific]}#{params[:method]}"
49
- # Genesis.build_render(render_method, &bloc)
50
- # elsif params.key?(:callback)
51
- # particle_targetted = params[:callback]
52
- # Atome.define_method "#{particle_targetted}_callback" do
53
- # bloc.call
54
- # end
55
- # elsif params.key?(:tool)
56
- # A.build_tool(&bloc)
57
- # end
58
- # end
59
- # end
60
- #
61
- # grab(:intuition).box({id: :toolbox, top: :auto, bottom: 0, left: 0, width: 50, height: 255})
62
- #
63
- # def record_tool
64
- # grab(Universe.current_user).selection
65
- # alert "must get selection to treat it "
66
- # end
67
- #
68
- #
69
- # module Intuition
70
- # def intuition_int8
71
- # # tool taxonomy and list
72
- # {
73
- # capture: { int8: { french: :enregistrement, english: :record, german: :datensatz } },
74
- # communication: { french: :communication, english: :communication, german: :communication },
75
- # tool: { french: :outils, english: :tools, german: :werkzeuge },
76
- # view: { french: :vue, english: :view, german: :aussicht },
77
- # time: { french: :horloge, english: :clock, german: :Uhr },
78
- # find: { french: :trouve, english: :find, german: :finden },
79
- # home: { french: :accueil, english: :home, german: :zuhause },
80
- # code: { french: :code, english: :code, german: :code },
81
- # impulse: { french: :impulse, english: :impulse, german: :impulse },
82
- # }
83
- # end
84
- # def intuition_taxonomy
85
- #
86
- # end
87
- #
88
- # def impulse
89
- # # tool start point
90
- # [:capture, :communication, :tool, :view, :time, :find, :home]
91
- # end
92
- #
93
- # # def capture
94
- # # categories=ATOME.methods_categories
95
- # # [categories[:inputs]]
96
- # # end
97
- # #
98
- # # def communication
99
- # # categories=ATOME.methods_categories
100
- # # [categories[:communications]]
101
- # # end
102
- # #
103
- # # def toolz
104
- # # categories=ATOME.methods_categories
105
- # # [categories[:spatials],categories[:helpers],categories[:materials],
106
- # # categories[:geometries],categories[:effects],
107
- # # categories[:medias],categories[:hierarchies],categories[:utilities],categories[:events]]
108
- # # end
109
- # #
110
- # # def tool_style(size = 33)
111
- # # # styling
112
- # # shadows = [{ x: size / 15, y: size / 15, thickness: 0, blur: size / 3, color: { red: 0, green: 0, blue: 0, alpha: 0.3 } }, { x: -size / 15, y: -size / 15, thickness: 0, blur: size / 6, color: { red: 1, green: 1, blue: 1, alpha: 0.3 } }]
113
- # # style = { type: :tool, content: { points: 4 }, color: { red: 0.9, green: 0.9, blue: 0.9, alpha: 0.15 }, parent: :intuition, shadow: shadows, blur: { value: 6, invert: true } }
114
- # # return style
115
- # # end
116
- # #
117
- # # def open_tool(tool_id, widthness=3, orientation=:x, speed=0.6)
118
- # # if orientation == :x
119
- # # orientation = :width
120
- # # value = grab(tool_id).width
121
- # # else
122
- # # orientation = :height
123
- # # value = grab(tool_id).height
124
- # # end
125
- # # animate({
126
- # # start: { orientation => value },
127
- # # end: { orientation => value * widthness },
128
- # # duration: speed * 1000,
129
- # # loop: 0,
130
- # # curve: :easing,
131
- # # target: tool_id
132
- # # })
133
- # # notification "find why this id #{self.atome_id}, add annimation callback to set overflow when anim complete"
134
- # # grab(tool_id).overflow(:visible)
135
- # # end
136
- # #
137
- # # def close_tool(tool_id, widthness, orientation, speed)
138
- # # if orientation == :x
139
- # # orientation = :width
140
- # # value = grab(tool_id).width
141
- # # else
142
- # # orientation = :height
143
- # # value = grab(tool_id).height
144
- # # end
145
- # # animate({
146
- # # start: { orientation => value * widthness },
147
- # # end: { orientation => value },
148
- # # duration: speed * 1000,
149
- # # loop: 0,
150
- # # curve: :easing,
151
- # # target: tool_id
152
- # # })
153
- # # # grab(tool_id).overflow(:hidden)
154
- # # end
155
- # #
156
- # # def create_tool(tool_name, size = 33, x_pos = 0, y_pos = 33, offsset=0)
157
- # # tool_created = tool(self.tool_style(size).merge({ parent: :main_menu, atome_id: "tool_" + tool_name, id: "tool_" + tool_name,
158
- # # width: size, height: size, smooth: size / 9, overflow: :hidden, x: x_pos, y: y_pos, z: 1, content: [] }))
159
- # # icon=tool_created.shape({ path: tool_name, width: size - size / 2, height: size - size / 2, center: true })
160
- # # # name = intuition_list[tool_name][language]
161
- # # particle({ atome_id: :tools_property_container, color: { red: 0.6, green: 0.6, blue: 0.6 } })
162
- # # # we get the plugin code only if the plugin hasn't been interpreted before (unless condition below)
163
- # # unless grab(:intuition).content.include? tool_name
164
- # # ATOME.reader("./medias/e_rubies/tools/#{tool_name}.rb") do |data|
165
- # # # todo add a security parser here
166
- # # # we set the variable tool that can be used to facilitate plugin creation
167
- # # data="tool=grab(:#{tool_created.atome_id})\n"+data
168
- # # compile(data)
169
- # # # we add the tool to the intuition content so it won't be loaded twice
170
- # # grab(:intuition).content |= [tool_name]
171
- # # end
172
- # # end
173
- # # # end
174
- # # tool_created.active({ exec: false })
175
- # # tool_created.inactive({ exec: false })
176
- # # icon.touch(stop: true) do
177
- # # if tool_created.active[:exec] == true
178
- # # tool_created.color(:transparent)
179
- # # tool_created.active(exec: false, proc: tool_created.active[:proc] )
180
- # # tool_created.inactive(exec: true, proc: tool_created.inactive[:proc] )
181
- # # else
182
- # # tool_created.color({alpha: 0.3})
183
- # # tool_created.active({ exec: true, proc: tool_created.active[:proc] })
184
- # # end
185
- # # end
186
- # # end
187
- # #
188
- # # # we get menu entry point
189
- # # def open_intuition(position = {})
190
- # # position = { x: 0, yy: 0, size: 33, orientation: :vertical, offset: 0 }.merge(position)
191
- # # # we get content language from view's language
192
- # # if grab(:main_menu)
193
- # # grab(:main_menu).delete
194
- # # else
195
- # # grab(:view).language
196
- # # self.language(grab(:view).language)
197
- # # orientation = position.delete(:orientation)
198
- # # size = position.delete(:size)
199
- # # offset = position.delete(:offset)
200
- # # # positioning and scaling
201
- # # if orientation == :vertical
202
- # # requested_width = size
203
- # # requested_height = (size+offset)* impulse.length
204
- # # else
205
- # # requested_width = (size+offset) * impulse.length
206
- # # requested_height = size
207
- # # end
208
- # # tool({ atome_id: :main_menu, parent: :intuition, color: { alpha: 0 } }.merge(position).merge(width: requested_width, height: requested_height))
209
- # # impulse.each_with_index do |item, index|
210
- # # if orientation == :vertical
211
- # # create_tool(item, size, 0, index * (size+offset))
212
- # # else
213
- # # create_tool(item, size, index * (size+offset), 0)
214
- # # end
215
- # # end
216
- # # end
217
- # # end
218
- # end
219
- # # atome class extension for eVe
220
- #
221
- # class Atome
222
- # include Intuition
223
- # # def atome(requested_property)
224
- # # # add component list iin the content we maybe ahave to create a tool object because box can't handle this type of content
225
- # # new_atome=self.tool({ atome_id: "#{self.atome_id}_#{requested_property}_atome_#{self.content.length}", x: 66})
226
- # # new_atome.touch({ stop: true, option: :down}) do
227
- # # color(:red)
228
- # # new_atome.height = new_atome.height*3
229
- # # end
230
- # # new_atome.touch({ stop: true, option: :up}) do
231
- # # color(:red)
232
- # # new_atome.height = new_atome.height/3
233
- # # end
234
- # # notification "now we have to add an object or a new property (style) to store complete tool style including size and
235
- # # orientation so we can position the new atome correctly"
236
- # # # alert self.content.class
237
- # # # alert self.content.length
238
- # # # alert tool_style
239
- # # end
240
- # end
241
- #
242
- # # # we initialise the toolbox here :
243
- # #
244
- # # # the launch bar
245
- # # launch_bar = box({ x: 0, y: 0, width: 33, height: "100%", parent: :intuition, z: 0, color: { alpha: 0 } })
246
- # # launch_bar.touch({ option: :long }) do |evt|
247
- # # size = 33
248
- # # yy_touch_position = grab(:view).convert(:height) - evt.page_y
249
- # # if yy_touch_position < size
250
- # # #if the long touch is within the wanted area( in this at bottom of the screen) we open the menu
251
- # # # launch_bar.open_intuition({ x: size, yy: 6,offset: 6, orientation: :horizontal, size: size })
252
- # # launch_bar.open_intuition({ x: 6, yy: size,offset: 6, orientation: :vertical, size: size })
253
- # # end
254
- # # end
255
- # #
256
- # # # # # # # # # # # # # # # # tests below # # # # # # # # # # # # #
257
- # #
258
- # # list = molecule_analysis(@molecules_list)
259
- # # notif list[:tools]
260
- # # notif "======"
261
- # # notif list[:molecules]
262
- # # notif "======"
263
- # # notif list[:atomes]
264
- # # notif "======"
265
- # # notif list[:molecules][:shadow]
266
- #
267
- # new({ tool: :capture }) do |params|
268
- # tool = { id: :rec_01,
269
- #
270
- # name: :record, icon: :record, action: {open: [:sub_menu]}, code: :record_tool, position: { root: 1 }, # position can be multiple
271
- # option: { opt1: :method_2 }, int8: { french: :enregistrement, english: :record, german: :datensatz } }
272
- # tool
273
- # end
274
- #
275
- #
276
- # puts A.impulse
277
- # # def fill_toolzone(tools_ids)
278
- # #
279
- # # end
280
- # #
281
- # # fill_toolzone(%i[files edition select group link copy undo settings])
282
- #
@@ -1,25 +0,0 @@
1
- # # frozen_string_literal: true
2
- #
3
- # # # addon for the Atome class
4
- # class Atome
5
- # # def calculate_sha(string)
6
- # # if RUBY_ENGINE.downcase == 'opal' || 'wasm32-wasi'
7
- # # # `sha256(#{string})`
8
- # # js_code = "sha256('#{string}')"
9
- # # JS.eval(js_code)
10
- # # else
11
- # # Digest::SHA256.hexdigest(string)
12
- # # end
13
- # # end
14
- # #
15
- # #
16
- # def crypt(string)
17
- # # if RUBY_ENGINE.downcase == 'opal' || 'wasm32-wasi'
18
- # # `sha256(#{string})`
19
- # js_code = "sha256('#{string}')"
20
- # JS.eval(js_code)
21
- # # else
22
- # Digest::SHA256.hexdigest(string)
23
- # # end
24
- # end
25
- # end