@vertexvis/utils 0.10.2-canary.7 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.cjs.js +24 -24
- package/dist/browser.cjs.js.map +1 -1
- package/dist/browser.esm.js +24 -24
- package/dist/browser.esm.js.map +1 -1
- package/dist/bundle.cjs.js +30 -28
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +24 -24
- package/dist/bundle.esm.js.map +1 -1
- package/package.json +8 -8
- package/dist/browser.cjs.min.js +0 -15
- package/dist/browser.cjs.min.js.map +0 -1
- package/dist/browser.esm.min.js +0 -15
- package/dist/browser.esm.min.js.map +0 -1
- package/dist/bundle.cjs.min.js +0 -15
- package/dist/bundle.cjs.min.js.map +0 -1
- package/dist/bundle.esm.min.js +0 -15
- package/dist/bundle.esm.min.js.map +0 -1
package/dist/bundle.esm.js
CHANGED
|
@@ -117,7 +117,7 @@ var hexRegex = /^(#|0x)?([A-Fa-f0-9]{6})$/;
|
|
|
117
117
|
* Constructs a new color with the given red, green, blue and alpha values. If
|
|
118
118
|
* alpha is undefined, defaults to 1.
|
|
119
119
|
*/
|
|
120
|
-
var create = function (r, g, b, a) {
|
|
120
|
+
var create$2 = function (r, g, b, a) {
|
|
121
121
|
if (a === void 0) { a = 255; }
|
|
122
122
|
return { r: r, g: g, b: b, a: a };
|
|
123
123
|
};
|
|
@@ -128,7 +128,7 @@ var create = function (r, g, b, a) {
|
|
|
128
128
|
var fromNumber = function (num) {
|
|
129
129
|
// tslint:disable:no-bitwise
|
|
130
130
|
var normalized = num & 0xffffff;
|
|
131
|
-
return create((normalized >> 16) & 0xff, (normalized >> 8) & 0xff, normalized & 0xff);
|
|
131
|
+
return create$2((normalized >> 16) & 0xff, (normalized >> 8) & 0xff, normalized & 0xff);
|
|
132
132
|
// tslint:enable:no-bitwise
|
|
133
133
|
};
|
|
134
134
|
/**
|
|
@@ -150,11 +150,11 @@ var fromHexString = function (str) {
|
|
|
150
150
|
var fromCss = function (css) {
|
|
151
151
|
var rgbMatch = rgbRegex.exec(css);
|
|
152
152
|
if (rgbMatch != null) {
|
|
153
|
-
return create(parseInt(rgbMatch[1]), parseInt(rgbMatch[2]), parseInt(rgbMatch[3]));
|
|
153
|
+
return create$2(parseInt(rgbMatch[1]), parseInt(rgbMatch[2]), parseInt(rgbMatch[3]));
|
|
154
154
|
}
|
|
155
155
|
var rgbaMatch = rgbaRegex.exec(css);
|
|
156
156
|
if (rgbaMatch != null) {
|
|
157
|
-
return create(parseInt(rgbaMatch[1]), parseInt(rgbaMatch[2]), parseInt(rgbaMatch[3]), Math.floor(parseFloat(rgbaMatch[4]) * 255));
|
|
157
|
+
return create$2(parseInt(rgbaMatch[1]), parseInt(rgbaMatch[2]), parseInt(rgbaMatch[3]), Math.floor(parseFloat(rgbaMatch[4]) * 255));
|
|
158
158
|
}
|
|
159
159
|
if (hexRegex.test(css)) {
|
|
160
160
|
return fromHexString(css);
|
|
@@ -165,7 +165,7 @@ var fromCss = function (css) {
|
|
|
165
165
|
* expected to be `[r, g, b]` or `[r, g, b, a]`.
|
|
166
166
|
*/
|
|
167
167
|
var fromArray = function (rgba) {
|
|
168
|
-
return create(rgba[0], rgba[1], rgba[2], rgba[3]);
|
|
168
|
+
return create$2(rgba[0], rgba[1], rgba[2], rgba[3]);
|
|
169
169
|
};
|
|
170
170
|
/**
|
|
171
171
|
* Returns `true` if the color's alpha channel is 0.
|
|
@@ -193,7 +193,7 @@ var componentToHex = function (num) {
|
|
|
193
193
|
|
|
194
194
|
var color = /*#__PURE__*/Object.freeze({
|
|
195
195
|
__proto__: null,
|
|
196
|
-
create: create,
|
|
196
|
+
create: create$2,
|
|
197
197
|
fromNumber: fromNumber,
|
|
198
198
|
fromHexString: fromHexString,
|
|
199
199
|
fromCss: fromCss,
|
|
@@ -581,7 +581,7 @@ function isObjectObject(o) {
|
|
|
581
581
|
&& Object.prototype.toString.call(o) === '[object Object]';
|
|
582
582
|
}
|
|
583
583
|
|
|
584
|
-
function isPlainObject(o) {
|
|
584
|
+
function isPlainObject$1(o) {
|
|
585
585
|
var ctor,prot;
|
|
586
586
|
|
|
587
587
|
if (isObjectObject(o) === false) return false;
|
|
@@ -605,11 +605,8 @@ function isPlainObject(o) {
|
|
|
605
605
|
|
|
606
606
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
607
607
|
|
|
608
|
-
|
|
609
|
-
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
610
|
-
}
|
|
608
|
+
var lodash_isequal = {exports: {}};
|
|
611
609
|
|
|
612
|
-
var lodash_isequal = createCommonjsModule(function (module, exports) {
|
|
613
610
|
/**
|
|
614
611
|
* Lodash (Custom Build) <https://lodash.com/>
|
|
615
612
|
* Build: `lodash modularize exports="npm" -o ./`
|
|
@@ -619,6 +616,7 @@ var lodash_isequal = createCommonjsModule(function (module, exports) {
|
|
|
619
616
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
620
617
|
*/
|
|
621
618
|
|
|
619
|
+
(function (module, exports) {
|
|
622
620
|
/** Used as the size to enable large array optimizations. */
|
|
623
621
|
var LARGE_ARRAY_SIZE = 200;
|
|
624
622
|
|
|
@@ -704,7 +702,7 @@ var freeSelf = typeof self == 'object' && self && self.Object === Object && self
|
|
|
704
702
|
var root = freeGlobal || freeSelf || Function('return this')();
|
|
705
703
|
|
|
706
704
|
/** Detect free variable `exports`. */
|
|
707
|
-
var freeExports =
|
|
705
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
708
706
|
|
|
709
707
|
/** Detect free variable `module`. */
|
|
710
708
|
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
@@ -2458,7 +2456,9 @@ function stubFalse() {
|
|
|
2458
2456
|
}
|
|
2459
2457
|
|
|
2460
2458
|
module.exports = isEqual;
|
|
2461
|
-
});
|
|
2459
|
+
}(lodash_isequal, lodash_isequal.exports));
|
|
2460
|
+
|
|
2461
|
+
var areEqual = lodash_isequal.exports;
|
|
2462
2462
|
|
|
2463
2463
|
function defaults() {
|
|
2464
2464
|
var objects = [];
|
|
@@ -2476,7 +2476,7 @@ function defaults() {
|
|
|
2476
2476
|
if (result[key] == null) {
|
|
2477
2477
|
result[key] = b[key];
|
|
2478
2478
|
}
|
|
2479
|
-
else if (isPlainObject
|
|
2479
|
+
else if (isPlainObject(result[key])) {
|
|
2480
2480
|
result[key] = defaults(result[key], b[key]);
|
|
2481
2481
|
}
|
|
2482
2482
|
}
|
|
@@ -2506,8 +2506,8 @@ function defaults() {
|
|
|
2506
2506
|
* isPlainObject(Object.create(null)); //=> false
|
|
2507
2507
|
* ```
|
|
2508
2508
|
*/
|
|
2509
|
-
function isPlainObject
|
|
2510
|
-
return isPlainObject(obj);
|
|
2509
|
+
function isPlainObject(obj) {
|
|
2510
|
+
return isPlainObject$1(obj);
|
|
2511
2511
|
}
|
|
2512
2512
|
/**
|
|
2513
2513
|
* Performs a deep comparison of two objects and returns `true` if they're
|
|
@@ -2523,8 +2523,8 @@ function isPlainObject$1(obj) {
|
|
|
2523
2523
|
* @param b The object to compare with `a`.
|
|
2524
2524
|
* @returns `true` if the two objects are equal. Otherwise `false`.
|
|
2525
2525
|
*/
|
|
2526
|
-
function isEqual(a, b) {
|
|
2527
|
-
return
|
|
2526
|
+
function isEqual$1(a, b) {
|
|
2527
|
+
return areEqual(a, b);
|
|
2528
2528
|
}
|
|
2529
2529
|
function toPairs(obj) {
|
|
2530
2530
|
if (obj != null) {
|
|
@@ -2555,8 +2555,8 @@ function fromPairs(pairs) {
|
|
|
2555
2555
|
var objects = /*#__PURE__*/Object.freeze({
|
|
2556
2556
|
__proto__: null,
|
|
2557
2557
|
defaults: defaults,
|
|
2558
|
-
isPlainObject: isPlainObject
|
|
2559
|
-
isEqual: isEqual,
|
|
2558
|
+
isPlainObject: isPlainObject,
|
|
2559
|
+
isEqual: isEqual$1,
|
|
2560
2560
|
toPairs: toPairs,
|
|
2561
2561
|
fromPairs: fromPairs
|
|
2562
2562
|
});
|
|
@@ -2818,7 +2818,7 @@ var parseAndAddParams = function (baseStr, params) {
|
|
|
2818
2818
|
var base = parse(baseStr);
|
|
2819
2819
|
return params ? addQueryParams(params, base) : base;
|
|
2820
2820
|
};
|
|
2821
|
-
var isEqual
|
|
2821
|
+
var isEqual = function (a, b) {
|
|
2822
2822
|
var queryA = JSON.stringify(sortByQueryName(queryAsArray(a)));
|
|
2823
2823
|
var queryB = JSON.stringify(sortByQueryName(queryAsArray(b)));
|
|
2824
2824
|
return (a.scheme === b.scheme &&
|
|
@@ -2937,7 +2937,7 @@ var uri = /*#__PURE__*/Object.freeze({
|
|
|
2937
2937
|
__proto__: null,
|
|
2938
2938
|
parse: parse,
|
|
2939
2939
|
parseAndAddParams: parseAndAddParams,
|
|
2940
|
-
isEqual: isEqual
|
|
2940
|
+
isEqual: isEqual,
|
|
2941
2941
|
replacePath: replacePath,
|
|
2942
2942
|
pathAsArray: pathAsArray,
|
|
2943
2943
|
appendPath: appendPath,
|
|
@@ -3088,11 +3088,11 @@ function v1(options, buf, offset) {
|
|
|
3088
3088
|
return buf || stringify(b);
|
|
3089
3089
|
}
|
|
3090
3090
|
|
|
3091
|
-
var create
|
|
3091
|
+
var create = function () { return v1(); };
|
|
3092
3092
|
|
|
3093
3093
|
var uuid = /*#__PURE__*/Object.freeze({
|
|
3094
3094
|
__proto__: null,
|
|
3095
|
-
create: create
|
|
3095
|
+
create: create
|
|
3096
3096
|
});
|
|
3097
3097
|
|
|
3098
3098
|
var EventDispatcher = /** @class */ (function () {
|