@hero-design/rn 8.98.1 → 8.99.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/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +6 -0
- package/babel.config.js +4 -1
- package/es/index.js +45 -66
- package/lib/index.js +45 -66
- package/package.json +39 -19
- package/src/components/AnimatedScroller/__tests__/__snapshots__/ScrollablesWithFAB.spec.tsx.snap +0 -3
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +52 -52
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +87 -87
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +2 -4
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +2 -2
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Radio/Radio.tsx +7 -1
- package/src/components/Radio/RadioGroup.tsx +1 -0
- package/src/components/Radio/__tests__/Radio.spec.tsx +15 -0
- package/src/components/Radio/__tests__/RadioGroup.spec.tsx +27 -0
- package/src/components/Radio/types.ts +3 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +1472 -1496
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +2992 -3040
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +1644 -1672
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +2512 -2554
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +6 -6
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +24 -24
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/Tabs/ScrollableTabs.tsx +0 -1
- package/src/components/Tabs/index.tsx +0 -1
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +2 -2
- package/stats/8.98.1/rn-stats.html +3 -1
- package/stats/8.99.0/rn-stats.html +4842 -0
- package/testUtils/setup.tsx +0 -1
- package/types/components/Accordion/StyledAccordion.d.ts +3 -5
- package/types/components/Alert/StyledAlert.d.ts +3 -5
- package/types/components/Attachment/StyledAttachment.d.ts +3 -5
- package/types/components/Avatar/StyledAvatar.d.ts +3 -5
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +3 -5
- package/types/components/Button/StyledButton.d.ts +3 -5
- package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +3 -5
- package/types/components/Calendar/StyledCalendar.d.ts +3 -5
- package/types/components/Checkbox/StyledCheckbox.d.ts +3 -5
- package/types/components/Chip/StyledChip.d.ts +2 -5
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +2 -5
- package/types/components/FAB/StyledFAB.d.ts +2 -2
- package/types/components/FloatingIsland/StyledFloatingIsland.d.ts +2 -2
- package/types/components/List/StyledBasicListItem.d.ts +3 -5
- package/types/components/List/StyledListItem.d.ts +3 -5
- package/types/components/Radio/Radio.d.ts +6 -1
- package/types/components/Radio/types.d.ts +3 -1
- package/types/components/RichTextEditor/StyledToolbar.d.ts +3 -5
- package/types/components/Swipeable/StyledSwipeable.d.ts +2 -5
- package/types/components/Toast/StyledToast.d.ts +3 -5
- package/types/components/Toolbar/StyledToolbar.d.ts +3 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(node:
|
|
1
|
+
(node:3214) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
|
|
2
2
|
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
3
3
|
[36m
|
|
4
4
|
[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
[7m [0m [91m ~~~~~~~~~~~~~~~~~~~[0m
|
|
11
11
|
[39m
|
|
12
12
|
[1m[33m(!) [plugin node-resolve] preferring built-in module 'events' over local alternative at '/home/runner/work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning.or passing a function to 'preferBuiltins' to provide more fine-grained control over which built-in modules to prefer.[39m[22m
|
|
13
|
-
[32mcreated [1mlib/index.js, es/index.js[22m in [
|
|
13
|
+
[32mcreated [1mlib/index.js, es/index.js[22m in [1m54.1s[22m[39m
|
|
14
14
|
[36m
|
|
15
15
|
[1m/home/runner/work/hero-design/hero-design/packages/rn/src/locales/en_AU.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/en_CA.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/index.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/types.ts[22m → [1m., .[22m...[39m
|
|
16
16
|
[1m[33m(!) Generated empty chunks[39m[22m
|
|
17
17
|
"locales/types" and "locales/types"
|
|
18
|
-
[32mcreated [1m., .[22m in [
|
|
18
|
+
[32mcreated [1m., .[22m in [1m21.2s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
+
## 8.99.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#3814](https://github.com/Thinkei/hero-design/pull/3814) [`22de5b249fb6bad2230e69e3c4ba1a5cad4e3807`](https://github.com/Thinkei/hero-design/commit/22de5b249fb6bad2230e69e3c4ba1a5cad4e3807) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Radio] Support prefix
|
|
8
|
+
|
|
3
9
|
## 8.98.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/babel.config.js
CHANGED
|
@@ -22,8 +22,11 @@ module.exports = function (api) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
return {
|
|
25
|
-
presets: ['babel-preset
|
|
25
|
+
presets: ['module:@react-native/babel-preset'],
|
|
26
26
|
plugins: [
|
|
27
|
+
['@babel/plugin-proposal-class-properties', { loose: false }],
|
|
28
|
+
['@babel/plugin-proposal-private-methods', { loose: false }],
|
|
29
|
+
['@babel/plugin-proposal-private-property-in-object', { loose: false }],
|
|
27
30
|
[
|
|
28
31
|
'babel-plugin-inline-import',
|
|
29
32
|
{
|
package/es/index.js
CHANGED
|
@@ -30,6 +30,9 @@ function _assertThisInitialized(e) {
|
|
|
30
30
|
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
31
31
|
return e;
|
|
32
32
|
}
|
|
33
|
+
function _callSuper(t, o, e) {
|
|
34
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
35
|
+
}
|
|
33
36
|
function _classCallCheck(a, n) {
|
|
34
37
|
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
35
38
|
}
|
|
@@ -92,18 +95,6 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
92
95
|
}
|
|
93
96
|
};
|
|
94
97
|
}
|
|
95
|
-
function _createSuper(t) {
|
|
96
|
-
var r = _isNativeReflectConstruct();
|
|
97
|
-
return function () {
|
|
98
|
-
var e,
|
|
99
|
-
o = _getPrototypeOf(t);
|
|
100
|
-
if (r) {
|
|
101
|
-
var s = _getPrototypeOf(this).constructor;
|
|
102
|
-
e = Reflect.construct(o, arguments, s);
|
|
103
|
-
} else e = o.apply(this, arguments);
|
|
104
|
-
return _possibleConstructorReturn(this, e);
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
98
|
function _defineProperty(e, r, t) {
|
|
108
99
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
109
100
|
value: t,
|
|
@@ -1201,7 +1192,7 @@ var Values = /*#__PURE__*/function () {
|
|
|
1201
1192
|
if (!parsed) throw new Error("Unable to parse color from string: ".concat(c));
|
|
1202
1193
|
return this["_setFrom".concat(parsed.type.toUpperCase())]([].concat(_toConsumableArray(parsed.values), [parsed.alpha]));
|
|
1203
1194
|
}
|
|
1204
|
-
_createClass(Values, [{
|
|
1195
|
+
return _createClass(Values, [{
|
|
1205
1196
|
key: "hex",
|
|
1206
1197
|
get: function get() {
|
|
1207
1198
|
return this.hexString().replace(/^#/, '');
|
|
@@ -1298,7 +1289,6 @@ var Values = /*#__PURE__*/function () {
|
|
|
1298
1289
|
return this;
|
|
1299
1290
|
}
|
|
1300
1291
|
}]);
|
|
1301
|
-
return Values;
|
|
1302
1292
|
}();
|
|
1303
1293
|
Values.VERSION = 'v2.1.1';
|
|
1304
1294
|
var mixColor = function mixColor(color) {
|
|
@@ -1317,8 +1307,7 @@ var STEPS = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85,
|
|
|
1317
1307
|
var createColorScales = function createColorScales(base) {
|
|
1318
1308
|
var mixed = mixColor(base);
|
|
1319
1309
|
return Object.assign(Object.assign({}, STEPS.reduce(function (acc, step) {
|
|
1320
|
-
|
|
1321
|
-
return Object.assign(Object.assign({}, acc), (_Object$assign = {}, _defineProperty(_Object$assign, "lighten".concat(step), mixed.tint(step)), _defineProperty(_Object$assign, "darken".concat(step), mixed.shade(step)), _Object$assign));
|
|
1310
|
+
return Object.assign(Object.assign({}, acc), _defineProperty(_defineProperty({}, "lighten".concat(step), mixed.tint(step)), "darken".concat(step), mixed.shade(step)));
|
|
1322
1311
|
}, {})), {
|
|
1323
1312
|
base: mixed.base
|
|
1324
1313
|
});
|
|
@@ -2208,7 +2197,6 @@ var getFontSizes = function getFontSizes(baseFontSize) {
|
|
|
2208
2197
|
xsmall: scale(fontSizes[0]) // 10
|
|
2209
2198
|
};
|
|
2210
2199
|
};
|
|
2211
|
-
|
|
2212
2200
|
var getLineHeights = function getLineHeights(fontSizes) {
|
|
2213
2201
|
var additionalSpace = 8;
|
|
2214
2202
|
return {
|
|
@@ -2279,7 +2267,6 @@ var getBorderWidths = function getBorderWidths(baseBorderWidth) {
|
|
|
2279
2267
|
medium: baseBorderWidth * 2 // 2
|
|
2280
2268
|
};
|
|
2281
2269
|
};
|
|
2282
|
-
|
|
2283
2270
|
var getRadii = function getRadii(baseRadius) {
|
|
2284
2271
|
return {
|
|
2285
2272
|
rounded: 999,
|
|
@@ -7000,7 +6987,6 @@ function requireCssToReactNative() {
|
|
|
7000
6987
|
fontWeight: tokenStream.expect(WORD) // Also match numbers as strings
|
|
7001
6988
|
};
|
|
7002
6989
|
};
|
|
7003
|
-
|
|
7004
6990
|
var shadowOffset = function shadowOffset(tokenStream) {
|
|
7005
6991
|
return {
|
|
7006
6992
|
shadowOffset: parseShadowOffset(tokenStream)
|
|
@@ -8996,7 +8982,6 @@ var StyledText$2 = index$b(Typography.Body)(function (_ref2) {
|
|
|
8996
8982
|
ios: {
|
|
8997
8983
|
lineHeight: 0 // center on ios
|
|
8998
8984
|
},
|
|
8999
|
-
|
|
9000
8985
|
android: {
|
|
9001
8986
|
lineHeight: null,
|
|
9002
8987
|
// center on android
|
|
@@ -9007,7 +8992,6 @@ var StyledText$2 = index$b(Typography.Body)(function (_ref2) {
|
|
|
9007
8992
|
}
|
|
9008
8993
|
}));
|
|
9009
8994
|
});
|
|
9010
|
-
|
|
9011
8995
|
var StyledImage$1 = index$b(Image$1)(function (_ref3) {
|
|
9012
8996
|
var themeSize = _ref3.themeSize,
|
|
9013
8997
|
theme = _ref3.theme;
|
|
@@ -15671,7 +15655,6 @@ var calculateSnapPointsData = function calculateSnapPointsData(minimumHeight, he
|
|
|
15671
15655
|
maxHeightOffset: 0 // Max height
|
|
15672
15656
|
};
|
|
15673
15657
|
};
|
|
15674
|
-
|
|
15675
15658
|
var calculateAnimatedToValue = function calculateAnimatedToValue(position, heightSnapPoints) {
|
|
15676
15659
|
var distances = heightSnapPoints.map(function (height) {
|
|
15677
15660
|
return Math.abs(position - height);
|
|
@@ -17047,7 +17030,7 @@ var StyledErrorDescription = index$b(Typography.Body)(function (_ref9) {
|
|
|
17047
17030
|
var _excluded$o = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress", "icon"],
|
|
17048
17031
|
_excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
17049
17032
|
var renderImage$1 = function renderImage(image) {
|
|
17050
|
-
if (
|
|
17033
|
+
if (/*#__PURE__*/isValidElement(image)) {
|
|
17051
17034
|
return /*#__PURE__*/React__default.cloneElement(image, {
|
|
17052
17035
|
testID: 'error-image'
|
|
17053
17036
|
});
|
|
@@ -18969,7 +18952,6 @@ var ProgressCircle = function ProgressCircle(_ref) {
|
|
|
18969
18952
|
inputRange: [0, 100],
|
|
18970
18953
|
outputRange: [circumference - minArc, 0] // Full circle to zero offset
|
|
18971
18954
|
});
|
|
18972
|
-
|
|
18973
18955
|
return /*#__PURE__*/React__default.createElement(View, _extends$1({}, nativeProps, {
|
|
18974
18956
|
testID: testID,
|
|
18975
18957
|
style: style
|
|
@@ -19629,12 +19611,14 @@ var Radio = function Radio(_ref2) {
|
|
|
19629
19611
|
testID = _ref2.testID,
|
|
19630
19612
|
_ref2$inactiveIntent = _ref2.inactiveIntent,
|
|
19631
19613
|
inactiveIntent = _ref2$inactiveIntent === void 0 ? 'light' : _ref2$inactiveIntent,
|
|
19632
|
-
children = _ref2.children
|
|
19614
|
+
children = _ref2.children,
|
|
19615
|
+
prefix = _ref2.prefix;
|
|
19633
19616
|
return /*#__PURE__*/React__default.createElement(StyledRadio, {
|
|
19634
19617
|
onPress: onPress,
|
|
19635
19618
|
selected: checked,
|
|
19636
19619
|
title: text,
|
|
19637
19620
|
subtitle: subText,
|
|
19621
|
+
prefix: prefix,
|
|
19638
19622
|
suffix: /*#__PURE__*/React__default.createElement(RadioCircle, {
|
|
19639
19623
|
checked: checked,
|
|
19640
19624
|
text: text
|
|
@@ -19681,7 +19665,8 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
19681
19665
|
onPress: function onPress() {
|
|
19682
19666
|
return _onPress(option.value);
|
|
19683
19667
|
},
|
|
19684
|
-
inactiveIntent: inactiveIntent
|
|
19668
|
+
inactiveIntent: inactiveIntent,
|
|
19669
|
+
prefix: option.prefix
|
|
19685
19670
|
}, option.children));
|
|
19686
19671
|
}));
|
|
19687
19672
|
};
|
|
@@ -19751,10 +19736,10 @@ var SectionHeading = function SectionHeading(_ref) {
|
|
|
19751
19736
|
icon: icon,
|
|
19752
19737
|
size: ICON_SIZE_MAP[size],
|
|
19753
19738
|
intent: ICON_INTENT_MAP[intent]
|
|
19754
|
-
}) : /*#__PURE__*/React__default.cloneElement(icon, _objectSpread2({
|
|
19739
|
+
}) : (/*#__PURE__*/React__default.cloneElement(icon, _objectSpread2({
|
|
19755
19740
|
size: ICON_SIZE_MAP[size],
|
|
19756
19741
|
intent: ICON_INTENT_MAP[intent]
|
|
19757
|
-
}, icon.props)))), size === 'small' ? /*#__PURE__*/React__default.createElement(Typography.Caption, {
|
|
19742
|
+
}, icon.props))))), size === 'small' ? /*#__PURE__*/React__default.createElement(Typography.Caption, {
|
|
19758
19743
|
intent: intent
|
|
19759
19744
|
}, text) : /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
19760
19745
|
variant: "small",
|
|
@@ -19833,7 +19818,7 @@ var useKeyboard = function useKeyboard() {
|
|
|
19833
19818
|
keyboardHeight: keyboardHeight
|
|
19834
19819
|
};
|
|
19835
19820
|
};
|
|
19836
|
-
var
|
|
19821
|
+
var _deepCompareValue = function deepCompareValue(a, b) {
|
|
19837
19822
|
// Handle strict equality first (handles primitives, null, undefined)
|
|
19838
19823
|
if (a === b) return true;
|
|
19839
19824
|
// Special handling for NaN (NaN !== NaN in JS)
|
|
@@ -19848,7 +19833,7 @@ var deepCompareValue = function deepCompareValue(a, b) {
|
|
|
19848
19833
|
if (Array.isArray(a) && Array.isArray(b)) {
|
|
19849
19834
|
if (a.length !== b.length) return false;
|
|
19850
19835
|
return a.every(function (val, index) {
|
|
19851
|
-
return
|
|
19836
|
+
return _deepCompareValue(val, b[index]);
|
|
19852
19837
|
});
|
|
19853
19838
|
}
|
|
19854
19839
|
// If one is array and the other isn't, return false
|
|
@@ -19859,7 +19844,7 @@ var deepCompareValue = function deepCompareValue(a, b) {
|
|
|
19859
19844
|
var keysB = Object.keys(b);
|
|
19860
19845
|
if (keysA.length !== keysB.length) return false;
|
|
19861
19846
|
return keysA.every(function (key) {
|
|
19862
|
-
return keysB.includes(key) &&
|
|
19847
|
+
return keysB.includes(key) && _deepCompareValue(a[key], b[key]);
|
|
19863
19848
|
});
|
|
19864
19849
|
}
|
|
19865
19850
|
// If none of the above conditions matched, they're not equal
|
|
@@ -20193,7 +20178,7 @@ var OptionList = function OptionList(_ref) {
|
|
|
20193
20178
|
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
20194
20179
|
var renderItem = function renderItem(info) {
|
|
20195
20180
|
var item = info.item;
|
|
20196
|
-
var selected =
|
|
20181
|
+
var selected = _deepCompareValue(item.value, value);
|
|
20197
20182
|
var onItemPress = function onItemPress() {
|
|
20198
20183
|
if (value === item.value) {
|
|
20199
20184
|
onPress(null);
|
|
@@ -20264,7 +20249,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
20264
20249
|
var sections = toSections(options);
|
|
20265
20250
|
var flatOptions = toFlatOptions(options);
|
|
20266
20251
|
var displayedValue = (_flatOptions$find = flatOptions.find(function (opt) {
|
|
20267
|
-
return
|
|
20252
|
+
return _deepCompareValue(opt.value, value);
|
|
20268
20253
|
})) === null || _flatOptions$find === void 0 ? void 0 : _flatOptions$find.text;
|
|
20269
20254
|
var rawValue = value ? String(value) : undefined;
|
|
20270
20255
|
var bottomSheetVariant = bottomSheetConfig.variant,
|
|
@@ -20530,7 +20515,7 @@ var StyledSuccessModal = index$b(ModalWrapper)({
|
|
|
20530
20515
|
|
|
20531
20516
|
var _excluded$a = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress", "icon"];
|
|
20532
20517
|
var renderImage = function renderImage(image) {
|
|
20533
|
-
if (
|
|
20518
|
+
if (/*#__PURE__*/isValidElement(image)) {
|
|
20534
20519
|
return /*#__PURE__*/React__default.cloneElement(image, {
|
|
20535
20520
|
testID: 'success-image'
|
|
20536
20521
|
});
|
|
@@ -21394,7 +21379,6 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
21394
21379
|
testID: componentTestID ? "".concat(componentTestID, "-tab-bar") : undefined,
|
|
21395
21380
|
variant: variant
|
|
21396
21381
|
}), /*#__PURE__*/React__default.createElement(PagerView, {
|
|
21397
|
-
useNext: true,
|
|
21398
21382
|
initialPage: selectedTabIndex,
|
|
21399
21383
|
ref: pagerViewRef,
|
|
21400
21384
|
onPageScrollStateChanged: onPageScrollStateChanged,
|
|
@@ -21530,7 +21514,6 @@ var Tabs = function Tabs(_ref2) {
|
|
|
21530
21514
|
tabsLength: tabs.length,
|
|
21531
21515
|
tabsWidth: tabsWidth
|
|
21532
21516
|
}))), /*#__PURE__*/React__default.createElement(AnimatedPagerView, {
|
|
21533
|
-
useNext: true,
|
|
21534
21517
|
initialPage: selectedTabIndex,
|
|
21535
21518
|
ref: pagerViewRef,
|
|
21536
21519
|
onPageSelected: function onPageSelected(e) {
|
|
@@ -24397,7 +24380,7 @@ function requireReactDom_production_min() {
|
|
|
24397
24380
|
if (ia) {
|
|
24398
24381
|
var xe;
|
|
24399
24382
|
if (ia) {
|
|
24400
|
-
var ye =
|
|
24383
|
+
var ye = "oninput" in document;
|
|
24401
24384
|
if (!ye) {
|
|
24402
24385
|
var ze = document.createElement("div");
|
|
24403
24386
|
ze.setAttribute("oninput", "return;");
|
|
@@ -30582,7 +30565,7 @@ function requireLib() {
|
|
|
30582
30565
|
}, I.set = function (e, t, r) {
|
|
30583
30566
|
return L.set.call(this, e[0], t, r, e[0]);
|
|
30584
30567
|
};
|
|
30585
|
-
var K = new (
|
|
30568
|
+
var K = new (/*#__PURE__*/function () {
|
|
30586
30569
|
function _class(e) {
|
|
30587
30570
|
var _this = this;
|
|
30588
30571
|
_classCallCheck(this, _class);
|
|
@@ -30639,7 +30622,7 @@ function requireLib() {
|
|
|
30639
30622
|
}), r, n];
|
|
30640
30623
|
}, "boolean" == typeof (e === null || e === void 0 ? void 0 : e.autoFreeze) && this.setAutoFreeze(e.autoFreeze), "boolean" == typeof (e === null || e === void 0 ? void 0 : e.useStrictShallowCopy) && this.setUseStrictShallowCopy(e.useStrictShallowCopy);
|
|
30641
30624
|
}
|
|
30642
|
-
_createClass(_class, [{
|
|
30625
|
+
return _createClass(_class, [{
|
|
30643
30626
|
key: "createDraft",
|
|
30644
30627
|
value: function createDraft(e) {
|
|
30645
30628
|
var t;
|
|
@@ -30684,7 +30667,6 @@ function requireLib() {
|
|
|
30684
30667
|
});
|
|
30685
30668
|
}
|
|
30686
30669
|
}]);
|
|
30687
|
-
return _class;
|
|
30688
30670
|
}())(),
|
|
30689
30671
|
X = K.produce,
|
|
30690
30672
|
J = (K.produceWithPatches.bind(K), K.setAutoFreeze.bind(K), K.setUseStrictShallowCopy.bind(K), K.applyPatches.bind(K), K.createDraft.bind(K)),
|
|
@@ -31248,12 +31230,12 @@ function requireLib() {
|
|
|
31248
31230
|
e.setSelection(t);
|
|
31249
31231
|
}
|
|
31250
31232
|
},
|
|
31251
|
-
|
|
31233
|
+
_ve = function ve(e, t) {
|
|
31252
31234
|
for (var r in e) {
|
|
31253
31235
|
var u = e[r],
|
|
31254
31236
|
o = t[r];
|
|
31255
31237
|
if (n(u) && n(o)) {
|
|
31256
|
-
if (!
|
|
31238
|
+
if (!_ve(u, o)) return !1;
|
|
31257
31239
|
} else if (Array.isArray(u) && Array.isArray(o)) {
|
|
31258
31240
|
if (u.length !== o.length) return !1;
|
|
31259
31241
|
for (var a = 0; a < u.length; a++) if (u[a] !== o[a]) return !1;
|
|
@@ -32323,7 +32305,7 @@ function requireLib() {
|
|
|
32323
32305
|
function u(e) {
|
|
32324
32306
|
return De(e, _e);
|
|
32325
32307
|
}
|
|
32326
|
-
return
|
|
32308
|
+
return _ve(n ? u(e) : e, n ? u(t) : t);
|
|
32327
32309
|
},
|
|
32328
32310
|
isText: function isText(e) {
|
|
32329
32311
|
return n(e) && "string" == typeof e.text;
|
|
@@ -32434,7 +32416,7 @@ function requireLib() {
|
|
|
32434
32416
|
var l = s.codePointAt(0);
|
|
32435
32417
|
if (!l) break;
|
|
32436
32418
|
var c = lt(s, l);
|
|
32437
|
-
if (
|
|
32419
|
+
if (_ref3 = r ? [o, c] : [c, u], _ref4 = _slicedToArray(_ref3, 2), u = _ref4[0], o = _ref4[1], ct(u, We.ZWJ) && ct(o, We.ExtPict) && !pt(r ? e.substring(0, a) : e.substring(0, e.length - a))) break;
|
|
32438
32420
|
if (ct(u, We.RI) && ct(o, We.RI) && !(i = null !== i ? !i : !!r || Dt(e.substring(0, e.length - a)))) break;
|
|
32439
32421
|
if (u !== We.None && o !== We.None && dt(u, o)) break;
|
|
32440
32422
|
a += s.length;
|
|
@@ -32811,10 +32793,10 @@ function requireLib() {
|
|
|
32811
32793
|
}
|
|
32812
32794
|
var Lt = ["text"],
|
|
32813
32795
|
It = ["children"],
|
|
32814
|
-
|
|
32796
|
+
_Wt = function Wt(e, t) {
|
|
32815
32797
|
if (Be.isElement(t)) {
|
|
32816
32798
|
var r = t;
|
|
32817
|
-
return !!ke.isVoid(e, t) || 1 === r.children.length &&
|
|
32799
|
+
return !!ke.isVoid(e, t) || 1 === r.children.length && _Wt(e, r.children[0]);
|
|
32818
32800
|
}
|
|
32819
32801
|
return !ke.isEditor(t);
|
|
32820
32802
|
};
|
|
@@ -34245,7 +34227,7 @@ function requireLib() {
|
|
|
34245
34227
|
at: h,
|
|
34246
34228
|
mode: "highest",
|
|
34247
34229
|
match: function match(t) {
|
|
34248
|
-
return B.includes(t) &&
|
|
34230
|
+
return B.includes(t) && _Wt(e, t);
|
|
34249
34231
|
}
|
|
34250
34232
|
}),
|
|
34251
34233
|
E = b && ke.pathRef(e, b[1]);
|
|
@@ -35726,13 +35708,13 @@ function requireLib() {
|
|
|
35726
35708
|
n = _hr2[0];
|
|
35727
35709
|
return n;
|
|
35728
35710
|
},
|
|
35729
|
-
|
|
35711
|
+
_vr = function vr(e) {
|
|
35730
35712
|
var t = "";
|
|
35731
35713
|
if (dr(e) && e.nodeValue) return e.nodeValue;
|
|
35732
35714
|
if (lr(e)) {
|
|
35733
35715
|
for (var _i9 = 0, _Array$from = Array.from(e.childNodes); _i9 < _Array$from.length; _i9++) {
|
|
35734
35716
|
var r = _Array$from[_i9];
|
|
35735
|
-
t +=
|
|
35717
|
+
t += _vr(r);
|
|
35736
35718
|
}
|
|
35737
35719
|
var n = getComputedStyle(e).getPropertyValue("display");
|
|
35738
35720
|
"block" !== n && "list" !== n && "BR" !== e.tagName || (t += "\n");
|
|
@@ -35743,7 +35725,7 @@ function requireLib() {
|
|
|
35743
35725
|
gr = function gr(e) {
|
|
35744
35726
|
return null != e.getSelection ? e.getSelection() : document.getSelection();
|
|
35745
35727
|
},
|
|
35746
|
-
|
|
35728
|
+
_Cr = function Cr(e, t, r) {
|
|
35747
35729
|
var n = t.target;
|
|
35748
35730
|
if (lr(n) && n.matches('[contentEditable="false"]')) return !1;
|
|
35749
35731
|
var _ln$getWindow = ln.getWindow(e),
|
|
@@ -35779,7 +35761,7 @@ function requireLib() {
|
|
|
35779
35761
|
_iterator43.f();
|
|
35780
35762
|
}
|
|
35781
35763
|
});
|
|
35782
|
-
return !(!o || o === t) &&
|
|
35764
|
+
return !(!o || o === t) && _Cr(e, o, r);
|
|
35783
35765
|
},
|
|
35784
35766
|
mr = function mr(e, t) {
|
|
35785
35767
|
return Boolean(e.compareDocumentPosition(t) & ar.DOCUMENT_POSITION_PRECEDING);
|
|
@@ -36093,7 +36075,7 @@ function requireLib() {
|
|
|
36093
36075
|
if (lr(t) && t.childNodes.length) {
|
|
36094
36076
|
var n = r === t.childNodes.length,
|
|
36095
36077
|
u = n ? r - 1 : r;
|
|
36096
|
-
for (
|
|
36078
|
+
for (_hr3 = hr(t, u, n ? "backward" : "forward"), _hr4 = _slicedToArray(_hr3, 2), t = _hr4[0], u = _hr4[1], n = u < r; lr(t) && t.childNodes.length;) {
|
|
36097
36079
|
var _hr3, _hr4;
|
|
36098
36080
|
var o = n ? t.childNodes.length - 1 : 0;
|
|
36099
36081
|
t = pr(t, o, n ? "backward" : "forward");
|
|
@@ -36197,13 +36179,13 @@ function requireLib() {
|
|
|
36197
36179
|
var f = t.getRangeAt(0),
|
|
36198
36180
|
d = t.getRangeAt(t.rangeCount - 1);
|
|
36199
36181
|
if (a instanceof HTMLTableRowElement && f.startContainer instanceof HTMLTableRowElement && d.startContainer instanceof HTMLTableRowElement) {
|
|
36200
|
-
var
|
|
36201
|
-
return e.childElementCount > 0 ?
|
|
36182
|
+
var _B2 = function B(e) {
|
|
36183
|
+
return e.childElementCount > 0 ? _B2(e.children[0]) : e;
|
|
36202
36184
|
};
|
|
36203
36185
|
var h = f.startContainer,
|
|
36204
36186
|
p = d.startContainer,
|
|
36205
|
-
v =
|
|
36206
|
-
D =
|
|
36187
|
+
v = _B2(h.children[f.startOffset]),
|
|
36188
|
+
D = _B2(p.children[d.startOffset]);
|
|
36207
36189
|
i = 0, u = D.childNodes.length > 0 ? D.childNodes[0] : D, a = v.childNodes.length > 0 ? v.childNodes[0] : v, o = D instanceof HTMLElement ? D.innerHTML.length : 0;
|
|
36208
36190
|
} else f.startContainer === a ? (u = d.endContainer, o = d.endOffset, i = f.startOffset) : (u = f.startContainer, o = f.endOffset, i = d.startOffset);
|
|
36209
36191
|
} else u = t.anchorNode, o = t.anchorOffset, a = t.focusNode, i = t.focusOffset;
|
|
@@ -37343,7 +37325,7 @@ function requireLib() {
|
|
|
37343
37325
|
handleDomMutations: function handleDomMutations(e) {
|
|
37344
37326
|
var r;
|
|
37345
37327
|
D() || v() || e.some(function (r) {
|
|
37346
|
-
return
|
|
37328
|
+
return _Cr(t, r, e);
|
|
37347
37329
|
}) && (null === (r = on.get(t)) || void 0 === r || r());
|
|
37348
37330
|
},
|
|
37349
37331
|
handleInput: function handleInput() {
|
|
@@ -37792,15 +37774,14 @@ function requireLib() {
|
|
|
37792
37774
|
characterDataOldValue: !0
|
|
37793
37775
|
};
|
|
37794
37776
|
var uo = /*#__PURE__*/function (_e$Component) {
|
|
37795
|
-
_inherits(uo, _e$Component);
|
|
37796
|
-
var _super = _createSuper(uo);
|
|
37797
37777
|
function uo() {
|
|
37798
37778
|
var _this3;
|
|
37799
37779
|
_classCallCheck(this, uo);
|
|
37800
|
-
_this3 =
|
|
37780
|
+
_this3 = _callSuper(this, uo, arguments), yu(_assertThisInitialized(_this3), "context", null), yu(_assertThisInitialized(_this3), "manager", null), yu(_assertThisInitialized(_this3), "mutationObserver", null);
|
|
37801
37781
|
return _this3;
|
|
37802
37782
|
}
|
|
37803
|
-
|
|
37783
|
+
_inherits(uo, _e$Component);
|
|
37784
|
+
return _createClass(uo, [{
|
|
37804
37785
|
key: "observe",
|
|
37805
37786
|
value: function observe() {
|
|
37806
37787
|
var e,
|
|
@@ -37823,7 +37804,7 @@ function requireLib() {
|
|
|
37823
37804
|
if (t.current) {
|
|
37824
37805
|
var _r8;
|
|
37825
37806
|
var u = n.filter(function (t) {
|
|
37826
|
-
return
|
|
37807
|
+
return _Cr(e, t, n);
|
|
37827
37808
|
});
|
|
37828
37809
|
(_r8 = r).push.apply(_r8, _toConsumableArray(u));
|
|
37829
37810
|
}
|
|
@@ -37869,7 +37850,6 @@ function requireLib() {
|
|
|
37869
37850
|
return this.props.children;
|
|
37870
37851
|
}
|
|
37871
37852
|
}]);
|
|
37872
|
-
return uo;
|
|
37873
37853
|
}(e.Component);
|
|
37874
37854
|
yu(uo, "contextType", Bu);
|
|
37875
37855
|
var oo = br ? uo : function (e) {
|
|
@@ -38261,9 +38241,8 @@ function requireLib() {
|
|
|
38261
38241
|
w(e && N ? null === (t = e.getBoundingClientRect()) || void 0 === t ? void 0 : t.height : void 0);
|
|
38262
38242
|
}, [N]);
|
|
38263
38243
|
if (N) {
|
|
38264
|
-
var _R$push;
|
|
38265
38244
|
var z = ke.start(C, []);
|
|
38266
|
-
R.push((
|
|
38245
|
+
R.push(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, an, !0), "placeholder", s), "onPlaceholderResize", _), "anchor", z), "focus", z));
|
|
38267
38246
|
}
|
|
38268
38247
|
var L = C.marks;
|
|
38269
38248
|
if (P.hasMarkPlaceholder = !1, C.selection && me.isCollapsed(C.selection) && L) {
|
|
@@ -39025,7 +39004,7 @@ function requireLib() {
|
|
|
39025
39004
|
g = window.btoa(encodeURIComponent(D));
|
|
39026
39005
|
c.setAttribute("data-slate-fragment", g), e.setData("application/".concat(t), g);
|
|
39027
39006
|
var C = l.ownerDocument.createElement("div");
|
|
39028
|
-
return C.appendChild(l), C.setAttribute("hidden", "true"), l.ownerDocument.body.appendChild(C), e.setData("text/html", C.innerHTML), e.setData("text/plain",
|
|
39007
|
+
return C.appendChild(l), C.setAttribute("hidden", "true"), l.ownerDocument.body.appendChild(C), e.setData("text/html", C.innerHTML), e.setData("text/plain", _vr(C)), l.ownerDocument.body.removeChild(C), e;
|
|
39029
39008
|
}
|
|
39030
39009
|
}
|
|
39031
39010
|
}, r.insertData = function (e) {
|