Skip to content

Commit 84b1d2a

Browse files
committed
Update plotlywidget build paths
1 parent 1aa2f66 commit 84b1d2a

File tree

3 files changed

+106
-113
lines changed

3 files changed

+106
-113
lines changed

js/webpack.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ module.exports = [
2121
entry: './src/extension.js',
2222
output: {
2323
filename: 'extension.js',
24-
path: path.resolve(__dirname, '..', 'plotlywidget', 'static'),
24+
path: path.resolve(
25+
__dirname, '..', 'plotly-package', 'plotlywidget', 'static'),
2526
libraryTarget: 'amd'
2627
}
2728
},
@@ -34,7 +35,8 @@ module.exports = [
3435
entry: './src/index.js',
3536
output: {
3637
filename: 'index.js',
37-
path: path.resolve(__dirname, '..', 'plotlywidget', 'static'),
38+
path: path.resolve(
39+
__dirname, '..', 'plotly-package', 'plotlywidget', 'static'),
3840
libraryTarget: 'amd'
3941
},
4042
node: {

plotly-package/plotlywidget/__init__.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

plotly-package/plotlywidget/static/index.js

Lines changed: 102 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -68,30 +68,30 @@ define(["@jupyter-widgets/base"], function(__WEBPACK_EXTERNAL_MODULE_21__) { ret
6868
/***/ (function(module, exports, __webpack_require__) {
6969

7070
"use strict";
71-
/**
72-
* inspired by is-number <https://github.com/jonschlinkert/is-number>
73-
* but significantly simplified and sped up by ignoring number and string constructors
74-
* ie these return false:
75-
* new Number(1)
76-
* new String('1')
77-
*/
78-
79-
80-
81-
var allBlankCharCodes = __webpack_require__(26);
82-
83-
module.exports = function(n) {
84-
var type = typeof n;
85-
if(type === 'string') {
86-
var original = n;
87-
n = +n;
88-
// whitespace strings cast to zero - filter them out
89-
if(n===0 && allBlankCharCodes(original)) return false;
90-
}
91-
else if(type !== 'number') return false;
92-
93-
return n - n < 1;
94-
};
71+
/**
72+
* inspired by is-number <https://github.com/jonschlinkert/is-number>
73+
* but significantly simplified and sped up by ignoring number and string constructors
74+
* ie these return false:
75+
* new Number(1)
76+
* new String('1')
77+
*/
78+
79+
80+
81+
var allBlankCharCodes = __webpack_require__(26);
82+
83+
module.exports = function(n) {
84+
var type = typeof n;
85+
if(type === 'string') {
86+
var original = n;
87+
n = +n;
88+
// whitespace strings cast to zero - filter them out
89+
if(n===0 && allBlankCharCodes(original)) return false;
90+
}
91+
else if(type !== 'number') return false;
92+
93+
return n - n < 1;
94+
};
9595

9696

9797
/***/ }),
@@ -10495,27 +10495,27 @@ module.exports = function(opts) {
1049510495
/* 10 */
1049610496
/***/ (function(module, exports) {
1049710497

10498-
var g;
10499-
10500-
// This works in non-strict mode
10501-
g = (function() {
10502-
return this;
10503-
})();
10504-
10505-
try {
10506-
// This works if eval is allowed (see CSP)
10507-
g = g || Function("return this")() || (1,eval)("this");
10508-
} catch(e) {
10509-
// This works if the window reference is available
10510-
if(typeof window === "object")
10511-
g = window;
10512-
}
10513-
10514-
// g can still be undefined, but nothing to do about it...
10515-
// We return undefined, instead of nothing here, so it's
10516-
// easier to handle this case. if(!global) { ...}
10517-
10518-
module.exports = g;
10498+
var g;
10499+
10500+
// This works in non-strict mode
10501+
g = (function() {
10502+
return this;
10503+
})();
10504+
10505+
try {
10506+
// This works if eval is allowed (see CSP)
10507+
g = g || Function("return this")() || (1,eval)("this");
10508+
} catch(e) {
10509+
// This works if the window reference is available
10510+
if(typeof window === "object")
10511+
g = window;
10512+
}
10513+
10514+
// g can still be undefined, but nothing to do about it...
10515+
// We return undefined, instead of nothing here, so it's
10516+
// easier to handle this case. if(!global) { ...}
10517+
10518+
module.exports = g;
1051910519

1052010520

1052110521
/***/ }),
@@ -31390,28 +31390,28 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_21__;
3139031390
/* 23 */
3139131391
/***/ (function(module, exports) {
3139231392

31393-
module.exports = function(module) {
31394-
if(!module.webpackPolyfill) {
31395-
module.deprecate = function() {};
31396-
module.paths = [];
31397-
// module.parent = undefined by default
31398-
if(!module.children) module.children = [];
31399-
Object.defineProperty(module, "loaded", {
31400-
enumerable: true,
31401-
get: function() {
31402-
return module.l;
31403-
}
31404-
});
31405-
Object.defineProperty(module, "id", {
31406-
enumerable: true,
31407-
get: function() {
31408-
return module.i;
31409-
}
31410-
});
31411-
module.webpackPolyfill = 1;
31412-
}
31413-
return module;
31414-
};
31393+
module.exports = function(module) {
31394+
if(!module.webpackPolyfill) {
31395+
module.deprecate = function() {};
31396+
module.paths = [];
31397+
// module.parent = undefined by default
31398+
if(!module.children) module.children = [];
31399+
Object.defineProperty(module, "loaded", {
31400+
enumerable: true,
31401+
get: function() {
31402+
return module.l;
31403+
}
31404+
});
31405+
Object.defineProperty(module, "id", {
31406+
enumerable: true,
31407+
get: function() {
31408+
return module.i;
31409+
}
31410+
});
31411+
module.webpackPolyfill = 1;
31412+
}
31413+
return module;
31414+
};
3141531415

3141631416

3141731417
/***/ }),
@@ -32612,41 +32612,41 @@ lib.formatPercent = function(ratio, n) {
3261232612
/***/ (function(module, exports, __webpack_require__) {
3261332613

3261432614
"use strict";
32615-
32616-
32617-
/**
32618-
* Is this string all whitespace?
32619-
* This solution kind of makes my brain hurt, but it's significantly faster
32620-
* than !str.trim() or any other solution I could find.
32621-
*
32622-
* whitespace codes from: http://en.wikipedia.org/wiki/Whitespace_character
32623-
* and verified with:
32624-
*
32625-
* for(var i = 0; i < 65536; i++) {
32626-
* var s = String.fromCharCode(i);
32627-
* if(+s===0 && !s.trim()) console.log(i, s);
32628-
* }
32629-
*
32630-
* which counts a couple of these as *not* whitespace, but finds nothing else
32631-
* that *is* whitespace. Note that charCodeAt stops at 16 bits, but it appears
32632-
* that there are no whitespace characters above this, and code points above
32633-
* this do not map onto white space characters.
32634-
*/
32635-
32636-
module.exports = function(str){
32637-
var l = str.length,
32638-
a;
32639-
for(var i = 0; i < l; i++) {
32640-
a = str.charCodeAt(i);
32641-
if((a < 9 || a > 13) && (a !== 32) && (a !== 133) && (a !== 160) &&
32642-
(a !== 5760) && (a !== 6158) && (a < 8192 || a > 8205) &&
32643-
(a !== 8232) && (a !== 8233) && (a !== 8239) && (a !== 8287) &&
32644-
(a !== 8288) && (a !== 12288) && (a !== 65279)) {
32645-
return false;
32646-
}
32647-
}
32648-
return true;
32649-
}
32615+
32616+
32617+
/**
32618+
* Is this string all whitespace?
32619+
* This solution kind of makes my brain hurt, but it's significantly faster
32620+
* than !str.trim() or any other solution I could find.
32621+
*
32622+
* whitespace codes from: http://en.wikipedia.org/wiki/Whitespace_character
32623+
* and verified with:
32624+
*
32625+
* for(var i = 0; i < 65536; i++) {
32626+
* var s = String.fromCharCode(i);
32627+
* if(+s===0 && !s.trim()) console.log(i, s);
32628+
* }
32629+
*
32630+
* which counts a couple of these as *not* whitespace, but finds nothing else
32631+
* that *is* whitespace. Note that charCodeAt stops at 16 bits, but it appears
32632+
* that there are no whitespace characters above this, and code points above
32633+
* this do not map onto white space characters.
32634+
*/
32635+
32636+
module.exports = function(str){
32637+
var l = str.length,
32638+
a;
32639+
for(var i = 0; i < l; i++) {
32640+
a = str.charCodeAt(i);
32641+
if((a < 9 || a > 13) && (a !== 32) && (a !== 133) && (a !== 160) &&
32642+
(a !== 5760) && (a !== 6158) && (a < 8192 || a > 8205) &&
32643+
(a !== 8232) && (a !== 8233) && (a !== 8239) && (a !== 8287) &&
32644+
(a !== 8288) && (a !== 12288) && (a !== 65279)) {
32645+
return false;
32646+
}
32647+
}
32648+
return true;
32649+
}
3265032650

3265132651

3265232652
/***/ }),

0 commit comments

Comments
 (0)