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
@@ -0,0 +1,24 @@
|
|
1
|
+
Important, please note that almost all requests for JavaScript code will have to be translated into Ruby Wasm, which is the common denominator between Opal and Ruby Wasm. This is because any code written for Ruby Wasm will work with Opal, whereas the reverse is not true. For example, a code with backticks will not work. Can you take this into account each time you are asked for code?
|
2
|
+
|
3
|
+
The most important thing is to never use backticks for interpreting JavaScript code in a Ruby environment; instead, use JS.eval.
|
4
|
+
|
5
|
+
please ask me some question for you to better understand atome? one question at a time please
|
6
|
+
|
7
|
+
|
8
|
+
je viens de te communiquer un fichier zip nommé atome peux tu analyser et le faire un retour , jai supprimé quelques fichier trop volumineux qui sont juste des fichiers sources nécessaires a construction dune application native ou les sources Wasm mais ces fichiers sont aucune incidence sur la façon de programmer ou utiliser atome
|
9
|
+
oui il faut que tu analyse plus en datives et surtout lire et comprendre le code contenue dans les fichiers en particuliers la partie du code la plus importante est dans lib , le dossier examples est lui aussi important car il montre comment les utilisateurs peuvent se servir d'atome
|
10
|
+
|
11
|
+
note que example est dans vendor/assets/application/examples
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
lorsqu'une personne se designe comme utilisateurs ou si tu pense qu'elle est plus utilisateur que que devellopeur , tu devras lui fournir un code calqué sur le code trouvé dans les exemples , ici : vendor/assets/application/examples
|
16
|
+
lorsqu'une personne se designe comme devellopeur ou si tu pense qu'elle est plus devellopeur que qu'utilisateur decars trouver des solutions similaire a ce que l'on trouve dans le dossier lib/atome/genesis/generators
|
17
|
+
|
18
|
+
as tu remarqué que le core du framework fait appel a beaucoup de meta programmation est ce que cela ne te gene pas pour comprendre le core d'atome? la grosse partie comprenant de la meta programmation se trouve dans lib/atome.atome.rb et dans lib/atome/helpers/utilities.rb et aussi lib/atome/genesis/genesis.rb
|
19
|
+
|
20
|
+
please this is important to note that within the HTML class @element is a js object, @id is both the id of the atome and the id of the html object
|
21
|
+
finally @original_atome is used to acces the atome from the HTML class
|
22
|
+
|
23
|
+
Q: What are some common types of projects or applications that users typically create using Atome?
|
24
|
+
A: anything , the aim is to replace a ful operating system and all applications possible its a productivity booster, it's aim is to make any task easier and more consistent tan actual solution , without having to deal with computing problems such as file format , format conversion storage , remove all computer (non human ) related concepts such as file extension, conversion , file transfer, ..
|
@@ -0,0 +1,272 @@
|
|
1
|
+
# In the context of the Atome framework, when you provide code, debug, or give examples, in fact, whenever there are comments in the code, please always write these comments in English.
|
2
|
+
|
3
|
+
# here how to use a callback between ruby and javascript with binding and unbinding :
|
4
|
+
|
5
|
+
# example with the over method
|
6
|
+
# the method below add an event listener and trig the code found in the @original_atome.over_code[:enter]
|
7
|
+
def over_enter(_option)
|
8
|
+
@over_enter = @original_atome.instance_variable_get('@over_code')[:enter]
|
9
|
+
return unless @over_enter
|
10
|
+
@over_enter_callback = lambda do |event|
|
11
|
+
@original_atome.instance_exec(event, &@over_enter) if @over_enter.is_a? Proc
|
12
|
+
end
|
13
|
+
@element.addEventListener('mouseenter', @over_enter_callback)
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
# you can unbind using the method below
|
18
|
+
def remove_over_enter(_option)
|
19
|
+
return unless @over_enter_callback
|
20
|
+
# Remove the event listener using the same lambda
|
21
|
+
@element.removeEventListener('mouseenter', @over_enter_callback)
|
22
|
+
@over_enter_callback = nil
|
23
|
+
@over_enter = nil
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
# please note that in the HTML class instance @element is always the current HTML object and is always define
|
28
|
+
# You forget every time - one should never suggest using backticks to interpolate JS code. How can you integrate this?
|
29
|
+
|
30
|
+
# Here is how to use direct JavaScript methods in a Ruby environment:
|
31
|
+
|
32
|
+
# Remember that you can use a variety of JavaScript methods without resorting to eval. For instance, for an EventListener:
|
33
|
+
|
34
|
+
@element.addEventListener('mouseleave', lambda do |event|
|
35
|
+
@original_atome.instance_exec('my_params', &@over_leave) if @over_leave.is_a?(Proc)
|
36
|
+
end)
|
37
|
+
# Or for appending a child:
|
38
|
+
|
39
|
+
def append_to(parent_id_found)
|
40
|
+
parent_found = JS.global[:document].getElementById(parent_id_found.to_s)
|
41
|
+
parent_found.appendChild(@element)
|
42
|
+
self
|
43
|
+
end
|
44
|
+
|
45
|
+
# These examples demonstrate the integration of JavaScript functionality in a Ruby environment,
|
46
|
+
# allowing for the use of JavaScript methods and events directly.
|
47
|
+
|
48
|
+
# Here is an example of a callback when used with the over particle:
|
49
|
+
|
50
|
+
def over_leave(_option)
|
51
|
+
@over_leave = @original_atome.over_code[:leave]
|
52
|
+
@element.addEventListener('mouseleave', lambda do |event|
|
53
|
+
@original_atome.instance_exec(event, &@over_leave) if @over_leave.is_a?(Proc)
|
54
|
+
end)
|
55
|
+
end
|
56
|
+
|
57
|
+
# This is also important because callbacks are often used. Try to remember this
|
58
|
+
|
59
|
+
# Here is a series of examples of basic methods for you to understand how use JavaScript from Ruby
|
60
|
+
# this example of callback is true when we have to deal with interoperability between ruby and javascript
|
61
|
+
|
62
|
+
class HTML
|
63
|
+
|
64
|
+
def initialize(id_found, current_atome)
|
65
|
+
@element ||= JS.global[:document].getElementById(id_found.to_s)
|
66
|
+
@id = id_found
|
67
|
+
@original_atome = current_atome
|
68
|
+
end
|
69
|
+
|
70
|
+
def attr(attribute, value)
|
71
|
+
@element.setAttribute(attribute.to_s, value.to_s)
|
72
|
+
self
|
73
|
+
end
|
74
|
+
|
75
|
+
def add_class(class_to_add)
|
76
|
+
@element[:classList].add(class_to_add.to_s)
|
77
|
+
self
|
78
|
+
end
|
79
|
+
|
80
|
+
def id(id)
|
81
|
+
attr('id', id)
|
82
|
+
self
|
83
|
+
end
|
84
|
+
|
85
|
+
# to create a html div or H1 or any other tag the tag is found in the @original_atome.markup instance variable
|
86
|
+
def shape(id)
|
87
|
+
#
|
88
|
+
# we remove any element if the id already exist
|
89
|
+
check_double(id)
|
90
|
+
markup_found = @original_atome.markup || :div
|
91
|
+
@element_type = markup_found.to_s
|
92
|
+
@element = JS.global[:document].createElement(@element_type)
|
93
|
+
JS.global[:document][:body].appendChild(@element)
|
94
|
+
add_class('atome')
|
95
|
+
id(id)
|
96
|
+
self
|
97
|
+
end
|
98
|
+
|
99
|
+
# below here is how to create various html tag
|
100
|
+
def text(id)
|
101
|
+
# we remove any element if the id already exist
|
102
|
+
check_double(id)
|
103
|
+
markup_found = @original_atome.markup || :pre
|
104
|
+
@element_type = markup_found.to_s
|
105
|
+
@element = JS.global[:document].createElement(@element_type)
|
106
|
+
JS.global[:document][:body].appendChild(@element)
|
107
|
+
add_class('atome')
|
108
|
+
id(id)
|
109
|
+
self
|
110
|
+
end
|
111
|
+
|
112
|
+
def image(id)
|
113
|
+
# we remove any element if the id already exist
|
114
|
+
check_double(id)
|
115
|
+
markup_found = @original_atome.markup || :img
|
116
|
+
@element_type = markup_found.to_s
|
117
|
+
@element = JS.global[:document].createElement(@element_type)
|
118
|
+
JS.global[:document][:body].appendChild(@element)
|
119
|
+
add_class('atome')
|
120
|
+
self.id(id)
|
121
|
+
self
|
122
|
+
end
|
123
|
+
|
124
|
+
def video(id)
|
125
|
+
# we remove any element if the id already exist
|
126
|
+
check_double(id)
|
127
|
+
markup_found = @original_atome.markup || :video
|
128
|
+
@element_type = markup_found.to_s
|
129
|
+
@element = JS.global[:document].createElement(@element_type)
|
130
|
+
JS.global[:document][:body].appendChild(@element)
|
131
|
+
add_class('atome')
|
132
|
+
self.id(id)
|
133
|
+
self
|
134
|
+
end
|
135
|
+
|
136
|
+
def www(id)
|
137
|
+
# we remove any element if the id already exist
|
138
|
+
check_double(id)
|
139
|
+
markup_found = @original_atome.markup || :iframe
|
140
|
+
@element_type = markup_found.to_s
|
141
|
+
@element = JS.global[:document].createElement(@element_type)
|
142
|
+
JS.global[:document][:body].appendChild(@element)
|
143
|
+
add_class('atome')
|
144
|
+
@element.setAttribute('src', 'https://www.youtube.com/embed/lLeQZ8Llkso?si=MMsGBEXELy9yBl9R')
|
145
|
+
# below we get image to feed width and height if needed
|
146
|
+
# image = JS.global[:Image].new
|
147
|
+
self.id(id)
|
148
|
+
self
|
149
|
+
end
|
150
|
+
|
151
|
+
def svg(id)
|
152
|
+
# we remove any element if the id already exist
|
153
|
+
check_double(id)
|
154
|
+
markup_found = @original_atome.markup || 'svg'
|
155
|
+
@element_type = markup_found.to_s
|
156
|
+
svg_ns = "http://www.w3.org/2000/svg"
|
157
|
+
@element = JS.global[:document].createElementNS(svg_ns, "svg")
|
158
|
+
JS.global[:document][:body].appendChild(@element)
|
159
|
+
@element.setAttribute('viewBox', '0 0 1024 1024')
|
160
|
+
@element.setAttribute('version', '1.1')
|
161
|
+
add_class('atome')
|
162
|
+
self.id(id)
|
163
|
+
self
|
164
|
+
end
|
165
|
+
|
166
|
+
def svg_data(data)
|
167
|
+
data.each do |type_passed, datas|
|
168
|
+
svg_ns = "http://www.w3.org/2000/svg"
|
169
|
+
new_path = JS.global[:document].createElementNS(svg_ns.to_s, type_passed.to_s)
|
170
|
+
JS.global[:document][:body].appendChild(new_path)
|
171
|
+
datas.each do |property, value|
|
172
|
+
new_path.setAttribute(property.to_s, value.to_s)
|
173
|
+
end
|
174
|
+
@element.appendChild(new_path)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
def update_svg_data(data)
|
179
|
+
data.each do |type_passed, datas|
|
180
|
+
element_to_update = JS.global[:document].getElementById(type_passed.to_s)
|
181
|
+
datas.each do |property, value|
|
182
|
+
element_to_update.setAttribute(property.to_s, value.to_s)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
def colorize_svg_data(data)
|
188
|
+
command = <<-JS
|
189
|
+
let svgElement = document.getElementById("#{@id}");
|
190
|
+
if (!svgElement) {
|
191
|
+
return [];
|
192
|
+
}
|
193
|
+
var children = svgElement.children;
|
194
|
+
var ids = [];
|
195
|
+
for (var i = 0; i < children.length; i++) {
|
196
|
+
var element = document.getElementById(children[i].id); // Récupérer l'élément par son ID
|
197
|
+
if (element) {
|
198
|
+
element.setAttribute('fill', '#{data}'); // Modifier l'attribut fill
|
199
|
+
element.setAttribute('stroke', '#{data}'); // Modifier l'attribut stroke
|
200
|
+
}
|
201
|
+
ids.push(children[i].id);
|
202
|
+
}
|
203
|
+
return ids
|
204
|
+
JS
|
205
|
+
JS.eval(command)
|
206
|
+
end
|
207
|
+
|
208
|
+
def raw_data(html_string)
|
209
|
+
@element[:innerHTML] = html_string
|
210
|
+
end
|
211
|
+
|
212
|
+
def video_path(video_path, type = 'video/mp4')
|
213
|
+
source = JS.global[:document].createElement('source')
|
214
|
+
source.setAttribute('src', video_path)
|
215
|
+
source.setAttribute('type', type)
|
216
|
+
@element.appendChild(source)
|
217
|
+
end
|
218
|
+
|
219
|
+
def sanitize_text(text)
|
220
|
+
text.to_s
|
221
|
+
.gsub('&', '&')
|
222
|
+
.gsub('<', '<')
|
223
|
+
.gsub('>', '>')
|
224
|
+
.gsub('"', '"')
|
225
|
+
.gsub("'", ''')
|
226
|
+
end
|
227
|
+
|
228
|
+
def innerText(data)
|
229
|
+
sanitized_data = sanitize_text(data.to_s)
|
230
|
+
@element[:innerText] = sanitized_data
|
231
|
+
end
|
232
|
+
|
233
|
+
def textContent(data)
|
234
|
+
@element[:textContent] = data
|
235
|
+
end
|
236
|
+
|
237
|
+
def path(objet_path)
|
238
|
+
@element.setAttribute('src', objet_path)
|
239
|
+
# below we get image to feed width and height if needed
|
240
|
+
# image = JS.global[:Image].new
|
241
|
+
@element[:src] = objet_path
|
242
|
+
@element[:onload] = lambda do |_event|
|
243
|
+
@element[:width]
|
244
|
+
@element[:height]
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
def transform(property, value = nil)
|
249
|
+
transform_needed = "#{property}(#{value}deg)"
|
250
|
+
@element[:style][:transform] = transform_needed.to_s
|
251
|
+
end
|
252
|
+
|
253
|
+
def style(property, value = nil)
|
254
|
+
if value
|
255
|
+
@element[:style][property] = value.to_s
|
256
|
+
elsif value.nil?
|
257
|
+
@element[:style][property]
|
258
|
+
else
|
259
|
+
# If value is explicitly set to false, remove the property
|
260
|
+
command = "document.getElementById('#{@id}').style.removeProperty('#{property}')"
|
261
|
+
JS.eval(command)
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
def filter(property, value)
|
266
|
+
filter_needed = "#{property}(#{value})"
|
267
|
+
@element[:style][:filter] = filter_needed
|
268
|
+
end
|
269
|
+
|
270
|
+
end
|
271
|
+
|
272
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
curl -LO https://github.com/ruby/ruby.wasm/releases/latest/download/ruby-3_2-wasm32-unknown-wasi-full-js.tar.gz
|
4
|
+
tar xfz ruby-3_2-wasm32-unknown-wasi-full-js.tar.gz
|
5
|
+
|
6
|
+
|
7
|
+
rm -f ./vendor/assets/src/wasm/ruby/ruby_browser.wasm
|
8
|
+
rm -f ./system_ruby_browser.wasm
|
9
|
+
mv 3_2-wasm32-unknown-wasi-full-js/usr/local/bin/ruby system_ruby_browser.wasm
|
10
|
+
|
11
|
+
wasi-vfs pack system_ruby_browser.wasm --mapdir /lib::./lib/ --mapdir /src::./vendor/assets/src/medias/rubies --mapdir /usr::./3_2-wasm32-unknown-wasi-full-js/usr -o vendor/assets/src/wasm/ruby/ruby_browser.wasm
|
12
|
+
cp ./vendor/assets/src/wasm/ruby/ruby_browser.wasm ./test/test_app/src/wasm/ruby/ruby_browser.wasm
|
13
|
+
|
14
|
+
|
@@ -65,7 +65,7 @@ atome framework is looking for the rendering method named "glow_html" we explai
|
|
65
65
|
|
66
66
|
Finally we have to manually create the rendering method in our renderer by default the HTML render is used
|
67
67
|
|
68
|
-
so we have to go to "atome/lib/
|
68
|
+
so we have to go to "atome/lib/renderers/html/properties/" the open "effect.rb" as we want to create an effect renderer
|
69
69
|
|
70
70
|
So in the "effect.rb" file we had the method name "glow_html" (the newly atome name suffixed with "_html" for html rendering)
|
71
71
|
|
@@ -3,7 +3,14 @@
|
|
3
3
|
[Main menu](../atome.md)
|
4
4
|
-
|
5
5
|
</div>
|
6
|
+
prerequisity:
|
6
7
|
|
8
|
+
ruby :
|
9
|
+
wasmtime:
|
10
|
+
curl https://wasmtime.dev/install.sh -sSf | bash
|
11
|
+
wasi :
|
12
|
+
brew tap kateinoigakukun/wasi-vfs https://github.com/kateinoigakukun/wasi-vfs.git
|
13
|
+
brew install kateinoigakukun/wasi-vfs/wasi-vfs
|
7
14
|
**[- first steps](./first_steps.md)**
|
8
15
|
-
|
9
16
|
|