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
@@ -1,74 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# for browser rendering
|
4
|
-
module BrowserHelper
|
5
|
-
# shadow
|
6
|
-
def self.browser_left_shadow(value, _browser_object, atome)
|
7
|
-
ls_left = "#{atome[:left] = value}px"
|
8
|
-
ls_top = "#{atome[:top]}px"
|
9
|
-
ls_blur = "#{atome[:blur]}px"
|
10
|
-
red = atome[:red] * 255
|
11
|
-
green = atome[:green] * 255
|
12
|
-
blue = (atome[:blue]) * 255
|
13
|
-
direction = atome[:direction]
|
14
|
-
alpha = atome[:alpha]
|
15
|
-
id_found = atome[:id]
|
16
|
-
real = atome[:real]
|
17
|
-
# `document.getElementById(#{atome[:id]}).sheet.cssRules[0].style.boxShadow = #{shadow_updated}`
|
18
|
-
if real
|
19
|
-
drop_shadow_updated = "drop-shadow(#{ls_left} #{ls_top} #{ls_blur} rgba(#{red}, #{green}, #{blue}, #{alpha}))"
|
20
|
-
class_content = <<STR
|
21
|
-
.#{id_found} {
|
22
|
-
|
23
|
-
filter: #{drop_shadow_updated};
|
24
|
-
}
|
25
|
-
STR
|
26
|
-
else
|
27
|
-
shadow_updated = "#{ls_left} #{ls_top} #{ls_blur} rgba(#{red}, #{green}, #{blue}, #{alpha}) #{direction}"
|
28
|
-
class_content = <<STR
|
29
|
-
.#{id_found} {
|
30
|
-
box-shadow: #{shadow_updated};
|
31
|
-
}
|
32
|
-
STR
|
33
|
-
end
|
34
|
-
|
35
|
-
atomic_style = BrowserHelper.browser_document['#atomic_style']
|
36
|
-
|
37
|
-
return unless atomic_style
|
38
|
-
|
39
|
-
if atomic_style.text.include?(".#{id_found}")
|
40
|
-
# if the class exist , update it's content with the new class
|
41
|
-
# alert "before :#{atomic_style.text}"
|
42
|
-
regex = /(\.#{id_found}\s*{)([\s\S]*?)(})/m
|
43
|
-
atomic_style.text = atomic_style.text.gsub(regex, class_content)
|
44
|
-
# alert "after :#{atomic_style.text}"
|
45
|
-
else
|
46
|
-
# if the class doesn't exist, add it to the end of the tag <style>
|
47
|
-
atomic_style.text += class_content
|
48
|
-
end
|
49
|
-
|
50
|
-
# alert atomic_style.text
|
51
|
-
end
|
52
|
-
|
53
|
-
# .shadow2 {
|
54
|
-
# box-shadow: 3px 9px 9px rgba(0, 0, 0, 1) inset;
|
55
|
-
# }
|
56
|
-
# .shadow2 {
|
57
|
-
# box-shadow: 3px 9px 9px rgba(0, 0, 0, 1) inset)
|
58
|
-
# }
|
59
|
-
|
60
|
-
def self.browser_top_shadow(value, _browser_object, atome)
|
61
|
-
# rs_left = "#{atome[:left]}px"
|
62
|
-
# rs_top = "#{atome[:top] = value}px"
|
63
|
-
# rs_blur = "#{atome[:blur]}px"
|
64
|
-
# red = atome[:red] * 255
|
65
|
-
# green = atome[:green] * 255
|
66
|
-
# blue = (atome[:blue]) * 255
|
67
|
-
# direction = atome[:direction]
|
68
|
-
# alpha = atome[:alpha]
|
69
|
-
#
|
70
|
-
# shadow_updated = "#{rs_left}px #{rs_top}px #{rs_blur}px rgba(#{red}, #{green}, #{blue}, #{alpha}) #{direction}"
|
71
|
-
# `document.getElementById(#{atome[:id]}).sheet.cssRules[0].style.boxShadow = #{shadow_updated}`
|
72
|
-
#
|
73
|
-
end
|
74
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# for browser rendering
|
4
|
-
module BrowserHelper
|
5
|
-
|
6
|
-
def self.browser_left_shape(value, browser_object, _atome)
|
7
|
-
browser_object.style[:left] = BrowserHelper.value_parse(value)
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.browser_right_shape(value, browser_object, _atome)
|
11
|
-
browser_object.style[:right] = BrowserHelper.value_parse(value)
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.browser_top_shape(value, browser_object, _atome)
|
15
|
-
browser_object.style[:top] = BrowserHelper.value_parse(value)
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.browser_bottom_shape(value, browser_object, _atome)
|
19
|
-
browser_object.style[:bottom] = BrowserHelper.value_parse(value)
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# for browser rendering
|
4
|
-
module BrowserHelper
|
5
|
-
|
6
|
-
def self.browser_left_text(value, browser_object, _atome)
|
7
|
-
browser_object.style[:left] = BrowserHelper.value_parse(value)
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.browser_right_text(value, browser_object, _atome)
|
11
|
-
browser_object.style[:right] = BrowserHelper.value_parse(value)
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.browser_top_text(value, browser_object, _atome)
|
15
|
-
browser_object.style[:top] = BrowserHelper.value_parse(value)
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.browser_bottom_text(value, browser_object, _atome)
|
19
|
-
browser_object.style[:bottom] = BrowserHelper.value_parse(value)
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.browser_data_text(value,atome_send)
|
23
|
-
value = value.gsub(/\n/, '<br/>')
|
24
|
-
atome_send.browser_object.inner_html = value
|
25
|
-
end
|
26
|
-
|
27
|
-
def self.browser_data_shape(_value,_atome_send)
|
28
|
-
|
29
|
-
end
|
30
|
-
def self.browser_data_color(_value,_atome_send)
|
31
|
-
|
32
|
-
end
|
33
|
-
|
34
|
-
def self.browser_data_find(value,_atome_send)
|
35
|
-
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# for browser rendering
|
4
|
-
module BrowserHelper
|
5
|
-
# video
|
6
|
-
def self.browser_left_video(value, browser_object, _atome)
|
7
|
-
browser_object.style[:left] = "#{value}px"
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.browser_right_video(value, browser_object, _atome)
|
11
|
-
browser_object.style[:right] = "#{value}px"
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.browser_top_video(value, browser_object, _atome)
|
15
|
-
browser_object.style[:top] = "#{value}px"
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.browser_bottom_video(value, browser_object, _atome)
|
19
|
-
browser_object.style[:bottom] = "#{value}px"
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.browser_path_video(value, browser_object, _atome)
|
23
|
-
browser_object[:src] = value
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.browser_play_video(_value, browser_object_found, atome_hash, atome_object, proc)
|
27
|
-
markers = atome_hash[:markers] ||= {}
|
28
|
-
markers.each_value do |value|
|
29
|
-
value[:end] = value[:begin] + 0.25 unless value[:end]
|
30
|
-
value[:label] = "label_#{atome_hash[:markers].length}" unless value[:label]
|
31
|
-
end
|
32
|
-
|
33
|
-
browser_object_found.play
|
34
|
-
# TODO : change timeupdate for when possible requestVideoFrameCallback
|
35
|
-
# (opal-browser/opal/browser/event.rb line 36)
|
36
|
-
video_callback = atome_hash[:code] # this is the video callback not the play callback
|
37
|
-
play_callback = proc # this is the video callback not the play callback
|
38
|
-
|
39
|
-
browser_object_found.on(:timeupdate) do |e|
|
40
|
-
current_time = browser_object_found.currentTime
|
41
|
-
# we update the time particle
|
42
|
-
atome_object.time_callback(current_time, markers)
|
43
|
-
e.prevent # Prevent the default action (eg. form submission)
|
44
|
-
# You can also use `e.stop` to stop propagating the event to other handlers.
|
45
|
-
atome_object.instance_exec(current_time, &video_callback) if video_callback.is_a?(Proc)
|
46
|
-
atome_object.instance_exec(current_time, &play_callback) if play_callback.is_a?(Proc)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# for browser rendering
|
4
|
-
module BrowserHelper
|
5
|
-
# web
|
6
|
-
def self.browser_left_web(value, browser_object, _atome)
|
7
|
-
browser_object.style[:left] = BrowserHelper.value_parse(value)
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.browser_right_web(value, browser_object, _atome)
|
11
|
-
browser_object.style[:right] = BrowserHelper.value_parse(value)
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.browser_top_web(value, browser_object, _atome)
|
15
|
-
browser_object.style[:top] = BrowserHelper.value_parse(value)
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.browser_bottom_web(value, browser_object, _atome)
|
19
|
-
browser_object.style[:bottom] = BrowserHelper.value_parse(value)
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.browser_path_web(value, browser_object, _atome)
|
23
|
-
browser_object[:src] = value
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
@@ -1,61 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
generator = Genesis.generator
|
4
|
-
|
5
|
-
# generator.build_render(:browser_id) do |params|
|
6
|
-
# if @browser_type == :style
|
7
|
-
# prev_content = @browser_object.inner_html
|
8
|
-
# new_content = prev_content.sub(@browser_object.id, params)
|
9
|
-
# @browser_object.inner_html = new_content
|
10
|
-
# end
|
11
|
-
# browser_object.id = params if @atome[:id] != params
|
12
|
-
# end
|
13
|
-
|
14
|
-
generator.build_render(:browser_type) do |params|
|
15
|
-
send("browser_#{params}", user_proc)
|
16
|
-
end
|
17
|
-
|
18
|
-
generator.build_render(:browser_attach) do |parents_found|
|
19
|
-
# puts "parents_found : #{parents_found}, #{parents_found.class}"
|
20
|
-
parents_found.each do |parent_found|
|
21
|
-
# puts "2 : >>>>> model: browser_type #{@browser_type} parents_found #{parents_found} , @browser_object, #{@browser_object}, self : #{self.id}"
|
22
|
-
BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
generator.build_render(:browser_attached) do |children_found|
|
27
|
-
children_found.each do |child_found|
|
28
|
-
# puts ">>>>> modeled: browser_type #{@browser_type} parents_fo
|
29
|
-
# und #{children_found} , @browser_object, #{@browser_object}, self : #{self.id}"
|
30
|
-
children_browser_type = grab(child_found).instance_variable_get('@browser_type')
|
31
|
-
BrowserHelper.send("browser_attached_#{children_browser_type}", children_found, @browser_object, @atome)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
generator.build_render(:browser_detached) do |values, _user_proc|
|
36
|
-
values.each do |value|
|
37
|
-
# FIXME: ugly patch to check if the value passed is an atome must create a more robust global solution for .value
|
38
|
-
value = value.value if value.instance_of? Atome
|
39
|
-
if grab(value).instance_variable_get('@browser_type') == :style
|
40
|
-
@browser_object.remove_class(value)
|
41
|
-
if definition
|
42
|
-
`
|
43
|
-
let parser = new DOMParser();
|
44
|
-
var divElement = document.querySelector('#'+#{self.id});
|
45
|
-
// divElement.style.removeProperty('background-color');
|
46
|
-
//divElement.style.backgroundColor = 'transparent';
|
47
|
-
// select the first svg tag inside the div
|
48
|
-
let foundSVG = divElement.querySelector('svg');
|
49
|
-
let elements = foundSVG.getElementsByTagName("path");
|
50
|
-
Array.from(elements).forEach(el => {
|
51
|
-
el.classList.remove(#{value});
|
52
|
-
});
|
53
|
-
`
|
54
|
-
end
|
55
|
-
|
56
|
-
else
|
57
|
-
BrowserHelper.browser_document[value]&.remove
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
@@ -1,121 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
generator = Genesis.generator
|
4
|
-
|
5
|
-
generator.build_render(:red) do |value|
|
6
|
-
red = ((@atome[:red] = value) * 255)
|
7
|
-
green = @atome[:green] * 255
|
8
|
-
blue = @atome[:blue] * 255
|
9
|
-
alpha = @atome[:alpha]
|
10
|
-
color_updated = "rgba(#{red}, #{green}, #{blue}, #{alpha})"
|
11
|
-
BrowserHelper.send("browser_colorize_#{@atome[:type]}", color_updated, @atome)
|
12
|
-
# we return self to allow syntax of the type : a.color(:black).red(1).green(0.3)
|
13
|
-
self
|
14
|
-
end
|
15
|
-
|
16
|
-
generator.build_render(:green) do |value|
|
17
|
-
# we return self to allow syntax of the type : a.color(:black).red(1).green(0.3)
|
18
|
-
red = @atome[:red] * 255
|
19
|
-
green = (@atome[:green] = value) * 255
|
20
|
-
blue = @atome[:blue] * 255
|
21
|
-
alpha = @atome[:alpha]
|
22
|
-
color_updated = "rgba(#{red}, #{green}, #{blue}, #{alpha})"
|
23
|
-
BrowserHelper.send("browser_colorize_#{@atome[:type]}", color_updated, @atome)
|
24
|
-
# we return self to allow syntax of the type : a.color(:black).red(1).green(0.3)
|
25
|
-
self
|
26
|
-
end
|
27
|
-
|
28
|
-
generator.build_render(:blue) do |value|
|
29
|
-
red = @atome[:red] * 255
|
30
|
-
green = @atome[:green] * 255
|
31
|
-
blue = (@atome[:blue] = value) * 255
|
32
|
-
alpha = @atome[:alpha]
|
33
|
-
color_updated = "rgba(#{red}, #{green}, #{blue}, #{alpha})"
|
34
|
-
BrowserHelper.send("browser_colorize_#{@atome[:type]}", color_updated, @atome)
|
35
|
-
# we return self to allow syntax of the type : a.color(:black).red(1).green(0.3)
|
36
|
-
self
|
37
|
-
end
|
38
|
-
|
39
|
-
generator.build_render(:alpha) do |value|
|
40
|
-
red = @atome[:red] * 255
|
41
|
-
green = @atome[:green] * 255
|
42
|
-
blue = @atome[:blue] * 255
|
43
|
-
alpha = (@atome[:alpha] = value)
|
44
|
-
color_updated = "rgba(#{red}, #{green}, #{blue}, #{alpha})"
|
45
|
-
BrowserHelper.send("browser_colorize_#{@atome[:type]}", color_updated, @atome)
|
46
|
-
# we return self to allow syntax of the type : a.color(:black).red(1).green(0.3)
|
47
|
-
self
|
48
|
-
end
|
49
|
-
|
50
|
-
generator.build_render(:visual) do |value|
|
51
|
-
value = BrowserHelper.value_parse(value[:size])
|
52
|
-
browser_object.style['font-size'] = value
|
53
|
-
end
|
54
|
-
|
55
|
-
generator.build_render(:browser_edit) do |value|
|
56
|
-
if value == true
|
57
|
-
caret_color = 'white'
|
58
|
-
user_select = 'text'
|
59
|
-
selection_color = 'blue'
|
60
|
-
else
|
61
|
-
caret_color = 'transparent'
|
62
|
-
user_select = 'none'
|
63
|
-
selection_color = 'transparent'
|
64
|
-
end
|
65
|
-
|
66
|
-
@browser_object.attributes[:contenteditable] = value
|
67
|
-
@browser_object.style['caret-color'] = caret_color
|
68
|
-
@browser_object.style['webkit-user-select'] = user_select
|
69
|
-
@browser_object.style['-moz-user-select'] = user_select
|
70
|
-
@browser_object.style['user-select'] = user_select
|
71
|
-
end
|
72
|
-
|
73
|
-
generator.build_render(:browser_hide) do |value|
|
74
|
-
@browser_object.style[:display] = "none"
|
75
|
-
|
76
|
-
end
|
77
|
-
|
78
|
-
generator.build_render(:browser_classes) do |value, _user_proc|
|
79
|
-
@browser_object.add_class(value)
|
80
|
-
# TODO : don't forget to remove class
|
81
|
-
end
|
82
|
-
|
83
|
-
generator.build_render(:browser_remove_classes) do |value, _user_proc|
|
84
|
-
@browser_object.remove_class(value)
|
85
|
-
end
|
86
|
-
|
87
|
-
new ({ browser: :opacity }) do |value|
|
88
|
-
@browser_object.style['opacity'] = value
|
89
|
-
end
|
90
|
-
|
91
|
-
new ({ browser: :definition }) do |value|
|
92
|
-
target=id
|
93
|
-
`
|
94
|
-
|
95
|
-
var divElement = document.querySelector('#'+#{target});;
|
96
|
-
divElement.style.removeProperty('background-color');
|
97
|
-
divElement.style.backgroundColor = 'transparent';
|
98
|
-
// select the first svg tag inside the div
|
99
|
-
var svgElement = divElement.querySelector('svg');
|
100
|
-
|
101
|
-
// delete the first svg tag inside the div if it exist
|
102
|
-
if (svgElement) {
|
103
|
-
divElement.removeChild(svgElement);
|
104
|
-
}
|
105
|
-
|
106
|
-
|
107
|
-
let svg_content='<svg style="width: 1em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">'+#{value}+'</svg>'
|
108
|
-
let svgContainer = document.getElementById(#{target});
|
109
|
-
svgContainer.style.removeProperty('background-color');
|
110
|
-
svgContainer.style.backgroundColor = 'transparent';
|
111
|
-
let parser = new DOMParser();
|
112
|
-
let svgDoc = parser.parseFromString(svg_content, "image/svg+xml");
|
113
|
-
let importedSVG = svgDoc.getElementsByTagName("svg")[0];
|
114
|
-
importedSVG.style.width = "100%";
|
115
|
-
importedSVG.style.height = "100%";
|
116
|
-
let elements = importedSVG.getElementsByTagName("path");
|
117
|
-
|
118
|
-
svgContainer.appendChild(importedSVG);
|
119
|
-
|
120
|
-
`
|
121
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
def add_new_class(class_name, tag_name, tag_content)
|
2
|
-
|
3
|
-
`
|
4
|
-
var styleTag = document.getElementById("atomic_style");
|
5
|
-
styleTag.innerHTML += "\n ."+#{class_name}+'{\n '+#{tag_name}+': '+#{tag_content}+';\n}';
|
6
|
-
`
|
7
|
-
end
|
8
|
-
|
9
|
-
add_new_class('new_class', 'background-color','yellow')
|
10
|
-
add_new_class('other_class', 'color','red')
|
11
|
-
|
12
|
-
def update_css_tag(tag_name, var_name, value)
|
13
|
-
`
|
14
|
-
var rules = null;
|
15
|
-
var cssRules = document.styleSheets[0].cssRules;
|
16
|
-
for (var i = 0; i < cssRules.length; i++) {
|
17
|
-
var rule = cssRules[i];
|
18
|
-
if (rule.selectorText === '.'+#{tag_name}) {
|
19
|
-
rules = rule;
|
20
|
-
break;
|
21
|
-
}
|
22
|
-
}
|
23
|
-
|
24
|
-
if (rules) {
|
25
|
-
|
26
|
-
rules.style.setProperty(#{var_name}, #{value});
|
27
|
-
}
|
28
|
-
`
|
29
|
-
end
|
30
|
-
|
31
|
-
update_css_tag('other_class', '--end-color', 'blue')
|
@@ -1,59 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
generator = Genesis.generator
|
4
|
-
|
5
|
-
|
6
|
-
new({ browser: :left, type: :integer }) do |value, _user_proc|
|
7
|
-
BrowserHelper.send("browser_left_#{@atome[:type]}", value, @browser_object, @atome)
|
8
|
-
end
|
9
|
-
|
10
|
-
generator.build_render(:browser_right) do |value, _user_proc|
|
11
|
-
BrowserHelper.send("browser_right_#{@atome[:type]}", value, @browser_object, @atome)
|
12
|
-
end
|
13
|
-
|
14
|
-
generator.build_render(:browser_top) do |value, _user_proc|
|
15
|
-
BrowserHelper.send("browser_top_#{@atome[:type]}", value, @browser_object, @atome)
|
16
|
-
end
|
17
|
-
|
18
|
-
generator.build_render(:browser_bottom) do |value, _user_proc|
|
19
|
-
BrowserHelper.send("browser_bottom_#{@atome[:type]}", value, @browser_object, @atome)
|
20
|
-
end
|
21
|
-
|
22
|
-
generator.build_render(:browser_rotate) do |value, _user_proc|
|
23
|
-
@browser_object.style[:transform] = "rotate(#{value}deg)" unless @browser_type == :style
|
24
|
-
end
|
25
|
-
|
26
|
-
generator.build_render(:browser_center) do |value, _user_proc|
|
27
|
-
case value
|
28
|
-
when :horizontal
|
29
|
-
@browser_object.remove_class(:center)
|
30
|
-
@browser_object.remove_class(:center_vertical)
|
31
|
-
@browser_object.add_class(:center_horizontal)
|
32
|
-
@browser_object.style[:bottom] = :auto
|
33
|
-
@browser_object.style[:right] = :auto
|
34
|
-
@browser_object.style[:top] = '0px'
|
35
|
-
@browser_object.style[:left] = '50%'
|
36
|
-
when :vertical
|
37
|
-
@browser_object.remove_class(:center)
|
38
|
-
@browser_object.remove_class(:center_horizontal)
|
39
|
-
@browser_object.add_class(:center_vertical)
|
40
|
-
@browser_object.style[:bottom] = :auto
|
41
|
-
@browser_object.style[:right] = :auto
|
42
|
-
@browser_object.style[:left] = '0px'
|
43
|
-
@browser_object.style[:top] = '50%'
|
44
|
-
else
|
45
|
-
@browser_object.remove_class(:center_vertical)
|
46
|
-
@browser_object.remove_class(:center_horizontal)
|
47
|
-
@browser_object.add_class(:center)
|
48
|
-
@browser_object.style[:bottom] = :auto
|
49
|
-
@browser_object.style[:right] = :auto
|
50
|
-
@browser_object.style[:left] = '50%'
|
51
|
-
@browser_object.style[:top] = '50%'
|
52
|
-
end
|
53
|
-
|
54
|
-
end
|
55
|
-
|
56
|
-
new ({ browser: :depth }) do |value|
|
57
|
-
@browser_object.style['z-index'] = value
|
58
|
-
end
|
59
|
-
|
@@ -1,49 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
generator = Genesis.generator
|
4
|
-
generator.build_render(:browser_bloc)
|
5
|
-
generator.build_render(:browser_render)
|
6
|
-
generator.build_render(:browser_delete) do |params|
|
7
|
-
browser_object&.remove if params == true
|
8
|
-
end
|
9
|
-
|
10
|
-
# do not use browser_clear
|
11
|
-
# #
|
12
|
-
# # generator.build_render(:browser_clear) do
|
13
|
-
# # @atome[:attached].each do |child_found|
|
14
|
-
# # grab(child_found).browser_object&.remove
|
15
|
-
# # end
|
16
|
-
# # end
|
17
|
-
|
18
|
-
generator.build_render(:browser_path) do |value|
|
19
|
-
BrowserHelper.send("browser_path_#{@atome[:type]}", value, @browser_object, @atome)
|
20
|
-
end
|
21
|
-
|
22
|
-
generator.build_render(:browser_data) do |data|
|
23
|
-
# according to the type we send the data to different operator
|
24
|
-
type_found = @atome[:type]
|
25
|
-
BrowserHelper.send("browser_data_#{type_found}", data, self)
|
26
|
-
end
|
27
|
-
|
28
|
-
generator.build_render(:browser_schedule) do |format_date, proc|
|
29
|
-
years = format_date[0]
|
30
|
-
months = format_date[1]
|
31
|
-
days = format_date[2]
|
32
|
-
hours = format_date[3]
|
33
|
-
minutes = format_date[4]
|
34
|
-
seconds = format_date[5]
|
35
|
-
atome_js.JS.schedule(years, months, days, hours, minutes, seconds, self, proc)
|
36
|
-
end
|
37
|
-
|
38
|
-
generator.build_render(:browser_reader) do |file, proc|
|
39
|
-
atome_js.JS.reader(file, self, proc)
|
40
|
-
end
|
41
|
-
|
42
|
-
generator.build_render(:browser_cursor) do |value|
|
43
|
-
@browser_object.style[:cursor] = value
|
44
|
-
end
|
45
|
-
|
46
|
-
generator.build_render(:browser_overflow) do |value|
|
47
|
-
@browser_object.style[:overflow] = value
|
48
|
-
end
|
49
|
-
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# require 'atome/renderers/headless/effect'
|
4
|
-
# require 'atome/renderers/headless/event'
|
5
|
-
# require 'atome/renderers/headless/geometry'
|
6
|
-
# require 'atome/renderers/headless/identity'
|
7
|
-
# require 'atome/renderers/headless/material'
|
8
|
-
# require 'atome/renderers/headless/spatial'
|
9
|
-
# require 'atome/renderers/headless/atome'
|
10
|
-
require 'atome/renderers/headless/utility'
|
@@ -1,49 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
|
4
|
-
generator = Genesis.generator
|
5
|
-
|
6
|
-
generator.build_render(:html_shape) do
|
7
|
-
current_atome = @atome
|
8
|
-
id_found = current_atome[:id]
|
9
|
-
@html_object = Html.new
|
10
|
-
@html_object.add_class('atome')
|
11
|
-
@html_object.attr('id', id_found)
|
12
|
-
end
|
13
|
-
|
14
|
-
generator.build_render(:html_element)
|
15
|
-
|
16
|
-
generator.build_render(:html_color) do |_value|
|
17
|
-
# we remove previous unused style tag
|
18
|
-
opal_document[id]&.remove
|
19
|
-
red_found = @atome[:red]
|
20
|
-
blue_found = @atome[:blue]
|
21
|
-
green_found = @atome[:green]
|
22
|
-
alpha_found = @atome[:alpha]
|
23
|
-
opal_document.head << DOM("<style atome='#{type}' id='#{id}'>.#{id}{background-color: rgba(#{red_found * 255},
|
24
|
-
#{green_found * 255},#{blue_found * 255},#{alpha_found})}</style>")
|
25
|
-
# TODO/ use the code below to modify the style tag
|
26
|
-
# `document.getElementById(#{id}).sheet.cssRules[0].style.backgroundColor = 'red'`
|
27
|
-
end
|
28
|
-
|
29
|
-
generator.build_render(:html_image) do |_user_prc|
|
30
|
-
# id_found = id
|
31
|
-
# instance_exec(&proc) if proc.is_a?(Proc)
|
32
|
-
# DOM do
|
33
|
-
# img({ id: id_found }).atome
|
34
|
-
# end.append_to($document[:user_view])
|
35
|
-
# @html_object = $document[id_found]
|
36
|
-
# @html_type = :image
|
37
|
-
end
|
38
|
-
|
39
|
-
generator.build_render(:html_shadow) do
|
40
|
-
end
|
41
|
-
|
42
|
-
generator.build_render(:html_video) do |_value, _user_proc|
|
43
|
-
# id_found = id
|
44
|
-
# # instance_exec(&proc) if proc.is_a?(Proc)
|
45
|
-
# DOM do
|
46
|
-
# video({ id: id_found, autoplay: true ,loop: false, muted: true }).atome
|
47
|
-
# end.append_to($document[:user_view])
|
48
|
-
# @html_object = $document[id_found]
|
49
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
generator = Genesis.generator
|
4
|
-
|
5
|
-
generator.build_render(:html_smooth) do |value|
|
6
|
-
formated_params = case value
|
7
|
-
when Array
|
8
|
-
properties = []
|
9
|
-
value.each do |param|
|
10
|
-
properties << "#{param}px"
|
11
|
-
end
|
12
|
-
properties.join(' ').to_s
|
13
|
-
when Integer
|
14
|
-
"#{value}px"
|
15
|
-
else
|
16
|
-
value
|
17
|
-
end
|
18
|
-
@html_object.style['border-radius'] = formated_params unless @html_type == :style
|
19
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
generator = Genesis.generator
|
4
|
-
|
5
|
-
generator.build_render(:html_width) do |value|
|
6
|
-
@html_object.style[:width] = "#{value}px" unless @html_type == :style
|
7
|
-
end
|
8
|
-
|
9
|
-
generator.build_render(:html_height) do |value|
|
10
|
-
@html_object.style[:height] = "#{value}px" unless @html_type == :style
|
11
|
-
end
|