@eightshift/ui-components 5.3.0 → 5.3.2
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/components/button/button.js +27 -1
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/menu/menu.js +6 -0
- package/dist/components/modal/modal.js +6 -1
- package/dist/components/popover/popover.js +26 -0
- package/dist/components/select/v2/async-multi-select.js +1 -1
- package/dist/components/select/v2/async-select.js +1 -1
- package/dist/components/select/v2/multi-select.js +1 -1
- package/dist/components/select/v2/shared.js +1 -1
- package/dist/components/select/v2/single-select.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +5 -0
- package/dist/components/tooltip/tooltip.js +23 -0
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/{react-jsx-parser.min-LF707GK8.js → react-jsx-parser.min-VUl-CuCv.js} +92 -89
- package/package.json +7 -7
|
@@ -10,7 +10,7 @@ import { c as cva } from "../../index-Dq3gT5pW.js";
|
|
|
10
10
|
import { Tooltip } from "../tooltip/tooltip.js";
|
|
11
11
|
import { _ as __ } from "../../default-i18n-CN_q3KUs.js";
|
|
12
12
|
import { icons } from "../../icons/icons.js";
|
|
13
|
-
import "../../react-jsx-parser.min-
|
|
13
|
+
import "../../react-jsx-parser.min-VUl-CuCv.js";
|
|
14
14
|
function $2680b1829e803644$export$fa142eb1681c520(props, ref) {
|
|
15
15
|
const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, orientation = "horizontal" } = props;
|
|
16
16
|
let [isInToolbar, setInToolbar] = useState(false);
|
|
@@ -89,6 +89,32 @@ const $13c3c67164f4d5be$export$4c260019440d418f = /* @__PURE__ */ forwardRef(fun
|
|
|
89
89
|
"data-orientation": props.orientation || "horizontal"
|
|
90
90
|
}, renderProps.children);
|
|
91
91
|
});
|
|
92
|
+
/**
|
|
93
|
+
* @typedef {import('../tooltip/tooltip').TooltipProps} TooltipProps
|
|
94
|
+
*
|
|
95
|
+
* @preserve
|
|
96
|
+
* */
|
|
97
|
+
/**
|
|
98
|
+
* @typedef {Object} ButtonProps
|
|
99
|
+
* @property {JSX.Element} [props.icon] - Icon to display within the button.
|
|
100
|
+
* @property {ButtonSize} [props.size='default'] - The size of the button.
|
|
101
|
+
* @property {ButtonType} [props.type='default'] - The type of the button.
|
|
102
|
+
* @property {boolean} [props.disabled] - If `true`, the button is disabled.
|
|
103
|
+
* @property {string} [props.className] - Classes to pass to the button.
|
|
104
|
+
* @property {string|boolean} [props.tooltip] - Tooltip text to display on hover. If set to `true` and an `aria-label` is not provided, the tooltip text will be used as the `aria-label`.
|
|
105
|
+
* @property {Function} [props.onPress] - Function to run when the button is pressed.
|
|
106
|
+
* @property {React.Ref} [props.forwardedRef] - Ref to forward to the button. Use the same as the `ref` prop.
|
|
107
|
+
* @property {string} [props.wrapperClassName] - Classes to pass to the tooltip wrapper.
|
|
108
|
+
* @property {TooltipProps} [props.tooltipProps] - Props to pass to the tooltip.
|
|
109
|
+
* @property {boolean} [props.pending] - If `true`, the button is in a pending state, which can be used to indicate that an action is being processed.
|
|
110
|
+
* @property {string} [props.pendingAriaLabel='Loading'] - ARIA label for the pending state, used for screen readers.
|
|
111
|
+
* @property {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
112
|
+
*
|
|
113
|
+
* @typedef {'small' | 'default' | 'large'} ButtonSize
|
|
114
|
+
* @typedef {'default' | 'selected' | 'selectedGhost' | 'ghost' | 'danger' | 'dangerGhost'} ButtonType
|
|
115
|
+
*
|
|
116
|
+
* @preserve
|
|
117
|
+
*/
|
|
92
118
|
/**
|
|
93
119
|
* A simple button component.
|
|
94
120
|
*
|
|
@@ -4,7 +4,7 @@ import "../../default-i18n-CN_q3KUs.js";
|
|
|
4
4
|
import { DraggableContext } from "./draggable-context.js";
|
|
5
5
|
import { useContext } from "react";
|
|
6
6
|
import { icons } from "../../icons/icons.js";
|
|
7
|
-
import "../../react-jsx-parser.min-
|
|
7
|
+
import "../../react-jsx-parser.min-VUl-CuCv.js";
|
|
8
8
|
/**
|
|
9
9
|
* A Draggable item handle.
|
|
10
10
|
*
|
|
@@ -4,7 +4,7 @@ import "../../default-i18n-CN_q3KUs.js";
|
|
|
4
4
|
import { BaseControl } from "../base-control/base-control.js";
|
|
5
5
|
import { icons } from "../../icons/icons.js";
|
|
6
6
|
import { cloneElement } from "react";
|
|
7
|
-
import "../../react-jsx-parser.min-
|
|
7
|
+
import "../../react-jsx-parser.min-VUl-CuCv.js";
|
|
8
8
|
/**
|
|
9
9
|
* A DraggableList item.
|
|
10
10
|
*
|
|
@@ -8,6 +8,12 @@ import { Popover } from "../popover/popover.js";
|
|
|
8
8
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
9
9
|
import { cloneElement } from "react";
|
|
10
10
|
import { _ as __ } from "../../default-i18n-CN_q3KUs.js";
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {import('../button/button').ButtonProps} ButtonProps
|
|
13
|
+
* @typedef {import('../popover/popover').PopoverProps} PopoverProps
|
|
14
|
+
*
|
|
15
|
+
* @preserve
|
|
16
|
+
* */
|
|
11
17
|
/**
|
|
12
18
|
* A simple menu component.
|
|
13
19
|
*
|
|
@@ -9,7 +9,7 @@ import { Button } from "../button/button.js";
|
|
|
9
9
|
import { _ as __ } from "../../default-i18n-CN_q3KUs.js";
|
|
10
10
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
11
11
|
import { icons } from "../../icons/icons.js";
|
|
12
|
-
import "../../react-jsx-parser.min-
|
|
12
|
+
import "../../react-jsx-parser.min-VUl-CuCv.js";
|
|
13
13
|
import { HStack } from "../layout/hstack.js";
|
|
14
14
|
let $5df64b3807dc15ee$var$visualViewport = typeof document !== "undefined" && window.visualViewport;
|
|
15
15
|
function $5df64b3807dc15ee$export$d699905dd57c73ca() {
|
|
@@ -210,6 +210,11 @@ function $f3f84453ead64de5$var$ModalContent(props) {
|
|
|
210
210
|
onDismiss: state.close
|
|
211
211
|
}), renderProps.children);
|
|
212
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* @typedef {import('../button/button').ButtonProps} ButtonProps
|
|
215
|
+
*
|
|
216
|
+
* @preserve
|
|
217
|
+
* */
|
|
213
218
|
/**
|
|
214
219
|
* Modal dialog.
|
|
215
220
|
*
|
|
@@ -3,6 +3,27 @@ import { e as $07b14b47974efb58$export$5b6b19405a83ff9d, f as $de32f1b87079253c$
|
|
|
3
3
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
4
4
|
import { _ as __ } from "../../default-i18n-CN_q3KUs.js";
|
|
5
5
|
import { Button } from "../button/button.js";
|
|
6
|
+
/**
|
|
7
|
+
* @typedef {Object} PopoverProps
|
|
8
|
+
* @property {React.Ref} props.triggerRef - Ref of the trigger button. In uncontrolled mode, this element will be used to open the popover. In controlled mode, the popover will be anchored to this element.
|
|
9
|
+
* @property {boolean} [props.openByDefault=false] - (**Controlled mode**) If `true`, the popover is open by default.
|
|
10
|
+
* @property {boolean} props.isOpen - (**Uncontrolled mode**) If `true`, the popover is open.
|
|
11
|
+
* @property {Function} props.onOpenChange - (**Uncontrolled mode**) Function to run when the popover is opened or closed. `(isOpen: boolean) => void`.
|
|
12
|
+
* @property {PopoverPlacement} props.placement - The placement of the popover.
|
|
13
|
+
* @property {string} [props.className] - Classes to pass to the popover contents.
|
|
14
|
+
* @property {string} [props.wrapperClassName] - Classes to pass to the popover wrapper.
|
|
15
|
+
* @property {Object} props.style - Styles to pass to the popover.
|
|
16
|
+
* @property {number} props.offset - Offset from the trigger element, on the same axis as the placement of the popover (e.g. if `placement` is `left`, this controls the horizontal spacing from the element).
|
|
17
|
+
* @property {number} props.crossOffset - Offset from the trigger element, on the opposite axis as the placement of the popover (e.g. if `placement` is `left`, this controls the vertical spacing from the element).
|
|
18
|
+
* @property {number} props.containerPadding - Space that should be left between the popover and the edge of the container (the default container is browser window).
|
|
19
|
+
* @property {boolean} props.shouldFlip - If `true`, the popover should flip when there is not enough space.
|
|
20
|
+
* @property {Function} [props.shouldCloseOnInteractOutside=() => true] - Allows ignoring close events for certain elements. `(element: HTMLElement) => boolean`.
|
|
21
|
+
* @property {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
22
|
+
*
|
|
23
|
+
* @typedef {'bottom' | 'bottom left' | 'bottom right' | 'bottom start' | 'bottom end' | 'top' | 'top left' | 'top right' | 'top start' | 'top end' | 'left' | 'left top' | 'left bottom' | 'start' | 'start top' | 'start bottom' | 'right' | 'right top' | 'right bottom' | 'end' | 'end top' | 'end bottom'} PopoverPlacement
|
|
24
|
+
*
|
|
25
|
+
* @preserve
|
|
26
|
+
*/
|
|
6
27
|
/**
|
|
7
28
|
* A popover component.
|
|
8
29
|
*
|
|
@@ -112,6 +133,11 @@ const Popover = (props) => {
|
|
|
112
133
|
}
|
|
113
134
|
);
|
|
114
135
|
};
|
|
136
|
+
/**
|
|
137
|
+
* @typedef {import('../button/button').ButtonProps} ButtonProps
|
|
138
|
+
*
|
|
139
|
+
* @preserve
|
|
140
|
+
* */
|
|
115
141
|
/**
|
|
116
142
|
* A simple version of the Popover component that includes a trigger button.
|
|
117
143
|
* The control of the popover is handled internally. A custom trigger can be provided.
|
|
@@ -11,7 +11,7 @@ import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../../Text-Ax
|
|
|
11
11
|
import { $ as $d8f176866e6dc039$export$2cfc5be7a55829f6 } from "../../../useDragAndDrop-DVLrIdEn.js";
|
|
12
12
|
import { useRef, useEffect, cloneElement } from "react";
|
|
13
13
|
import { icons } from "../../../icons/icons.js";
|
|
14
|
-
import "../../../react-jsx-parser.min-
|
|
14
|
+
import "../../../react-jsx-parser.min-VUl-CuCv.js";
|
|
15
15
|
import { OptionItemBase } from "./shared.js";
|
|
16
16
|
import { RichLabel } from "../../rich-label/rich-label.js";
|
|
17
17
|
import { c as clsx } from "../../../utils-cvK1vxO7.js";
|
|
@@ -10,7 +10,7 @@ import { e as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-
|
|
|
10
10
|
import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, b as $82d7e5349645de74$export$ef445b55be0601bd } from "../../../Select-ciHB1pub.js";
|
|
11
11
|
import { useRef, useEffect, cloneElement, useContext } from "react";
|
|
12
12
|
import { icons } from "../../../icons/icons.js";
|
|
13
|
-
import "../../../react-jsx-parser.min-
|
|
13
|
+
import "../../../react-jsx-parser.min-VUl-CuCv.js";
|
|
14
14
|
import { OptionItemBase } from "./shared.js";
|
|
15
15
|
import { RichLabel } from "../../rich-label/rich-label.js";
|
|
16
16
|
import { unescapeHTML } from "../../../utilities/text-helpers.js";
|
|
@@ -11,7 +11,7 @@ import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../../Text-Ax
|
|
|
11
11
|
import { $ as $d8f176866e6dc039$export$2cfc5be7a55829f6 } from "../../../useDragAndDrop-DVLrIdEn.js";
|
|
12
12
|
import { useRef, cloneElement } from "react";
|
|
13
13
|
import { icons } from "../../../icons/icons.js";
|
|
14
|
-
import "../../../react-jsx-parser.min-
|
|
14
|
+
import "../../../react-jsx-parser.min-VUl-CuCv.js";
|
|
15
15
|
import { OptionItemBase } from "./shared.js";
|
|
16
16
|
import { RichLabel } from "../../rich-label/rich-label.js";
|
|
17
17
|
import { c as clsx } from "../../../utils-cvK1vxO7.js";
|
|
@@ -3,7 +3,7 @@ import { a as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../../ListBox-
|
|
|
3
3
|
import { c as clsx } from "../../../utils-cvK1vxO7.js";
|
|
4
4
|
import { icons } from "../../../icons/icons.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import "../../../react-jsx-parser.min-
|
|
6
|
+
import "../../../react-jsx-parser.min-VUl-CuCv.js";
|
|
7
7
|
import { AnimatedVisibility } from "../../animated-visibility/animated-visibility.js";
|
|
8
8
|
const OptionItemBase = (props) => /* @__PURE__ */ jsx(
|
|
9
9
|
$eed445e0843c11d0$export$a11e76429ed99b4,
|
|
@@ -10,7 +10,7 @@ import { e as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-
|
|
|
10
10
|
import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, b as $82d7e5349645de74$export$ef445b55be0601bd } from "../../../Select-ciHB1pub.js";
|
|
11
11
|
import { useRef, cloneElement, useContext } from "react";
|
|
12
12
|
import { icons } from "../../../icons/icons.js";
|
|
13
|
-
import "../../../react-jsx-parser.min-
|
|
13
|
+
import "../../../react-jsx-parser.min-VUl-CuCv.js";
|
|
14
14
|
import { OptionItemBase } from "./shared.js";
|
|
15
15
|
import { RichLabel } from "../../rich-label/rich-label.js";
|
|
16
16
|
import { c as clsx } from "../../../utils-cvK1vxO7.js";
|
|
@@ -102,6 +102,11 @@ const $efde0372d7a700fe$export$d2b052e7b4be1756 = /* @__PURE__ */ forwardRef(fun
|
|
|
102
102
|
"data-focus-visible": isFocusVisible || void 0
|
|
103
103
|
});
|
|
104
104
|
});
|
|
105
|
+
/**
|
|
106
|
+
* @typedef {import('../tooltip/tooltip').TooltipProps} TooltipProps
|
|
107
|
+
*
|
|
108
|
+
* @preserve
|
|
109
|
+
* */
|
|
105
110
|
/**
|
|
106
111
|
* A simple toggle button component.
|
|
107
112
|
*
|
|
@@ -345,6 +345,29 @@ function $4e3b923658d69c60$var$TooltipInner(props) {
|
|
|
345
345
|
}
|
|
346
346
|
}, renderProps.children));
|
|
347
347
|
}
|
|
348
|
+
/**
|
|
349
|
+
* @typedef {Object} TooltipProps
|
|
350
|
+
* @property {string|JSX.Element} props.text - The text to display in the tooltip.
|
|
351
|
+
* @property {TooltipTheme} [props.theme='dark'] - The theme of the tooltip.
|
|
352
|
+
* @property {number} [props.offset=0] - Additional offset between the tooltip and the element on the main axis (same axis as element).
|
|
353
|
+
* @property {number} [props.crossOffset=0] - Additional offset between the tooltip and the element on the cross axis (opposite axis as element).
|
|
354
|
+
* @property {number} [props.containerPadding=12] - Space that should be left between the tooltip and the main containing element (usually browser window).
|
|
355
|
+
* @property {number} [props.openDelay=1500] - Duration before the tooltip is shown, in milliseconds.
|
|
356
|
+
* @property {number} [props.closeDelay=500] - Duration before the tooltip is hidden, in milliseconds.
|
|
357
|
+
* @property {boolean} [props.shouldFlip=true] - If `false`, the tooltip will not flip to the opposite side if there is not enough space.
|
|
358
|
+
* @property {boolean} [props.defaultOpen] - (**Uncontrolled mode**) Whether the tooltip is initially open.
|
|
359
|
+
* @property {boolean} [props.open] - (**Controlled mode**) Whether the tooltip is open.
|
|
360
|
+
* @property {Function} [props.onOpenChange] - (**Controlled mode**) Function to run when the tooltip is opened or closed.
|
|
361
|
+
* @property {TooltipPlacement} [props.placement] - The side of the trigger element where the tooltip will be displayed.
|
|
362
|
+
* @property {string} [props.className] - Classes to pass to the tooltip.
|
|
363
|
+
* @property {RefObject<Element>} [props.triggerRef] - Ref to anchor the tooltip to. If not provided, the tooltip will be anchored to the trigger element.
|
|
364
|
+
* @property {boolean} [props.arrow] - If `true`, an arrow is shown on the tooltip.
|
|
365
|
+
*
|
|
366
|
+
* @typedef {'light' | 'dark'} TooltipTheme
|
|
367
|
+
* @typedef {'bottom' | 'bottom left' | 'bottom right' | 'bottom start' | 'bottom end' | 'top' | 'top left' | 'top right' | 'top start' | 'top end' | 'left' | 'left top' | 'left bottom' | 'start' | 'start top' | 'start bottom' | 'right' | 'right top' | 'right bottom' | 'end' | 'end top' | 'end bottom'} TooltipPlacement
|
|
368
|
+
*
|
|
369
|
+
* @preserve
|
|
370
|
+
*/
|
|
348
371
|
/**
|
|
349
372
|
* A simple tooltip component.
|
|
350
373
|
*
|
package/dist/icons/jsx-svg.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { s as svgToJsxString, a as source_default } from "../react-jsx-parser.min-
|
|
2
|
+
import { s as svgToJsxString, a as source_default } from "../react-jsx-parser.min-VUl-CuCv.js";
|
|
3
3
|
/**
|
|
4
4
|
* Renders SVG string as JSX SVGs.
|
|
5
5
|
*
|
|
@@ -673,12 +673,12 @@ var require_acorn = __commonJS((exports, module) => {
|
|
|
673
673
|
var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
|
|
674
674
|
function isInAstralSet2(code, set) {
|
|
675
675
|
var pos = 65536;
|
|
676
|
-
for (var
|
|
677
|
-
pos += set[
|
|
676
|
+
for (var i3 = 0; i3 < set.length; i3 += 2) {
|
|
677
|
+
pos += set[i3];
|
|
678
678
|
if (pos > code) {
|
|
679
679
|
return false;
|
|
680
680
|
}
|
|
681
|
-
pos += set[
|
|
681
|
+
pos += set[i3 + 1];
|
|
682
682
|
if (pos >= code) {
|
|
683
683
|
return true;
|
|
684
684
|
}
|
|
@@ -845,10 +845,10 @@ var require_acorn = __commonJS((exports, module) => {
|
|
|
845
845
|
function nextLineBreak2(code, from, end) {
|
|
846
846
|
if (end === void 0)
|
|
847
847
|
end = code.length;
|
|
848
|
-
for (var
|
|
849
|
-
var next = code.charCodeAt(
|
|
848
|
+
for (var i3 = from; i3 < end; i3++) {
|
|
849
|
+
var next = code.charCodeAt(i3);
|
|
850
850
|
if (isNewLine2(next)) {
|
|
851
|
-
return
|
|
851
|
+
return i3 < end - 1 && next === 13 && code.charCodeAt(i3 + 1) === 10 ? i3 + 2 : i3 + 1;
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
854
|
return -1;
|
|
@@ -1043,8 +1043,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
1043
1043
|
return (this.currentVarScope().flags & SCOPE_ASYNC2) > 0 && !this.currentVarScope().inClassFieldInit;
|
|
1044
1044
|
};
|
|
1045
1045
|
prototypeAccessors2.canAwait.get = function() {
|
|
1046
|
-
for (var
|
|
1047
|
-
var scope = this.scopeStack[
|
|
1046
|
+
for (var i3 = this.scopeStack.length - 1; i3 >= 0; i3--) {
|
|
1047
|
+
var scope = this.scopeStack[i3];
|
|
1048
1048
|
if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK2) {
|
|
1049
1049
|
return false;
|
|
1050
1050
|
}
|
|
@@ -1080,8 +1080,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
1080
1080
|
while (len--)
|
|
1081
1081
|
plugins[len] = arguments[len];
|
|
1082
1082
|
var cls = this;
|
|
1083
|
-
for (var
|
|
1084
|
-
cls = plugins[
|
|
1083
|
+
for (var i3 = 0; i3 < plugins.length; i3++) {
|
|
1084
|
+
cls = plugins[i3](cls);
|
|
1085
1085
|
}
|
|
1086
1086
|
return cls;
|
|
1087
1087
|
};
|
|
@@ -1236,8 +1236,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
1236
1236
|
node.body.push(stmt);
|
|
1237
1237
|
}
|
|
1238
1238
|
if (this.inModule) {
|
|
1239
|
-
for (var
|
|
1240
|
-
var name =
|
|
1239
|
+
for (var i3 = 0, list3 = Object.keys(this.undefinedExports); i3 < list3.length; i3 += 1) {
|
|
1240
|
+
var name = list3[i3];
|
|
1241
1241
|
this.raiseRecoverable(this.undefinedExports[name].start, "Export '" + name + "' is not defined");
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
@@ -1384,9 +1384,9 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
1384
1384
|
node.label = this.parseIdent();
|
|
1385
1385
|
this.semicolon();
|
|
1386
1386
|
}
|
|
1387
|
-
var
|
|
1388
|
-
for (;
|
|
1389
|
-
var lab = this.labels[
|
|
1387
|
+
var i3 = 0;
|
|
1388
|
+
for (; i3 < this.labels.length; ++i3) {
|
|
1389
|
+
var lab = this.labels[i3];
|
|
1390
1390
|
if (node.label == null || lab.name === node.label.name) {
|
|
1391
1391
|
if (lab.kind != null && (isBreak || lab.kind === "loop")) {
|
|
1392
1392
|
break;
|
|
@@ -1396,7 +1396,7 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
|
-
if (
|
|
1399
|
+
if (i3 === this.labels.length) {
|
|
1400
1400
|
this.raise(node.start, "Unsyntactic " + keyword);
|
|
1401
1401
|
}
|
|
1402
1402
|
return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
|
|
@@ -1625,15 +1625,15 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
1625
1625
|
return this.finishNode(node, "EmptyStatement");
|
|
1626
1626
|
};
|
|
1627
1627
|
pp$82.parseLabeledStatement = function(node, maybeName, expr, context) {
|
|
1628
|
-
for (var i$1 = 0,
|
|
1629
|
-
var label =
|
|
1628
|
+
for (var i$1 = 0, list3 = this.labels; i$1 < list3.length; i$1 += 1) {
|
|
1629
|
+
var label = list3[i$1];
|
|
1630
1630
|
if (label.name === maybeName) {
|
|
1631
1631
|
this.raise(expr.start, "Label '" + maybeName + "' is already declared");
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
1634
|
var kind = this.type.isLoop ? "loop" : this.type === types$12._switch ? "switch" : null;
|
|
1635
|
-
for (var
|
|
1636
|
-
var label$1 = this.labels[
|
|
1635
|
+
for (var i3 = this.labels.length - 1; i3 >= 0; i3--) {
|
|
1636
|
+
var label$1 = this.labels[i3];
|
|
1637
1637
|
if (label$1.statementStart === node.start) {
|
|
1638
1638
|
label$1.statementStart = this.start;
|
|
1639
1639
|
label$1.kind = kind;
|
|
@@ -1800,7 +1800,7 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
1800
1800
|
if (this.eat(types$12.semi)) {
|
|
1801
1801
|
return null;
|
|
1802
1802
|
}
|
|
1803
|
-
var
|
|
1803
|
+
var ecmaVersion3 = this.options.ecmaVersion;
|
|
1804
1804
|
var node = this.startNode();
|
|
1805
1805
|
var keyName = "";
|
|
1806
1806
|
var isGenerator = false;
|
|
@@ -1808,7 +1808,7 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
1808
1808
|
var kind = "method";
|
|
1809
1809
|
var isStatic = false;
|
|
1810
1810
|
if (this.eatContextual("static")) {
|
|
1811
|
-
if (
|
|
1811
|
+
if (ecmaVersion3 >= 13 && this.eat(types$12.braceL)) {
|
|
1812
1812
|
this.parseClassStaticBlock(node);
|
|
1813
1813
|
return node;
|
|
1814
1814
|
}
|
|
@@ -1819,14 +1819,14 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
1819
1819
|
}
|
|
1820
1820
|
}
|
|
1821
1821
|
node.static = isStatic;
|
|
1822
|
-
if (!keyName &&
|
|
1822
|
+
if (!keyName && ecmaVersion3 >= 8 && this.eatContextual("async")) {
|
|
1823
1823
|
if ((this.isClassElementNameStart() || this.type === types$12.star) && !this.canInsertSemicolon()) {
|
|
1824
1824
|
isAsync = true;
|
|
1825
1825
|
} else {
|
|
1826
1826
|
keyName = "async";
|
|
1827
1827
|
}
|
|
1828
1828
|
}
|
|
1829
|
-
if (!keyName && (
|
|
1829
|
+
if (!keyName && (ecmaVersion3 >= 9 || !isAsync) && this.eat(types$12.star)) {
|
|
1830
1830
|
isGenerator = true;
|
|
1831
1831
|
}
|
|
1832
1832
|
if (!keyName && !isAsync && !isGenerator) {
|
|
@@ -1847,7 +1847,7 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
1847
1847
|
} else {
|
|
1848
1848
|
this.parseClassElementName(node);
|
|
1849
1849
|
}
|
|
1850
|
-
if (
|
|
1850
|
+
if (ecmaVersion3 < 13 || this.type === types$12.parenL || kind !== "method" || isGenerator || isAsync) {
|
|
1851
1851
|
var isConstructor = !node.static && checkKeyName2(node, "constructor");
|
|
1852
1852
|
var allowsDirectSuper = isConstructor && constructorAllowsSuper;
|
|
1853
1853
|
if (isConstructor && kind !== "method") {
|
|
@@ -1960,8 +1960,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
1960
1960
|
}
|
|
1961
1961
|
var len = this.privateNameStack.length;
|
|
1962
1962
|
var parent = len === 0 ? null : this.privateNameStack[len - 1];
|
|
1963
|
-
for (var
|
|
1964
|
-
var id = used[
|
|
1963
|
+
for (var i3 = 0; i3 < used.length; ++i3) {
|
|
1964
|
+
var id = used[i3];
|
|
1965
1965
|
if (!hasOwn2(declared, id.name)) {
|
|
1966
1966
|
if (parent) {
|
|
1967
1967
|
parent.used.push(id);
|
|
@@ -2038,8 +2038,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
2038
2038
|
}
|
|
2039
2039
|
node.source = this.parseExprAtom();
|
|
2040
2040
|
} else {
|
|
2041
|
-
for (var
|
|
2042
|
-
var spec =
|
|
2041
|
+
for (var i3 = 0, list3 = node.specifiers; i3 < list3.length; i3 += 1) {
|
|
2042
|
+
var spec = list3[i3];
|
|
2043
2043
|
this.checkUnreserved(spec.local);
|
|
2044
2044
|
this.checkLocalExport(spec.local);
|
|
2045
2045
|
if (spec.local.type === "Literal") {
|
|
@@ -2090,8 +2090,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
2090
2090
|
if (type === "Identifier") {
|
|
2091
2091
|
this.checkExport(exports3, pat, pat.start);
|
|
2092
2092
|
} else if (type === "ObjectPattern") {
|
|
2093
|
-
for (var
|
|
2094
|
-
var prop =
|
|
2093
|
+
for (var i3 = 0, list3 = pat.properties; i3 < list3.length; i3 += 1) {
|
|
2094
|
+
var prop = list3[i3];
|
|
2095
2095
|
this.checkPatternExport(exports3, prop);
|
|
2096
2096
|
}
|
|
2097
2097
|
} else if (type === "ArrayPattern") {
|
|
@@ -2113,8 +2113,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
2113
2113
|
if (!exports3) {
|
|
2114
2114
|
return;
|
|
2115
2115
|
}
|
|
2116
|
-
for (var
|
|
2117
|
-
var decl =
|
|
2116
|
+
for (var i3 = 0, list3 = decls; i3 < list3.length; i3 += 1) {
|
|
2117
|
+
var decl = list3[i3];
|
|
2118
2118
|
this.checkPatternExport(exports3, decl.id);
|
|
2119
2119
|
}
|
|
2120
2120
|
};
|
|
@@ -2220,8 +2220,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
2220
2220
|
return this.parseIdent(true);
|
|
2221
2221
|
};
|
|
2222
2222
|
pp$82.adaptDirectivePrologue = function(statements) {
|
|
2223
|
-
for (var
|
|
2224
|
-
statements[
|
|
2223
|
+
for (var i3 = 0; i3 < statements.length && this.isDirectiveCandidate(statements[i3]); ++i3) {
|
|
2224
|
+
statements[i3].directive = statements[i3].expression.raw.slice(1, -1);
|
|
2225
2225
|
}
|
|
2226
2226
|
};
|
|
2227
2227
|
pp$82.isDirectiveCandidate = function(statement) {
|
|
@@ -2246,8 +2246,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
2246
2246
|
if (refDestructuringErrors) {
|
|
2247
2247
|
this.checkPatternErrors(refDestructuringErrors, true);
|
|
2248
2248
|
}
|
|
2249
|
-
for (var
|
|
2250
|
-
var prop =
|
|
2249
|
+
for (var i3 = 0, list3 = node.properties; i3 < list3.length; i3 += 1) {
|
|
2250
|
+
var prop = list3[i3];
|
|
2251
2251
|
this.toAssignable(prop, isBinding);
|
|
2252
2252
|
if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) {
|
|
2253
2253
|
this.raise(prop.argument.start, "Unexpected token");
|
|
@@ -2302,8 +2302,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
2302
2302
|
};
|
|
2303
2303
|
pp$72.toAssignableList = function(exprList, isBinding) {
|
|
2304
2304
|
var end = exprList.length;
|
|
2305
|
-
for (var
|
|
2306
|
-
var elt = exprList[
|
|
2305
|
+
for (var i3 = 0; i3 < end; i3++) {
|
|
2306
|
+
var elt = exprList[i3];
|
|
2307
2307
|
if (elt) {
|
|
2308
2308
|
this.toAssignable(elt, isBinding);
|
|
2309
2309
|
}
|
|
@@ -2436,8 +2436,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
2436
2436
|
bindingType = BIND_NONE2;
|
|
2437
2437
|
switch (expr.type) {
|
|
2438
2438
|
case "ObjectPattern":
|
|
2439
|
-
for (var
|
|
2440
|
-
var prop =
|
|
2439
|
+
for (var i3 = 0, list3 = expr.properties; i3 < list3.length; i3 += 1) {
|
|
2440
|
+
var prop = list3[i3];
|
|
2441
2441
|
this.checkLValInnerPattern(prop, bindingType, checkClashes);
|
|
2442
2442
|
}
|
|
2443
2443
|
break;
|
|
@@ -2521,8 +2521,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
2521
2521
|
return !this.exprAllowed;
|
|
2522
2522
|
};
|
|
2523
2523
|
pp$62.inGeneratorContext = function() {
|
|
2524
|
-
for (var
|
|
2525
|
-
var context = this.context[
|
|
2524
|
+
for (var i3 = this.context.length - 1; i3 >= 1; i3--) {
|
|
2525
|
+
var context = this.context[i3];
|
|
2526
2526
|
if (context.token === "function") {
|
|
2527
2527
|
return context.generator;
|
|
2528
2528
|
}
|
|
@@ -3499,8 +3499,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
3499
3499
|
this.exitScope();
|
|
3500
3500
|
};
|
|
3501
3501
|
pp$52.isSimpleParamList = function(params) {
|
|
3502
|
-
for (var
|
|
3503
|
-
var param =
|
|
3502
|
+
for (var i3 = 0, list3 = params; i3 < list3.length; i3 += 1) {
|
|
3503
|
+
var param = list3[i3];
|
|
3504
3504
|
if (param.type !== "Identifier") {
|
|
3505
3505
|
return false;
|
|
3506
3506
|
}
|
|
@@ -3509,8 +3509,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
3509
3509
|
};
|
|
3510
3510
|
pp$52.checkParams = function(node, allowDuplicates) {
|
|
3511
3511
|
var nameHash = /* @__PURE__ */ Object.create(null);
|
|
3512
|
-
for (var
|
|
3513
|
-
var param =
|
|
3512
|
+
for (var i3 = 0, list3 = node.params; i3 < list3.length; i3 += 1) {
|
|
3513
|
+
var param = list3[i3];
|
|
3514
3514
|
this.checkLValInnerPattern(param, BIND_VAR2, allowDuplicates ? null : nameHash);
|
|
3515
3515
|
}
|
|
3516
3516
|
};
|
|
@@ -3693,8 +3693,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
3693
3693
|
}
|
|
3694
3694
|
scope$2.functions.push(name);
|
|
3695
3695
|
} else {
|
|
3696
|
-
for (var
|
|
3697
|
-
var scope$3 = this.scopeStack[
|
|
3696
|
+
for (var i3 = this.scopeStack.length - 1; i3 >= 0; --i3) {
|
|
3697
|
+
var scope$3 = this.scopeStack[i3];
|
|
3698
3698
|
if (scope$3.lexical.indexOf(name) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH2 && scope$3.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) {
|
|
3699
3699
|
redeclared = true;
|
|
3700
3700
|
break;
|
|
@@ -3721,16 +3721,16 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
3721
3721
|
return this.scopeStack[this.scopeStack.length - 1];
|
|
3722
3722
|
};
|
|
3723
3723
|
pp$32.currentVarScope = function() {
|
|
3724
|
-
for (var
|
|
3725
|
-
var scope = this.scopeStack[
|
|
3724
|
+
for (var i3 = this.scopeStack.length - 1; ; i3--) {
|
|
3725
|
+
var scope = this.scopeStack[i3];
|
|
3726
3726
|
if (scope.flags & SCOPE_VAR2) {
|
|
3727
3727
|
return scope;
|
|
3728
3728
|
}
|
|
3729
3729
|
}
|
|
3730
3730
|
};
|
|
3731
3731
|
pp$32.currentThisScope = function() {
|
|
3732
|
-
for (var
|
|
3733
|
-
var scope = this.scopeStack[
|
|
3732
|
+
for (var i3 = this.scopeStack.length - 1; ; i3--) {
|
|
3733
|
+
var scope = this.scopeStack[i3];
|
|
3734
3734
|
if (scope.flags & SCOPE_VAR2 && !(scope.flags & SCOPE_ARROW2)) {
|
|
3735
3735
|
return scope;
|
|
3736
3736
|
}
|
|
@@ -3820,13 +3820,13 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
3820
3820
|
14: ecma14ScriptValues2
|
|
3821
3821
|
};
|
|
3822
3822
|
var data2 = {};
|
|
3823
|
-
function buildUnicodeData2(
|
|
3824
|
-
var d = data2[
|
|
3825
|
-
binary: wordsRegexp2(unicodeBinaryProperties2[
|
|
3826
|
-
binaryOfStrings: wordsRegexp2(unicodeBinaryPropertiesOfStrings2[
|
|
3823
|
+
function buildUnicodeData2(ecmaVersion3) {
|
|
3824
|
+
var d = data2[ecmaVersion3] = {
|
|
3825
|
+
binary: wordsRegexp2(unicodeBinaryProperties2[ecmaVersion3] + " " + unicodeGeneralCategoryValues2),
|
|
3826
|
+
binaryOfStrings: wordsRegexp2(unicodeBinaryPropertiesOfStrings2[ecmaVersion3]),
|
|
3827
3827
|
nonBinary: {
|
|
3828
3828
|
General_Category: wordsRegexp2(unicodeGeneralCategoryValues2),
|
|
3829
|
-
Script: wordsRegexp2(unicodeScriptValues2[
|
|
3829
|
+
Script: wordsRegexp2(unicodeScriptValues2[ecmaVersion3])
|
|
3830
3830
|
}
|
|
3831
3831
|
};
|
|
3832
3832
|
d.nonBinary.Script_Extensions = d.nonBinary.Script;
|
|
@@ -3895,34 +3895,34 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
3895
3895
|
RegExpValidationState3.prototype.raise = function raise2(message) {
|
|
3896
3896
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
|
|
3897
3897
|
};
|
|
3898
|
-
RegExpValidationState3.prototype.at = function at2(
|
|
3898
|
+
RegExpValidationState3.prototype.at = function at2(i3, forceU) {
|
|
3899
3899
|
if (forceU === void 0)
|
|
3900
3900
|
forceU = false;
|
|
3901
3901
|
var s = this.source;
|
|
3902
3902
|
var l = s.length;
|
|
3903
|
-
if (
|
|
3903
|
+
if (i3 >= l) {
|
|
3904
3904
|
return -1;
|
|
3905
3905
|
}
|
|
3906
|
-
var c = s.charCodeAt(
|
|
3907
|
-
if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 ||
|
|
3906
|
+
var c = s.charCodeAt(i3);
|
|
3907
|
+
if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i3 + 1 >= l) {
|
|
3908
3908
|
return c;
|
|
3909
3909
|
}
|
|
3910
|
-
var next = s.charCodeAt(
|
|
3910
|
+
var next = s.charCodeAt(i3 + 1);
|
|
3911
3911
|
return next >= 56320 && next <= 57343 ? (c << 10) + next - 56613888 : c;
|
|
3912
3912
|
};
|
|
3913
|
-
RegExpValidationState3.prototype.nextIndex = function nextIndex2(
|
|
3913
|
+
RegExpValidationState3.prototype.nextIndex = function nextIndex2(i3, forceU) {
|
|
3914
3914
|
if (forceU === void 0)
|
|
3915
3915
|
forceU = false;
|
|
3916
3916
|
var s = this.source;
|
|
3917
3917
|
var l = s.length;
|
|
3918
|
-
if (
|
|
3918
|
+
if (i3 >= l) {
|
|
3919
3919
|
return l;
|
|
3920
3920
|
}
|
|
3921
|
-
var c = s.charCodeAt(
|
|
3922
|
-
if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 ||
|
|
3923
|
-
return
|
|
3921
|
+
var c = s.charCodeAt(i3), next;
|
|
3922
|
+
if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i3 + 1 >= l || (next = s.charCodeAt(i3 + 1)) < 56320 || next > 57343) {
|
|
3923
|
+
return i3 + 1;
|
|
3924
3924
|
}
|
|
3925
|
-
return
|
|
3925
|
+
return i3 + 2;
|
|
3926
3926
|
};
|
|
3927
3927
|
RegExpValidationState3.prototype.current = function current2(forceU) {
|
|
3928
3928
|
if (forceU === void 0)
|
|
@@ -3952,8 +3952,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
3952
3952
|
if (forceU === void 0)
|
|
3953
3953
|
forceU = false;
|
|
3954
3954
|
var pos = this.pos;
|
|
3955
|
-
for (var
|
|
3956
|
-
var ch =
|
|
3955
|
+
for (var i3 = 0, list3 = chs; i3 < list3.length; i3 += 1) {
|
|
3956
|
+
var ch = list3[i3];
|
|
3957
3957
|
var current2 = this.at(pos, forceU);
|
|
3958
3958
|
if (current2 === -1 || current2 !== ch) {
|
|
3959
3959
|
return false;
|
|
@@ -3968,12 +3968,12 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
3968
3968
|
var flags = state.flags;
|
|
3969
3969
|
var u = false;
|
|
3970
3970
|
var v = false;
|
|
3971
|
-
for (var
|
|
3972
|
-
var flag = flags.charAt(
|
|
3971
|
+
for (var i3 = 0; i3 < flags.length; i3++) {
|
|
3972
|
+
var flag = flags.charAt(i3);
|
|
3973
3973
|
if (validFlags.indexOf(flag) === -1) {
|
|
3974
3974
|
this.raise(state.start, "Invalid regular expression flag");
|
|
3975
3975
|
}
|
|
3976
|
-
if (flags.indexOf(flag,
|
|
3976
|
+
if (flags.indexOf(flag, i3 + 1) > -1) {
|
|
3977
3977
|
this.raise(state.start, "Duplicate regular expression flag");
|
|
3978
3978
|
}
|
|
3979
3979
|
if (flag === "u") {
|
|
@@ -4022,8 +4022,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
4022
4022
|
if (state.maxBackReference > state.numCapturingParens) {
|
|
4023
4023
|
state.raise("Invalid escape");
|
|
4024
4024
|
}
|
|
4025
|
-
for (var
|
|
4026
|
-
var name =
|
|
4025
|
+
for (var i3 = 0, list3 = state.backReferenceNames; i3 < list3.length; i3 += 1) {
|
|
4026
|
+
var name = list3[i3];
|
|
4027
4027
|
if (!state.groupNames[name]) {
|
|
4028
4028
|
state.raise("Invalid named capture referenced");
|
|
4029
4029
|
}
|
|
@@ -4223,8 +4223,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
4223
4223
|
var known = state.groupNames[state.lastStringValue];
|
|
4224
4224
|
if (known) {
|
|
4225
4225
|
if (trackDisjunction) {
|
|
4226
|
-
for (var
|
|
4227
|
-
var altID =
|
|
4226
|
+
for (var i3 = 0, list3 = known; i3 < list3.length; i3 += 1) {
|
|
4227
|
+
var altID = list3[i3];
|
|
4228
4228
|
if (!altID.separatedFrom(state.branchID)) {
|
|
4229
4229
|
state.raise("Duplicate capture group name");
|
|
4230
4230
|
}
|
|
@@ -4884,7 +4884,7 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
4884
4884
|
pp$12.regexp_eatFixedHexDigits = function(state, length) {
|
|
4885
4885
|
var start = state.pos;
|
|
4886
4886
|
state.lastIntValue = 0;
|
|
4887
|
-
for (var
|
|
4887
|
+
for (var i3 = 0; i3 < length; ++i3) {
|
|
4888
4888
|
var ch = state.current();
|
|
4889
4889
|
if (!isHexDigit2(ch)) {
|
|
4890
4890
|
state.pos = start;
|
|
@@ -5161,8 +5161,8 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
5161
5161
|
return this.finishOp(code === 61 ? types$12.eq : types$12.prefix, 1);
|
|
5162
5162
|
};
|
|
5163
5163
|
pp2.readToken_question = function() {
|
|
5164
|
-
var
|
|
5165
|
-
if (
|
|
5164
|
+
var ecmaVersion3 = this.options.ecmaVersion;
|
|
5165
|
+
if (ecmaVersion3 >= 11) {
|
|
5166
5166
|
var next = this.input.charCodeAt(this.pos + 1);
|
|
5167
5167
|
if (next === 46) {
|
|
5168
5168
|
var next2 = this.input.charCodeAt(this.pos + 2);
|
|
@@ -5171,7 +5171,7 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
5171
5171
|
}
|
|
5172
5172
|
}
|
|
5173
5173
|
if (next === 63) {
|
|
5174
|
-
if (
|
|
5174
|
+
if (ecmaVersion3 >= 12) {
|
|
5175
5175
|
var next2$1 = this.input.charCodeAt(this.pos + 2);
|
|
5176
5176
|
if (next2$1 === 61) {
|
|
5177
5177
|
return this.finishOp(types$12.assign, 3);
|
|
@@ -5183,9 +5183,9 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
5183
5183
|
return this.finishOp(types$12.question, 1);
|
|
5184
5184
|
};
|
|
5185
5185
|
pp2.readToken_numberSign = function() {
|
|
5186
|
-
var
|
|
5186
|
+
var ecmaVersion3 = this.options.ecmaVersion;
|
|
5187
5187
|
var code = 35;
|
|
5188
|
-
if (
|
|
5188
|
+
if (ecmaVersion3 >= 13) {
|
|
5189
5189
|
++this.pos;
|
|
5190
5190
|
code = this.fullCharCodeAtPos();
|
|
5191
5191
|
if (isIdentifierStart2(code, true) || code === 92) {
|
|
@@ -5336,7 +5336,7 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
5336
5336
|
var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0;
|
|
5337
5337
|
var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48;
|
|
5338
5338
|
var start = this.pos, total = 0, lastCode = 0;
|
|
5339
|
-
for (var
|
|
5339
|
+
for (var i3 = 0, e = len == null ? Infinity : len; i3 < e; ++i3, ++this.pos) {
|
|
5340
5340
|
var code = this.input.charCodeAt(this.pos), val = void 0;
|
|
5341
5341
|
if (allowSeparators && code === 95) {
|
|
5342
5342
|
if (isLegacyOctalNumericLiteral) {
|
|
@@ -5345,7 +5345,7 @@ Defaulting to 2020, but this will stop working in the future.`);
|
|
|
5345
5345
|
if (lastCode === 95) {
|
|
5346
5346
|
this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore");
|
|
5347
5347
|
}
|
|
5348
|
-
if (
|
|
5348
|
+
if (i3 === 0) {
|
|
5349
5349
|
this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits");
|
|
5350
5350
|
}
|
|
5351
5351
|
lastCode = code;
|
|
@@ -11429,17 +11429,16 @@ class JsxParser extends React__default.Component {
|
|
|
11429
11429
|
try {
|
|
11430
11430
|
parsed = parser.parse(wrappedJsx, { ecmaVersion: "latest" });
|
|
11431
11431
|
parsed = parsed.body[0].expression.children || [];
|
|
11432
|
+
return parsed.map((p) => this.#parseExpression(p)).filter(Boolean);
|
|
11432
11433
|
} catch (error) {
|
|
11433
11434
|
if (this.props.showWarnings)
|
|
11434
11435
|
console.warn(error);
|
|
11435
11436
|
if (this.props.onError)
|
|
11436
11437
|
this.props.onError(error);
|
|
11437
|
-
if (this.props.renderError)
|
|
11438
|
+
if (this.props.renderError)
|
|
11438
11439
|
return this.props.renderError({ error: String(error) });
|
|
11439
|
-
}
|
|
11440
11440
|
return null;
|
|
11441
11441
|
}
|
|
11442
|
-
return parsed.map((p) => this.#parseExpression(p)).filter(Boolean);
|
|
11443
11442
|
};
|
|
11444
11443
|
#parseExpression = (expression, scope) => {
|
|
11445
11444
|
switch (expression.type) {
|
|
@@ -11573,6 +11572,10 @@ class JsxParser extends React__default.Component {
|
|
|
11573
11572
|
return -unaryValue;
|
|
11574
11573
|
case "!":
|
|
11575
11574
|
return !unaryValue;
|
|
11575
|
+
case "~":
|
|
11576
|
+
return ~unaryValue;
|
|
11577
|
+
case "typeof":
|
|
11578
|
+
return typeof unaryValue;
|
|
11576
11579
|
}
|
|
11577
11580
|
return;
|
|
11578
11581
|
case "ArrowFunctionExpression":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eightshift/ui-components",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dev": "vite",
|
|
36
36
|
"start": "vite",
|
|
37
37
|
"build": "vite build",
|
|
38
|
-
"lint": "
|
|
38
|
+
"lint": "bun x eslint",
|
|
39
39
|
"preview": "vite preview"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@dnd-kit/react": "^0.1.21",
|
|
53
53
|
"@dnd-kit/sortable": "^10.0.0",
|
|
54
54
|
"@dnd-kit/utilities": "^3.2.2",
|
|
55
|
-
"@eslint/compat": "^1.
|
|
55
|
+
"@eslint/compat": "^1.4.0",
|
|
56
56
|
"@react-stately/collections": "^3.12.7",
|
|
57
57
|
"@stylistic/eslint-plugin-js": "^4.4.1",
|
|
58
58
|
"@tailwindcss/vite": "^4.1.13",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"class-variance-authority": "^0.7.1",
|
|
65
65
|
"clsx": "^2.1.1",
|
|
66
66
|
"css-gradient-parser": "^0.0.18",
|
|
67
|
-
"eslint": "^9.
|
|
67
|
+
"eslint": "^9.36.0",
|
|
68
68
|
"eslint-config-prettier": "^10.1.8",
|
|
69
|
-
"eslint-plugin-jsdoc": "^
|
|
69
|
+
"eslint-plugin-jsdoc": "^60.1.1",
|
|
70
70
|
"eslint-plugin-prettier": "^5.5.4",
|
|
71
71
|
"glob": "^11.0.3",
|
|
72
72
|
"globals": "^16.4.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"react-aria": "^3.43.2",
|
|
85
85
|
"react-aria-components": "^1.12.2",
|
|
86
86
|
"react-dom": "^18.3.1",
|
|
87
|
-
"react-jsx-parser": "^2.4.
|
|
87
|
+
"react-jsx-parser": "^2.4.1",
|
|
88
88
|
"react-movable": "^3.4.1",
|
|
89
89
|
"react-select": "^5.10.2",
|
|
90
90
|
"react-stately": "^3.41.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"tailwindcss": "^4.1.13",
|
|
93
93
|
"tailwindcss-motion": "^1.1.1",
|
|
94
94
|
"tailwindcss-react-aria-components": "^2.0.1",
|
|
95
|
-
"vite": "^7.1.
|
|
95
|
+
"vite": "^7.1.7",
|
|
96
96
|
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|