From 771223d0deda76afdb93d7445045566b5b6d350d Mon Sep 17 00:00:00 2001 From: Mojtaba Samimi Date: Fri, 17 Feb 2023 13:34:23 -0500 Subject: [PATCH 1/6] update stackgl package-lock --- stackgl_modules/package-lock.json | 1 - 1 file changed, 1 deletion(-) diff --git a/stackgl_modules/package-lock.json b/stackgl_modules/package-lock.json index 0dc01e1d3a1..978030b73ba 100644 --- a/stackgl_modules/package-lock.json +++ b/stackgl_modules/package-lock.json @@ -4,7 +4,6 @@ "requires": true, "packages": { "": { - "name": "stackgl_modules", "dependencies": { "@plotly/point-cluster": "^3.1.9", "alpha-shape": "^1.0.0", From 07619eeffa8d0b5fe7e17076202c9c6a5f0dcada Mon Sep 17 00:00:00 2001 From: Mojtaba Samimi Date: Fri, 17 Feb 2023 13:35:29 -0500 Subject: [PATCH 2/6] remove unused node-polyfill-webpack-plugin in stackgl config --- stackgl_modules/webpack.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/stackgl_modules/webpack.config.js b/stackgl_modules/webpack.config.js index 073d7de3ea6..421710dc205 100644 --- a/stackgl_modules/webpack.config.js +++ b/stackgl_modules/webpack.config.js @@ -1,5 +1,4 @@ var path = require('path'); -var NodePolyfillPlugin = require('node-polyfill-webpack-plugin'); module.exports = { target: ['web', 'es5'], From a8b48e685397ab3d03d963f89c21d3909bee371b Mon Sep 17 00:00:00 2001 From: Mojtaba Samimi Date: Fri, 17 Feb 2023 13:36:59 -0500 Subject: [PATCH 3/6] reuse plotly.js webpack config --- stackgl_modules/webpack.config.js | 36 +++---------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/stackgl_modules/webpack.config.js b/stackgl_modules/webpack.config.js index 421710dc205..967428eaade 100644 --- a/stackgl_modules/webpack.config.js +++ b/stackgl_modules/webpack.config.js @@ -1,5 +1,7 @@ var path = require('path'); +var plotlyjsConfig = require('../webpack.config'); + module.exports = { target: ['web', 'es5'], entry: './main.js', @@ -14,37 +16,5 @@ module.exports = { optimization: { minimize: false }, - module: { - rules: [{ - test: /\.js$/, - exclude: /node_modules/, - use: { - loader: 'babel-loader' - } - }, { - test: /\.js$/, - include: /node_modules[\\\/]buffer[\\\/]/, - use: { - loader: 'babel-loader', - options: { - babelrc: false, - configFile: false, - presets: [ - '@babel/preset-env' - ] - } - }, - }, { - test: /\.glsl$/, - include: /node_modules/, - use: { - loader: 'raw-loader' - } - }, { - test: /\.(js|glsl)$/, - use: [ - 'ify-loader' - ] - }] - } + module: plotlyjsConfig.module }; From 1ac6318297b437dec6d09fb508c06f3e3ac1a529 Mon Sep 17 00:00:00 2001 From: Mojtaba Samimi Date: Fri, 17 Feb 2023 13:47:51 -0500 Subject: [PATCH 4/6] update package-lock to use is-mobile 3.1.1 --- stackgl_modules/package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stackgl_modules/package-lock.json b/stackgl_modules/package-lock.json index 978030b73ba..733a25c13c7 100644 --- a/stackgl_modules/package-lock.json +++ b/stackgl_modules/package-lock.json @@ -710,7 +710,7 @@ "gl-spikes3d": "^1.0.10", "glslify": "^7.0.0", "has-passive-events": "^1.0.0", - "is-mobile": "^2.2.1", + "is-mobile": "^3.1.1", "mouse-change": "^1.4.0", "mouse-event-offset": "^3.0.2", "mouse-wheel": "^1.2.0", @@ -1139,9 +1139,9 @@ } }, "node_modules/is-mobile": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-mobile/-/is-mobile-2.2.2.tgz", - "integrity": "sha512-wW/SXnYJkTjs++tVK5b6kVITZpAZPtUrt9SF80vvxGiF/Oywal+COk1jlRkiVq15RFNEQKQY31TkV24/1T5cVg==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/is-mobile/-/is-mobile-3.1.1.tgz", + "integrity": "sha512-RRoXXR2HNFxNkUnxtaBdGBXtFlUMFa06S0NUKf/LCF+MuGLu13gi9iBCkoEmc6+rpXuwi5Mso5V8Zf7mNynMBQ==" }, "node_modules/is-obj": { "version": "1.0.1", @@ -2605,7 +2605,7 @@ "gl-spikes3d": "^1.0.10", "glslify": "^7.0.0", "has-passive-events": "^1.0.0", - "is-mobile": "^2.2.1", + "is-mobile": "^3.1.1", "mouse-change": "^1.4.0", "mouse-event-offset": "^3.0.2", "mouse-wheel": "^1.2.0", @@ -3025,9 +3025,9 @@ } }, "is-mobile": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-mobile/-/is-mobile-2.2.2.tgz", - "integrity": "sha512-wW/SXnYJkTjs++tVK5b6kVITZpAZPtUrt9SF80vvxGiF/Oywal+COk1jlRkiVq15RFNEQKQY31TkV24/1T5cVg==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/is-mobile/-/is-mobile-3.1.1.tgz", + "integrity": "sha512-RRoXXR2HNFxNkUnxtaBdGBXtFlUMFa06S0NUKf/LCF+MuGLu13gi9iBCkoEmc6+rpXuwi5Mso5V8Zf7mNynMBQ==" }, "is-obj": { "version": "1.0.1", From b84ba7ff89c17e711470a59d6ff200fa52bb380f Mon Sep 17 00:00:00 2001 From: Mojtaba Samimi Date: Fri, 17 Feb 2023 13:49:11 -0500 Subject: [PATCH 5/6] update stackgl bundle --- stackgl_modules/index.js | 74 ++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 44 deletions(-) diff --git a/stackgl_modules/index.js b/stackgl_modules/index.js index b6dfdd48526..223535588fc 100644 --- a/stackgl_modules/index.js +++ b/stackgl_modules/index.js @@ -1810,6 +1810,35 @@ function BufferBigIntNotDefined() { /***/ }), +/***/ 2321: +/***/ (function(module) { + +"use strict"; + + +module.exports = isMobile; +module.exports.isMobile = isMobile; +module.exports["default"] = isMobile; +var mobileRE = /(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i; +var notMobileRE = /CrOS/; +var tabletRE = /android|ipad|playbook|silk/i; +function isMobile(opts) { + if (!opts) opts = {}; + var ua = opts.ua; + if (!ua && typeof navigator !== 'undefined') ua = navigator.userAgent; + if (ua && ua.headers && typeof ua.headers['user-agent'] === 'string') { + ua = ua.headers['user-agent']; + } + if (typeof ua !== 'string') return false; + var result = mobileRE.test(ua) && !notMobileRE.test(ua) || !!opts.tablet && tabletRE.test(ua); + if (!result && opts.tablet && opts.featureDetect && navigator && navigator.maxTouchPoints > 1 && ua.indexOf('Macintosh') !== -1 && ua.indexOf('Safari') !== -1) { + result = true; + } + return result; +} + +/***/ }), + /***/ 3910: /***/ (function(__unused_webpack_module, exports) { @@ -20314,7 +20343,7 @@ var mouseChange = __webpack_require__(6145) var perspective = __webpack_require__(1120) var ortho = __webpack_require__(5268) var createShader = __webpack_require__(8245) -var isMobile = __webpack_require__(2861)({ tablet: true, featureDetect: true }) +var isMobile = __webpack_require__(2321)({ tablet: true, featureDetect: true }) module.exports = { createScene: createScene, @@ -30623,49 +30652,6 @@ function isSlowBuffer (obj) { } -/***/ }), - -/***/ 2861: -/***/ (function(module) { - -"use strict"; - - -module.exports = isMobile -module.exports.isMobile = isMobile -module.exports["default"] = isMobile - -var mobileRE = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i - -var tabletRE = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i - -function isMobile (opts) { - if (!opts) opts = {} - var ua = opts.ua - if (!ua && typeof navigator !== 'undefined') ua = navigator.userAgent - if (ua && ua.headers && typeof ua.headers['user-agent'] === 'string') { - ua = ua.headers['user-agent'] - } - if (typeof ua !== 'string') return false - - var result = opts.tablet ? tabletRE.test(ua) : mobileRE.test(ua) - - if ( - !result && - opts.tablet && - opts.featureDetect && - navigator && - navigator.maxTouchPoints > 1 && - ua.indexOf('Macintosh') !== -1 && - ua.indexOf('Safari') !== -1 - ) { - result = true - } - - return result -} - - /***/ }), /***/ 3596: From a35692ee93f0608586ae6ce52ac9d7cc968147ee Mon Sep 17 00:00:00 2001 From: Mojtaba Samimi Date: Fri, 17 Feb 2023 14:15:16 -0500 Subject: [PATCH 6/6] install is-mobile in stackgl too --- stackgl_modules/package-lock.json | 1 + stackgl_modules/package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/stackgl_modules/package-lock.json b/stackgl_modules/package-lock.json index 733a25c13c7..3930b97b1f1 100644 --- a/stackgl_modules/package-lock.json +++ b/stackgl_modules/package-lock.json @@ -26,6 +26,7 @@ "gl-surface3d": "^1.6.0", "glslify": "^7.1.1", "incremental-convex-hull": "plotly/incremental-convex-hull#v1.1.0", + "is-mobile": "^3.1.1", "matrix-camera-controller": "^2.1.4", "ndarray": "plotly/ndarray#v1.1.0", "ndarray-extract-contour": "plotly/ndarray-extract-contour#v1.1.0", diff --git a/stackgl_modules/package.json b/stackgl_modules/package.json index 715fb8ec04e..f672f572abd 100644 --- a/stackgl_modules/package.json +++ b/stackgl_modules/package.json @@ -30,6 +30,7 @@ "gl-surface3d": "^1.6.0", "glslify": "^7.1.1", "incremental-convex-hull": "plotly/incremental-convex-hull#v1.1.0", + "is-mobile": "^3.1.1", "matrix-camera-controller": "^2.1.4", "ndarray": "plotly/ndarray#v1.1.0", "ndarray-extract-contour": "plotly/ndarray-extract-contour#v1.1.0",