musae 1.0.27-beta.13 → 1.0.27-beta.15
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/icon/icons/index.cjs +2 -0
- package/dist/components/icon/icons/index.d.ts +1 -0
- package/dist/components/icon/icons/index.mjs +1 -0
- package/dist/components/icon/icons/social/index.d.ts +2 -0
- package/dist/components/icon/icons/social/share.cjs +22 -0
- package/dist/components/icon/icons/social/share.d.ts +3 -0
- package/dist/components/icon/icons/social/share.mjs +18 -0
- package/dist/components/rich-text-editor/plugins/controlled-state/index.cjs +3 -8
- package/dist/components/rich-text-editor/plugins/controlled-state/index.mjs +3 -8
- package/package.json +1 -1
|
@@ -59,6 +59,7 @@ var rocketLaunch = require('./action/rocket-launch.cjs');
|
|
|
59
59
|
var rotateLeft = require('./image/rotate-left.cjs');
|
|
60
60
|
var rotateRight = require('./image/rotate-right.cjs');
|
|
61
61
|
var schedule = require('./action/schedule.cjs');
|
|
62
|
+
var share = require('./social/share.cjs');
|
|
62
63
|
var smartToy = require('./home/smart-toy.cjs');
|
|
63
64
|
var star = require('./toggle/star.cjs');
|
|
64
65
|
var starHalf = require('./toggle/star-half.cjs');
|
|
@@ -142,6 +143,7 @@ exports.RocketLaunch = rocketLaunch.default;
|
|
|
142
143
|
exports.RotateLeft = rotateLeft.default;
|
|
143
144
|
exports.RotateRight = rotateRight.default;
|
|
144
145
|
exports.Schedule = schedule.default;
|
|
146
|
+
exports.Share = share.default;
|
|
145
147
|
exports.SmartToy = smartToy.default;
|
|
146
148
|
exports.Star = star.default;
|
|
147
149
|
exports.StarHalf = starHalf.default;
|
|
@@ -57,6 +57,7 @@ export { default as RocketLaunch } from './action/rocket-launch.mjs';
|
|
|
57
57
|
export { default as RotateLeft } from './image/rotate-left.mjs';
|
|
58
58
|
export { default as RotateRight } from './image/rotate-right.mjs';
|
|
59
59
|
export { default as Schedule } from './action/schedule.mjs';
|
|
60
|
+
export { default as Share } from './social/share.mjs';
|
|
60
61
|
export { default as SmartToy } from './home/smart-toy.mjs';
|
|
61
62
|
export { default as Star } from './toggle/star.mjs';
|
|
62
63
|
export { default as StarHalf } from './toggle/star-half.mjs';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var hoc = require('../../hoc.cjs');
|
|
7
|
+
|
|
8
|
+
var Share = hoc.withIcon(function (_ref) {
|
|
9
|
+
var size = _ref.size;
|
|
10
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
+
width: size,
|
|
13
|
+
height: size,
|
|
14
|
+
viewBox: "0 0 24 24",
|
|
15
|
+
fill: "none"
|
|
16
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
17
|
+
d: "M18 16.12C17.24 16.12 16.56 16.42 16.04 16.89L8.91 12.74C8.96 12.51 9 12.28 9 12.04C9 11.8 8.96 11.57 8.91 11.34L15.96 7.23004C16.5 7.73004 17.21 8.04004 18 8.04004C19.66 8.04004 21 6.70004 21 5.04004C21 3.38004 19.66 2.04004 18 2.04004C16.34 2.04004 15 3.38004 15 5.04004C15 5.28004 15.04 5.51004 15.09 5.74004L8.04 9.85004C7.5 9.35004 6.79 9.04004 6 9.04004C4.34 9.04004 3 10.38 3 12.04C3 13.7 4.34 15.04 6 15.04C6.79 15.04 7.5 14.73 8.04 14.23L15.16 18.39C15.11 18.6 15.08 18.82 15.08 19.04C15.08 20.65 16.39 21.96 18 21.96C19.61 21.96 20.92 20.65 20.92 19.04C20.92 17.43 19.61 16.12 18 16.12ZM18 4.04004C18.55 4.04004 19 4.49004 19 5.04004C19 5.59004 18.55 6.04004 18 6.04004C17.45 6.04004 17 5.59004 17 5.04004C17 4.49004 17.45 4.04004 18 4.04004ZM6 13.04C5.45 13.04 5 12.59 5 12.04C5 11.49 5.45 11.04 6 11.04C6.55 11.04 7 11.49 7 12.04C7 12.59 6.55 13.04 6 13.04ZM18 20.06C17.45 20.06 17 19.61 17 19.06C17 18.51 17.45 18.06 18 18.06C18.55 18.06 19 18.51 19 19.06C19 19.61 18.55 20.06 18 20.06Z",
|
|
18
|
+
fill: "currentColor"
|
|
19
|
+
}));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
exports.default = Share;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { withIcon } from '../../hoc.mjs';
|
|
3
|
+
|
|
4
|
+
var Share = withIcon(function (_ref) {
|
|
5
|
+
var size = _ref.size;
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
width: size,
|
|
9
|
+
height: size,
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none"
|
|
12
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
13
|
+
d: "M18 16.12C17.24 16.12 16.56 16.42 16.04 16.89L8.91 12.74C8.96 12.51 9 12.28 9 12.04C9 11.8 8.96 11.57 8.91 11.34L15.96 7.23004C16.5 7.73004 17.21 8.04004 18 8.04004C19.66 8.04004 21 6.70004 21 5.04004C21 3.38004 19.66 2.04004 18 2.04004C16.34 2.04004 15 3.38004 15 5.04004C15 5.28004 15.04 5.51004 15.09 5.74004L8.04 9.85004C7.5 9.35004 6.79 9.04004 6 9.04004C4.34 9.04004 3 10.38 3 12.04C3 13.7 4.34 15.04 6 15.04C6.79 15.04 7.5 14.73 8.04 14.23L15.16 18.39C15.11 18.6 15.08 18.82 15.08 19.04C15.08 20.65 16.39 21.96 18 21.96C19.61 21.96 20.92 20.65 20.92 19.04C20.92 17.43 19.61 16.12 18 16.12ZM18 4.04004C18.55 4.04004 19 4.49004 19 5.04004C19 5.59004 18.55 6.04004 18 6.04004C17.45 6.04004 17 5.59004 17 5.04004C17 4.49004 17.45 4.04004 18 4.04004ZM6 13.04C5.45 13.04 5 12.59 5 12.04C5 11.49 5.45 11.04 6 11.04C6.55 11.04 7 11.49 7 12.04C7 12.59 6.55 13.04 6 13.04ZM18 20.06C17.45 20.06 17 19.61 17 19.06C17 18.51 17.45 18.06 18 18.06C18.55 18.06 19 18.51 19 19.06C19 19.61 18.55 20.06 18 20.06Z",
|
|
14
|
+
fill: "currentColor"
|
|
15
|
+
}));
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export { Share as default };
|
|
@@ -28,18 +28,13 @@ var ControlledStatePlugin = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
28
28
|
var editorState = editor.parseEditorState(updatedValue);
|
|
29
29
|
editor.setEditorState(editorState);
|
|
30
30
|
});
|
|
31
|
-
var _useControlledState = relax.useControlledState(value,
|
|
32
|
-
onChange: function onChange(nextValue) {
|
|
33
|
-
_setEditorState(nextValue);
|
|
34
|
-
}
|
|
35
|
-
}),
|
|
31
|
+
var _useControlledState = relax.useControlledState(value),
|
|
36
32
|
_useControlledState2 = _slicedToArray(_useControlledState, 2),
|
|
37
33
|
_value = _useControlledState2[0],
|
|
38
34
|
_setValue = _useControlledState2[1];
|
|
39
35
|
relax.useUpdateEffect(function () {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
});
|
|
36
|
+
_setEditorState(_value);
|
|
37
|
+
}, [_value]);
|
|
43
38
|
// 富文本组件发生数据变更时,同步更新受控数据
|
|
44
39
|
var change = relax.useEvent(function (state, editor) {
|
|
45
40
|
editor.read(function () {
|
|
@@ -24,18 +24,13 @@ var ControlledStatePlugin = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
24
24
|
var editorState = editor.parseEditorState(updatedValue);
|
|
25
25
|
editor.setEditorState(editorState);
|
|
26
26
|
});
|
|
27
|
-
var _useControlledState = useControlledState(value,
|
|
28
|
-
onChange: function onChange(nextValue) {
|
|
29
|
-
_setEditorState(nextValue);
|
|
30
|
-
}
|
|
31
|
-
}),
|
|
27
|
+
var _useControlledState = useControlledState(value),
|
|
32
28
|
_useControlledState2 = _slicedToArray(_useControlledState, 2),
|
|
33
29
|
_value = _useControlledState2[0],
|
|
34
30
|
_setValue = _useControlledState2[1];
|
|
35
31
|
useUpdateEffect(function () {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
});
|
|
32
|
+
_setEditorState(_value);
|
|
33
|
+
}, [_value]);
|
|
39
34
|
// 富文本组件发生数据变更时,同步更新受控数据
|
|
40
35
|
var change = useEvent(function (state, editor) {
|
|
41
36
|
editor.read(function () {
|