@jobber/components 6.39.0 → 6.40.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/Chips/index.cjs +1 -4
- package/dist/Chips/index.mjs +1 -4
- package/dist/Combobox/index.cjs +0 -2
- package/dist/Combobox/index.mjs +0 -2
- package/dist/Combobox-cjs.js +0 -7
- package/dist/Combobox-es.js +0 -7
- package/dist/ConfirmationModal/index.cjs +0 -1
- package/dist/ConfirmationModal/index.mjs +0 -1
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +0 -2
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +0 -2
- package/dist/DataList/components/DataListFilters/index.cjs +0 -2
- package/dist/DataList/components/DataListFilters/index.mjs +0 -2
- package/dist/DataList/index.cjs +0 -2
- package/dist/DataList/index.mjs +0 -2
- package/dist/FeatureSwitch/index.cjs +0 -1
- package/dist/FeatureSwitch/index.mjs +0 -1
- package/dist/FormatFile/index.cjs +0 -1
- package/dist/FormatFile/index.mjs +0 -1
- package/dist/Gallery/index.cjs +0 -1
- package/dist/Gallery/index.mjs +0 -1
- package/dist/List/index.cjs +0 -1
- package/dist/List/index.mjs +0 -1
- package/dist/Markdown/index.cjs +0 -1
- package/dist/Markdown/index.mjs +0 -1
- package/dist/Markdown-cjs.js +228 -3
- package/dist/Markdown-es.js +226 -1
- package/dist/Page/index.cjs +0 -1
- package/dist/Page/index.mjs +0 -1
- package/dist/index.cjs +0 -2
- package/dist/index.mjs +0 -2
- package/package.json +2 -2
- package/dist/_polyfill-node.process-cjs.js +0 -258
- package/dist/_polyfill-node.process-es.js +0 -255
- package/dist/useAssert-cjs.js +0 -28
- package/dist/useAssert-es.js +0 -26
package/dist/Chips/index.cjs
CHANGED
|
@@ -4,7 +4,6 @@ var React = require('react');
|
|
|
4
4
|
var InternalChipDismissible = require('../InternalChipDismissible-cjs.js');
|
|
5
5
|
var Chip$1 = require('../Chip-cjs.js');
|
|
6
6
|
var Chips = require('../Chips-cjs.js');
|
|
7
|
-
var useAssert = require('../useAssert-cjs.js');
|
|
8
7
|
require('../useScrollToActive-cjs.js');
|
|
9
8
|
require('../_commonjsHelpers-cjs.js');
|
|
10
9
|
require('../_baseFlatten-cjs.js');
|
|
@@ -38,7 +37,6 @@ require('../Tooltip-cjs.js');
|
|
|
38
37
|
require('react-dom');
|
|
39
38
|
require('framer-motion');
|
|
40
39
|
require('../useIsMounted-cjs.js');
|
|
41
|
-
require('../_polyfill-node.process-cjs.js');
|
|
42
40
|
|
|
43
41
|
function ChipDismissible({ label, disabled, invalid, prefix, onClick, onRequestRemove, }) {
|
|
44
42
|
return (React.createElement(InternalChipDismissible.InternalChip, { label: label, disabled: disabled, invalid: invalid, prefix: prefix, onClick: onClick, suffix: React.createElement(Chip$1.InternalChipButton, { icon: "remove", label: label, invalid: invalid, disabled: disabled, onClick: onRequestRemove }) }));
|
|
@@ -47,8 +45,7 @@ function ChipDismissible({ label, disabled, invalid, prefix, onClick, onRequestR
|
|
|
47
45
|
// Only need the component to pass in the data as a react children
|
|
48
46
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
49
47
|
function Chip(props) {
|
|
50
|
-
//
|
|
51
|
-
useAssert.useAssert_2(true, "`<Chip>` component can only be used inside `<Chips>`");
|
|
48
|
+
//eslint-disable-next-line react/jsx-no-useless-fragment
|
|
52
49
|
return React.createElement(React.Fragment, null);
|
|
53
50
|
}
|
|
54
51
|
|
package/dist/Chips/index.mjs
CHANGED
|
@@ -2,7 +2,6 @@ import React__default from 'react';
|
|
|
2
2
|
import { a as InternalChip } from '../InternalChipDismissible-es.js';
|
|
3
3
|
import { I as InternalChipButton } from '../Chip-es.js';
|
|
4
4
|
export { C as Chips } from '../Chips-es.js';
|
|
5
|
-
import { u as useAssert_2 } from '../useAssert-es.js';
|
|
6
5
|
import '../useScrollToActive-es.js';
|
|
7
6
|
import '../_commonjsHelpers-es.js';
|
|
8
7
|
import '../_baseFlatten-es.js';
|
|
@@ -36,7 +35,6 @@ import '../Tooltip-es.js';
|
|
|
36
35
|
import 'react-dom';
|
|
37
36
|
import 'framer-motion';
|
|
38
37
|
import '../useIsMounted-es.js';
|
|
39
|
-
import '../_polyfill-node.process-es.js';
|
|
40
38
|
|
|
41
39
|
function ChipDismissible({ label, disabled, invalid, prefix, onClick, onRequestRemove, }) {
|
|
42
40
|
return (React__default.createElement(InternalChip, { label: label, disabled: disabled, invalid: invalid, prefix: prefix, onClick: onClick, suffix: React__default.createElement(InternalChipButton, { icon: "remove", label: label, invalid: invalid, disabled: disabled, onClick: onRequestRemove }) }));
|
|
@@ -45,8 +43,7 @@ function ChipDismissible({ label, disabled, invalid, prefix, onClick, onRequestR
|
|
|
45
43
|
// Only need the component to pass in the data as a react children
|
|
46
44
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
47
45
|
function Chip(props) {
|
|
48
|
-
//
|
|
49
|
-
useAssert_2(true, "`<Chip>` component can only be used inside `<Chips>`");
|
|
46
|
+
//eslint-disable-next-line react/jsx-no-useless-fragment
|
|
50
47
|
return React__default.createElement(React__default.Fragment, null);
|
|
51
48
|
}
|
|
52
49
|
|
package/dist/Combobox/index.cjs
CHANGED
package/dist/Combobox/index.mjs
CHANGED
package/dist/Combobox-cjs.js
CHANGED
|
@@ -9,7 +9,6 @@ var ComboboxOption = require('./ComboboxOption-cjs.js');
|
|
|
9
9
|
var debounce = require('./debounce-cjs.js');
|
|
10
10
|
var noop = require('./noop-cjs.js');
|
|
11
11
|
var ComboboxActivator = require('./ComboboxActivator-cjs.js');
|
|
12
|
-
var useAssert = require('./useAssert-cjs.js');
|
|
13
12
|
|
|
14
13
|
var styles = {"overlay":"xxU2WqkpXZU-","wrapper":"W-9SMjhEMpI-","spinning":"mqMvu8yxz2w-"};
|
|
15
14
|
|
|
@@ -77,22 +76,16 @@ function useCombobox(selected, onSelect, options, onClose, multiSelect, onSearch
|
|
|
77
76
|
};
|
|
78
77
|
}
|
|
79
78
|
|
|
80
|
-
const COMBOBOX_TRIGGER_COUNT_ERROR_MESSAGE = "Combobox must have exactly one Trigger element";
|
|
81
79
|
function useComboboxValidation(children) {
|
|
82
80
|
const optionElements = getCompoundComponents(ComboboxOption.ComboboxOption, children);
|
|
83
81
|
const actionElements = getCompoundComponents(ComboboxAction.ComboboxAction, children);
|
|
84
82
|
const activatorElements = getCompoundComponents(ComboboxActivator.ComboboxActivator, children);
|
|
85
|
-
const shouldThrowTriggerError = isInvalid(activatorElements);
|
|
86
|
-
useAssert.useAssert_2(shouldThrowTriggerError, COMBOBOX_TRIGGER_COUNT_ERROR_MESSAGE);
|
|
87
83
|
return {
|
|
88
84
|
optionElements,
|
|
89
85
|
triggerElement: activatorElements[0],
|
|
90
86
|
actionElements,
|
|
91
87
|
};
|
|
92
88
|
}
|
|
93
|
-
function isInvalid(activators) {
|
|
94
|
-
return activators.length > 1 ? true : false;
|
|
95
|
-
}
|
|
96
89
|
/**
|
|
97
90
|
* Return all instances child component that matches the `type` provided
|
|
98
91
|
*/
|
package/dist/Combobox-es.js
CHANGED
|
@@ -7,7 +7,6 @@ import { C as ComboboxOption } from './ComboboxOption-es.js';
|
|
|
7
7
|
import { d as debounce } from './debounce-es.js';
|
|
8
8
|
import { n as noop } from './noop-es.js';
|
|
9
9
|
import { C as ComboboxActivator } from './ComboboxActivator-es.js';
|
|
10
|
-
import { u as useAssert_2 } from './useAssert-es.js';
|
|
11
10
|
|
|
12
11
|
var styles = {"overlay":"xxU2WqkpXZU-","wrapper":"W-9SMjhEMpI-","spinning":"mqMvu8yxz2w-"};
|
|
13
12
|
|
|
@@ -75,22 +74,16 @@ function useCombobox(selected, onSelect, options, onClose, multiSelect, onSearch
|
|
|
75
74
|
};
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
const COMBOBOX_TRIGGER_COUNT_ERROR_MESSAGE = "Combobox must have exactly one Trigger element";
|
|
79
77
|
function useComboboxValidation(children) {
|
|
80
78
|
const optionElements = getCompoundComponents(ComboboxOption, children);
|
|
81
79
|
const actionElements = getCompoundComponents(ComboboxAction, children);
|
|
82
80
|
const activatorElements = getCompoundComponents(ComboboxActivator, children);
|
|
83
|
-
const shouldThrowTriggerError = isInvalid(activatorElements);
|
|
84
|
-
useAssert_2(shouldThrowTriggerError, COMBOBOX_TRIGGER_COUNT_ERROR_MESSAGE);
|
|
85
81
|
return {
|
|
86
82
|
optionElements,
|
|
87
83
|
triggerElement: activatorElements[0],
|
|
88
84
|
actionElements,
|
|
89
85
|
};
|
|
90
86
|
}
|
|
91
|
-
function isInvalid(activators) {
|
|
92
|
-
return activators.length > 1 ? true : false;
|
|
93
|
-
}
|
|
94
87
|
/**
|
|
95
88
|
* Return all instances child component that matches the `type` provided
|
|
96
89
|
*/
|
|
@@ -46,8 +46,6 @@ require('../../../../../debounce-cjs.js');
|
|
|
46
46
|
require('../../../../../isObjectLike-cjs.js');
|
|
47
47
|
require('../../../../../isSymbol-cjs.js');
|
|
48
48
|
require('../../../../../ComboboxActivator-cjs.js');
|
|
49
|
-
require('../../../../../useAssert-cjs.js');
|
|
50
|
-
require('../../../../../_polyfill-node.process-cjs.js');
|
|
51
49
|
|
|
52
50
|
|
|
53
51
|
|
|
@@ -44,5 +44,3 @@ import '../../../../../debounce-es.js';
|
|
|
44
44
|
import '../../../../../isObjectLike-es.js';
|
|
45
45
|
import '../../../../../isSymbol-es.js';
|
|
46
46
|
import '../../../../../ComboboxActivator-es.js';
|
|
47
|
-
import '../../../../../useAssert-es.js';
|
|
48
|
-
import '../../../../../_polyfill-node.process-es.js';
|
|
@@ -47,8 +47,6 @@ require('../../../debounce-cjs.js');
|
|
|
47
47
|
require('../../../isObjectLike-cjs.js');
|
|
48
48
|
require('../../../isSymbol-cjs.js');
|
|
49
49
|
require('../../../ComboboxActivator-cjs.js');
|
|
50
|
-
require('../../../useAssert-cjs.js');
|
|
51
|
-
require('../../../_polyfill-node.process-cjs.js');
|
|
52
50
|
require('../../../DataListOverflowFade-cjs.js');
|
|
53
51
|
require('../../../DataList.utils-cjs.js');
|
|
54
52
|
require('../../../_getTag-cjs.js');
|
|
@@ -45,8 +45,6 @@ import '../../../debounce-es.js';
|
|
|
45
45
|
import '../../../isObjectLike-es.js';
|
|
46
46
|
import '../../../isSymbol-es.js';
|
|
47
47
|
import '../../../ComboboxActivator-es.js';
|
|
48
|
-
import '../../../useAssert-es.js';
|
|
49
|
-
import '../../../_polyfill-node.process-es.js';
|
|
50
48
|
import '../../../DataListOverflowFade-es.js';
|
|
51
49
|
import '../../../DataList.utils-es.js';
|
|
52
50
|
import '../../../_getTag-es.js';
|
package/dist/DataList/index.cjs
CHANGED
|
@@ -80,8 +80,6 @@ require('../useChildComponent-cjs.js');
|
|
|
80
80
|
require('../debounce-cjs.js');
|
|
81
81
|
require('../isSymbol-cjs.js');
|
|
82
82
|
require('../ComboboxActivator-cjs.js');
|
|
83
|
-
require('../useAssert-cjs.js');
|
|
84
|
-
require('../_polyfill-node.process-cjs.js');
|
|
85
83
|
require('../DataListOverflowFade-cjs.js');
|
|
86
84
|
require('../DataListStickyHeader-cjs.js');
|
|
87
85
|
require('../DataListSearch-cjs.js');
|
package/dist/DataList/index.mjs
CHANGED
|
@@ -78,8 +78,6 @@ import '../useChildComponent-es.js';
|
|
|
78
78
|
import '../debounce-es.js';
|
|
79
79
|
import '../isSymbol-es.js';
|
|
80
80
|
import '../ComboboxActivator-es.js';
|
|
81
|
-
import '../useAssert-es.js';
|
|
82
|
-
import '../_polyfill-node.process-es.js';
|
|
83
81
|
import '../DataListOverflowFade-es.js';
|
|
84
82
|
import '../DataListStickyHeader-es.js';
|
|
85
83
|
import '../DataListSearch-es.js';
|
package/dist/Gallery/index.cjs
CHANGED
package/dist/Gallery/index.mjs
CHANGED
package/dist/List/index.cjs
CHANGED
package/dist/List/index.mjs
CHANGED
package/dist/Markdown/index.cjs
CHANGED
package/dist/Markdown/index.mjs
CHANGED
package/dist/Markdown-cjs.js
CHANGED
|
@@ -7,7 +7,6 @@ var Heading = require('./Heading-cjs.js');
|
|
|
7
7
|
var Content = require('./Content-cjs.js');
|
|
8
8
|
var index$3 = require('./index-cjs.js');
|
|
9
9
|
var _commonjsHelpers = require('./_commonjsHelpers-cjs.js');
|
|
10
|
-
var _polyfillNode_process = require('./_polyfill-node.process-cjs.js');
|
|
11
10
|
|
|
12
11
|
const protocols = ['http', 'https', 'mailto', 'tel'];
|
|
13
12
|
|
|
@@ -612,6 +611,232 @@ var substr = 'ab'.substr(-1) === 'b' ?
|
|
|
612
611
|
}
|
|
613
612
|
;
|
|
614
613
|
|
|
614
|
+
var global$1 = (typeof global !== "undefined" ? global :
|
|
615
|
+
typeof self !== "undefined" ? self :
|
|
616
|
+
typeof window !== "undefined" ? window : {});
|
|
617
|
+
|
|
618
|
+
// shim for using process in browser
|
|
619
|
+
// based off https://github.com/defunctzombie/node-process/blob/master/browser.js
|
|
620
|
+
|
|
621
|
+
function defaultSetTimout() {
|
|
622
|
+
throw new Error('setTimeout has not been defined');
|
|
623
|
+
}
|
|
624
|
+
function defaultClearTimeout () {
|
|
625
|
+
throw new Error('clearTimeout has not been defined');
|
|
626
|
+
}
|
|
627
|
+
var cachedSetTimeout = defaultSetTimout;
|
|
628
|
+
var cachedClearTimeout = defaultClearTimeout;
|
|
629
|
+
if (typeof global$1.setTimeout === 'function') {
|
|
630
|
+
cachedSetTimeout = setTimeout;
|
|
631
|
+
}
|
|
632
|
+
if (typeof global$1.clearTimeout === 'function') {
|
|
633
|
+
cachedClearTimeout = clearTimeout;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
function runTimeout(fun) {
|
|
637
|
+
if (cachedSetTimeout === setTimeout) {
|
|
638
|
+
//normal enviroments in sane situations
|
|
639
|
+
return setTimeout(fun, 0);
|
|
640
|
+
}
|
|
641
|
+
// if setTimeout wasn't available but was latter defined
|
|
642
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
643
|
+
cachedSetTimeout = setTimeout;
|
|
644
|
+
return setTimeout(fun, 0);
|
|
645
|
+
}
|
|
646
|
+
try {
|
|
647
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
648
|
+
return cachedSetTimeout(fun, 0);
|
|
649
|
+
} catch(e){
|
|
650
|
+
try {
|
|
651
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
652
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
653
|
+
} catch(e){
|
|
654
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
655
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
}
|
|
661
|
+
function runClearTimeout(marker) {
|
|
662
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
663
|
+
//normal enviroments in sane situations
|
|
664
|
+
return clearTimeout(marker);
|
|
665
|
+
}
|
|
666
|
+
// if clearTimeout wasn't available but was latter defined
|
|
667
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
668
|
+
cachedClearTimeout = clearTimeout;
|
|
669
|
+
return clearTimeout(marker);
|
|
670
|
+
}
|
|
671
|
+
try {
|
|
672
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
673
|
+
return cachedClearTimeout(marker);
|
|
674
|
+
} catch (e){
|
|
675
|
+
try {
|
|
676
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
677
|
+
return cachedClearTimeout.call(null, marker);
|
|
678
|
+
} catch (e){
|
|
679
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
680
|
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
681
|
+
return cachedClearTimeout.call(this, marker);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
}
|
|
688
|
+
var queue = [];
|
|
689
|
+
var draining = false;
|
|
690
|
+
var currentQueue;
|
|
691
|
+
var queueIndex = -1;
|
|
692
|
+
|
|
693
|
+
function cleanUpNextTick() {
|
|
694
|
+
if (!draining || !currentQueue) {
|
|
695
|
+
return;
|
|
696
|
+
}
|
|
697
|
+
draining = false;
|
|
698
|
+
if (currentQueue.length) {
|
|
699
|
+
queue = currentQueue.concat(queue);
|
|
700
|
+
} else {
|
|
701
|
+
queueIndex = -1;
|
|
702
|
+
}
|
|
703
|
+
if (queue.length) {
|
|
704
|
+
drainQueue();
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
function drainQueue() {
|
|
709
|
+
if (draining) {
|
|
710
|
+
return;
|
|
711
|
+
}
|
|
712
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
713
|
+
draining = true;
|
|
714
|
+
|
|
715
|
+
var len = queue.length;
|
|
716
|
+
while(len) {
|
|
717
|
+
currentQueue = queue;
|
|
718
|
+
queue = [];
|
|
719
|
+
while (++queueIndex < len) {
|
|
720
|
+
if (currentQueue) {
|
|
721
|
+
currentQueue[queueIndex].run();
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
queueIndex = -1;
|
|
725
|
+
len = queue.length;
|
|
726
|
+
}
|
|
727
|
+
currentQueue = null;
|
|
728
|
+
draining = false;
|
|
729
|
+
runClearTimeout(timeout);
|
|
730
|
+
}
|
|
731
|
+
function nextTick(fun) {
|
|
732
|
+
var args = new Array(arguments.length - 1);
|
|
733
|
+
if (arguments.length > 1) {
|
|
734
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
735
|
+
args[i - 1] = arguments[i];
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
queue.push(new Item(fun, args));
|
|
739
|
+
if (queue.length === 1 && !draining) {
|
|
740
|
+
runTimeout(drainQueue);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
// v8 likes predictible objects
|
|
744
|
+
function Item(fun, array) {
|
|
745
|
+
this.fun = fun;
|
|
746
|
+
this.array = array;
|
|
747
|
+
}
|
|
748
|
+
Item.prototype.run = function () {
|
|
749
|
+
this.fun.apply(null, this.array);
|
|
750
|
+
};
|
|
751
|
+
var title = 'browser';
|
|
752
|
+
var platform = 'browser';
|
|
753
|
+
var browser = true;
|
|
754
|
+
var env = {};
|
|
755
|
+
var argv = [];
|
|
756
|
+
var version = ''; // empty string to avoid regexp issues
|
|
757
|
+
var versions = {};
|
|
758
|
+
var release = {};
|
|
759
|
+
var config = {};
|
|
760
|
+
|
|
761
|
+
function noop() {}
|
|
762
|
+
|
|
763
|
+
var on = noop;
|
|
764
|
+
var addListener = noop;
|
|
765
|
+
var once = noop;
|
|
766
|
+
var off = noop;
|
|
767
|
+
var removeListener = noop;
|
|
768
|
+
var removeAllListeners = noop;
|
|
769
|
+
var emit = noop;
|
|
770
|
+
|
|
771
|
+
function binding(name) {
|
|
772
|
+
throw new Error('process.binding is not supported');
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
function cwd () { return '/' }
|
|
776
|
+
function chdir (dir) {
|
|
777
|
+
throw new Error('process.chdir is not supported');
|
|
778
|
+
}function umask() { return 0; }
|
|
779
|
+
|
|
780
|
+
// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
|
|
781
|
+
var performance = global$1.performance || {};
|
|
782
|
+
var performanceNow =
|
|
783
|
+
performance.now ||
|
|
784
|
+
performance.mozNow ||
|
|
785
|
+
performance.msNow ||
|
|
786
|
+
performance.oNow ||
|
|
787
|
+
performance.webkitNow ||
|
|
788
|
+
function(){ return (new Date()).getTime() };
|
|
789
|
+
|
|
790
|
+
// generate timestamp or delta
|
|
791
|
+
// see http://nodejs.org/api/process.html#process_process_hrtime
|
|
792
|
+
function hrtime(previousTimestamp){
|
|
793
|
+
var clocktime = performanceNow.call(performance)*1e-3;
|
|
794
|
+
var seconds = Math.floor(clocktime);
|
|
795
|
+
var nanoseconds = Math.floor((clocktime%1)*1e9);
|
|
796
|
+
if (previousTimestamp) {
|
|
797
|
+
seconds = seconds - previousTimestamp[0];
|
|
798
|
+
nanoseconds = nanoseconds - previousTimestamp[1];
|
|
799
|
+
if (nanoseconds<0) {
|
|
800
|
+
seconds--;
|
|
801
|
+
nanoseconds += 1e9;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
return [seconds,nanoseconds]
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
var startTime = new Date();
|
|
808
|
+
function uptime() {
|
|
809
|
+
var currentTime = new Date();
|
|
810
|
+
var dif = currentTime - startTime;
|
|
811
|
+
return dif / 1000;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
var browser$1 = {
|
|
815
|
+
nextTick: nextTick,
|
|
816
|
+
title: title,
|
|
817
|
+
browser: browser,
|
|
818
|
+
env: env,
|
|
819
|
+
argv: argv,
|
|
820
|
+
version: version,
|
|
821
|
+
versions: versions,
|
|
822
|
+
on: on,
|
|
823
|
+
addListener: addListener,
|
|
824
|
+
once: once,
|
|
825
|
+
off: off,
|
|
826
|
+
removeListener: removeListener,
|
|
827
|
+
removeAllListeners: removeAllListeners,
|
|
828
|
+
emit: emit,
|
|
829
|
+
binding: binding,
|
|
830
|
+
cwd: cwd,
|
|
831
|
+
chdir: chdir,
|
|
832
|
+
umask: umask,
|
|
833
|
+
hrtime: hrtime,
|
|
834
|
+
platform: platform,
|
|
835
|
+
release: release,
|
|
836
|
+
config: config,
|
|
837
|
+
uptime: uptime
|
|
838
|
+
};
|
|
839
|
+
|
|
615
840
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
616
841
|
|
|
617
842
|
|
|
@@ -1896,7 +2121,7 @@ let VFile$1 = class VFile {
|
|
|
1896
2121
|
*
|
|
1897
2122
|
* @type {string}
|
|
1898
2123
|
*/
|
|
1899
|
-
this.cwd =
|
|
2124
|
+
this.cwd = browser$1.cwd();
|
|
1900
2125
|
|
|
1901
2126
|
/* eslint-disable no-unused-expressions */
|
|
1902
2127
|
/**
|
|
@@ -2985,7 +3210,7 @@ class VFile {
|
|
|
2985
3210
|
*
|
|
2986
3211
|
* @type {string}
|
|
2987
3212
|
*/
|
|
2988
|
-
this.cwd =
|
|
3213
|
+
this.cwd = browser$1.cwd();
|
|
2989
3214
|
|
|
2990
3215
|
/* eslint-disable no-unused-expressions */
|
|
2991
3216
|
/**
|