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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/Gemfile +3 -1
- data/README.md +70 -1
- data/Rakefile +246 -75
- data/app_builder_helpers/Rakefile +276 -288
- data/documentation/basic.md +242 -0
- data/documentation/deep learning/architecture.txt +3763 -0
- data/documentation/deep learning/atome.png +0 -0
- data/documentation/deep learning/basic_infos.txt +227 -0
- data/documentation/deep learning/example_of_users_code.rb +1810 -0
- data/documentation/deep learning/misc.txt +24 -0
- data/documentation/deep learning/ruby_js_example.rb +272 -0
- data/documentation/deep learning/wasm_script_help.text +14 -0
- data/documentation/framework/enhance_atome.md +1 -1
- data/documentation/tutorials/tutorials.md +7 -0
- data/exe/atome +308 -208
- data/lib/atome/atome.rb +52 -156
- data/lib/atome/extensions/atome.rb +129 -47
- data/lib/atome/extensions/mathematics.rb +20 -0
- data/lib/atome/extensions/ping.rb +2 -3
- data/lib/atome/genesis/generators/atome.rb +57 -30
- data/lib/atome/genesis/generators/communication.rb +9 -0
- data/lib/atome/genesis/generators/effect.rb +0 -1
- data/lib/atome/genesis/generators/event.rb +279 -43
- data/lib/atome/genesis/generators/geometry.rb +1 -10
- data/lib/atome/genesis/generators/hierarchy.rb +103 -0
- data/lib/atome/genesis/generators/identity.rb +45 -84
- data/lib/atome/genesis/generators/material.rb +31 -34
- data/lib/atome/genesis/generators/property.rb +31 -0
- data/lib/atome/genesis/generators/security.rb +31 -0
- data/lib/atome/genesis/generators/spatial.rb +3 -5
- data/lib/atome/genesis/generators/time.rb +0 -1
- data/lib/atome/genesis/generators/utility.rb +181 -66
- data/lib/atome/genesis/genesis.rb +152 -55
- data/lib/atome/genesis/sparkle.rb +59 -75
- data/lib/atome/helpers/color_helper/color/rgb/colors.rb +1 -1
- data/lib/atome/helpers/color_helper/color/rgb.rb +1 -1
- data/lib/atome/helpers/color_helper/color.rb +226 -7
- data/lib/atome/helpers/essentials.rb +22 -26
- data/lib/atome/helpers/security.rb +71 -0
- data/lib/atome/helpers/utilities.rb +191 -178
- data/lib/atome/kernel/black_matter.rb +22 -0
- data/lib/atome/kernel/universe.rb +123 -24
- data/lib/atome/presets/atome.rb +39 -35
- data/lib/atome/version.rb +3 -2
- data/lib/atome.rb +12 -12
- data/lib/atome_relative.rb +36 -0
- data/lib/{atome/renderers → platform_specific}/opal/atome_opal_extensions.rb +4 -1
- data/lib/{atome/renderers → platform_specific}/opal/extensions/color.rb +12 -5
- data/lib/{atome/renderers → platform_specific}/opal/extensions/geolocation.rb +1 -0
- data/lib/platform_specific/opal/extensions/js.rb +21 -0
- data/lib/platform_specific/opal/extensions/object.rb +6 -0
- data/lib/platform_specific/opal/extensions/ping.rb +31 -0
- data/lib/{atome/renderers → platform_specific}/opal/extensions/sha.rb +4 -2
- data/lib/platform_specific/wasm/atome_wasm_extensions.rb +11 -0
- data/lib/renderers/headless/headless.rb +18 -0
- data/lib/renderers/headless/index.rb +6 -0
- data/lib/renderers/headless/index_relative.rb +6 -0
- data/lib/renderers/headless/utility.rb +6 -0
- data/{vendor/assets/src/medias/rubies/examples/top.rb → lib/renderers/html/atome.rb} +0 -1
- data/lib/renderers/html/atome_html.rb +22 -0
- data/lib/renderers/html/effect.rb +26 -0
- data/lib/renderers/html/event.rb +43 -0
- data/lib/renderers/html/geometry.rb +31 -0
- data/lib/renderers/html/hierarchy.rb +233 -0
- data/lib/renderers/html/html.rb +1112 -0
- data/lib/renderers/html/identity.rb +84 -0
- data/lib/renderers/html/index.rb +19 -0
- data/lib/renderers/html/index_relative.rb +20 -0
- data/lib/renderers/html/material.rb +53 -0
- data/lib/renderers/html/property.rb +24 -0
- data/lib/renderers/html/spatial.rb +46 -0
- data/lib/renderers/html/time.rb +1 -0
- data/lib/renderers/html/utility.rb +38 -0
- data/lib/renderers/renderer.rb +16 -0
- data/lib/renderers/server/index.rb +4 -0
- data/lib/renderers/server/index_relative.rb +4 -0
- data/lib/renderers/server/utility.rb +4 -0
- data/sig/atome.rbs +6 -0
- data/sig/object.rbs +4 -0
- data/sig/universe.rbs +3 -0
- data/vendor/assets/Rakefile +3 -3
- data/vendor/assets/application/examples/a_concat.rb +16 -0
- data/vendor/assets/application/examples/affect.rb +8 -0
- data/vendor/assets/application/examples/animation.rb +96 -0
- data/vendor/assets/application/examples/apply.rb +8 -0
- data/vendor/assets/application/examples/atome.rb +5 -0
- data/vendor/assets/application/examples/attach.rb +34 -0
- data/vendor/assets/application/examples/attached.rb +38 -0
- data/vendor/assets/application/examples/basic_understanding.rb +52 -0
- data/vendor/assets/application/examples/browse.rb +17 -0
- data/vendor/assets/application/examples/callback.rb +20 -0
- data/vendor/assets/application/examples/category.rb +12 -0
- data/vendor/assets/application/examples/clear.rb +96 -0
- data/vendor/assets/application/examples/clones.rb +177 -0
- data/vendor/assets/application/examples/code.rb +13 -0
- data/vendor/assets/application/examples/color.rb +54 -0
- data/vendor/assets/application/examples/convert.rb +163 -0
- data/vendor/assets/application/examples/copy.rb +25 -0
- data/vendor/assets/application/examples/copybck.rb +68 -0
- data/vendor/assets/application/examples/debug.rb +78 -0
- data/vendor/assets/application/examples/delete.rb +93 -0
- data/vendor/assets/application/examples/display.rb +279 -0
- data/vendor/assets/application/examples/display_bck.rb +164 -0
- data/vendor/assets/application/examples/drag.rb +45 -0
- data/vendor/assets/application/examples/drop.rb +35 -0
- data/vendor/assets/application/examples/duplicate.rb +64 -0
- data/vendor/assets/application/examples/edit.rb +21 -0
- data/vendor/assets/application/examples/encode.rb +6 -0
- data/vendor/assets/application/examples/file.rb +50 -0
- data/vendor/assets/application/examples/find.rb +157 -0
- data/vendor/assets/application/examples/generator_and_build.rb +15 -0
- data/vendor/assets/application/examples/getter.rb +16 -0
- data/vendor/assets/application/examples/grab.rb +14 -0
- data/vendor/assets/application/examples/gradient.rb +35 -0
- data/vendor/assets/application/examples/group.rb +44 -0
- data/vendor/assets/application/examples/hierarchy.rb +21 -0
- data/vendor/assets/application/examples/history.rb +31 -0
- data/vendor/assets/application/examples/hypertext.rb +113 -0
- data/vendor/assets/application/examples/image.rb +5 -0
- data/vendor/assets/application/examples/keyboard.rb +59 -0
- data/vendor/assets/application/examples/layout.rb +227 -0
- data/vendor/assets/application/examples/login.rb +10 -0
- data/vendor/assets/application/examples/markup.rb +4 -0
- data/vendor/assets/application/examples/match.rb +115 -0
- data/vendor/assets/application/examples/messaging.rb +16 -0
- data/vendor/assets/application/examples/monitor.rb +14 -0
- data/vendor/assets/application/examples/on_resize.rb +7 -0
- data/vendor/assets/{src/medias/rubies/examples/get_renderer_list.rb → application/examples/online.rb} +1 -1
- data/vendor/assets/application/examples/over.rb +29 -0
- data/vendor/assets/application/examples/paint.rb +23 -0
- data/vendor/assets/application/examples/particles.rb +4 -0
- data/vendor/assets/application/examples/percent_to_px.rb +4 -0
- data/vendor/assets/application/examples/play.rb +50 -0
- data/vendor/assets/application/examples/presets.rb +33 -0
- data/vendor/assets/application/examples/random.rb +42 -0
- data/vendor/assets/application/examples/raw_html.rb +48 -0
- data/vendor/assets/application/examples/read.rb +11 -0
- data/vendor/assets/application/examples/refresh.rb +62 -0
- data/vendor/assets/application/examples/remove.rb +47 -0
- data/vendor/assets/application/examples/repeat.rb +26 -0
- data/vendor/assets/application/examples/resize.rb +17 -0
- data/vendor/assets/application/examples/scroll.rb +11 -0
- data/vendor/assets/application/examples/security.rb +76 -0
- data/vendor/assets/application/examples/selected.rb +30 -0
- data/vendor/assets/application/examples/shadow.rb +46 -0
- data/vendor/assets/application/examples/shapes.rb +6 -0
- data/vendor/assets/{src/medias/rubies → application}/examples/smooth.rb +5 -1
- data/vendor/assets/application/examples/style.rb +4 -0
- data/vendor/assets/application/examples/sync.rb +39 -0
- data/vendor/assets/application/examples/tagged.rb +24 -0
- data/vendor/assets/application/examples/terminal.rb +4 -0
- data/vendor/assets/application/examples/text.rb +5 -0
- data/vendor/assets/application/examples/touch.rb +38 -0
- data/vendor/assets/application/examples/type_mutation.rb +18 -0
- data/vendor/assets/application/examples/universe.rb +8 -0
- data/vendor/assets/application/examples/vector.rb +24 -0
- data/vendor/assets/application/examples/video.rb +14 -0
- data/vendor/assets/application/examples/wait.rb +6 -0
- data/vendor/assets/application/examples/www.rb +10 -0
- data/vendor/assets/application/index.rb +1 -1
- data/vendor/assets/application/test.rb +29 -0
- data/vendor/assets/application/works/photos.rb +672 -0
- data/vendor/assets/application/works/photos2.rb +218 -0
- data/vendor/assets/application/works/photos3.rb +343 -0
- data/vendor/assets/application/works/photos4.rb +34 -0
- data/vendor/assets/application/works/photos6.rb +6 -0
- data/vendor/assets/application/works/trigga.rb +0 -0
- data/vendor/assets/application/works/vie.rb +74 -0
- data/vendor/assets/server/atome_server.rb +37 -41
- data/vendor/assets/server/atome_server_wasm.rb +112 -0
- data/vendor/assets/server/capture.rb +10 -0
- data/vendor/assets/server/config.ru +5 -4
- data/vendor/assets/src/css/style.css +29 -4
- data/vendor/assets/src/index.html +31 -38
- data/vendor/assets/src/index_opal.html +42 -0
- data/vendor/assets/src/index_server.html +43 -0
- data/vendor/assets/src/index_server_wasm.html +46 -0
- data/vendor/assets/src/js/atome/atome.js +170 -150
- data/vendor/assets/src/js/atome/atome_helpers/add_font.js +46 -0
- data/vendor/assets/src/js/atome/atome_helpers/atome_drag.js +3 -1
- data/vendor/assets/src/js/atome/atome_helpers/atome_events.js +12 -7
- data/vendor/assets/src/js/atome/atome_helpers/communication.js +126 -0
- data/vendor/assets/src/js/atome/atome_helpers/{atome_file.js → file.js} +1 -1
- data/vendor/assets/src/js/atome/specific/opal.js +3 -0
- data/vendor/assets/src/js/atome/specific/wasm.js +12 -0
- data/vendor/assets/src/js/third_parties/browser.script.iife.min.js +13 -0
- data/vendor/assets/src/js/third_parties/fabric.min.js +1 -1
- data/vendor/assets/src/js/third_parties/html-to-image.min.js +2 -0
- data/vendor/assets/src/js/third_parties/jsencrypt.min.js +2 -0
- data/vendor/assets/src/js/third_parties/papaparse.min.js +7 -0
- data/vendor/assets/src/medias/fonts/Roboto/LICENSE.txt +202 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Black.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Bold.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Italic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Light.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Medium.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Regular.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Thin.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
- data/vendor/assets/src/medias/images/logos/Facebook.svg +1 -1
- data/vendor/assets/src/medias/images/logos/LinkedIn-full.svg +109 -0
- data/vendor/assets/src/medias/images/logos/LinkedIn.svg +11 -0
- data/vendor/assets/src/medias/images/logos/X.svg +5 -0
- data/vendor/assets/src-tauri/Cargo.toml +1 -1
- data/vendor/assets/src-tauri/src/main.rs +59 -5
- data/vendor/assets/src-tauri/tauri.conf.json +1 -1
- data/vendor/assets/src-wasm/wasm/wasi-vfs-osx_arm +0 -0
- data/vendor/assets/src-wasm/wasm/wasi-vfs-osx_x86 +0 -0
- data/vendor/assets/src-wasm/wasm/wasi-vfs-unix +0 -0
- data/vendor/assets/src-wasm/wasm/wasi-vfs.exe +0 -0
- metadata +188 -180
- data/lib/atome/extensions/mathematic.rb +0 -20
- data/lib/atome/extensions/matrix.rb +0 -346
- data/lib/atome/helpers/callbacks.rb +0 -133
- data/lib/atome/kernel/batch.rb +0 -26
- data/lib/atome/kernel/essentials.rb +0 -23
- data/lib/atome/renderers/browser/atome.rb +0 -158
- data/lib/atome/renderers/browser/browser.rb +0 -47
- data/lib/atome/renderers/browser/effect.rb +0 -23
- data/lib/atome/renderers/browser/event.rb +0 -96
- data/lib/atome/renderers/browser/geometry.rb +0 -27
- data/lib/atome/renderers/browser/helpers/animation_helper.rb +0 -69
- data/lib/atome/renderers/browser/helpers/browser_helper.rb +0 -101
- data/lib/atome/renderers/browser/helpers/color_helper.rb +0 -80
- data/lib/atome/renderers/browser/helpers/drag_helper.rb +0 -52
- data/lib/atome/renderers/browser/helpers/drop_helper.rb +0 -13
- data/lib/atome/renderers/browser/helpers/effect_helper.rb +0 -23
- data/lib/atome/renderers/browser/helpers/event_helper.rb +0 -76
- data/lib/atome/renderers/browser/helpers/image_helper.rb +0 -27
- data/lib/atome/renderers/browser/helpers/over_helper.rb +0 -13
- data/lib/atome/renderers/browser/helpers/shadow_helper.rb +0 -74
- data/lib/atome/renderers/browser/helpers/shape_helper.rb +0 -22
- data/lib/atome/renderers/browser/helpers/text_helper.rb +0 -38
- data/lib/atome/renderers/browser/helpers/video_helper.rb +0 -50
- data/lib/atome/renderers/browser/helpers/web_helper.rb +0 -26
- data/lib/atome/renderers/browser/identity.rb +0 -61
- data/lib/atome/renderers/browser/material.rb +0 -121
- data/lib/atome/renderers/browser/opal_add_on.rb +0 -31
- data/lib/atome/renderers/browser/opal_browser.rb +0 -6
- data/lib/atome/renderers/browser/spatial.rb +0 -59
- data/lib/atome/renderers/browser/time.rb +0 -3
- data/lib/atome/renderers/browser/utility.rb +0 -49
- data/lib/atome/renderers/headless/headless.rb +0 -10
- data/lib/atome/renderers/headless/utility.rb +0 -6
- data/lib/atome/renderers/html/atome.rb +0 -49
- data/lib/atome/renderers/html/effect.rb +0 -19
- data/lib/atome/renderers/html/event.rb +0 -9
- data/lib/atome/renderers/html/geometry.rb +0 -11
- data/lib/atome/renderers/html/html.rb +0 -42
- data/lib/atome/renderers/html/identity.rb +0 -14
- data/lib/atome/renderers/html/opal_browser.rb +0 -6
- data/lib/atome/renderers/html/spatial.rb +0 -28
- data/lib/atome/renderers/html/utility.rb +0 -17
- data/lib/atome/renderers/opal/extensions/atome.rb +0 -29
- data/lib/atome/renderers/opal/extensions/ping.rb +0 -18
- data/lib/atome/renderers/renderer.rb +0 -15
- data/lib/atome/renderers/server/server.rb +0 -10
- data/lib/atome/renderers/server/utility.rb +0 -6
- data/vendor/assets/aui.rb +0 -5
- data/vendor/assets/r&d/misc.rb +0 -219
- data/vendor/assets/r&d/ping.rb +0 -3
- data/vendor/assets/r&d/storage.rb +0 -9
- data/vendor/assets/r&d/view_example.rb +0 -21
- data/vendor/assets/src/js/atome/atome_helpers/atome_communication.js +0 -40
- data/vendor/assets/src/medias/javascripts/test.js +0 -1
- data/vendor/assets/src/medias/rubies/demos.rb +0 -63
- data/vendor/assets/src/medias/rubies/examples/add.rb +0 -24
- data/vendor/assets/src/medias/rubies/examples/animation.rb +0 -81
- data/vendor/assets/src/medias/rubies/examples/atome_new.rb +0 -27
- data/vendor/assets/src/medias/rubies/examples/attach.rb +0 -15
- data/vendor/assets/src/medias/rubies/examples/attached.rb +0 -15
- data/vendor/assets/src/medias/rubies/examples/auto_height.rb +0 -5
- data/vendor/assets/src/medias/rubies/examples/auto_width.rb +0 -4
- data/vendor/assets/src/medias/rubies/examples/batch.rb +0 -17
- data/vendor/assets/src/medias/rubies/examples/blur.rb +0 -4
- data/vendor/assets/src/medias/rubies/examples/bottom.rb +0 -3
- data/vendor/assets/src/medias/rubies/examples/box.rb +0 -20
- data/vendor/assets/src/medias/rubies/examples/center.rb +0 -21
- data/vendor/assets/src/medias/rubies/examples/circle.rb +0 -3
- data/vendor/assets/src/medias/rubies/examples/class.rb +0 -13
- data/vendor/assets/src/medias/rubies/examples/clear.rb +0 -10
- data/vendor/assets/src/medias/rubies/examples/clone.rb +0 -35
- data/vendor/assets/src/medias/rubies/examples/code.rb +0 -11
- data/vendor/assets/src/medias/rubies/examples/color.rb +0 -73
- data/vendor/assets/src/medias/rubies/examples/create_atome_in_atome.rb +0 -13
- data/vendor/assets/src/medias/rubies/examples/cursor.rb +0 -7
- data/vendor/assets/src/medias/rubies/examples/delete.rb +0 -42
- data/vendor/assets/src/medias/rubies/examples/depth.rb +0 -6
- data/vendor/assets/src/medias/rubies/examples/detached.rb +0 -13
- data/vendor/assets/src/medias/rubies/examples/drag.rb +0 -98
- data/vendor/assets/src/medias/rubies/examples/drop.rb +0 -26
- data/vendor/assets/src/medias/rubies/examples/edit.rb +0 -12
- data/vendor/assets/src/medias/rubies/examples/element.rb +0 -6
- data/vendor/assets/src/medias/rubies/examples/empty_atome.rb +0 -12
- data/vendor/assets/src/medias/rubies/examples/fullscreen.rb +0 -15
- data/vendor/assets/src/medias/rubies/examples/grab.rb +0 -5
- data/vendor/assets/src/medias/rubies/examples/height.rb +0 -7
- data/vendor/assets/src/medias/rubies/examples/hide.rb +0 -7
- data/vendor/assets/src/medias/rubies/examples/id.rb +0 -14
- data/vendor/assets/src/medias/rubies/examples/image.rb +0 -8
- data/vendor/assets/src/medias/rubies/examples/left.rb +0 -7
- data/vendor/assets/src/medias/rubies/examples/link.rb +0 -22
- data/vendor/assets/src/medias/rubies/examples/markers.rb +0 -48
- data/vendor/assets/src/medias/rubies/examples/materials.rb +0 -15
- data/vendor/assets/src/medias/rubies/examples/matrix.rb +0 -102
- data/vendor/assets/src/medias/rubies/examples/matrix_changes.rb +0 -483
- data/vendor/assets/src/medias/rubies/examples/matrix_simple.rb +0 -32
- data/vendor/assets/src/medias/rubies/examples/monitoring.rb +0 -70
- data/vendor/assets/src/medias/rubies/examples/mute.rb +0 -22
- data/vendor/assets/src/medias/rubies/examples/on.rb +0 -26
- data/vendor/assets/src/medias/rubies/examples/opacity.rb +0 -5
- data/vendor/assets/src/medias/rubies/examples/over.rb +0 -21
- data/vendor/assets/src/medias/rubies/examples/pause.rb +0 -15
- data/vendor/assets/src/medias/rubies/examples/physical.rb +0 -19
- data/vendor/assets/src/medias/rubies/examples/play.rb +0 -15
- data/vendor/assets/src/medias/rubies/examples/read.rb +0 -11
- data/vendor/assets/src/medias/rubies/examples/refresh.rb +0 -8
- data/vendor/assets/src/medias/rubies/examples/remove.rb +0 -16
- data/vendor/assets/src/medias/rubies/examples/repeat.rb +0 -6
- data/vendor/assets/src/medias/rubies/examples/right.rb +0 -3
- data/vendor/assets/src/medias/rubies/examples/rotate.rb +0 -4
- data/vendor/assets/src/medias/rubies/examples/schedule.rb +0 -13
- data/vendor/assets/src/medias/rubies/examples/shadow.rb +0 -84
- data/vendor/assets/src/medias/rubies/examples/size.rb +0 -8
- data/vendor/assets/src/medias/rubies/examples/sort.rb +0 -18
- data/vendor/assets/src/medias/rubies/examples/style.rb +0 -4
- data/vendor/assets/src/medias/rubies/examples/tags.rb +0 -10
- data/vendor/assets/src/medias/rubies/examples/text.rb +0 -39
- data/vendor/assets/src/medias/rubies/examples/time.rb +0 -18
- data/vendor/assets/src/medias/rubies/examples/to_px.rb +0 -10
- data/vendor/assets/src/medias/rubies/examples/touch.rb +0 -56
- data/vendor/assets/src/medias/rubies/examples/vector.rb +0 -39
- data/vendor/assets/src/medias/rubies/examples/video.rb +0 -65
- data/vendor/assets/src/medias/rubies/examples/wait.rb +0 -8
- data/vendor/assets/src/medias/rubies/examples/web.rb +0 -13
- data/vendor/assets/src/medias/rubies/examples/width.rb +0 -6
- data/vendor/assets/src/medias/rubies/test.rb +0 -1
- data/vendor/assets/src/medias/rubies/text_read.rb +0 -1
- data/vendor/assets/src/medias/rubies/unstable/!run.rb +0 -16
- data/vendor/assets/src/medias/rubies/unstable/_2_solve.rb +0 -72
- data/vendor/assets/src/medias/rubies/unstable/_attach.rb +0 -12
- data/vendor/assets/src/medias/rubies/unstable/_audio.rb +0 -231
- data/vendor/assets/src/medias/rubies/unstable/_dataset.rb +0 -257
- data/vendor/assets/src/medias/rubies/unstable/_matrix.rb +0 -58
- data/vendor/assets/src/medias/rubies/unstable/_os.rb +0 -29
- data/vendor/assets/src/medias/rubies/unstable/_table2.rb +0 -108
- data/vendor/assets/src/medias/rubies/unstable/_vie.rb +0 -211
- data/vendor/assets/src/medias/rubies/users/code.rb +0 -6
- /data/lib/{atome/renderers → platform_specific}/opal/opal.rb +0 -0
- /data/lib/{atome/renderers → platform_specific}/opal/opal_parser.rb +0 -0
- /data/{vendor/assets/src/utilities/mode.rb → lib/renderers/html/communication.rb} +0 -0
- /data/{vendor/assets/src/medias/rubies/unstable/_test.rb → lib/renderers/html/security.rb} +0 -0
data/lib/atome/presets/atome.rb
CHANGED
@@ -5,51 +5,55 @@
|
|
5
5
|
# TODO: Factorise codes below
|
6
6
|
# TODO we must clarified/unified the usage of presets and sanitizer it is not clear
|
7
7
|
|
8
|
+
# additional Atome methods
|
8
9
|
class Atome
|
9
|
-
def atome_common(
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
10
|
+
def atome_common(atome_preset, params)
|
11
|
+
basic_params = { renderers: [] }
|
12
|
+
# TODO : remove Essentials.default_params[atome_preset] || {} as it is
|
13
|
+
# applied twice because preset is now a particle
|
14
|
+
preset_params = Essentials.default_params[atome_preset] || {}
|
15
|
+
|
16
|
+
basic_params[:type] = preset_params[:type] || :element
|
17
|
+
basic_params[:id] = params[:id] || identity_generator(atome_preset)
|
18
|
+
basic_params[:renderers] = @renderers || preset_params[:renderers]
|
19
|
+
essential_params = basic_params.merge(preset_params)
|
20
|
+
reordered_params = essential_params.reject { |key, _| params.has_key?(key) }
|
21
|
+
params = reordered_params.merge(params)
|
22
|
+
|
23
|
+
# condition to handle color/shadow/paint atomes that shouldn't be attach to view
|
24
|
+
# TODO : add category for atome( material/physical vs modifier : color, shadow, .. vs shape, image ..)
|
25
|
+
# then add condition same things fo code in genesis new_atome
|
26
|
+
if %i[color shadow paint].include?(atome_preset)
|
27
|
+
unless params[:affect]
|
28
|
+
params[:affect] = if @id == :view
|
29
|
+
[:black_matter]
|
30
|
+
else
|
31
|
+
[@id]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
else
|
35
|
+
params[:attach] = params[:attach] || @id || :view
|
20
36
|
end
|
37
|
+
params
|
38
|
+
end
|
21
39
|
|
22
|
-
|
23
|
-
|
40
|
+
def preset_common(params, &bloc)
|
41
|
+
# if an atome with current id exist we update the ID in the params
|
42
|
+
params[:id] = "#{params[:id]}_#{Universe.atomes.length}" if grab(params[:id])
|
43
|
+
Atome.new(params, &bloc)
|
24
44
|
end
|
25
45
|
|
26
46
|
def box(params = {}, &bloc)
|
27
|
-
|
28
|
-
params = atome_common(
|
29
|
-
|
30
|
-
Atome.new({ atome_type => params }, &bloc)
|
31
|
-
|
47
|
+
atome_preset = :box
|
48
|
+
params = atome_common(atome_preset, params)
|
49
|
+
preset_common(params, &bloc)
|
32
50
|
end
|
33
51
|
|
34
|
-
|
35
|
-
|
36
52
|
def circle(params = {}, &bloc)
|
37
|
-
|
38
|
-
params = atome_common(
|
39
|
-
|
40
|
-
Atome.new({ atome_type => params }, &bloc)
|
53
|
+
atome_preset = :circle
|
54
|
+
params = atome_common(atome_preset, params)
|
55
|
+
preset_common(params, &bloc)
|
41
56
|
end
|
42
|
-
|
43
|
-
|
44
|
-
def vector(params = {}, &bloc)
|
45
|
-
atome_type = :vector
|
46
|
-
params = atome_common(atome_type, params)
|
47
|
-
# send(params[:type],params, &bloc )
|
48
|
-
Atome.new({ atome_type => params }, &bloc)
|
49
|
-
|
50
|
-
|
51
|
-
end
|
52
|
-
|
53
57
|
end
|
54
58
|
|
55
59
|
|
data/lib/atome/version.rb
CHANGED
data/lib/atome.rb
CHANGED
@@ -1,37 +1,37 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
|
4
|
+
# require without relative is needed when using Opal
|
3
5
|
require 'fileutils'
|
4
6
|
require 'securerandom'
|
5
7
|
require 'atome/version'
|
6
8
|
require 'atome/genesis/genesis'
|
7
|
-
require 'atome/kernel/
|
9
|
+
require 'atome/kernel/black_matter'
|
8
10
|
require 'atome/kernel/universe'
|
9
|
-
require 'atome/kernel/batch'
|
10
11
|
require 'atome/helpers/essentials'
|
11
|
-
require '
|
12
|
+
require 'renderers/renderer'
|
12
13
|
require 'atome/helpers/color_helper/color'
|
13
14
|
require 'atome/extensions/atome'
|
14
|
-
require 'atome/extensions/
|
15
|
+
require 'atome/extensions/mathematics'
|
15
16
|
require 'atome/atome'
|
16
|
-
require 'atome/helpers/callbacks'
|
17
17
|
require 'atome/genesis/generators/atome'
|
18
18
|
require 'atome/presets/atome'
|
19
19
|
require 'atome/genesis/generators/communication'
|
20
20
|
require 'atome/genesis/generators/effect'
|
21
21
|
require 'atome/genesis/generators/event'
|
22
22
|
require 'atome/genesis/generators/geometry'
|
23
|
+
require 'atome/genesis/generators/hierarchy'
|
23
24
|
require 'atome/genesis/generators/identity'
|
24
25
|
require 'atome/genesis/generators/material'
|
26
|
+
require 'atome/genesis/generators/property'
|
27
|
+
require 'atome/genesis/generators/security'
|
25
28
|
require 'atome/genesis/generators/spatial'
|
26
29
|
require 'atome/genesis/generators/time'
|
27
30
|
require 'atome/genesis/generators/utility'
|
28
31
|
require 'atome/helpers/utilities'
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
require 'atome/renderers/headless/headless'
|
34
|
-
require 'atome/renderers/server/server'
|
35
|
-
require 'atome/extensions/matrix'
|
32
|
+
require 'atome/helpers/security'
|
33
|
+
require 'renderers/html/index'
|
34
|
+
require 'renderers/headless/index'
|
35
|
+
require 'renderers/server/index'
|
36
36
|
require 'atome/helpers/sanitizer'
|
37
37
|
require 'atome/genesis/sparkle'
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# relative is needed when using ruby wasm
|
4
|
+
require 'fileutils'
|
5
|
+
require 'securerandom'
|
6
|
+
require_relative './atome/version'
|
7
|
+
require_relative './atome/genesis/genesis'
|
8
|
+
require_relative 'atome/kernel/black_matter'
|
9
|
+
require_relative './atome/kernel/universe'
|
10
|
+
require_relative './atome/helpers/essentials'
|
11
|
+
require_relative './renderers/renderer'
|
12
|
+
require_relative './atome/helpers/color_helper/color'
|
13
|
+
require_relative './atome/extensions/atome'
|
14
|
+
require_relative './atome/extensions/mathematics'
|
15
|
+
require_relative './atome/atome'
|
16
|
+
require_relative './atome/genesis/generators/atome'
|
17
|
+
require_relative './atome/presets/atome'
|
18
|
+
require_relative './atome/genesis/generators/communication'
|
19
|
+
require_relative './atome/genesis/generators/effect'
|
20
|
+
require_relative './atome/genesis/generators/event'
|
21
|
+
require_relative './atome/genesis/generators/geometry'
|
22
|
+
require_relative './atome/genesis/generators/hierarchy'
|
23
|
+
require_relative './atome/genesis/generators/identity'
|
24
|
+
require_relative './atome/genesis/generators/material'
|
25
|
+
require_relative './atome/genesis/generators/property'
|
26
|
+
require_relative './atome/genesis/generators/security'
|
27
|
+
require_relative './atome/genesis/generators/spatial'
|
28
|
+
require_relative './atome/genesis/generators/time'
|
29
|
+
require_relative './atome/genesis/generators/utility'
|
30
|
+
require_relative './atome/helpers/utilities'
|
31
|
+
require_relative './atome/helpers/security'
|
32
|
+
require_relative './renderers/html/index_relative'
|
33
|
+
require_relative './renderers/headless/index_relative'
|
34
|
+
require_relative './renderers/server/index_relative'
|
35
|
+
require_relative './atome/helpers/sanitizer'
|
36
|
+
require_relative './atome/genesis/sparkle'
|
@@ -3,11 +3,18 @@
|
|
3
3
|
# rgb utility
|
4
4
|
class Atome
|
5
5
|
def rgb_html(string)
|
6
|
-
`
|
7
|
-
col = w3color(#{string});
|
8
|
-
rgb_col=col.toRgb();
|
9
|
-
return Opal.hash(rgb_col)
|
10
|
-
`
|
6
|
+
# `
|
7
|
+
# col = w3color(#{string});
|
8
|
+
# rgb_col=col.toRgb();
|
9
|
+
# return Opal.hash(rgb_col)
|
10
|
+
# `
|
11
|
+
js_code = <<-JS
|
12
|
+
var col = w3color('#{string}');
|
13
|
+
var rgb_col = col.toRgb();
|
14
|
+
return rgb_col;
|
15
|
+
JS
|
16
|
+
|
17
|
+
JS.eval(js_code)
|
11
18
|
end
|
12
19
|
|
13
20
|
def to_rgb(string)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# JS add on specific to Opal
|
4
|
+
module JS
|
5
|
+
|
6
|
+
def self.eval(string)
|
7
|
+
clean_str = string.gsub('return', '')
|
8
|
+
result = `eval(#{clean_str})`
|
9
|
+
native_result = Native(result)
|
10
|
+
native_result
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.global
|
14
|
+
JS.eval('window')
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Add on the Atome class
|
4
|
+
class Atome
|
5
|
+
def ping(my_proc = false)
|
6
|
+
instance_exec(my_proc) if my_proc.is_a?(Proc)
|
7
|
+
# ` var p = new Ping();
|
8
|
+
# p.ping('https://'+#{address}+'', function (err, data) {
|
9
|
+
# if (err) {
|
10
|
+
# return false;
|
11
|
+
# } else {
|
12
|
+
# console.log("the site "+#{address}+" is up!");
|
13
|
+
# }
|
14
|
+
# });
|
15
|
+
# `
|
16
|
+
js_code = <<-JS
|
17
|
+
var p = new Ping();
|
18
|
+
p.ping('https://' + "#{address}" + '', function (err, data) {
|
19
|
+
if (err) {
|
20
|
+
return false;
|
21
|
+
} else {
|
22
|
+
console.log("the site " + "#{address}" + " is up!");
|
23
|
+
}
|
24
|
+
});
|
25
|
+
JS
|
26
|
+
|
27
|
+
# Exécute le code JavaScript
|
28
|
+
JS.eval(js_code)
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
@@ -3,8 +3,10 @@
|
|
3
3
|
# addon for the Atome class
|
4
4
|
class Atome
|
5
5
|
def calculate_sha(string)
|
6
|
-
if RUBY_ENGINE.downcase == 'opal'
|
7
|
-
`sha256(#{string})`
|
6
|
+
if RUBY_ENGINE.downcase == 'opal' || 'wasm32-wasi'
|
7
|
+
# `sha256(#{string})`
|
8
|
+
js_code = "sha256('#{string}')"
|
9
|
+
JS.eval(js_code)
|
8
10
|
else
|
9
11
|
Digest::SHA256.hexdigest(string)
|
10
12
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
def alert(val)
|
4
|
+
escaped_val = val.to_s.gsub("'", "\\'").gsub("\n", "\\n")
|
5
|
+
JS.eval("alert('#{escaped_val}')")
|
6
|
+
end
|
7
|
+
|
8
|
+
# dummy object to allow code parity with Opal when using Native Object with wasm
|
9
|
+
def Native(obj)
|
10
|
+
obj
|
11
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# add renderer html to atome
|
3
|
+
|
4
|
+
# headless rendering for atome
|
5
|
+
class Atome
|
6
|
+
def headless(_val = nil); end
|
7
|
+
end
|
8
|
+
|
9
|
+
# this class is aimed at headless rendering
|
10
|
+
class Headless
|
11
|
+
|
12
|
+
def initialize(id_found, current_atome)
|
13
|
+
@element ||= self
|
14
|
+
@id = id_found
|
15
|
+
@original_atome = current_atome
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Atome
|
4
|
+
def html(obj = nil)
|
5
|
+
if obj
|
6
|
+
@html = obj
|
7
|
+
else
|
8
|
+
@html
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def to_px(particle)
|
13
|
+
ruby_wasm_code = <<-JS
|
14
|
+
var div = document.getElementById("#{@id}");
|
15
|
+
var style = window.getComputedStyle(div);
|
16
|
+
var original_value = style.getPropertyValue("#{particle}");
|
17
|
+
var parsed_value = parseInt(original_value);
|
18
|
+
return parsed_value;
|
19
|
+
JS
|
20
|
+
JS.eval(ruby_wasm_code).to_f
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
new({ renderer: :html, method: :smooth, type: :string }) do |value, _user_proc|
|
4
|
+
# alert :ici
|
5
|
+
format_params = case value
|
6
|
+
when Array
|
7
|
+
data_collected = []
|
8
|
+
value.each do |param|
|
9
|
+
data_collected << "#{param}px"
|
10
|
+
end
|
11
|
+
data_collected.join(' ')
|
12
|
+
when Integer
|
13
|
+
"#{value}px"
|
14
|
+
else
|
15
|
+
if value.is_a?(String) && value.end_with?('%')
|
16
|
+
value
|
17
|
+
else
|
18
|
+
"#{value}px"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
html.style('border-radius', format_params)
|
22
|
+
end
|
23
|
+
|
24
|
+
new({ renderer: :html, method: :blur, type: :integer }) do |value, _user_proc|
|
25
|
+
html.filter(:blur, "#{value}px")
|
26
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
new({ method: :drag, type: :symbol, renderer: :html }) do |params|
|
4
|
+
option = @drag[params]
|
5
|
+
html.event(:drag, params, option)
|
6
|
+
end
|
7
|
+
|
8
|
+
new({ method: :drop, type: :symbol, renderer: :html }) do |params|
|
9
|
+
option = @drop[params]
|
10
|
+
html.event(:drop, params, option)
|
11
|
+
end
|
12
|
+
|
13
|
+
new({ method: :touch, type: :integer, renderer: :html }) do |params|
|
14
|
+
option = @touch[params]
|
15
|
+
html.event(:touch, params, option)
|
16
|
+
end
|
17
|
+
|
18
|
+
new({ method: :over, type: :integer, renderer: :html }) do |params|
|
19
|
+
option = @over[params]
|
20
|
+
html.event(:over, params, option)
|
21
|
+
end
|
22
|
+
|
23
|
+
new({ method: :keyboard, renderer: :html }) do |params|
|
24
|
+
option = @keyboard[params]
|
25
|
+
html.event(:keyboard, params, option)
|
26
|
+
end
|
27
|
+
|
28
|
+
new({ method: :play, renderer: :html }) do |params = true|
|
29
|
+
option = @play[params]
|
30
|
+
# html.currentTime(params, option) if params != true
|
31
|
+
html.action(:play, params, option)
|
32
|
+
# params
|
33
|
+
end
|
34
|
+
|
35
|
+
new({ method: :on, renderer: :html }) do |params|
|
36
|
+
option = @on[params]
|
37
|
+
html.on(params, option)
|
38
|
+
end
|
39
|
+
|
40
|
+
new({ method: :resize, renderer: :html }) do |params, user_bloc|
|
41
|
+
option = @resize[params]
|
42
|
+
html.resize(params, option)
|
43
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
new({ method: :width, type: :integer, renderer: :html }) do |value, _user_proc|
|
4
|
+
unit_found = unit[:width]
|
5
|
+
if unit_found
|
6
|
+
html.style(:width, "#{value}#{unit_found}")
|
7
|
+
elsif value.instance_of? Integer
|
8
|
+
html.style(:width, "#{value}px")
|
9
|
+
else
|
10
|
+
html.style(:width, value)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
new({ method: :height, renderer: :html, type: :string }) do |value, _user_proc|
|
15
|
+
unit_found = unit[:height]
|
16
|
+
if unit_found
|
17
|
+
html.style(:height, "#{value}#{unit_found}")
|
18
|
+
elsif value.instance_of? Integer
|
19
|
+
html.style(:height, "#{value}px")
|
20
|
+
else
|
21
|
+
html.style(:height, value)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
new({ method: :size, type: :hash, renderer: :html }) do |value, _user_proc|
|
26
|
+
# html.style('fontSize',"#{value}px")
|
27
|
+
end
|
28
|
+
|
29
|
+
new({ method: :size, type: :int, renderer: :html, specific: :text }) do |value, _user_proc|
|
30
|
+
html.style('fontSize', "#{value}px")
|
31
|
+
end
|