atome 0.5.4.1.7 → 0.5.5.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (358) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -1
  3. data/Gemfile +3 -1
  4. data/README.md +70 -1
  5. data/Rakefile +246 -75
  6. data/app_builder_helpers/Rakefile +276 -288
  7. data/documentation/basic.md +242 -0
  8. data/documentation/deep learning/architecture.txt +3763 -0
  9. data/documentation/deep learning/atome.png +0 -0
  10. data/documentation/deep learning/basic_infos.txt +227 -0
  11. data/documentation/deep learning/example_of_users_code.rb +1810 -0
  12. data/documentation/deep learning/misc.txt +24 -0
  13. data/documentation/deep learning/ruby_js_example.rb +272 -0
  14. data/documentation/deep learning/wasm_script_help.text +14 -0
  15. data/documentation/framework/enhance_atome.md +1 -1
  16. data/documentation/tutorials/tutorials.md +7 -0
  17. data/exe/atome +308 -208
  18. data/lib/atome/atome.rb +52 -156
  19. data/lib/atome/extensions/atome.rb +129 -47
  20. data/lib/atome/extensions/mathematics.rb +20 -0
  21. data/lib/atome/extensions/ping.rb +2 -3
  22. data/lib/atome/genesis/generators/atome.rb +57 -30
  23. data/lib/atome/genesis/generators/communication.rb +9 -0
  24. data/lib/atome/genesis/generators/effect.rb +0 -1
  25. data/lib/atome/genesis/generators/event.rb +279 -43
  26. data/lib/atome/genesis/generators/geometry.rb +1 -10
  27. data/lib/atome/genesis/generators/hierarchy.rb +103 -0
  28. data/lib/atome/genesis/generators/identity.rb +45 -84
  29. data/lib/atome/genesis/generators/material.rb +31 -34
  30. data/lib/atome/genesis/generators/property.rb +31 -0
  31. data/lib/atome/genesis/generators/security.rb +31 -0
  32. data/lib/atome/genesis/generators/spatial.rb +3 -5
  33. data/lib/atome/genesis/generators/time.rb +0 -1
  34. data/lib/atome/genesis/generators/utility.rb +181 -66
  35. data/lib/atome/genesis/genesis.rb +152 -55
  36. data/lib/atome/genesis/sparkle.rb +59 -75
  37. data/lib/atome/helpers/color_helper/color/rgb/colors.rb +1 -1
  38. data/lib/atome/helpers/color_helper/color/rgb.rb +1 -1
  39. data/lib/atome/helpers/color_helper/color.rb +226 -7
  40. data/lib/atome/helpers/essentials.rb +22 -26
  41. data/lib/atome/helpers/security.rb +71 -0
  42. data/lib/atome/helpers/utilities.rb +191 -178
  43. data/lib/atome/kernel/black_matter.rb +22 -0
  44. data/lib/atome/kernel/universe.rb +123 -24
  45. data/lib/atome/presets/atome.rb +39 -35
  46. data/lib/atome/version.rb +3 -2
  47. data/lib/atome.rb +12 -12
  48. data/lib/atome_relative.rb +36 -0
  49. data/lib/{atome/renderers → platform_specific}/opal/atome_opal_extensions.rb +4 -1
  50. data/lib/{atome/renderers → platform_specific}/opal/extensions/color.rb +12 -5
  51. data/lib/{atome/renderers → platform_specific}/opal/extensions/geolocation.rb +1 -0
  52. data/lib/platform_specific/opal/extensions/js.rb +21 -0
  53. data/lib/platform_specific/opal/extensions/object.rb +6 -0
  54. data/lib/platform_specific/opal/extensions/ping.rb +31 -0
  55. data/lib/{atome/renderers → platform_specific}/opal/extensions/sha.rb +4 -2
  56. data/lib/platform_specific/wasm/atome_wasm_extensions.rb +11 -0
  57. data/lib/renderers/headless/headless.rb +18 -0
  58. data/lib/renderers/headless/index.rb +6 -0
  59. data/lib/renderers/headless/index_relative.rb +6 -0
  60. data/lib/renderers/headless/utility.rb +6 -0
  61. data/{vendor/assets/src/medias/rubies/examples/top.rb → lib/renderers/html/atome.rb} +0 -1
  62. data/lib/renderers/html/atome_html.rb +22 -0
  63. data/lib/renderers/html/effect.rb +26 -0
  64. data/lib/renderers/html/event.rb +43 -0
  65. data/lib/renderers/html/geometry.rb +31 -0
  66. data/lib/renderers/html/hierarchy.rb +233 -0
  67. data/lib/renderers/html/html.rb +1112 -0
  68. data/lib/renderers/html/identity.rb +84 -0
  69. data/lib/renderers/html/index.rb +19 -0
  70. data/lib/renderers/html/index_relative.rb +20 -0
  71. data/lib/renderers/html/material.rb +53 -0
  72. data/lib/renderers/html/property.rb +24 -0
  73. data/lib/renderers/html/spatial.rb +46 -0
  74. data/lib/renderers/html/time.rb +1 -0
  75. data/lib/renderers/html/utility.rb +38 -0
  76. data/lib/renderers/renderer.rb +16 -0
  77. data/lib/renderers/server/index.rb +4 -0
  78. data/lib/renderers/server/index_relative.rb +4 -0
  79. data/lib/renderers/server/utility.rb +4 -0
  80. data/sig/atome.rbs +6 -0
  81. data/sig/object.rbs +4 -0
  82. data/sig/universe.rbs +3 -0
  83. data/vendor/assets/Rakefile +3 -3
  84. data/vendor/assets/application/examples/a_concat.rb +16 -0
  85. data/vendor/assets/application/examples/affect.rb +8 -0
  86. data/vendor/assets/application/examples/animation.rb +96 -0
  87. data/vendor/assets/application/examples/apply.rb +8 -0
  88. data/vendor/assets/application/examples/atome.rb +5 -0
  89. data/vendor/assets/application/examples/attach.rb +34 -0
  90. data/vendor/assets/application/examples/attached.rb +38 -0
  91. data/vendor/assets/application/examples/basic_understanding.rb +52 -0
  92. data/vendor/assets/application/examples/browse.rb +17 -0
  93. data/vendor/assets/application/examples/callback.rb +20 -0
  94. data/vendor/assets/application/examples/category.rb +12 -0
  95. data/vendor/assets/application/examples/clear.rb +96 -0
  96. data/vendor/assets/application/examples/clones.rb +177 -0
  97. data/vendor/assets/application/examples/code.rb +13 -0
  98. data/vendor/assets/application/examples/color.rb +54 -0
  99. data/vendor/assets/application/examples/convert.rb +163 -0
  100. data/vendor/assets/application/examples/copy.rb +25 -0
  101. data/vendor/assets/application/examples/copybck.rb +68 -0
  102. data/vendor/assets/application/examples/debug.rb +78 -0
  103. data/vendor/assets/application/examples/delete.rb +93 -0
  104. data/vendor/assets/application/examples/display.rb +279 -0
  105. data/vendor/assets/application/examples/display_bck.rb +164 -0
  106. data/vendor/assets/application/examples/drag.rb +45 -0
  107. data/vendor/assets/application/examples/drop.rb +35 -0
  108. data/vendor/assets/application/examples/duplicate.rb +64 -0
  109. data/vendor/assets/application/examples/edit.rb +21 -0
  110. data/vendor/assets/application/examples/encode.rb +6 -0
  111. data/vendor/assets/application/examples/file.rb +50 -0
  112. data/vendor/assets/application/examples/find.rb +157 -0
  113. data/vendor/assets/application/examples/generator_and_build.rb +15 -0
  114. data/vendor/assets/application/examples/getter.rb +16 -0
  115. data/vendor/assets/application/examples/grab.rb +14 -0
  116. data/vendor/assets/application/examples/gradient.rb +35 -0
  117. data/vendor/assets/application/examples/group.rb +44 -0
  118. data/vendor/assets/application/examples/hierarchy.rb +21 -0
  119. data/vendor/assets/application/examples/history.rb +31 -0
  120. data/vendor/assets/application/examples/hypertext.rb +113 -0
  121. data/vendor/assets/application/examples/image.rb +5 -0
  122. data/vendor/assets/application/examples/keyboard.rb +59 -0
  123. data/vendor/assets/application/examples/layout.rb +227 -0
  124. data/vendor/assets/application/examples/login.rb +10 -0
  125. data/vendor/assets/application/examples/markup.rb +4 -0
  126. data/vendor/assets/application/examples/match.rb +115 -0
  127. data/vendor/assets/application/examples/messaging.rb +16 -0
  128. data/vendor/assets/application/examples/monitor.rb +14 -0
  129. data/vendor/assets/application/examples/on_resize.rb +7 -0
  130. data/vendor/assets/{src/medias/rubies/examples/get_renderer_list.rb → application/examples/online.rb} +1 -1
  131. data/vendor/assets/application/examples/over.rb +29 -0
  132. data/vendor/assets/application/examples/paint.rb +23 -0
  133. data/vendor/assets/application/examples/particles.rb +4 -0
  134. data/vendor/assets/application/examples/percent_to_px.rb +4 -0
  135. data/vendor/assets/application/examples/play.rb +50 -0
  136. data/vendor/assets/application/examples/presets.rb +33 -0
  137. data/vendor/assets/application/examples/random.rb +42 -0
  138. data/vendor/assets/application/examples/raw_html.rb +48 -0
  139. data/vendor/assets/application/examples/read.rb +11 -0
  140. data/vendor/assets/application/examples/refresh.rb +62 -0
  141. data/vendor/assets/application/examples/remove.rb +47 -0
  142. data/vendor/assets/application/examples/repeat.rb +26 -0
  143. data/vendor/assets/application/examples/resize.rb +17 -0
  144. data/vendor/assets/application/examples/scroll.rb +11 -0
  145. data/vendor/assets/application/examples/security.rb +76 -0
  146. data/vendor/assets/application/examples/selected.rb +30 -0
  147. data/vendor/assets/application/examples/shadow.rb +46 -0
  148. data/vendor/assets/application/examples/shapes.rb +6 -0
  149. data/vendor/assets/{src/medias/rubies → application}/examples/smooth.rb +5 -1
  150. data/vendor/assets/application/examples/style.rb +4 -0
  151. data/vendor/assets/application/examples/sync.rb +39 -0
  152. data/vendor/assets/application/examples/tagged.rb +24 -0
  153. data/vendor/assets/application/examples/terminal.rb +4 -0
  154. data/vendor/assets/application/examples/text.rb +5 -0
  155. data/vendor/assets/application/examples/touch.rb +38 -0
  156. data/vendor/assets/application/examples/type_mutation.rb +18 -0
  157. data/vendor/assets/application/examples/universe.rb +8 -0
  158. data/vendor/assets/application/examples/vector.rb +24 -0
  159. data/vendor/assets/application/examples/video.rb +14 -0
  160. data/vendor/assets/application/examples/wait.rb +6 -0
  161. data/vendor/assets/application/examples/www.rb +10 -0
  162. data/vendor/assets/application/index.rb +1 -1
  163. data/vendor/assets/application/test.rb +29 -0
  164. data/vendor/assets/application/works/photos.rb +672 -0
  165. data/vendor/assets/application/works/photos2.rb +218 -0
  166. data/vendor/assets/application/works/photos3.rb +343 -0
  167. data/vendor/assets/application/works/photos4.rb +34 -0
  168. data/vendor/assets/application/works/photos6.rb +6 -0
  169. data/vendor/assets/application/works/trigga.rb +0 -0
  170. data/vendor/assets/application/works/vie.rb +74 -0
  171. data/vendor/assets/server/atome_server.rb +37 -41
  172. data/vendor/assets/server/atome_server_wasm.rb +112 -0
  173. data/vendor/assets/server/capture.rb +10 -0
  174. data/vendor/assets/server/config.ru +5 -4
  175. data/vendor/assets/src/css/style.css +29 -4
  176. data/vendor/assets/src/index.html +31 -38
  177. data/vendor/assets/src/index_opal.html +42 -0
  178. data/vendor/assets/src/index_server.html +43 -0
  179. data/vendor/assets/src/index_server_wasm.html +46 -0
  180. data/vendor/assets/src/js/atome/atome.js +170 -150
  181. data/vendor/assets/src/js/atome/atome_helpers/add_font.js +46 -0
  182. data/vendor/assets/src/js/atome/atome_helpers/atome_drag.js +3 -1
  183. data/vendor/assets/src/js/atome/atome_helpers/atome_events.js +12 -7
  184. data/vendor/assets/src/js/atome/atome_helpers/communication.js +126 -0
  185. data/vendor/assets/src/js/atome/atome_helpers/{atome_file.js → file.js} +1 -1
  186. data/vendor/assets/src/js/atome/specific/opal.js +3 -0
  187. data/vendor/assets/src/js/atome/specific/wasm.js +12 -0
  188. data/vendor/assets/src/js/third_parties/browser.script.iife.min.js +13 -0
  189. data/vendor/assets/src/js/third_parties/fabric.min.js +1 -1
  190. data/vendor/assets/src/js/third_parties/html-to-image.min.js +2 -0
  191. data/vendor/assets/src/js/third_parties/jsencrypt.min.js +2 -0
  192. data/vendor/assets/src/js/third_parties/papaparse.min.js +7 -0
  193. data/vendor/assets/src/medias/fonts/Roboto/LICENSE.txt +202 -0
  194. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Black.ttf +0 -0
  195. data/vendor/assets/src/medias/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
  196. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Bold.ttf +0 -0
  197. data/vendor/assets/src/medias/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
  198. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Italic.ttf +0 -0
  199. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Light.ttf +0 -0
  200. data/vendor/assets/src/medias/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
  201. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Medium.ttf +0 -0
  202. data/vendor/assets/src/medias/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
  203. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Regular.ttf +0 -0
  204. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Thin.ttf +0 -0
  205. data/vendor/assets/src/medias/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
  206. data/vendor/assets/src/medias/images/logos/Facebook.svg +1 -1
  207. data/vendor/assets/src/medias/images/logos/LinkedIn-full.svg +109 -0
  208. data/vendor/assets/src/medias/images/logos/LinkedIn.svg +11 -0
  209. data/vendor/assets/src/medias/images/logos/X.svg +5 -0
  210. data/vendor/assets/src-tauri/Cargo.toml +1 -1
  211. data/vendor/assets/src-tauri/src/main.rs +59 -5
  212. data/vendor/assets/src-tauri/tauri.conf.json +1 -1
  213. data/vendor/assets/src-wasm/wasm/wasi-vfs-osx_arm +0 -0
  214. data/vendor/assets/src-wasm/wasm/wasi-vfs-osx_x86 +0 -0
  215. data/vendor/assets/src-wasm/wasm/wasi-vfs-unix +0 -0
  216. data/vendor/assets/src-wasm/wasm/wasi-vfs.exe +0 -0
  217. metadata +188 -180
  218. data/lib/atome/extensions/mathematic.rb +0 -20
  219. data/lib/atome/extensions/matrix.rb +0 -346
  220. data/lib/atome/helpers/callbacks.rb +0 -133
  221. data/lib/atome/kernel/batch.rb +0 -26
  222. data/lib/atome/kernel/essentials.rb +0 -23
  223. data/lib/atome/renderers/browser/atome.rb +0 -158
  224. data/lib/atome/renderers/browser/browser.rb +0 -47
  225. data/lib/atome/renderers/browser/effect.rb +0 -23
  226. data/lib/atome/renderers/browser/event.rb +0 -96
  227. data/lib/atome/renderers/browser/geometry.rb +0 -27
  228. data/lib/atome/renderers/browser/helpers/animation_helper.rb +0 -69
  229. data/lib/atome/renderers/browser/helpers/browser_helper.rb +0 -101
  230. data/lib/atome/renderers/browser/helpers/color_helper.rb +0 -80
  231. data/lib/atome/renderers/browser/helpers/drag_helper.rb +0 -52
  232. data/lib/atome/renderers/browser/helpers/drop_helper.rb +0 -13
  233. data/lib/atome/renderers/browser/helpers/effect_helper.rb +0 -23
  234. data/lib/atome/renderers/browser/helpers/event_helper.rb +0 -76
  235. data/lib/atome/renderers/browser/helpers/image_helper.rb +0 -27
  236. data/lib/atome/renderers/browser/helpers/over_helper.rb +0 -13
  237. data/lib/atome/renderers/browser/helpers/shadow_helper.rb +0 -74
  238. data/lib/atome/renderers/browser/helpers/shape_helper.rb +0 -22
  239. data/lib/atome/renderers/browser/helpers/text_helper.rb +0 -38
  240. data/lib/atome/renderers/browser/helpers/video_helper.rb +0 -50
  241. data/lib/atome/renderers/browser/helpers/web_helper.rb +0 -26
  242. data/lib/atome/renderers/browser/identity.rb +0 -61
  243. data/lib/atome/renderers/browser/material.rb +0 -121
  244. data/lib/atome/renderers/browser/opal_add_on.rb +0 -31
  245. data/lib/atome/renderers/browser/opal_browser.rb +0 -6
  246. data/lib/atome/renderers/browser/spatial.rb +0 -59
  247. data/lib/atome/renderers/browser/time.rb +0 -3
  248. data/lib/atome/renderers/browser/utility.rb +0 -49
  249. data/lib/atome/renderers/headless/headless.rb +0 -10
  250. data/lib/atome/renderers/headless/utility.rb +0 -6
  251. data/lib/atome/renderers/html/atome.rb +0 -49
  252. data/lib/atome/renderers/html/effect.rb +0 -19
  253. data/lib/atome/renderers/html/event.rb +0 -9
  254. data/lib/atome/renderers/html/geometry.rb +0 -11
  255. data/lib/atome/renderers/html/html.rb +0 -42
  256. data/lib/atome/renderers/html/identity.rb +0 -14
  257. data/lib/atome/renderers/html/opal_browser.rb +0 -6
  258. data/lib/atome/renderers/html/spatial.rb +0 -28
  259. data/lib/atome/renderers/html/utility.rb +0 -17
  260. data/lib/atome/renderers/opal/extensions/atome.rb +0 -29
  261. data/lib/atome/renderers/opal/extensions/ping.rb +0 -18
  262. data/lib/atome/renderers/renderer.rb +0 -15
  263. data/lib/atome/renderers/server/server.rb +0 -10
  264. data/lib/atome/renderers/server/utility.rb +0 -6
  265. data/vendor/assets/aui.rb +0 -5
  266. data/vendor/assets/r&d/misc.rb +0 -219
  267. data/vendor/assets/r&d/ping.rb +0 -3
  268. data/vendor/assets/r&d/storage.rb +0 -9
  269. data/vendor/assets/r&d/view_example.rb +0 -21
  270. data/vendor/assets/src/js/atome/atome_helpers/atome_communication.js +0 -40
  271. data/vendor/assets/src/medias/javascripts/test.js +0 -1
  272. data/vendor/assets/src/medias/rubies/demos.rb +0 -63
  273. data/vendor/assets/src/medias/rubies/examples/add.rb +0 -24
  274. data/vendor/assets/src/medias/rubies/examples/animation.rb +0 -81
  275. data/vendor/assets/src/medias/rubies/examples/atome_new.rb +0 -27
  276. data/vendor/assets/src/medias/rubies/examples/attach.rb +0 -15
  277. data/vendor/assets/src/medias/rubies/examples/attached.rb +0 -15
  278. data/vendor/assets/src/medias/rubies/examples/auto_height.rb +0 -5
  279. data/vendor/assets/src/medias/rubies/examples/auto_width.rb +0 -4
  280. data/vendor/assets/src/medias/rubies/examples/batch.rb +0 -17
  281. data/vendor/assets/src/medias/rubies/examples/blur.rb +0 -4
  282. data/vendor/assets/src/medias/rubies/examples/bottom.rb +0 -3
  283. data/vendor/assets/src/medias/rubies/examples/box.rb +0 -20
  284. data/vendor/assets/src/medias/rubies/examples/center.rb +0 -21
  285. data/vendor/assets/src/medias/rubies/examples/circle.rb +0 -3
  286. data/vendor/assets/src/medias/rubies/examples/class.rb +0 -13
  287. data/vendor/assets/src/medias/rubies/examples/clear.rb +0 -10
  288. data/vendor/assets/src/medias/rubies/examples/clone.rb +0 -35
  289. data/vendor/assets/src/medias/rubies/examples/code.rb +0 -11
  290. data/vendor/assets/src/medias/rubies/examples/color.rb +0 -73
  291. data/vendor/assets/src/medias/rubies/examples/create_atome_in_atome.rb +0 -13
  292. data/vendor/assets/src/medias/rubies/examples/cursor.rb +0 -7
  293. data/vendor/assets/src/medias/rubies/examples/delete.rb +0 -42
  294. data/vendor/assets/src/medias/rubies/examples/depth.rb +0 -6
  295. data/vendor/assets/src/medias/rubies/examples/detached.rb +0 -13
  296. data/vendor/assets/src/medias/rubies/examples/drag.rb +0 -98
  297. data/vendor/assets/src/medias/rubies/examples/drop.rb +0 -26
  298. data/vendor/assets/src/medias/rubies/examples/edit.rb +0 -12
  299. data/vendor/assets/src/medias/rubies/examples/element.rb +0 -6
  300. data/vendor/assets/src/medias/rubies/examples/empty_atome.rb +0 -12
  301. data/vendor/assets/src/medias/rubies/examples/fullscreen.rb +0 -15
  302. data/vendor/assets/src/medias/rubies/examples/grab.rb +0 -5
  303. data/vendor/assets/src/medias/rubies/examples/height.rb +0 -7
  304. data/vendor/assets/src/medias/rubies/examples/hide.rb +0 -7
  305. data/vendor/assets/src/medias/rubies/examples/id.rb +0 -14
  306. data/vendor/assets/src/medias/rubies/examples/image.rb +0 -8
  307. data/vendor/assets/src/medias/rubies/examples/left.rb +0 -7
  308. data/vendor/assets/src/medias/rubies/examples/link.rb +0 -22
  309. data/vendor/assets/src/medias/rubies/examples/markers.rb +0 -48
  310. data/vendor/assets/src/medias/rubies/examples/materials.rb +0 -15
  311. data/vendor/assets/src/medias/rubies/examples/matrix.rb +0 -102
  312. data/vendor/assets/src/medias/rubies/examples/matrix_changes.rb +0 -483
  313. data/vendor/assets/src/medias/rubies/examples/matrix_simple.rb +0 -32
  314. data/vendor/assets/src/medias/rubies/examples/monitoring.rb +0 -70
  315. data/vendor/assets/src/medias/rubies/examples/mute.rb +0 -22
  316. data/vendor/assets/src/medias/rubies/examples/on.rb +0 -26
  317. data/vendor/assets/src/medias/rubies/examples/opacity.rb +0 -5
  318. data/vendor/assets/src/medias/rubies/examples/over.rb +0 -21
  319. data/vendor/assets/src/medias/rubies/examples/pause.rb +0 -15
  320. data/vendor/assets/src/medias/rubies/examples/physical.rb +0 -19
  321. data/vendor/assets/src/medias/rubies/examples/play.rb +0 -15
  322. data/vendor/assets/src/medias/rubies/examples/read.rb +0 -11
  323. data/vendor/assets/src/medias/rubies/examples/refresh.rb +0 -8
  324. data/vendor/assets/src/medias/rubies/examples/remove.rb +0 -16
  325. data/vendor/assets/src/medias/rubies/examples/repeat.rb +0 -6
  326. data/vendor/assets/src/medias/rubies/examples/right.rb +0 -3
  327. data/vendor/assets/src/medias/rubies/examples/rotate.rb +0 -4
  328. data/vendor/assets/src/medias/rubies/examples/schedule.rb +0 -13
  329. data/vendor/assets/src/medias/rubies/examples/shadow.rb +0 -84
  330. data/vendor/assets/src/medias/rubies/examples/size.rb +0 -8
  331. data/vendor/assets/src/medias/rubies/examples/sort.rb +0 -18
  332. data/vendor/assets/src/medias/rubies/examples/style.rb +0 -4
  333. data/vendor/assets/src/medias/rubies/examples/tags.rb +0 -10
  334. data/vendor/assets/src/medias/rubies/examples/text.rb +0 -39
  335. data/vendor/assets/src/medias/rubies/examples/time.rb +0 -18
  336. data/vendor/assets/src/medias/rubies/examples/to_px.rb +0 -10
  337. data/vendor/assets/src/medias/rubies/examples/touch.rb +0 -56
  338. data/vendor/assets/src/medias/rubies/examples/vector.rb +0 -39
  339. data/vendor/assets/src/medias/rubies/examples/video.rb +0 -65
  340. data/vendor/assets/src/medias/rubies/examples/wait.rb +0 -8
  341. data/vendor/assets/src/medias/rubies/examples/web.rb +0 -13
  342. data/vendor/assets/src/medias/rubies/examples/width.rb +0 -6
  343. data/vendor/assets/src/medias/rubies/test.rb +0 -1
  344. data/vendor/assets/src/medias/rubies/text_read.rb +0 -1
  345. data/vendor/assets/src/medias/rubies/unstable/!run.rb +0 -16
  346. data/vendor/assets/src/medias/rubies/unstable/_2_solve.rb +0 -72
  347. data/vendor/assets/src/medias/rubies/unstable/_attach.rb +0 -12
  348. data/vendor/assets/src/medias/rubies/unstable/_audio.rb +0 -231
  349. data/vendor/assets/src/medias/rubies/unstable/_dataset.rb +0 -257
  350. data/vendor/assets/src/medias/rubies/unstable/_matrix.rb +0 -58
  351. data/vendor/assets/src/medias/rubies/unstable/_os.rb +0 -29
  352. data/vendor/assets/src/medias/rubies/unstable/_table2.rb +0 -108
  353. data/vendor/assets/src/medias/rubies/unstable/_vie.rb +0 -211
  354. data/vendor/assets/src/medias/rubies/users/code.rb +0 -6
  355. /data/lib/{atome/renderers → platform_specific}/opal/opal.rb +0 -0
  356. /data/lib/{atome/renderers → platform_specific}/opal/opal_parser.rb +0 -0
  357. /data/{vendor/assets/src/utilities/mode.rb → lib/renderers/html/communication.rb} +0 -0
  358. /data/{vendor/assets/src/medias/rubies/unstable/_test.rb → lib/renderers/html/security.rb} +0 -0
@@ -1,67 +1,234 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  new({ particle: :touch, type: :hash, store: false })
4
- new({ post: :touch }) do |params, user_bloc|
5
- @touch = {} if @touch == nil
6
- @touch[params] = user_bloc
7
- # as store for touch is set to false we have to manually save the instance variable
8
- store_value(:touch)
4
+ new({ sanitizer: :touch }) do |params, user_bloc|
5
+ # TODO: factorise code below
6
+ @touch ||= {}
7
+ @touch_code ||= {}
8
+ option = true
9
+ params = if params.instance_of? Hash
10
+ @touch_code[params.keys[0]] = user_bloc
11
+ option = params[params.keys[0]]
12
+ params.keys[0]
13
+ else
14
+ case params
15
+ when true
16
+ @touch_code[:tap] = user_bloc
17
+ :tap
18
+ when :touch
19
+ @touch_code[:tap] = user_bloc
20
+ :tap
21
+ when :down
22
+ @touch_code[:down] = user_bloc
23
+ :down
24
+ when :up
25
+ @touch_code[:up] = user_bloc
26
+ :up
27
+ when :long
28
+ @touch_code[:long] = user_bloc
29
+ :long
30
+ when :double
31
+ @touch_code[:double] = user_bloc
32
+ :double
33
+ when :remove
34
+ params
35
+ when false
36
+ @touch_code[:remove] = user_bloc
37
+ :remove
38
+ else
39
+ @touch_code[:tap] = user_bloc
40
+ :tap
41
+ end
42
+ end
43
+ @touch[params] = option
44
+ params
45
+
9
46
  end
47
+ new({ particle: :play, store: false })
48
+ new({ sanitizer: :play }) do |params, user_bloc|
49
+ @play ||= {}
50
+ @play_code ||= {}
51
+ option = true
52
+ params = if params.instance_of? Hash
53
+ @play_code[params.keys[0]] = user_bloc
54
+ option = params[params.keys[0]]
55
+ params.keys[0]
56
+ else
57
+ case params
58
+ when true
59
+ @play_code[:play] = user_bloc
60
+ :play
61
+ when :stop
62
+ @play_code[:stop] = user_bloc
63
+ :stop
64
+ when :play
65
+ @play_code[:play] = user_bloc
66
+ :play
67
+ when :pause
68
+ @play_code[:pause] = user_bloc
69
+ :pause
70
+ else
71
+ @play_code[:play] = user_bloc
72
+ option = params
73
+ :play
74
+ end
10
75
 
11
- new({ particle: :play }) do
12
- @atome[:pause] = :false
76
+ end
77
+ @play[params] = option
78
+
79
+ params
13
80
  end
81
+ new({ particle: :pause })
14
82
  new({ particle: :time })
15
- new({ particle: :pause }) do
16
- @atome[:play] = :false
83
+ new({ particle: :on, store: false })
84
+ new({ sanitizer: :on }) do |params, user_bloc|
85
+ @on ||= {}
86
+ @on_code ||= {}
87
+
88
+ option = {}
89
+ params = if params.instance_of? Hash
90
+ @on_code[:view_resize] = user_bloc
91
+ option = params[params.keys[0]]
92
+ :resize
93
+ else
94
+ case params
95
+ when true
96
+ @on_code[:view_resize] = user_bloc
97
+ :resize
98
+ when :remove
99
+
100
+ :remove
101
+ else
102
+ @on_code[:view_resize] = user_bloc
103
+ option = params
104
+ :resize
105
+ end
106
+ end
107
+ @on[params] = option
108
+ params
17
109
  end
18
- new({ particle: :on })
19
110
  new({ particle: :fullscreen })
20
111
  new({ particle: :mute })
21
112
  new({ particle: :drag, store: false })
113
+ new({ sanitizer: :drag }) do |params, user_bloc|
114
+ @drag ||= {}
115
+ @drag_code ||= {}
116
+ option = true
117
+ params = if params.instance_of? Hash
118
+ @drag_code[params.keys[0]] = user_bloc
119
+ option = params[params.keys[0]]
120
+ params.keys[0]
121
+ else
122
+ case params
123
+ when true
124
+ @drag_code[:move] = user_bloc
125
+ :move
126
+ when :move
127
+ @drag_code[:move] = user_bloc
128
+ :move
129
+ when :drag
130
+ @drag_code[:move] = user_bloc
131
+ :move
132
+ when :clone
133
+ @drag_code[:clone] = user_bloc
134
+ :clone
135
+ when :start
136
+ @drag_code[:start] = user_bloc
137
+ :start
138
+ when :stop
139
+ @drag_code[:end] = user_bloc
140
+ :end
141
+ when :end
142
+ @drag_code[:end] = user_bloc
143
+ :end
144
+ when :locked
145
+ @drag_code[:locked] = user_bloc
146
+ :locked
147
+ when false
148
+ @drag_code[:remove] = user_bloc
149
+ :remove
150
+ else
151
+ @drag_code[:move] = user_bloc
152
+ :move
153
+ end
22
154
 
23
- new({ sanitizer: :drag }) do |params, proc|
24
- params = { move: true } if params == true
25
- params = { end: proc } if params == :end
26
- params = { start: proc } if params == :start
155
+ end
156
+ @drag[params] = option
27
157
  params
28
158
  end
159
+ new({ particle: :drop, store: false })
160
+ new({ sanitizer: :drop }) do |params, user_bloc|
161
+ @drop ||= {}
162
+ @drop_code ||= {}
163
+ option = true
164
+ params = if params.instance_of? Hash
165
+ @drop_code[params.keys[0]] = user_bloc
166
+ option = params[params.keys[0]]
167
+ params.keys[0]
168
+ else
169
+ case params
170
+ when true
171
+ @drop_code[:dropped] = user_bloc
172
+ :dropped
173
+ when :enter
174
+ @drop_code[:enter] = user_bloc
175
+ :enter
176
+ when :activate
177
+ @drop_code[:activate] = user_bloc
178
+ :activate
179
+ when :deactivate
180
+ @drop_code[:deactivate] = user_bloc
181
+ :deactivate
182
+ when :leave
183
+ @drop_code[:leave] = user_bloc
184
+ :leave
185
+ else
186
+ @drop_code[:dropped] = user_bloc
187
+ :dropped
188
+ end
29
189
 
30
- new({ post: :drag }) do |params|
31
- # puts "params is : > #{params}"
32
- @drag = {} if @drag == nil
33
- # @drag[params] = user_bloc
34
- params.each do |k, v|
35
- @drag[k] = v
36
- end
37
- # @drag=params
38
- # as store for touch is set to false we have to manually save the instance variable
39
- store_value(:drag)
40
- end
41
-
42
- # @touch[params] = user_bloc
43
-
44
- new ({ particle: :drop })
45
-
46
- new ({ sanitizer: :drop }) do |params|
47
- params = { action: true } if params == true
190
+ end
191
+ @drop[params] = option
48
192
  params
49
193
  end
194
+ new({ particle: :over, type: :hash, store: false })
195
+ new({ sanitizer: :over }) do |params, user_bloc|
196
+
197
+ # TODO: factorise code below
198
+ @over ||= {}
199
+ @over_code ||= {}
200
+ option = true
201
+ params = if params.instance_of? Hash
50
202
 
51
- new ({ particle: :over })
203
+ @over_code[params.keys[0]] = user_bloc
204
+ option = params[params.keys[0]]
205
+ params.keys[0]
206
+ else
207
+ case params
208
+ when true
209
+ @over_code[:over] = user_bloc
210
+ :over
211
+ when :over
212
+ @over_code[:over] = user_bloc
213
+ :over
214
+ when :enter
215
+ @over_code[:enter] = user_bloc
216
+ :enter
217
+ when :leave
218
+ @over_code[:leave] = user_bloc
219
+ :leave
220
+ # when false
221
+ # false
222
+ else
223
+ :over
224
+ end
52
225
 
53
- new ({ sanitizer: :over }) do |params, user_proc|
226
+ end
54
227
 
55
- params = :enter if params == true
56
- case params
57
- when :enter
58
- @enter_action_proc = user_proc
59
- when :leave
60
- @leave_action_proc = user_proc
61
- end
228
+ @over[params] = option
62
229
  params
63
- end
64
230
 
231
+ end
65
232
  new({ particle: :sort }) do |_value, sort_proc|
66
233
  @sort_proc = sort_proc
67
234
  end
@@ -83,5 +250,74 @@ new({ particle: :stiffness })
83
250
  new({ particle: :velocity })
84
251
  new({ particle: :repeat })
85
252
  new({ particle: :ease })
86
- new({ particle: :unbind })
253
+ new(particle: :keyboard, type: :hash, store: false)
254
+ new({ sanitizer: :keyboard }) do |params, user_bloc|
255
+ @keyboard ||= {}
256
+ @keyboard_code ||= {}
257
+
258
+ option = {}
259
+ params = if params.instance_of? Hash
260
+ # @keyboard_code[:keyboard] = user_bloc
261
+ option = params[params.keys[0]]
262
+ :remove
263
+ else
264
+ case params
265
+ when true
266
+ @keyboard_code[:press] = user_bloc
267
+ :press
268
+ when :down
269
+ @keyboard_code[:down] = user_bloc
270
+ :down
271
+ when :up
272
+ @keyboard_code[:up] = user_bloc
273
+ :up
274
+ when :press
275
+ @keyboard_code[:press] = user_bloc
276
+ :press
277
+ when :remove
278
+ @keyboard_code[:remove] = user_bloc
279
+ :remove
280
+ else
281
+ @keyboard_code[:press] = user_bloc
282
+ option = params
283
+ :press
284
+ end
285
+
286
+ end
287
+ @keyboard[params] = option
288
+
289
+ params
290
+ end
291
+ new({ particle: :resize, store: false })
292
+ new({ sanitizer: :resize }) do |params, user_bloc|
293
+ @resize ||= { }
294
+ @resize_code ||= {}
87
295
 
296
+ option = {min: { width: 10, height: 10 }, max: { width: 3000, height: 3000 }}
297
+ params = if params.instance_of? Hash
298
+ @resize_code[:resize] = user_bloc
299
+ option = params[params.keys[0]]
300
+ :resize
301
+ else
302
+ case params
303
+ when true
304
+ @resize_code[:resize] = user_bloc
305
+ :resize
306
+ when :remove
307
+ :remove
308
+ else
309
+ @resize_code[:resize] = user_bloc
310
+ option = params
311
+ :resize
312
+ end
313
+ end
314
+ @resize[params] = option
315
+
316
+ params
317
+ end
318
+ new({ particle: :overflow }) do |params, bloc|
319
+ @overflow_code ||= {}
320
+ instance_variable_get('@overflow_code')[:overflow] = bloc
321
+ params
322
+
323
+ end
@@ -3,14 +3,5 @@
3
3
  new({particle: :width })
4
4
  new({particle: :height })
5
5
  new({particle: :size }) do |params|
6
- atome_width = atome[:width]
7
- atome_height = atome[:height]
8
- aspect_ratio = atome_width / atome_height
9
- if atome_width > atome_height
10
- width(params)
11
- height(params / aspect_ratio)
12
- else
13
- width(params * aspect_ratio)
14
- height(params)
15
- end
6
+ params
16
7
  end
@@ -0,0 +1,103 @@
1
+ # frozen_string_literal: true
2
+ def detach_child(child)
3
+ return unless child.attach
4
+
5
+ parent = grab(child.attach)
6
+ parent.attached.delete(@id)
7
+
8
+ end
9
+
10
+ def detach_from_parent(parent_found, child_found)
11
+ child_found.attach(false)
12
+ end
13
+
14
+ def attachment_common(child_id, parents_id, direction, &user_proc)
15
+ parent_found = grab(parents_id)
16
+ if direction == :attach
17
+ if parent_found
18
+ parent_found.attached ||= []
19
+ parent_found.attached.push(@id) unless parent_found.attached.include?(@id)
20
+ detach_child(self)
21
+ render(:attach, parents_id, &user_proc)
22
+ else
23
+ # we remove the current id from parent
24
+ grab(attach).attached.delete(@id)
25
+ end
26
+ else
27
+ child_found = grab(child_id)
28
+ detach_from_parent(parent_found, child_found)
29
+ child_found.render(:attach, parents_id, &user_proc)
30
+ end
31
+ end
32
+
33
+ new({ particle: :attach, render: false }) do |parents_id, &user_proc|
34
+ attachment_common(@id, parents_id, :attach, &user_proc)
35
+ parents_id
36
+ end
37
+
38
+ new({ particle: :attached, render: false }) do |children_ids, &user_proc|
39
+ children_ids = [children_ids] unless children_ids.instance_of?(Array)
40
+ parents_id = @id
41
+ children_ids.each do |children_id|
42
+ attachment_common(children_id, parents_id, :attached, &user_proc)
43
+ end
44
+ children_ids
45
+ end
46
+
47
+ new({ sanitizer: :attached }) do |children_ids|
48
+ children_ids
49
+ end
50
+
51
+ new({ particle: :apply, render: false, store: false }) do |parents_ids, &user_proc|
52
+ # TODO: optimize the 2 lines below:
53
+ @apply ||= []
54
+ parents_ids = [parents_ids] unless parents_ids.instance_of?(Array)
55
+ parents_ids.each do |parent_id|
56
+ @apply.delete(parent_id)
57
+ @apply << parent_id
58
+ end
59
+ parents_ids = @apply
60
+ children_ids = [id]
61
+ parents_ids.each do |parent_id|
62
+ parent_found = grab(parent_id)
63
+ parent_affect = parent_found.instance_variable_get('@affect')
64
+ parent_found.instance_variable_set('@affect', []) unless parent_affect.instance_of? Array
65
+ affect_element = parent_found.instance_variable_get('@affect')
66
+ children_ids.each do |child_id|
67
+ # affect_element << child_id unless affect_element.include?(child_id)
68
+ affect_element.delete(child_id)
69
+ # affect_element.push(child_id)
70
+ affect_element << child_id
71
+ child_found = grab(child_id)
72
+ child_found&.render(:apply, parent_found, &user_proc)
73
+ end
74
+ end
75
+ @apply = parents_ids
76
+
77
+ parents_ids
78
+ end
79
+
80
+ new({ particle: :affect, render: false }) do |children_ids, &user_proc|
81
+ children_ids = [children_ids] unless children_ids.instance_of? Array
82
+ children_ids.each do |child_id|
83
+ child_found = grab(child_id)
84
+ child_found&.apply([id], &user_proc)
85
+ end
86
+ children_ids
87
+ end
88
+
89
+ new({ particle: :detached, store: false }) # unfastened
90
+ new({ sanitizer: :detached }) do |values|
91
+ # unfastened
92
+ if values.instance_of? Array
93
+ values.each do |value|
94
+ detach_atome(value)
95
+ end
96
+ else
97
+ detach_atome(values)
98
+ # we sanitize the values so it always return an array to the renderer
99
+ values = [values]
100
+ end
101
+ values
102
+ end
103
+ new({ particle: :collect })
@@ -1,81 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- new({ particle: :attach })
4
- new({ sanitizer: :attach }) do |parents_ids|
5
- # puts "=> attach it! : #{parents_ids} <="
6
-
7
- # parents_ids = parents_ids if parents_ids.instance_of? Atome
8
- parents_ids = [parents_ids] unless parents_ids.instance_of?(Array)
9
- parents_ids.each do |parents_id|
10
- # parents_id = parents_id if parents_id.instance_of? Atome
11
- parents_found = grab(parents_id)
12
- # TODO : factorise the code below
13
- current_type = atome[:type]
14
- parents_found.atome[current_type] = [] unless parents_found.atome[current_type]
15
-
16
- # the condition below is needed when user passed a hash instead of the id of the child cf :
17
- parent_type_container = if parents_found.atome[current_type].instance_of? Array
18
- parents_found.atome[current_type]
19
- else
20
- [parents_found.atome[current_type][:id]]
21
- end
22
- # here we add the child into it's parents type container
23
- parent_type_container << atome[:id]
24
- # TODO : factorise the code above
25
- parents_found.atome[:attached] = [] unless parents_found.atome[:attached]
26
- parents_found.atome[:attached] << atome[:id]
27
- end
28
- parents_ids
29
- end
30
-
31
- new({ particle: :attached })
32
- new({ sanitizer: :attached }) do |children_ids|
33
- # puts "=> attached now! : #{children_ids}<="
34
- # children_ids = children_ids if children_ids.instance_of? Atome
35
- children_ids = [children_ids] unless children_ids.instance_of?(Array)
36
- children_ids.each do |child_id|
37
- # child_id = child_id if child_id.instance_of? Atome
38
- child_found = grab(child_id)
39
- parents_found = @atome[:id]
40
- # TODO : factorise the code below
41
- child_found_type = child_found.type
42
- @atome[child_found_type] = [] unless @atome[child_found_type]
43
-
44
- # the condition below is needed when user passed a hash instead of the id of the child cf :
45
- # circle(color: {red: 0, green: 1}) instead of color({id: :the_col}); circle(color: [:the_col])
46
- child_type_container = if @atome[child_found_type].instance_of? Array
47
- @atome[child_found_type]
48
- else
49
- [@atome[child_found_type][:id]]
50
- end
51
- child_type_container << child_id
52
- # TODO : factorise the code above
53
- child_found.atome[:attach] = [parents_found]
54
- end
55
- end
56
-
57
- new({ particle: :detached, store: false })
58
- new({ sanitizer: :detached }) do |values|
59
- if values.instance_of? Array
60
- values.each do |value|
61
- detach_atome(value)
62
- end
63
- else
64
- detach_atome(values)
65
- # we sanitize the values so it always return an array to the renderer
66
- values = [values]
67
- end
68
- values
69
- end
70
-
71
-
72
-
73
3
  new({ particle: :real })
74
4
  new({ particle: :type })
75
5
  new({ particle: :id })
76
6
  new({ sanitizer: :id }) do |params|
77
- if @atome[:id] != params
78
- Universe.update_atome_id(params, self, @atome[:id])
7
+ # first we sanitize the the id below
8
+ params = params.to_sym
9
+ if @id.to_sym != params
10
+ Universe.update_atome_id(params, self, @id)
79
11
  else
80
12
  Universe.add_to_atomes(params, self)
81
13
  end
@@ -83,18 +15,47 @@ new({ sanitizer: :id }) do |params|
83
15
  end
84
16
  new({ particle: :name })
85
17
  new({ particle: :active })
18
+ # new({ particle: :entangled, type: :array })
19
+ # new({ particle: :clones }) do |clones_found|
20
+ # clones_found.each_with_index do |clone_found, index|
21
+ # particles_entangled = clone_found[:entangled] ||= []
22
+ # clone_id = "#{particles[:id]}_clone_#{index}"
23
+ # original_id = atome[:id]
24
+ # clone_found[:id] = clone_id
25
+ # clone_found = particles.merge(clone_found)
26
+ # clone_found.delete(:html_object)
27
+ # cloned_atome = Atome.new(clone_found)
28
+ # monitor({ atomes: [original_id], particles: particles_entangled }) do |_atome, particle, value|
29
+ # cloned_atome.send(particle, value)
30
+ # end
31
+ # end
32
+ # end
33
+ new({ particle: :markup })
34
+ new({particle: :bundle})
35
+ new({ particle: :data })
36
+
37
+ new({particle: :category, store: false}) do |category_names|
38
+ category_names=[category_names] unless category_names.instance_of? Array
39
+ category_names.each do |category_name|
40
+ @category << category_name
41
+ end
42
+ end
43
+ # The selection particle is used by current user to store selected atomes
44
+ new(particle: :selection)
45
+
46
+ new({ read: :selection }) do |params_get|
47
+ selector = grab(:selector)
48
+ selector.collect = params_get
49
+ selector
50
+ end
86
51
 
87
- new({ particle: :intricate, type: :array })
88
- new({ particle: :clones }) do |clones_found|
89
- clones_found.each_with_index do |clone_found, index|
90
- particles_intricated = clone_found[:intricate] ||= []
91
- clone_id = "#{particles[:id]}_clone_#{index}"
92
- original_id = atome[:id]
93
- clone_found[:id] = clone_id
94
- clone_found = particles.merge(clone_found)
95
- cloned_atome = Atome.new({ clone: clone_found })
96
- cloned_atome.monitor({ atomes: [original_id], particles: particles_intricated }) do |_atome, particle, value|
97
- cloned_atome.send(particle, value)
98
- end
52
+ new(particle: :selected) do |params|
53
+ if params == true
54
+ grab(Universe.current_user).selection << @id
55
+ elsif params == false
56
+ grab(Universe.current_user).selection.delete(@id)
57
+ else
58
+ # TODO: for future use
99
59
  end
60
+ params
100
61
  end
@@ -1,27 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # new({ particle: :red }) do
4
- # # we return self to allow syntax of the type : a.color(:black).red(1).green(0.3)
5
- # self
6
- # end
7
- # new({ particle: :green }) do
8
- # # we return self to allow syntax of the type : a.color(:black).red(1).green(0.3)
9
- # self
10
- # end
11
- # new({ particle: :blue }) do
12
- # # we return self to allow syntax of the type : a.color(:black).red(1).green(0.3)
13
- # self
14
- # end
15
- # new({ particle: :alpha }) do
16
- # # we return self to allow syntax of the type : a.color(:black).red(1).green(0.3)
17
- # self
18
- # end
19
- new({ particle: :diffusion }) do
20
- # we return self to allow syntax of the type : a.color(:black).red(1).green(0.3)
21
- self
22
- end
23
- new({ particle: :visual })
24
- new({ particle: :overflow })
3
+ new({ particle: :component })
4
+
25
5
  new({ particle: :edit })
26
6
  new({ particle: :style })
27
7
  new({ pre: :style }) do |styles_send, _user_proc|
@@ -31,23 +11,40 @@ new({ pre: :style }) do |styles_send, _user_proc|
31
11
  end
32
12
  new({ particle: :hide })
33
13
 
34
- new({ particle: :remove }) do |particle_to_remove|
35
- case particle_to_remove
36
- when :color
37
- send(particle_to_remove, :black)
38
- when :shadow
39
- # TODO : code to write
40
- puts 'code to write'
41
- else
42
- particle_to_remove_decision(particle_to_remove)
14
+ new({ particle: :remove })
15
+
16
+ new({ post: :remove }) do |params|
17
+ # TODO : we have to rethink the removal of atome and particles (with exception like category) and maybe 'use particle type' to handle removal
18
+ if params.instance_of?(Hash)
19
+ case params[:all]
20
+ when :color
21
+ color.each do |atome_id_found|
22
+ @apply.delete(atome_id_found)
23
+ end
24
+ when :paint
25
+ paint.each do |atome_id_found|
26
+ @apply.delete(atome_id_found)
27
+ end
28
+ else
29
+ params.each do |particle, value|
30
+ case particle
31
+ when :category
32
+ @category.delete(value) if particle == :category
33
+ else
34
+ puts 'write code'
35
+ end
36
+ end
37
+
38
+ end
43
39
  end
40
+ params
44
41
  end
42
+
45
43
  new({ particle: :classes }) do |value|
46
44
  Universe.classes[value] ||= []
47
45
  Universe.classes[value] |= [id]
48
46
  end
49
47
  new({ particle: :remove_classes }) do |value|
50
- # Universe.classes.delete(value)
51
48
  Universe.classes[value].delete(id)
52
49
  end
53
50
  new ({ particle: :opacity })
@@ -55,10 +52,10 @@ new ({ particle: :opacity })
55
52
  # vector shape
56
53
  new({ particle: :definition })
57
54
 
58
- new({ browser: :definition, type: :string })
59
-
60
55
  new({ sanitizer: :definition }) do |params|
61
56
  # we remove the unwanted svg tags
62
57
  params = params.gsub(/<svg[^>]*>|<\/svg>/, '')
63
58
  params
64
59
  end
60
+
61
+ new({ particle: :gradient })