atome 0.5.4.1.9 → 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/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 -177
- 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 -95
- 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 -32
- 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
@@ -1,160 +1,180 @@
|
|
1
|
-
const atomeJS = Object.assign(
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
//
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
//
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
//
|
38
|
-
|
39
|
-
//
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
//
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
//
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
//
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
//
|
1
|
+
const atomeJS = Object.assign(communication, File);
|
2
|
+
|
3
|
+
// generic callback method
|
4
|
+
|
5
|
+
|
6
|
+
async function callback(callback_method, cmd) {
|
7
|
+
let ruby_callback_method = 'A.callback(:' + callback_method + ')'
|
8
|
+
let instance_variable_to_set = '@' + callback_method + '_code'
|
9
|
+
let cmd_result;
|
10
|
+
try {
|
11
|
+
let response;
|
12
|
+
response = await 'ok'
|
13
|
+
cmd_result = response;
|
14
|
+
} catch (error) {
|
15
|
+
cmd_result = error;
|
16
|
+
}
|
17
|
+
rubyVMCallback("Atome.instance_variable_set('" + instance_variable_to_set + "','" + cmd_result + "')")
|
18
|
+
rubyVMCallback(ruby_callback_method)
|
19
|
+
}
|
20
|
+
|
21
|
+
//read file
|
22
|
+
|
23
|
+
|
24
|
+
async function readFile(atome_id, filePath) {
|
25
|
+
let fileContent;
|
26
|
+
try {
|
27
|
+
fileContent = await window.__TAURI__.invoke('read_file', {filePath: filePath});
|
28
|
+
} catch (error) {
|
29
|
+
fileContent = error;
|
30
|
+
}
|
31
|
+
// alert(fileContent);
|
32
|
+
rubyVMCallback("grab(:" + atome_id + ").callback({ read: '" + fileContent + "' })");
|
33
|
+
rubyVMCallback("grab(:" + atome_id + ").call(:read)");
|
34
|
+
}
|
35
|
+
|
36
|
+
|
37
|
+
// list folder
|
38
|
+
|
39
|
+
// almost works
|
40
|
+
async function browseFile(atome_id, directoryPath) {
|
41
|
+
let directoryContent;
|
42
|
+
try {
|
43
|
+
directoryContent = await window.__TAURI__.invoke('list_directory_content', {directoryPath: directoryPath});
|
44
|
+
} catch (error) {
|
45
|
+
directoryContent = error;
|
46
|
+
}
|
47
|
+
rubyVMCallback("grab(:" + atome_id + ").callback({ browse: '" + directoryContent + "' })");
|
48
|
+
rubyVMCallback("grab(:" + atome_id + ").call(:browse)");
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
// change dir
|
53
|
+
|
54
|
+
async function changeCurrentDirectory(atome_id, newPath) {
|
55
|
+
let result;
|
56
|
+
try {
|
57
|
+
// Utilisez Tauri pour changer le répertoire de travail courant
|
58
|
+
result = await window.__TAURI__.invoke('change_dir', {path: newPath});
|
59
|
+
} catch (error) {
|
60
|
+
result = error;
|
61
|
+
}
|
62
|
+
alert(result);
|
63
|
+
}
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
// Terminal
|
69
|
+
|
70
|
+
async function terminal(atome_id, cmd) {
|
71
|
+
let cmd_result;
|
72
|
+
try {
|
73
|
+
const command = cmd;
|
74
|
+
let response;
|
75
|
+
response = await window.__TAURI__.invoke('execute_command', {command});
|
76
|
+
cmd_result = response;
|
77
|
+
} catch (error) {
|
78
|
+
cmd_result = error;
|
79
|
+
}
|
80
|
+
cmd_result = cmd_result.replace(/\r?\n/g, "");
|
81
|
+
|
82
|
+
rubyVMCallback("grab(:" + atome_id + ").callback({ terminal: '" + cmd_result + "' })");
|
83
|
+
rubyVMCallback("grab(:" + atome_id + ").call(:terminal)");
|
84
|
+
|
85
|
+
}
|
86
|
+
|
87
|
+
|
88
|
+
function distant_terminal(id, cmd) {
|
89
|
+
let myd_data_test = 'Terminal particle will soon be implemented when using a non native mode\nYou can switch to OSX to test';
|
90
|
+
let call_back_to_send = `grab(:${id}).callback({terminal: "${myd_data_test}"})`
|
91
|
+
let call = `grab(:${id}).call(:terminal)`
|
92
|
+
rubyVMCallback(call_back_to_send)
|
93
|
+
rubyVMCallback(call)
|
94
|
+
}
|
95
|
+
|
96
|
+
|
97
|
+
// we check if we are in tauri context
|
98
|
+
// if (typeof window.__TAURI__ !== 'undefined') {
|
99
|
+
// callExecuteCommand('pwd');
|
98
100
|
//
|
101
|
+
// } else {
|
99
102
|
// }
|
100
103
|
|
101
104
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
//
|
106
|
-
//
|
107
|
-
//
|
108
|
-
//
|
109
|
-
//
|
110
|
-
//
|
111
|
-
//
|
112
|
-
//
|
113
|
-
//
|
114
|
-
//
|
115
|
-
//
|
116
|
-
//
|
117
|
-
//
|
118
|
-
//
|
119
|
-
// // alert ('Suoer cool!!'+val)
|
120
|
-
// // alert(atomeJS)
|
121
|
-
// return (val);
|
122
|
-
// }, 0);
|
123
|
-
//
|
124
|
-
// $def(self, '$way', function $way() {
|
125
|
-
// // getter code below
|
126
|
-
// return (self.my_var);
|
127
|
-
// }, 0);
|
128
|
-
//
|
129
|
-
// return $def(self, '$way=', function $way(val) {
|
130
|
-
// //self method example
|
131
|
-
// return (self.my_var = val);
|
132
|
-
// }, 0);
|
133
|
-
//
|
134
|
-
//
|
135
|
-
// })();
|
136
|
-
//
|
137
|
-
// // new class below
|
138
|
-
// return (function ($base, $super) {
|
139
|
-
// const self = $klass($base, $super, 'Atome');
|
140
|
-
//
|
141
|
-
// $defs(self, '$verif', function $$verif(val) {
|
142
|
-
// //self method example
|
143
|
-
// return (val);
|
144
|
-
// }, 0);
|
105
|
+
// 'ls -l'
|
106
|
+
|
107
|
+
|
108
|
+
//read/write
|
109
|
+
//
|
110
|
+
// // Créer un fichier
|
111
|
+
// async function createAndWriteFile(filePath, contentToWrite) {
|
112
|
+
// try {
|
113
|
+
// await window.__TAURI__.invoke('write_file', {
|
114
|
+
// file_path: filePath,
|
115
|
+
// content: contentToWrite
|
116
|
+
// });
|
117
|
+
// console.log('File written successfully.');
|
118
|
+
// } catch (error) {
|
119
|
+
// console.error('Error writing to file:', error);
|
120
|
+
// }
|
121
|
+
// }
|
145
122
|
//
|
146
|
-
//
|
147
|
-
//
|
148
|
-
//
|
149
|
-
//
|
123
|
+
// // Lire un fichier
|
124
|
+
// async function readAndDisplayFile(filePath) {
|
125
|
+
// try {
|
126
|
+
// const fileContent = await window.__TAURI__.invoke('read_file', {
|
127
|
+
// file_path: filePath
|
128
|
+
// });
|
129
|
+
// console.log('File content:', fileContent);
|
130
|
+
// } catch (error) {
|
131
|
+
// console.error('Error reading file:', error);
|
132
|
+
// }
|
133
|
+
// }
|
150
134
|
//
|
135
|
+
// // Utiliser les fonctions pour créer et lire le fichier
|
136
|
+
// const filePath = 'example.txt'; // Remplacez ceci par le chemin du fichier souhaité
|
137
|
+
// const contentToWrite = 'This is some content to write to the file.';
|
151
138
|
//
|
152
|
-
//
|
153
|
-
//
|
154
|
-
// return (self.atome = val);
|
155
|
-
// }, 0);
|
139
|
+
// // Créer un fichier avec le contenu
|
140
|
+
// createAndWriteFile(filePath, contentToWrite);
|
156
141
|
//
|
157
|
-
//
|
158
|
-
//
|
142
|
+
// // Lire le fichier
|
143
|
+
// readAndDisplayFile(filePath);
|
144
|
+
|
145
|
+
function createSvgElement(tagName, attributes) {
|
146
|
+
var elem = document.createElementNS('http://www.w3.org/2000/svg', tagName);
|
147
|
+
for (var attr in attributes) {
|
148
|
+
if (attributes.hasOwnProperty(attr)) {
|
149
|
+
elem.setAttribute(attr, attributes[attr]);
|
150
|
+
}
|
151
|
+
}
|
152
|
+
return elem;
|
153
|
+
}
|
154
|
+
|
155
|
+
|
156
|
+
function sanitizeString(str) {
|
157
|
+
return str.replace(/'/g, "\\'");
|
158
|
+
}
|
159
|
+
function fileread(){
|
160
|
+
var inputElement = document.createElement("input");
|
161
|
+
inputElement.type = "file";
|
162
|
+
|
163
|
+
inputElement.addEventListener("change", function(event) {
|
164
|
+
var file = event.target.files[0];
|
165
|
+
var reader = new FileReader();
|
166
|
+
|
167
|
+
reader.onload = function(event) {
|
168
|
+
var content = event.target.result;
|
169
|
+
var sanitizedContent = sanitizeString(content);
|
170
|
+
rubyVMCallback("input_callback('"+sanitizedContent+"')");
|
171
|
+
};
|
172
|
+
|
173
|
+
reader.readAsText(file);
|
174
|
+
});
|
159
175
|
|
176
|
+
// Ajout de l'élément input à la div
|
177
|
+
var viewDiv = document.querySelector("#support");
|
178
|
+
viewDiv.appendChild(inputElement);
|
179
|
+
}
|
160
180
|
|
@@ -0,0 +1,46 @@
|
|
1
|
+
// Fonction pour ajouter la police dynamiquement
|
2
|
+
function ajouterPoliceDynamiquement(font_name,type,path) {
|
3
|
+
// Créer une nouvelle balise <style>
|
4
|
+
const styleElement = document.getElementById('atomic_style');
|
5
|
+
|
6
|
+
// Ajouter la règle @font-face à la balise <style>
|
7
|
+
styleElement.textContent = `
|
8
|
+
@font-face {
|
9
|
+
font-family: ${font_name};
|
10
|
+
src: url('${path}') format('truetype');
|
11
|
+
}
|
12
|
+
`;
|
13
|
+
|
14
|
+
// Ajouter la balise <style> à la balise <head> du document
|
15
|
+
document.head.appendChild(styleElement);
|
16
|
+
|
17
|
+
// Appliquer la police au corps du document
|
18
|
+
// document.body.style.fontFamily = font_name+','+type;
|
19
|
+
}
|
20
|
+
|
21
|
+
// Appeler la fonction pour ajouter et appliquer la police
|
22
|
+
ajouterPoliceDynamiquement('Ruboto','ThinItalic','medias/fonts/Roboto/Roboto-ThinItalic.ttf');
|
23
|
+
|
24
|
+
/////////////////
|
25
|
+
|
26
|
+
// setTimeout(function () {
|
27
|
+
// const viewDiv = document.getElementById('view');
|
28
|
+
//
|
29
|
+
// // Vérifier si la div existe
|
30
|
+
// if (viewDiv) {
|
31
|
+
// // Ajouter le texte à la div
|
32
|
+
// viewDiv.innerText = "Ceci est un texte ajouté à la div 'view'.";
|
33
|
+
//
|
34
|
+
// // Appliquer la police et la taille du texte
|
35
|
+
// viewDiv.style.fontFamily = 'Ruboto, thin';
|
36
|
+
// viewDiv.style.fontSize = '36px';
|
37
|
+
// } else {
|
38
|
+
// console.error("La div avec l'ID 'view' n'a pas été trouvée.");
|
39
|
+
// }
|
40
|
+
// }, 3000);
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
function mouse_interaction(element, atome){
|
1
|
+
function mouse_interaction(element, atome) {
|
3
2
|
interact(element).dropzone({
|
4
3
|
listeners: {
|
5
4
|
dragenter(event) {
|
@@ -60,8 +59,8 @@ function mouse_interaction(element, atome){
|
|
60
59
|
}
|
61
60
|
|
62
61
|
|
63
|
-
function file_drop(atome_id, atome){
|
64
|
-
const dropzone = document.querySelector('#'+atome_id)
|
62
|
+
function file_drop(atome_id, atome) {
|
63
|
+
const dropzone = document.querySelector('#' + atome_id)
|
65
64
|
dropzone.addEventListener('dragover', evt => evt.preventDefault())
|
66
65
|
dropzone.addEventListener('drop', async evt => {
|
67
66
|
evt.preventDefault()
|
@@ -71,14 +70,19 @@ function file_drop(atome_id, atome){
|
|
71
70
|
reader.readAsDataURL(file);
|
72
71
|
reader.onloadend = function () {
|
73
72
|
const base64data = reader.result;
|
74
|
-
let
|
75
|
-
atome.$drop_action_callback(Opal.hash({
|
73
|
+
let type_found = file.type.split('/')[0]
|
74
|
+
atome.$drop_action_callback(Opal.hash({
|
75
|
+
path: file.filepath,
|
76
|
+
type: type_found,
|
77
|
+
size: file.size,
|
78
|
+
data: base64data
|
79
|
+
}));
|
76
80
|
}
|
77
81
|
}
|
78
82
|
})
|
79
83
|
|
80
84
|
|
81
|
-
async function getFilesFromDataTransferItems
|
85
|
+
async function getFilesFromDataTransferItems(dataTransferItems, options = {raw: false}) {
|
82
86
|
const checkErr = (err) => {
|
83
87
|
if (getFilesFromDataTransferItems.didShowInfo) return
|
84
88
|
if (err.name !== 'EncodingError') return
|
@@ -164,3 +168,4 @@ function file_drop(atome_id, atome){
|
|
164
168
|
else module.exports.getFilesFromDataTransferItems = getFilesFromDataTransferItems
|
165
169
|
|
166
170
|
}
|
171
|
+
|
@@ -0,0 +1,126 @@
|
|
1
|
+
const communication = {
|
2
|
+
// websocket: new WebSocket('ws://localhost:9292'),
|
3
|
+
websocket: null,
|
4
|
+
initialize: function () {
|
5
|
+
this.websocket = new WebSocket('ws://localhost:9292')
|
6
|
+
// this.websocket = new WebSocket(address);
|
7
|
+
|
8
|
+
this.websocket.onopen = function (event) {
|
9
|
+
rubyVMCallback("puts 'Connected to WebSocket'")
|
10
|
+
};
|
11
|
+
|
12
|
+
this.websocket.onmessage = function (event) {
|
13
|
+
rubyVMCallback("puts 'object ruby callback : " + event.data + "'")
|
14
|
+
};
|
15
|
+
|
16
|
+
this.websocket.onclose = function (event) {
|
17
|
+
rubyVMCallback("puts 'WebSocket closed'")
|
18
|
+
|
19
|
+
};
|
20
|
+
|
21
|
+
this.websocket.onerror = function (event) {
|
22
|
+
// to prevent error disturbing the console
|
23
|
+
event.preventDefault();
|
24
|
+
console.log('connection lost!')
|
25
|
+
};
|
26
|
+
},
|
27
|
+
controller_sender: function (msg) {
|
28
|
+
let json_msg = JSON.parse(msg);
|
29
|
+
|
30
|
+
if (window.webkit) {
|
31
|
+
try {
|
32
|
+
window.webkit.messageHandlers.toggleMessageHandler.postMessage(json_msg);
|
33
|
+
} catch (error) {
|
34
|
+
console.log('no server, unable to post message')
|
35
|
+
}
|
36
|
+
|
37
|
+
} else {
|
38
|
+
try {
|
39
|
+
window.chrome.webview.postMessage(json_msg);
|
40
|
+
} catch (error) {
|
41
|
+
console.log('no server, unable to post message')
|
42
|
+
}
|
43
|
+
}
|
44
|
+
},
|
45
|
+
controller_listener: function () {
|
46
|
+
if (window.webkit) {
|
47
|
+
try {
|
48
|
+
///
|
49
|
+
} catch (error) {
|
50
|
+
console.log('no server, unable to receive message')
|
51
|
+
}
|
52
|
+
} else {
|
53
|
+
|
54
|
+
try {
|
55
|
+
window.chrome.webview.addEventListener('message', arg => {
|
56
|
+
Opal.Object.$response_listener(arg.data)
|
57
|
+
});
|
58
|
+
} catch (error) {
|
59
|
+
console.log('no server, unable to receive message')
|
60
|
+
}
|
61
|
+
|
62
|
+
|
63
|
+
}
|
64
|
+
},
|
65
|
+
connect: function (address) {
|
66
|
+
this.websocket = new WebSocket(address);
|
67
|
+
|
68
|
+
this.websocket.onopen = function (event) {
|
69
|
+
rubyVMCallback("puts 'Connected to WebSocket'")
|
70
|
+
};
|
71
|
+
|
72
|
+
this.websocket.onmessage = function (event) {
|
73
|
+
rubyVMCallback("puts 'object ruby callback : " + event.data + "'")
|
74
|
+
|
75
|
+
};
|
76
|
+
|
77
|
+
this.websocket.onclose = function (event) {
|
78
|
+
rubyVMCallback("puts 'WebSocket closed'")
|
79
|
+
|
80
|
+
};
|
81
|
+
|
82
|
+
this.websocket.onerror = function (event) {
|
83
|
+
// to prevent error disturbing the console
|
84
|
+
event.preventDefault();
|
85
|
+
console.log('connection lost!')
|
86
|
+
};
|
87
|
+
|
88
|
+
},
|
89
|
+
ws_sender: function (address) {
|
90
|
+
this.websocket.send("Hello, WebSocket! !look look")
|
91
|
+
},
|
92
|
+
}
|
93
|
+
|
94
|
+
/////////////////////////// connection ws
|
95
|
+
|
96
|
+
|
97
|
+
function connect(address) {
|
98
|
+
|
99
|
+
// alert('kool');
|
100
|
+
websocket = new WebSocket(address);
|
101
|
+
|
102
|
+
websocket.onopen = function (event) {
|
103
|
+
rubyVMCallback("puts 'Connected to WebSocket'")
|
104
|
+
|
105
|
+
};
|
106
|
+
|
107
|
+
websocket.onmessage = function (event) {
|
108
|
+
rubyVMCallback("puts 'object ruby callback : " + event.data + "'")
|
109
|
+
};
|
110
|
+
|
111
|
+
websocket.onclose = function (event) {
|
112
|
+
rubyVMCallback("puts 'WebSocket closed'")
|
113
|
+
};
|
114
|
+
|
115
|
+
websocket.onerror = function (event) {
|
116
|
+
// to prevent error disturbing the console
|
117
|
+
event.preventDefault();
|
118
|
+
console.log('connection lost!')
|
119
|
+
};
|
120
|
+
|
121
|
+
}
|
122
|
+
|
123
|
+
function ws_sender() {
|
124
|
+
websocket.send("the Hello, WebSocket!!!")
|
125
|
+
}
|
126
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
function rubyVMCallback(rubycode) {
|
2
|
+
rubyVM.eval(rubycode);
|
3
|
+
}
|
4
|
+
|
5
|
+
|
6
|
+
// var checkInterval = setInterval(function () {
|
7
|
+
// if (typeof rubyVM !== "undefined") {
|
8
|
+
// clearInterval(checkInterval); // Arrêtez la vérification une fois rubyVM trouvé
|
9
|
+
// rubyVM.eval('text("rubyvm is ready")');
|
10
|
+
// }
|
11
|
+
// }, 100);
|
12
|
+
//
|