@yorab/react-paint 0.6.2 → 0.6.5
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/Changelog.md +16 -0
- package/README.md +0 -1
- package/dist/components/App.js +30 -22
- package/dist/components/Canvas.js +5 -5
- package/dist/components/common/Button.js +4 -4
- package/dist/components/common/Loading.js +3 -3
- package/dist/components/common/Modal.js +3 -3
- package/dist/components/common/Panel.js +2 -2
- package/dist/components/common/Snackbar.js +2 -2
- package/dist/components/settings/ColorField.js +14 -10
- package/dist/components/settings/FontFamilyField.js +3 -3
- package/dist/components/settings/LayoutButton.js +1 -1
- package/dist/components/settings/Layouts.js +10 -10
- package/dist/components/settings/LineArrowField.js +3 -3
- package/dist/components/settings/LineTypeField.js +2 -2
- package/dist/components/settings/RangeField.js +1 -1
- package/dist/components/settings/SelectField.js +2 -2
- package/dist/components/settings/SettingsBar.js +3 -3
- package/dist/components/toolbox/EditTextBox.js +23 -9
- package/dist/components/toolbox/LoadFileTool.js +3 -3
- package/dist/components/toolbox/MenuGroup.js +2 -2
- package/dist/components/toolbox/PictureUrlInput.js +1 -1
- package/dist/components/toolbox/Tool.js +3 -3
- package/dist/components/toolbox/Toolbar.js +4 -5
- package/dist/components/toolbox/ToolbarGroup.js +2 -2
- package/dist/constants/icons.js +7 -3
- package/dist/constants/style.js +1 -1
- package/dist/constants/tools.js +20 -20
- package/dist/styles.css +55 -55
- package/package.json +2 -2
package/Changelog.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# V0.6.5
|
|
2
|
+
|
|
3
|
+
- add babel/runtime to dep to fix build
|
|
4
|
+
|
|
5
|
+
# V0.6.4
|
|
6
|
+
|
|
7
|
+
- fix TextEdit copy/paste containing html
|
|
8
|
+
- add clearCallback in opts to override clear button behavior
|
|
9
|
+
|
|
10
|
+
# V0.6.3
|
|
11
|
+
|
|
12
|
+
- Rename 'lib' prop in 'label'
|
|
13
|
+
- update dash settings
|
|
14
|
+
- update clear icon
|
|
15
|
+
- update color settings UI
|
|
16
|
+
|
|
1
17
|
# V0.6.2
|
|
2
18
|
|
|
3
19
|
- Lock : can't select shape by click on it (only via layers panel)
|
package/README.md
CHANGED
package/dist/components/App.js
CHANGED
|
@@ -71,49 +71,49 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
71
71
|
|
|
72
72
|
var StyledApp = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
73
73
|
name: "StyledApp",
|
|
74
|
-
"class": "
|
|
74
|
+
"class": "sdhgr8u",
|
|
75
75
|
vars: {
|
|
76
|
-
"
|
|
76
|
+
"sdhgr8u-0": [function (props) {
|
|
77
77
|
return props.toolbarBackgroundColor;
|
|
78
78
|
}],
|
|
79
|
-
"
|
|
79
|
+
"sdhgr8u-1": [function (props) {
|
|
80
80
|
return props.dividerColor;
|
|
81
81
|
}],
|
|
82
|
-
"
|
|
82
|
+
"sdhgr8u-2": [function (props) {
|
|
83
83
|
return props.fontRadius;
|
|
84
84
|
}, "px"],
|
|
85
|
-
"
|
|
85
|
+
"sdhgr8u-3": [function (props) {
|
|
86
86
|
return props.fontDisabledColor;
|
|
87
87
|
}],
|
|
88
|
-
"
|
|
88
|
+
"sdhgr8u-4": [function (props) {
|
|
89
89
|
return props.fontDisabledBackgroundColor;
|
|
90
90
|
}],
|
|
91
|
-
"
|
|
91
|
+
"sdhgr8u-5": [function (props) {
|
|
92
92
|
return props.fontColor;
|
|
93
93
|
}],
|
|
94
|
-
"
|
|
94
|
+
"sdhgr8u-6": [function (props) {
|
|
95
95
|
return props.fontBackgroundColor;
|
|
96
96
|
}],
|
|
97
|
-
"
|
|
97
|
+
"sdhgr8u-7": [function (props) {
|
|
98
98
|
return props.fontSelectedColor;
|
|
99
99
|
}],
|
|
100
|
-
"
|
|
100
|
+
"sdhgr8u-8": [function (props) {
|
|
101
101
|
return props.fontSelectedBackgroundColor;
|
|
102
102
|
}],
|
|
103
|
-
"
|
|
103
|
+
"sdhgr8u-9": [function (props) {
|
|
104
104
|
return props.fontHoverColor;
|
|
105
105
|
}],
|
|
106
|
-
"
|
|
106
|
+
"sdhgr8u-10": [function (props) {
|
|
107
107
|
return props.fontHoverBackgroundColor;
|
|
108
108
|
}],
|
|
109
|
-
"
|
|
109
|
+
"sdhgr8u-11": [function (props) {
|
|
110
110
|
return props.canvasBackgroundColor;
|
|
111
111
|
}],
|
|
112
|
-
"
|
|
112
|
+
"sdhgr8u-12": [function (_ref) {
|
|
113
113
|
var canvasWidth = _ref.canvasWidth;
|
|
114
114
|
return "min(100%, ".concat(canvasWidth, "px)");
|
|
115
115
|
}],
|
|
116
|
-
"
|
|
116
|
+
"sdhgr8u-13": [function (_ref2) {
|
|
117
117
|
var canvasWidth = _ref2.canvasWidth;
|
|
118
118
|
return canvasWidth;
|
|
119
119
|
}, "px"]
|
|
@@ -121,13 +121,13 @@ var StyledApp = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
|
121
121
|
});
|
|
122
122
|
var StyledRow = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
123
123
|
name: "StyledRow",
|
|
124
|
-
"class": "
|
|
124
|
+
"class": "sm24hcl",
|
|
125
125
|
vars: {
|
|
126
|
-
"
|
|
126
|
+
"sm24hcl-1": [function (_ref3) {
|
|
127
127
|
var width = _ref3.width;
|
|
128
128
|
return width;
|
|
129
129
|
}, "px"],
|
|
130
|
-
"
|
|
130
|
+
"sm24hcl-2": [function (_ref4) {
|
|
131
131
|
var aspectRatio = _ref4.aspectRatio;
|
|
132
132
|
return aspectRatio;
|
|
133
133
|
}]
|
|
@@ -143,6 +143,7 @@ var DEFAULT_OPTIONS = {
|
|
|
143
143
|
withUploadPicture: true,
|
|
144
144
|
withUrlPicture: false,
|
|
145
145
|
availableTools: _tools.DEFAULT_SHAPE_TOOLS,
|
|
146
|
+
clearCallback: 'empty',
|
|
146
147
|
uiStyle: {
|
|
147
148
|
toolbarBackgroundColor: 'white',
|
|
148
149
|
dividerColor: '#36418129',
|
|
@@ -188,6 +189,7 @@ var App = function App(_ref5) {
|
|
|
188
189
|
withLoadAndSave = _DEFAULT_OPTIONS$opti.withLoadAndSave,
|
|
189
190
|
withUploadPicture = _DEFAULT_OPTIONS$opti.withUploadPicture,
|
|
190
191
|
withUrlPicture = _DEFAULT_OPTIONS$opti.withUrlPicture,
|
|
192
|
+
clearCallback = _DEFAULT_OPTIONS$opti.clearCallback,
|
|
191
193
|
availableToolsFromProps = _DEFAULT_OPTIONS$opti.availableTools;
|
|
192
194
|
|
|
193
195
|
var _DEFAULT_OPTIONS$uiSt = _objectSpread(_objectSpread({}, DEFAULT_OPTIONS.uiStyle), (_options$uiStyle = options === null || options === void 0 ? void 0 : options.uiStyle) !== null && _options$uiStyle !== void 0 ? _options$uiStyle : {}),
|
|
@@ -355,14 +357,20 @@ var App = function App(_ref5) {
|
|
|
355
357
|
};
|
|
356
358
|
}(), [resetCanvas]);
|
|
357
359
|
var clearCanvas = (0, _react.useCallback)(function () {
|
|
358
|
-
if (
|
|
360
|
+
if (typeof clearCallback !== 'string') {
|
|
359
361
|
void loadImportedData({
|
|
360
|
-
shapes:
|
|
362
|
+
shapes: clearCallback()
|
|
361
363
|
}, false);
|
|
362
364
|
} else {
|
|
363
|
-
|
|
365
|
+
if (clearCallback === 'defaultShapes' && shapesFromProps !== undefined) {
|
|
366
|
+
void loadImportedData({
|
|
367
|
+
shapes: shapesFromProps
|
|
368
|
+
}, false);
|
|
369
|
+
} else {
|
|
370
|
+
resetCanvas();
|
|
371
|
+
}
|
|
364
372
|
}
|
|
365
|
-
}, [resetCanvas, loadImportedData, shapesFromProps]);
|
|
373
|
+
}, [resetCanvas, loadImportedData, shapesFromProps, clearCallback]);
|
|
366
374
|
var selectShape = (0, _react.useCallback)(function (shape) {
|
|
367
375
|
setActiveTool(_tools.SELECTION_TOOL);
|
|
368
376
|
setSelectedShape(shape);
|
|
@@ -73,21 +73,21 @@ var renderSelectionCanvas = function renderSelectionCanvas(selectionCtx, selecti
|
|
|
73
73
|
|
|
74
74
|
var StyledCanvasBox = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
75
75
|
name: "StyledCanvasBox",
|
|
76
|
-
"class": "
|
|
76
|
+
"class": "s14cny8z"
|
|
77
77
|
});
|
|
78
78
|
var StyledCanvasContainer = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
79
79
|
name: "StyledCanvasContainer",
|
|
80
|
-
"class": "
|
|
80
|
+
"class": "s16bxms6"
|
|
81
81
|
});
|
|
82
82
|
var StyledDrawCanvas = /*#__PURE__*/(0, _react2.styled)("canvas")({
|
|
83
83
|
name: "StyledDrawCanvas",
|
|
84
|
-
"class": "
|
|
84
|
+
"class": "spzzsat"
|
|
85
85
|
});
|
|
86
86
|
var StyledSelectionCanvas = /*#__PURE__*/(0, _react2.styled)("canvas")({
|
|
87
87
|
name: "StyledSelectionCanvas",
|
|
88
|
-
"class": "
|
|
88
|
+
"class": "s1egrskk",
|
|
89
89
|
vars: {
|
|
90
|
-
"
|
|
90
|
+
"s1egrskk-0": [function (_ref) {
|
|
91
91
|
var cursor = _ref.cursor;
|
|
92
92
|
return cursor;
|
|
93
93
|
}]
|
|
@@ -19,19 +19,19 @@ var _excluded = ["hidden", "disabled", "selected", "icon", "children", "classNam
|
|
|
19
19
|
_excluded2 = ["hidden", "disabled", "selected", "icon", "children", "type"];
|
|
20
20
|
var StyledButton = /*#__PURE__*/(0, _react2.styled)("button")({
|
|
21
21
|
name: "StyledButton",
|
|
22
|
-
"class": "
|
|
22
|
+
"class": "sc6yefj"
|
|
23
23
|
});
|
|
24
24
|
var StyledButtonContent = /*#__PURE__*/(0, _react2.styled)("span")({
|
|
25
25
|
name: "StyledButtonContent",
|
|
26
|
-
"class": "
|
|
26
|
+
"class": "s2aizej"
|
|
27
27
|
});
|
|
28
28
|
var StyledIcon = /*#__PURE__*/(0, _react2.styled)("span")({
|
|
29
29
|
name: "StyledIcon",
|
|
30
|
-
"class": "
|
|
30
|
+
"class": "s13rkw3s"
|
|
31
31
|
});
|
|
32
32
|
var StyledChildren = /*#__PURE__*/(0, _react2.styled)("span")({
|
|
33
33
|
name: "StyledChildren",
|
|
34
|
-
"class": "
|
|
34
|
+
"class": "s1qkcrgj"
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
var Button = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
@@ -24,15 +24,15 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
24
24
|
var TRANSITION_DURATION = 300;
|
|
25
25
|
var StyledLoading = /*#__PURE__*/(0, _react.styled)("div")({
|
|
26
26
|
name: "StyledLoading",
|
|
27
|
-
"class": "
|
|
27
|
+
"class": "s15r7ba"
|
|
28
28
|
});
|
|
29
29
|
var StyledLoader = /*#__PURE__*/(0, _react.styled)("div")({
|
|
30
30
|
name: "StyledLoader",
|
|
31
|
-
"class": "
|
|
31
|
+
"class": "s19n4ela"
|
|
32
32
|
});
|
|
33
33
|
var StyledShape = /*#__PURE__*/(0, _react.styled)("div")({
|
|
34
34
|
name: "StyledShape",
|
|
35
|
-
"class": "
|
|
35
|
+
"class": "ssemdwq"
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
var Loading = function Loading(_ref) {
|
|
@@ -15,15 +15,15 @@ var _style = require("../../constants/style");
|
|
|
15
15
|
|
|
16
16
|
var StyledModal = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
17
17
|
name: "StyledModal",
|
|
18
|
-
"class": "
|
|
18
|
+
"class": "s1hezj2d"
|
|
19
19
|
});
|
|
20
20
|
var StyledPanel = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
21
21
|
name: "StyledPanel",
|
|
22
|
-
"class": "
|
|
22
|
+
"class": "spuj31h"
|
|
23
23
|
});
|
|
24
24
|
var StyledMask = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
25
25
|
name: "StyledMask",
|
|
26
|
-
"class": "
|
|
26
|
+
"class": "s1ulcd40"
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
var Modal = function Modal(_ref) {
|
|
@@ -19,11 +19,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
19
19
|
|
|
20
20
|
var StyledPanel = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
21
21
|
name: "StyledPanel",
|
|
22
|
-
"class": "
|
|
22
|
+
"class": "s2dsyaf"
|
|
23
23
|
});
|
|
24
24
|
var StyledTitle = /*#__PURE__*/(0, _react2.styled)("h3")({
|
|
25
25
|
name: "StyledTitle",
|
|
26
|
-
"class": "
|
|
26
|
+
"class": "s1f032bv"
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
var Panel = function Panel(_ref) {
|
|
@@ -27,11 +27,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
27
27
|
|
|
28
28
|
var StyledSnackbar = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
29
29
|
name: "StyledSnackbar",
|
|
30
|
-
"class": "
|
|
30
|
+
"class": "s1xg1lj6"
|
|
31
31
|
});
|
|
32
32
|
var StyledSnackbarContainer = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
33
33
|
name: "StyledSnackbarContainer",
|
|
34
|
-
"class": "
|
|
34
|
+
"class": "sg1lk71"
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
var Snackbar = function Snackbar(_ref) {
|
|
@@ -29,9 +29,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
29
29
|
|
|
30
30
|
var StyledColor = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
31
31
|
name: "StyledColor",
|
|
32
|
-
"class": "
|
|
32
|
+
"class": "s1dqu4j7",
|
|
33
33
|
vars: {
|
|
34
|
-
"
|
|
34
|
+
"s1dqu4j7-0": [function (_ref) {
|
|
35
35
|
var color = _ref.color;
|
|
36
36
|
return color;
|
|
37
37
|
}]
|
|
@@ -39,13 +39,13 @@ var StyledColor = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
|
39
39
|
});
|
|
40
40
|
var StyleWrapper = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
41
41
|
name: "StyleWrapper",
|
|
42
|
-
"class": "
|
|
42
|
+
"class": "s1j0ldko"
|
|
43
43
|
});
|
|
44
44
|
var StyledCustomColor = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
45
45
|
name: "StyledCustomColor",
|
|
46
|
-
"class": "
|
|
46
|
+
"class": "s10ecqf5",
|
|
47
47
|
vars: {
|
|
48
|
-
"
|
|
48
|
+
"s10ecqf5-0": [function (_ref2) {
|
|
49
49
|
var color = _ref2.color;
|
|
50
50
|
return color;
|
|
51
51
|
}]
|
|
@@ -93,9 +93,11 @@ var ColorField = function ColorField(_ref3) {
|
|
|
93
93
|
selected: isPanelVisible,
|
|
94
94
|
title: title,
|
|
95
95
|
disabled: disabled,
|
|
96
|
-
onClick: togglePanel
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
onClick: togglePanel,
|
|
97
|
+
icon: value === 'transparent' ? mode === 'fill' ? _icons.noFillIcon : _icons.noStrokeIcon : undefined
|
|
98
|
+
}, value !== 'transparent' && /*#__PURE__*/_react["default"].createElement(StyledColor, {
|
|
99
|
+
color: value,
|
|
100
|
+
"data-mode": mode
|
|
99
101
|
})), isPanelVisible && /*#__PURE__*/_react["default"].createElement(_Panel["default"], {
|
|
100
102
|
title: title,
|
|
101
103
|
alignment: "left"
|
|
@@ -105,11 +107,13 @@ var ColorField = function ColorField(_ref3) {
|
|
|
105
107
|
key: index,
|
|
106
108
|
selected: color === value,
|
|
107
109
|
color: color,
|
|
110
|
+
icon: color === 'transparent' ? mode === 'fill' ? _icons.noFillIcon : _icons.noStrokeIcon : undefined,
|
|
108
111
|
onClick: function onClick() {
|
|
109
112
|
return handleClick(color);
|
|
110
113
|
}
|
|
111
|
-
}, /*#__PURE__*/_react["default"].createElement(StyledColor, {
|
|
112
|
-
color: color
|
|
114
|
+
}, color !== 'transparent' && /*#__PURE__*/_react["default"].createElement(StyledColor, {
|
|
115
|
+
color: color,
|
|
116
|
+
"data-mode": mode
|
|
113
117
|
}));
|
|
114
118
|
}), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
115
119
|
type: "color",
|
|
@@ -19,9 +19,9 @@ var _icons = require("../../constants/icons");
|
|
|
19
19
|
|
|
20
20
|
var StyledOption = /*#__PURE__*/(0, _react2.styled)("span")({
|
|
21
21
|
name: "StyledOption",
|
|
22
|
-
"class": "
|
|
22
|
+
"class": "s16o63ah",
|
|
23
23
|
vars: {
|
|
24
|
-
"
|
|
24
|
+
"s16o63ah-0": [function (_ref) {
|
|
25
25
|
var family = _ref.family;
|
|
26
26
|
return family;
|
|
27
27
|
}]
|
|
@@ -48,7 +48,7 @@ var FontFamilyField = function FontFamilyField(_ref3) {
|
|
|
48
48
|
selectedSettings: selectedSettings,
|
|
49
49
|
setSelectedSettings: setSelectedSettings,
|
|
50
50
|
CustomOption: FontFamilyOption,
|
|
51
|
-
title: "
|
|
51
|
+
title: "Police",
|
|
52
52
|
icon: _icons.fontIcon,
|
|
53
53
|
disabled: disabled,
|
|
54
54
|
field: "fontFamily",
|
|
@@ -17,7 +17,7 @@ var _Button = _interopRequireDefault(require("../common/Button"));
|
|
|
17
17
|
|
|
18
18
|
var StyleToggleLayoutButton = /*#__PURE__*/(0, _react2.styled)(_Button["default"])({
|
|
19
19
|
name: "StyleToggleLayoutButton",
|
|
20
|
-
"class": "
|
|
20
|
+
"class": "sb1jkk3"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
var LayoutButton = function LayoutButton(_ref) {
|
|
@@ -33,43 +33,43 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
33
33
|
|
|
34
34
|
var StyledLayouts = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
35
35
|
name: "StyledLayouts",
|
|
36
|
-
"class": "
|
|
36
|
+
"class": "sw61axo"
|
|
37
37
|
});
|
|
38
38
|
var StyledRemoveButton = /*#__PURE__*/(0, _react2.styled)(_Button["default"])({
|
|
39
39
|
name: "StyledRemoveButton",
|
|
40
|
-
"class": "
|
|
40
|
+
"class": "s1shoasi"
|
|
41
41
|
});
|
|
42
42
|
var StyledLayout = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
43
43
|
name: "StyledLayout",
|
|
44
|
-
"class": "
|
|
44
|
+
"class": "s1adt0vs"
|
|
45
45
|
});
|
|
46
46
|
var StyledVisibleButton = /*#__PURE__*/(0, _react2.styled)(_Button["default"])({
|
|
47
47
|
name: "StyledVisibleButton",
|
|
48
|
-
"class": "
|
|
48
|
+
"class": "svyjq0t"
|
|
49
49
|
});
|
|
50
50
|
var StyledLockedButton = /*#__PURE__*/(0, _react2.styled)(_Button["default"])({
|
|
51
51
|
name: "StyledLockedButton",
|
|
52
|
-
"class": "
|
|
52
|
+
"class": "s1vztggb"
|
|
53
53
|
});
|
|
54
54
|
var StyledGridButton = /*#__PURE__*/(0, _react2.styled)(_Button["default"])({
|
|
55
55
|
name: "StyledGridButton",
|
|
56
|
-
"class": "
|
|
56
|
+
"class": "s1fgf9tg"
|
|
57
57
|
});
|
|
58
58
|
var StyledSeparator = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
59
59
|
name: "StyledSeparator",
|
|
60
|
-
"class": "
|
|
60
|
+
"class": "s1rl6big"
|
|
61
61
|
});
|
|
62
62
|
var StyledPanelLayouts = /*#__PURE__*/(0, _react2.styled)(_Panel["default"])({
|
|
63
63
|
name: "StyledPanelLayouts",
|
|
64
|
-
"class": "
|
|
64
|
+
"class": "sbpkotp"
|
|
65
65
|
});
|
|
66
66
|
var StyledScrollingContent = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
67
67
|
name: "StyledScrollingContent",
|
|
68
|
-
"class": "
|
|
68
|
+
"class": "s12cgrwn"
|
|
69
69
|
});
|
|
70
70
|
var StyledPlaceholder = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
71
71
|
name: "StyledPlaceholder",
|
|
72
|
-
"class": "
|
|
72
|
+
"class": "s1jzw7d9"
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
var Layout = function Layout(_ref) {
|
|
@@ -19,15 +19,15 @@ var _icons = require("../../constants/icons");
|
|
|
19
19
|
|
|
20
20
|
var StyledLeftTriangle = /*#__PURE__*/(0, _react2.styled)("span")({
|
|
21
21
|
name: "StyledLeftTriangle",
|
|
22
|
-
"class": "
|
|
22
|
+
"class": "s1bq28wy"
|
|
23
23
|
});
|
|
24
24
|
var StyledRightTriangle = /*#__PURE__*/(0, _react2.styled)("span")({
|
|
25
25
|
name: "StyledRightTriangle",
|
|
26
|
-
"class": "
|
|
26
|
+
"class": "sej9ve5"
|
|
27
27
|
});
|
|
28
28
|
var StyledOption = /*#__PURE__*/(0, _react2.styled)("span")({
|
|
29
29
|
name: "StyledOption",
|
|
30
|
-
"class": "
|
|
30
|
+
"class": "s5asd7a"
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
var LineArrowOption = function LineArrowOption(_ref) {
|
|
@@ -19,11 +19,11 @@ var _icons = require("../../constants/icons");
|
|
|
19
19
|
|
|
20
20
|
var StyledLine = /*#__PURE__*/(0, _react2.styled)("span")({
|
|
21
21
|
name: "StyledLine",
|
|
22
|
-
"class": "
|
|
22
|
+
"class": "s1yz5lc1"
|
|
23
23
|
});
|
|
24
24
|
var StyledOption = /*#__PURE__*/(0, _react2.styled)("span")({
|
|
25
25
|
name: "StyledOption",
|
|
26
|
-
"class": "
|
|
26
|
+
"class": "s1k64iv7"
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
var LineTypeOption = function LineTypeOption(_ref) {
|
|
@@ -27,7 +27,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
27
27
|
|
|
28
28
|
var StyledLabel = /*#__PURE__*/(0, _react2.styled)("label")({
|
|
29
29
|
name: "StyledLabel",
|
|
30
|
-
"class": "
|
|
30
|
+
"class": "s4h1871"
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
var RangeField = function RangeField(_ref) {
|
|
@@ -27,11 +27,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
27
27
|
|
|
28
28
|
var StyledButton = /*#__PURE__*/(0, _react2.styled)(_Button["default"])({
|
|
29
29
|
name: "StyledButton",
|
|
30
|
-
"class": "
|
|
30
|
+
"class": "sfr849o"
|
|
31
31
|
});
|
|
32
32
|
var StyleWrapper = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
33
33
|
name: "StyleWrapper",
|
|
34
|
-
"class": "
|
|
34
|
+
"class": "s11cdkmf"
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
var SelectField = function SelectField(_ref) {
|
|
@@ -56,15 +56,15 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
56
56
|
var SETTING_WIDTH = 40;
|
|
57
57
|
var StyledSettingsBar = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
58
58
|
name: "StyledSettingsBar",
|
|
59
|
-
"class": "
|
|
59
|
+
"class": "s17kh6p4"
|
|
60
60
|
});
|
|
61
61
|
var StyledSeparator = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
62
62
|
name: "StyledSeparator",
|
|
63
|
-
"class": "
|
|
63
|
+
"class": "s1fluhcn"
|
|
64
64
|
});
|
|
65
65
|
var StyledToolsModal = /*#__PURE__*/(0, _react2.styled)(_Modal["default"])({
|
|
66
66
|
name: "StyledToolsModal",
|
|
67
|
-
"class": "
|
|
67
|
+
"class": "sg7vrwb"
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
var SettingsItems = function SettingsItems(_ref) {
|
|
@@ -27,29 +27,29 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
27
27
|
|
|
28
28
|
var StyledEditBox = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
29
29
|
name: "StyledEditBox",
|
|
30
|
-
"class": "
|
|
30
|
+
"class": "se8ufj4",
|
|
31
31
|
vars: {
|
|
32
|
-
"
|
|
32
|
+
"se8ufj4-0": [function (_ref) {
|
|
33
33
|
var transform = _ref.transform;
|
|
34
34
|
return transform;
|
|
35
35
|
}],
|
|
36
|
-
"
|
|
36
|
+
"se8ufj4-1": [function (_ref2) {
|
|
37
37
|
var color = _ref2.color;
|
|
38
38
|
return color;
|
|
39
39
|
}],
|
|
40
|
-
"
|
|
40
|
+
"se8ufj4-2": [function (_ref3) {
|
|
41
41
|
var padding = _ref3.padding;
|
|
42
42
|
return padding;
|
|
43
43
|
}, "px"],
|
|
44
|
-
"
|
|
44
|
+
"se8ufj4-3": [function (_ref4) {
|
|
45
45
|
var fontsize = _ref4.fontsize;
|
|
46
46
|
return fontsize;
|
|
47
47
|
}, "px"],
|
|
48
|
-
"
|
|
48
|
+
"se8ufj4-5": [function (_ref5) {
|
|
49
49
|
var fontfamily = _ref5.fontfamily;
|
|
50
50
|
return fontfamily;
|
|
51
51
|
}],
|
|
52
|
-
"
|
|
52
|
+
"se8ufj4-6": [function (_ref6) {
|
|
53
53
|
var opacity = _ref6.opacity;
|
|
54
54
|
return opacity;
|
|
55
55
|
}]
|
|
@@ -74,8 +74,22 @@ var EditTextBox = function EditTextBox(_ref7) {
|
|
|
74
74
|
|
|
75
75
|
(0, _react.useEffect)(function () {
|
|
76
76
|
if (!ref.current) return;
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
var currentNode = ref.current;
|
|
78
|
+
|
|
79
|
+
var handlePaste = function handlePaste(e) {
|
|
80
|
+
var _e$clipboardData;
|
|
81
|
+
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
var text = (_e$clipboardData = e.clipboardData) === null || _e$clipboardData === void 0 ? void 0 : _e$clipboardData.getData('text/plain');
|
|
84
|
+
document.execCommand('insertText', false, text); //TODO use Clipboard API when ready
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
currentNode.addEventListener('paste', handlePaste);
|
|
88
|
+
currentNode.innerHTML = (0, _string.convertStringArrayToDivContent)(defaultValue);
|
|
89
|
+
currentNode.focus();
|
|
90
|
+
return function () {
|
|
91
|
+
currentNode.removeEventListener('paste', handlePaste);
|
|
92
|
+
};
|
|
79
93
|
}, [defaultValue]);
|
|
80
94
|
var position = (0, _react.useMemo)(function () {
|
|
81
95
|
var _getShapeInfos = (0, _shapeData.getShapeInfos)(shape, selectionPadding),
|
|
@@ -18,7 +18,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
20
|
var LoadFileTool = function LoadFileTool(_ref) {
|
|
21
|
-
var _type$
|
|
21
|
+
var _type$label;
|
|
22
22
|
|
|
23
23
|
var _ref$disabled = _ref.disabled,
|
|
24
24
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
@@ -49,9 +49,9 @@ var LoadFileTool = function LoadFileTool(_ref) {
|
|
|
49
49
|
onClick: handleClick,
|
|
50
50
|
onChange: handleChange,
|
|
51
51
|
accept: accept,
|
|
52
|
-
title: (_type$
|
|
52
|
+
title: (_type$label = type.label) !== null && _type$label !== void 0 ? _type$label : type.type,
|
|
53
53
|
icon: img,
|
|
54
|
-
children: withText ? type.
|
|
54
|
+
children: withText ? type.label : undefined,
|
|
55
55
|
disabled: disabled
|
|
56
56
|
});
|
|
57
57
|
};
|
|
@@ -39,11 +39,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
39
39
|
|
|
40
40
|
var StyledPanel = /*#__PURE__*/(0, _react2.styled)(_Panel["default"])({
|
|
41
41
|
name: "StyledPanel",
|
|
42
|
-
"class": "
|
|
42
|
+
"class": "s1qu0ers"
|
|
43
43
|
});
|
|
44
44
|
var StyledRelative = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
45
45
|
name: "StyledRelative",
|
|
46
|
-
"class": "
|
|
46
|
+
"class": "s1y35t9y"
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
var MenuGroup = function MenuGroup(_ref) {
|
|
@@ -27,7 +27,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
27
27
|
|
|
28
28
|
var StyledInputModal = /*#__PURE__*/(0, _react2.styled)(_Modal["default"])({
|
|
29
29
|
name: "StyledInputModal",
|
|
30
|
-
"class": "
|
|
30
|
+
"class": "s1rncfwv"
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
var PictureUrlModal = function PictureUrlModal(_ref) {
|
|
@@ -12,7 +12,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
12
12
|
var _Button = _interopRequireDefault(require("../common/Button"));
|
|
13
13
|
|
|
14
14
|
var Tool = function Tool(_ref) {
|
|
15
|
-
var _type$
|
|
15
|
+
var _type$label;
|
|
16
16
|
|
|
17
17
|
var type = _ref.type,
|
|
18
18
|
img = _ref.img,
|
|
@@ -31,9 +31,9 @@ var Tool = function Tool(_ref) {
|
|
|
31
31
|
disabled: disabled,
|
|
32
32
|
selected: isActive,
|
|
33
33
|
onClick: handleClick,
|
|
34
|
-
title: (_type$
|
|
34
|
+
title: (_type$label = type.label) !== null && _type$label !== void 0 ? _type$label : type.type,
|
|
35
35
|
icon: img,
|
|
36
|
-
children: withText ? type.
|
|
36
|
+
children: withText ? type.label : undefined
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
39
|
|
|
@@ -44,15 +44,15 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
44
44
|
var TOOL_WIDTH = 40;
|
|
45
45
|
var StyledShrinkableTools = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
46
46
|
name: "StyledShrinkableTools",
|
|
47
|
-
"class": "
|
|
47
|
+
"class": "s1gorp95"
|
|
48
48
|
});
|
|
49
49
|
var StyledToolbox = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
50
50
|
name: "StyledToolbox",
|
|
51
|
-
"class": "
|
|
51
|
+
"class": "s1ivsaf6"
|
|
52
52
|
});
|
|
53
53
|
var StyledToolsModal = /*#__PURE__*/(0, _react2.styled)(_Modal["default"])({
|
|
54
54
|
name: "StyledToolsModal",
|
|
55
|
-
"class": "
|
|
55
|
+
"class": "sv0y70r"
|
|
56
56
|
});
|
|
57
57
|
var TOOLBAR_STRUCTURE = [{
|
|
58
58
|
title: 'brush',
|
|
@@ -143,8 +143,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
143
143
|
setActiveTool((_availableTools$find = availableTools.find(function (tool) {
|
|
144
144
|
return tool.id === toolId;
|
|
145
145
|
})) !== null && _availableTools$find !== void 0 ? _availableTools$find : activeTool);
|
|
146
|
-
};
|
|
147
|
-
|
|
146
|
+
};
|
|
148
147
|
|
|
149
148
|
(0, _react.useEffect)(function () {
|
|
150
149
|
setActionsInMenu(width < fullToolbarSize);
|
|
@@ -29,11 +29,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
29
29
|
|
|
30
30
|
var StyledPanel = /*#__PURE__*/(0, _react2.styled)(_Panel["default"])({
|
|
31
31
|
name: "StyledPanel",
|
|
32
|
-
"class": "
|
|
32
|
+
"class": "s3kynji"
|
|
33
33
|
});
|
|
34
34
|
var StyledRelative = /*#__PURE__*/(0, _react2.styled)("div")({
|
|
35
35
|
name: "StyledRelative",
|
|
36
|
-
"class": "
|
|
36
|
+
"class": "s1614rl3"
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
var ToolbarGroup = function ToolbarGroup(_ref) {
|
package/dist/constants/icons.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.visibilityOffIcon = exports.visibilityIcon = exports.unlockedIcon = exports.undoIcon = exports.trashIcon = exports.textIcon = exports.squareIcon = exports.shapesIcon = exports.settingsIcon = exports.saveIcon = exports.redoIcon = exports.recIcon = exports.publicIcon = exports.polygonIcon = exports.pictureIcon = exports.penIcon = exports.paletteIcon = exports.paintIcon = exports.openFileIcon = exports.opacityIcon = exports.menuIcon = exports.lockedIcon = exports.lineWidthIcon = exports.lineTypeIcon = exports.lineEndIcon = exports.layersIcon = exports.italicIcon = exports.gridOnIcon = exports.gridOffIcon = exports.fontIcon = exports.exportFileIcon = exports.encodedTransparentIcon = exports.ellipseIcon = exports.dotsIcon = exports.curveIcon = exports.cursorIcon = exports.clearIcon = exports.circleIcon = exports.brushIcon = exports.boldIcon = exports.arrowIcon = void 0;
|
|
6
|
+
exports.visibilityOffIcon = exports.visibilityIcon = exports.unlockedIcon = exports.undoIcon = exports.trashIcon = exports.textIcon = exports.squareIcon = exports.shapesIcon = exports.settingsIcon = exports.saveIcon = exports.redoIcon = exports.recIcon = exports.publicIcon = exports.polygonIcon = exports.pictureIcon = exports.penIcon = exports.paletteIcon = exports.paintIcon = exports.openFileIcon = exports.opacityIcon = exports.noStrokeIcon = exports.noFillIcon = exports.menuIcon = exports.lockedIcon = exports.lineWidthIcon = exports.lineTypeIcon = exports.lineEndIcon = exports.layersIcon = exports.italicIcon = exports.gridOnIcon = exports.gridOffIcon = exports.fontIcon = exports.exportFileIcon = exports.encodedTransparentIcon = exports.ellipseIcon = exports.dotsIcon = exports.curveIcon = exports.cursorIcon = exports.clearIcon = exports.circleIcon = exports.brushIcon = exports.boldIcon = exports.arrowIcon = void 0;
|
|
7
7
|
var brushIcon = '<svg><path d="M5.146 17.5Q4.146 17.5 3.208 17Q2.271 16.5 1.667 15.708Q2.208 15.75 2.802 15.344Q3.396 14.938 3.396 14.104Q3.396 13.042 4.135 12.292Q4.875 11.542 5.958 11.542Q7.021 11.542 7.76 12.292Q8.5 13.042 8.5 14.104Q8.5 15.5 7.51 16.5Q6.521 17.5 5.146 17.5ZM9.917 12.5 7.562 10.146 14.917 2.729Q15.146 2.5 15.469 2.5Q15.792 2.5 16.021 2.729L17.271 3.958Q17.5 4.188 17.5 4.531Q17.5 4.875 17.271 5.125Z"/></svg>';
|
|
8
8
|
exports.brushIcon = brushIcon;
|
|
9
9
|
var squareIcon = '<svg><path d="M2.5 17.5V2.5H17.5V17.5ZM4.25 15.75H15.75V4.25H4.25ZM4.25 15.75V4.25V15.75Z"/></svg>';
|
|
@@ -32,7 +32,7 @@ var redoIcon = '<svg><path d="M8.292 15.833Q6.271 15.833 4.802 14.521Q3.333 13.2
|
|
|
32
32
|
exports.redoIcon = redoIcon;
|
|
33
33
|
var layersIcon = '<svg><path d="M10 17.646 2.438 11.75 3.875 10.646 10 15.396 16.125 10.646 17.562 11.75ZM10 13.188 2.5 7.354 10 1.521 17.5 7.354Z"/></svg>';
|
|
34
34
|
exports.layersIcon = layersIcon;
|
|
35
|
-
var clearIcon = '<svg><path d="
|
|
35
|
+
var clearIcon = '<svg><path d="M7.854 13.812 10 11.688 12.125 13.812 13.354 12.604 11.208 10.458 13.354 8.312 12.125 7.104 10 9.229 7.854 7.104 6.625 8.312 8.771 10.458 6.625 12.604ZM5.896 17.5Q5.167 17.5 4.656 16.99Q4.146 16.479 4.146 15.75V5.125H3.333V3.375H7.542V2.5H12.458V3.375H16.667V5.125H15.833V15.75Q15.833 16.479 15.323 16.99Q14.812 17.5 14.083 17.5Z"/></svg>';
|
|
36
36
|
exports.clearIcon = clearIcon;
|
|
37
37
|
var saveIcon = '<svg><path d="M17.5 5.833V15.75Q17.5 16.479 16.99 16.99Q16.479 17.5 15.75 17.5H4.25Q3.521 17.5 3.01 16.99Q2.5 16.479 2.5 15.75V4.25Q2.5 3.521 3.01 3.01Q3.521 2.5 4.25 2.5H14.167ZM10 14.917Q11.062 14.917 11.823 14.156Q12.583 13.396 12.583 12.333Q12.583 11.271 11.823 10.51Q11.062 9.75 10 9.75Q8.938 9.75 8.177 10.51Q7.417 11.271 7.417 12.333Q7.417 13.396 8.177 14.156Q8.938 14.917 10 14.917ZM5.021 8.396H12.521V5.021H5.021Z"/></svg>';
|
|
38
38
|
exports.saveIcon = saveIcon;
|
|
@@ -87,4 +87,8 @@ exports.fontIcon = fontIcon;
|
|
|
87
87
|
var lineEndIcon = '<svg><path d="M6 17 2 13 6 9 7.062 10.062 4.875 12.25H17V13.75H4.875L7.062 15.938ZM14 11 12.938 9.938 15.125 7.75H3V6.25H15.125L12.938 4.062L14 3L18 7Z"/></svg>';
|
|
88
88
|
exports.lineEndIcon = lineEndIcon;
|
|
89
89
|
var settingsIcon = '<svg><path d="M2.5 15.833V14.083H7.667V15.833ZM2.5 5.917V4.167H10.771V5.917ZM9.208 17.5V12.438H10.958V14.083H17.5V15.833H10.958V17.5ZM5.917 12.542V10.875H2.5V9.125H5.917V7.479H7.667V12.542ZM9.208 10.875V9.125H17.5V10.875ZM12.333 7.562V2.5H14.083V4.167H17.5V5.917H14.083V7.562Z"/></svg>';
|
|
90
|
-
exports.settingsIcon = settingsIcon;
|
|
90
|
+
exports.settingsIcon = settingsIcon;
|
|
91
|
+
var noStrokeIcon = '<svg><path d="M16.354 18.833 14.521 17Q13.542 17.646 12.396 17.99Q11.25 18.333 10 18.333Q8.271 18.333 6.75 17.677Q5.229 17.021 4.104 15.896Q2.979 14.771 2.323 13.25Q1.667 11.729 1.667 10Q1.667 8.729 2.01 7.594Q2.354 6.458 3 5.458L1.167 3.625L2.396 2.396L17.583 17.604ZM10 16.583Q10.896 16.583 11.708 16.365Q12.521 16.146 13.25 15.729L4.292 6.75Q3.875 7.479 3.646 8.292Q3.417 9.104 3.417 10Q3.417 12.729 5.344 14.656Q7.271 16.583 10 16.583ZM17 14.562 15.708 13.271Q16.125 12.542 16.354 11.719Q16.583 10.896 16.583 10Q16.583 7.271 14.656 5.344Q12.729 3.417 10 3.417Q9.104 3.417 8.292 3.646Q7.479 3.875 6.75 4.292L5.458 3Q6.458 2.354 7.594 2.01Q8.729 1.667 10 1.667Q11.729 1.667 13.25 2.323Q14.771 2.979 15.896 4.104Q17.021 5.229 17.677 6.75Q18.333 8.271 18.333 10Q18.333 11.271 17.979 12.417Q17.625 13.562 17 14.562ZM11.229 8.771Q11.229 8.771 11.229 8.771Q11.229 8.771 11.229 8.771Q11.229 8.771 11.229 8.771Q11.229 8.771 11.229 8.771Q11.229 8.771 11.229 8.771Q11.229 8.771 11.229 8.771ZM8.771 11.229Q8.771 11.229 8.771 11.229Q8.771 11.229 8.771 11.229Q8.771 11.229 8.771 11.229Q8.771 11.229 8.771 11.229Q8.771 11.229 8.771 11.229Q8.771 11.229 8.771 11.229Z"/></svg>';
|
|
92
|
+
exports.noStrokeIcon = noStrokeIcon;
|
|
93
|
+
var noFillIcon = '<svg ><path d="M16.354 18.833 14.521 17Q13.542 17.646 12.396 17.99Q11.25 18.333 10 18.333Q8.271 18.333 6.75 17.677Q5.229 17.021 4.104 15.896Q2.979 14.771 2.323 13.25Q1.667 11.729 1.667 10Q1.667 8.729 2.01 7.594Q2.354 6.458 3 5.458L1.167 3.625L2.396 2.396L17.583 17.604ZM17 14.562 5.458 3Q6.458 2.354 7.594 2.01Q8.729 1.667 10 1.667Q11.729 1.667 13.25 2.323Q14.771 2.979 15.896 4.104Q17.021 5.229 17.677 6.75Q18.333 8.271 18.333 10Q18.333 11.271 17.979 12.417Q17.625 13.562 17 14.562Z"/></svg>';
|
|
94
|
+
exports.noFillIcon = noFillIcon;
|
package/dist/constants/style.js
CHANGED
|
@@ -14,7 +14,7 @@ var STYLE_LINE_DASH = [0, 1, 2];
|
|
|
14
14
|
exports.STYLE_LINE_DASH = STYLE_LINE_DASH;
|
|
15
15
|
var STYLE_LINE_WITH_ARROW = [0, 1, 2, 3];
|
|
16
16
|
exports.STYLE_LINE_WITH_ARROW = STYLE_LINE_WITH_ARROW;
|
|
17
|
-
var LINE_DASH_DATA = [[1, 0], [
|
|
17
|
+
var LINE_DASH_DATA = [[1, 0], [1, 2], [4, 6]];
|
|
18
18
|
exports.LINE_DASH_DATA = LINE_DASH_DATA;
|
|
19
19
|
var STYLE_FONTS = ['arial', 'serif', 'monospace'];
|
|
20
20
|
exports.STYLE_FONTS = STYLE_FONTS;
|
package/dist/constants/tools.js
CHANGED
|
@@ -276,7 +276,7 @@ var DEFAULT_SHAPE_PICTURE = {
|
|
|
276
276
|
type: _Shapes.ShapeEnum.picture,
|
|
277
277
|
id: "".concat(PREFIX_ID, "picture"),
|
|
278
278
|
icon: _icons.pictureIcon,
|
|
279
|
-
|
|
279
|
+
label: 'Image',
|
|
280
280
|
settings: SETTINGS_DEFAULT_PICTURE
|
|
281
281
|
};
|
|
282
282
|
exports.DEFAULT_SHAPE_PICTURE = DEFAULT_SHAPE_PICTURE;
|
|
@@ -284,7 +284,7 @@ var DEFAULT_SHAPE_BRUSH = {
|
|
|
284
284
|
type: _Shapes.ShapeEnum.brush,
|
|
285
285
|
id: "".concat(PREFIX_ID, "brush"),
|
|
286
286
|
icon: _icons.brushIcon,
|
|
287
|
-
|
|
287
|
+
label: 'Brosse',
|
|
288
288
|
settings: SETTINGS_DEFAULT_BRUSH
|
|
289
289
|
};
|
|
290
290
|
exports.DEFAULT_SHAPE_BRUSH = DEFAULT_SHAPE_BRUSH;
|
|
@@ -292,7 +292,7 @@ var DEFAULT_SHAPE_LINE = {
|
|
|
292
292
|
type: _Shapes.ShapeEnum.line,
|
|
293
293
|
id: "".concat(PREFIX_ID, "line"),
|
|
294
294
|
icon: _icons.arrowIcon,
|
|
295
|
-
|
|
295
|
+
label: 'Ligne',
|
|
296
296
|
settings: SETTINGS_DEFAULT_LINE
|
|
297
297
|
};
|
|
298
298
|
exports.DEFAULT_SHAPE_LINE = DEFAULT_SHAPE_LINE;
|
|
@@ -300,7 +300,7 @@ var DEFAULT_SHAPE_POLYGON = {
|
|
|
300
300
|
type: _Shapes.ShapeEnum.polygon,
|
|
301
301
|
id: "".concat(PREFIX_ID, "polygon"),
|
|
302
302
|
icon: _icons.polygonIcon,
|
|
303
|
-
|
|
303
|
+
label: 'Polygone',
|
|
304
304
|
settings: SETTINGS_DEFAULT_POLYGON
|
|
305
305
|
};
|
|
306
306
|
exports.DEFAULT_SHAPE_POLYGON = DEFAULT_SHAPE_POLYGON;
|
|
@@ -308,7 +308,7 @@ var DEFAULT_SHAPE_CURVE = {
|
|
|
308
308
|
type: _Shapes.ShapeEnum.curve,
|
|
309
309
|
id: "".concat(PREFIX_ID, "curve"),
|
|
310
310
|
icon: _icons.curveIcon,
|
|
311
|
-
|
|
311
|
+
label: 'Courbe',
|
|
312
312
|
settings: SETTINGS_DEFAULT_CURVE
|
|
313
313
|
};
|
|
314
314
|
exports.DEFAULT_SHAPE_CURVE = DEFAULT_SHAPE_CURVE;
|
|
@@ -317,7 +317,7 @@ var DEFAULT_SHAPE_RECT = {
|
|
|
317
317
|
id: "".concat(PREFIX_ID, "rect"),
|
|
318
318
|
icon: _icons.squareIcon,
|
|
319
319
|
// temporary
|
|
320
|
-
|
|
320
|
+
label: 'Rectangle',
|
|
321
321
|
settings: SETTINGS_DEFAULT_RECT
|
|
322
322
|
};
|
|
323
323
|
exports.DEFAULT_SHAPE_RECT = DEFAULT_SHAPE_RECT;
|
|
@@ -325,7 +325,7 @@ var DEFAULT_SHAPE_SQUARE = {
|
|
|
325
325
|
type: _Shapes.ShapeEnum.square,
|
|
326
326
|
id: "".concat(PREFIX_ID, "square"),
|
|
327
327
|
icon: _icons.squareIcon,
|
|
328
|
-
|
|
328
|
+
label: 'Carré',
|
|
329
329
|
settings: SETTINGS_DEFAULT_SQUARE
|
|
330
330
|
};
|
|
331
331
|
exports.DEFAULT_SHAPE_SQUARE = DEFAULT_SHAPE_SQUARE;
|
|
@@ -333,7 +333,7 @@ var DEFAULT_SHAPE_CIRCLE = {
|
|
|
333
333
|
type: _Shapes.ShapeEnum.circle,
|
|
334
334
|
id: "".concat(PREFIX_ID, "circle"),
|
|
335
335
|
icon: _icons.circleIcon,
|
|
336
|
-
|
|
336
|
+
label: 'Cercle',
|
|
337
337
|
settings: SETTINGS_DEFAULT_CIRCLE
|
|
338
338
|
};
|
|
339
339
|
exports.DEFAULT_SHAPE_CIRCLE = DEFAULT_SHAPE_CIRCLE;
|
|
@@ -342,7 +342,7 @@ var DEFAULT_SHAPE_ELLIPSE = {
|
|
|
342
342
|
id: "".concat(PREFIX_ID, "ellipse"),
|
|
343
343
|
icon: _icons.circleIcon,
|
|
344
344
|
// temporary
|
|
345
|
-
|
|
345
|
+
label: 'Ellipse',
|
|
346
346
|
settings: SETTINGS_DEFAULT_ELLIPSE
|
|
347
347
|
};
|
|
348
348
|
exports.DEFAULT_SHAPE_ELLIPSE = DEFAULT_SHAPE_ELLIPSE;
|
|
@@ -350,7 +350,7 @@ var DEFAULT_SHAPE_TEXT = {
|
|
|
350
350
|
type: _Shapes.ShapeEnum.text,
|
|
351
351
|
id: "".concat(PREFIX_ID, "text"),
|
|
352
352
|
icon: _icons.textIcon,
|
|
353
|
-
|
|
353
|
+
label: 'Texte',
|
|
354
354
|
settings: SETTINGS_DEFAULT_TEXT
|
|
355
355
|
};
|
|
356
356
|
exports.DEFAULT_SHAPE_TEXT = DEFAULT_SHAPE_TEXT;
|
|
@@ -360,69 +360,69 @@ var SELECTION_TOOL = {
|
|
|
360
360
|
id: "".concat(PREFIX_ID, "selection"),
|
|
361
361
|
type: _tools.ActionsEnum.selection,
|
|
362
362
|
icon: _icons.cursorIcon,
|
|
363
|
-
|
|
363
|
+
label: 'Sélection'
|
|
364
364
|
};
|
|
365
365
|
exports.SELECTION_TOOL = SELECTION_TOOL;
|
|
366
366
|
var UNDO_TOOL = {
|
|
367
367
|
id: "".concat(PREFIX_ID, "undo"),
|
|
368
368
|
type: _tools.ActionsEnum.undo,
|
|
369
369
|
icon: _icons.undoIcon,
|
|
370
|
-
|
|
370
|
+
label: 'Undo'
|
|
371
371
|
};
|
|
372
372
|
exports.UNDO_TOOL = UNDO_TOOL;
|
|
373
373
|
var REDO_TOOL = {
|
|
374
374
|
id: "".concat(PREFIX_ID, "redo"),
|
|
375
375
|
type: _tools.ActionsEnum.redo,
|
|
376
376
|
icon: _icons.redoIcon,
|
|
377
|
-
|
|
377
|
+
label: 'Redo'
|
|
378
378
|
};
|
|
379
379
|
exports.REDO_TOOL = REDO_TOOL;
|
|
380
380
|
var CLEAR_TOOL = {
|
|
381
381
|
id: "".concat(PREFIX_ID, "clear"),
|
|
382
382
|
type: _tools.ActionsEnum.clear,
|
|
383
383
|
icon: _icons.clearIcon,
|
|
384
|
-
|
|
384
|
+
label: 'Clear'
|
|
385
385
|
};
|
|
386
386
|
exports.CLEAR_TOOL = CLEAR_TOOL;
|
|
387
387
|
var EXPORT_TOOL = {
|
|
388
388
|
id: "".concat(PREFIX_ID, "export"),
|
|
389
389
|
type: _tools.ActionsEnum["export"],
|
|
390
390
|
icon: _icons.exportFileIcon,
|
|
391
|
-
|
|
391
|
+
label: 'Export PNG'
|
|
392
392
|
};
|
|
393
393
|
exports.EXPORT_TOOL = EXPORT_TOOL;
|
|
394
394
|
var LOAD_TOOL = {
|
|
395
395
|
id: "".concat(PREFIX_ID, "load"),
|
|
396
396
|
type: _tools.ActionsEnum.loadFile,
|
|
397
397
|
icon: _icons.openFileIcon,
|
|
398
|
-
|
|
398
|
+
label: 'Load project'
|
|
399
399
|
};
|
|
400
400
|
exports.LOAD_TOOL = LOAD_TOOL;
|
|
401
401
|
var SAVE_TOOL = {
|
|
402
402
|
id: "".concat(PREFIX_ID, "save"),
|
|
403
403
|
type: _tools.ActionsEnum.saveFile,
|
|
404
404
|
icon: _icons.saveIcon,
|
|
405
|
-
|
|
405
|
+
label: 'Save project'
|
|
406
406
|
};
|
|
407
407
|
exports.SAVE_TOOL = SAVE_TOOL;
|
|
408
408
|
var MOVE_TOOL = {
|
|
409
409
|
id: "".concat(PREFIX_ID, "move"),
|
|
410
410
|
type: _tools.ActionsEnum.move,
|
|
411
411
|
icon: _icons.cursorIcon,
|
|
412
|
-
|
|
412
|
+
label: 'Move'
|
|
413
413
|
};
|
|
414
414
|
exports.MOVE_TOOL = MOVE_TOOL;
|
|
415
415
|
var UPLOAD_PICTURE_TOOL = {
|
|
416
416
|
id: "".concat(PREFIX_ID, "upload-picture"),
|
|
417
417
|
type: _tools.ActionsEnum.uploadPicture,
|
|
418
418
|
icon: _icons.pictureIcon,
|
|
419
|
-
|
|
419
|
+
label: 'Upload picture'
|
|
420
420
|
};
|
|
421
421
|
exports.UPLOAD_PICTURE_TOOL = UPLOAD_PICTURE_TOOL;
|
|
422
422
|
var ADD_URL_PICTURE_TOOL = {
|
|
423
423
|
id: "".concat(PREFIX_ID, "upload-picture"),
|
|
424
424
|
type: _tools.ActionsEnum.addUrlPicture,
|
|
425
425
|
icon: _icons.pictureIcon,
|
|
426
|
-
|
|
426
|
+
label: 'Add picture from URL'
|
|
427
427
|
};
|
|
428
428
|
exports.ADD_URL_PICTURE_TOOL = ADD_URL_PICTURE_TOOL;
|
package/dist/styles.css
CHANGED
|
@@ -31,58 +31,58 @@
|
|
|
31
31
|
min-width: 0;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
35
|
-
.
|
|
36
|
-
.
|
|
37
|
-
.
|
|
38
|
-
.
|
|
39
|
-
.
|
|
40
|
-
.
|
|
41
|
-
.
|
|
42
|
-
.
|
|
43
|
-
.
|
|
44
|
-
.
|
|
45
|
-
.
|
|
46
|
-
.
|
|
47
|
-
.
|
|
48
|
-
.
|
|
49
|
-
.
|
|
50
|
-
.
|
|
51
|
-
.
|
|
52
|
-
.
|
|
53
|
-
.
|
|
54
|
-
.
|
|
55
|
-
.
|
|
56
|
-
.
|
|
57
|
-
.
|
|
58
|
-
.
|
|
59
|
-
.
|
|
60
|
-
.
|
|
61
|
-
.
|
|
62
|
-
.
|
|
63
|
-
.
|
|
64
|
-
.
|
|
65
|
-
.
|
|
66
|
-
.
|
|
67
|
-
.
|
|
68
|
-
.
|
|
69
|
-
.layoutPanelOpened .
|
|
70
|
-
.
|
|
71
|
-
.
|
|
72
|
-
.
|
|
73
|
-
.
|
|
74
|
-
.
|
|
75
|
-
.
|
|
76
|
-
.
|
|
77
|
-
.
|
|
78
|
-
.
|
|
79
|
-
.
|
|
80
|
-
.
|
|
81
|
-
.
|
|
82
|
-
.
|
|
83
|
-
.
|
|
84
|
-
.
|
|
85
|
-
.
|
|
86
|
-
.
|
|
87
|
-
.
|
|
88
|
-
.
|
|
34
|
+
.se8ufj4{position:absolute;display:inline-block;outline:none;left:0px;top:0px;-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left top;box-sizing:border-box;-webkit-transform:var(--se8ufj4-0);-ms-transform:var(--se8ufj4-0);transform:var(--se8ufj4-0);color:var(--se8ufj4-1);padding:var(--se8ufj4-2);font-size:var(--se8ufj4-3);line-height:var(--se8ufj4-3);font-family:var(--se8ufj4-5);opacity:var(--se8ufj4-6);width:-webkit-max-content;width:-moz-max-content;width:max-content;}.se8ufj4[data-fontbold='true']{font-weight:bold;}.se8ufj4[data-fontitalic='true']{font-style:italic;}
|
|
35
|
+
.s14cny8z{-webkit-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}
|
|
36
|
+
.s16bxms6{position:relative;background-color:var(--canvas-bg);background-repeat:repeat;background-size:16px;overflow:hidden;display:grid;}.s16bxms6[data-grid='true']{background-image:url("data:image/svg+xml,%3Csvg%20id%3D%22svg%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22400%22%20height%3D%22400%22%20viewBox%3D%220%2C%200%2C%20400%2C400%22%3E%3Cg%20id%3D%22svgg%22%3E%3Cpath%20id%3D%22path0%22%20d%3D%22M204.800%2094.600%20C%20204.800%20188.933%2C204.802%20189.200%2C205.600%20189.200%20C%20206.248%20189.200%2C206.400%20189.467%2C206.400%20190.600%20C%20206.400%20191.733%2C206.552%20192.000%2C207.200%20192.000%20C%20207.733%20192.000%2C208.000%20192.267%2C208.000%20192.800%20C%20208.000%20193.244%2C208.267%20193.600%2C208.600%20193.600%20C%20208.933%20193.600%2C209.200%20193.956%2C209.200%20194.400%20C%20209.200%20195.067%2C209.467%20195.200%2C210.800%20195.200%20C%20212.133%20195.200%2C212.400%20195.333%2C212.400%20196.000%20C%20212.400%20196.798%2C212.667%20196.800%2C306.200%20196.800%20L%20400.000%20196.800%20400.000%2098.400%20L%20400.000%200.000%20302.400%200.000%20L%20204.800%200.000%20204.800%2094.600%20M0.000%20302.400%20L%200.000%20400.000%2098.400%20400.000%20L%20196.800%20400.000%20196.800%20306.200%20C%20196.800%20212.667%2C196.798%20212.400%2C196.000%20212.400%20C%20195.333%20212.400%2C195.200%20212.133%2C195.200%20210.800%20C%20195.200%20209.467%2C195.067%20209.200%2C194.400%20209.200%20C%20193.956%20209.200%2C193.600%20208.933%2C193.600%20208.600%20C%20193.600%20208.267%2C193.244%20208.000%2C192.800%20208.000%20C%20192.267%20208.000%2C192.000%20207.733%2C192.000%20207.200%20C%20192.000%20206.552%2C191.733%20206.400%2C190.600%20206.400%20C%20189.467%20206.400%2C189.200%20206.248%2C189.200%20205.600%20C%20189.200%20204.802%2C188.933%20204.800%2C94.600%20204.800%20L%200.000%20204.800%200.000%20302.400%20%22%20stroke%3D%22none%22%20fill%3D%22%23fcfcfc%22%20fill-rule%3D%22evenodd%22%3E%3C%2Fpath%3E%3Cpath%20id%3D%22path1%22%20d%3D%22M0.000%20100.000%20L%200.000%20200.000%2096.800%20200.000%20C%20193.333%20200.000%2C193.600%20199.998%2C193.600%20199.200%20C%20193.600%20198.533%2C193.867%20198.400%2C195.200%20198.400%20C%20196.533%20198.400%2C196.800%20198.267%2C196.800%20197.600%20C%20196.800%20197.067%2C197.067%20196.800%2C197.600%20196.800%20C%20198.267%20196.800%2C198.400%20196.533%2C198.400%20195.200%20C%20198.400%20193.867%2C198.533%20193.600%2C199.200%20193.600%20C%20199.998%20193.600%2C200.000%20193.333%2C200.000%2096.800%20L%20200.000%200.000%20100.000%200.000%20L%200.000%200.000%200.000%20100.000%20M208.000%20202.400%20C%20208.000%20203.067%2C207.733%20203.200%2C206.400%20203.200%20C%20205.067%20203.200%2C204.800%20203.333%2C204.800%20204.000%20C%20204.800%20204.533%2C204.533%20204.800%2C204.000%20204.800%20C%20203.333%20204.800%2C203.200%20205.067%2C203.200%20206.400%20C%20203.200%20207.733%2C203.067%20208.000%2C202.400%20208.000%20C%20201.602%20208.000%2C201.600%20208.267%2C201.600%20304.000%20L%20201.600%20400.000%20300.800%20400.000%20L%20400.000%20400.000%20400.000%20300.800%20L%20400.000%20201.600%20304.000%20201.600%20C%20208.267%20201.600%2C208.000%20201.602%2C208.000%20202.400%20%22%20stroke%3D%22none%22%20fill%3D%22%23e4e4e4%22%20fill-rule%3D%22evenodd%22%3E%3C%2Fpath%3E%3Cpath%20id%3D%22path2%22%20d%3D%22%22%20stroke%3D%22none%22%20fill%3D%22%23f4100f0%22%20fill-rule%3D%22evenodd%22%3E%3C%2Fpath%3E%3Cpath%20id%3D%22path3%22%20d%3D%22%22%20stroke%3D%22none%22%20fill%3D%22%23f4100f0%22%20fill-rule%3D%22evenodd%22%3E%3C%2Fpath%3E%3Cpath%20id%3D%22path4%22%20d%3D%22%22%20stroke%3D%22none%22%20fill%3D%22%23f4100f0%22%20fill-rule%3D%22evenodd%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E");}.s16bxms6[data-grow='true']{width:100%;height:100%;}
|
|
37
|
+
.spzzsat{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;max-width:100%;touch-action:none;display:block;grid-area:1 / 1;}.spzzsat[data-grow='true']{width:100%;}
|
|
38
|
+
.s1egrskk{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;max-width:100%;touch-action:none;display:block;grid-area:1 / 1;cursor:var(--s1egrskk-0);}.s1egrskk[data-grow='true']{width:100%;}
|
|
39
|
+
.sc6yefj{min-width:32px;height:32px;font-size:14px;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;box-sizing:border-box;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background:none;border:none;cursor:pointer;border-radius:var(--font-radius);color:var(--font-color);margin:2px 4px;padding:0;}.sc6yefj[data-selected='1']{color:var(--font-selected-color);background:var(--font-selected-bg);}.sc6yefj[data-hidden='1']{visibility:hidden;}.sc6yefj[data-disabled='1']{cursor:default;color:var(--font-disabled-color);background:var(--font-disabled-bg);}.sc6yefj[data-selected='0'][data-disabled='0']{background:var(--font-bg);color:var(--font-color);}.sc6yefj[data-selected='0'][data-disabled='0']:hover{color:var(--font-hover-color);background:var(--font-hover-bg);}.sc6yefj[data-disabled='0']{cursor:pointer;}.sc6yefj svg{fill:currentColor;width:20px;height:20px;}.sc6yefj input{position:absolute;visibility:hidden;}
|
|
40
|
+
.s2aizej{width:100%;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:2px 6px;}
|
|
41
|
+
.s13rkw3s{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
|
42
|
+
.s1qkcrgj{-webkit-flex:1;-ms-flex:1;flex:1;text-align:left;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.s1qkcrgj + .s13rkw3s{margin-left:12px;}
|
|
43
|
+
.s2dsyaf{position:absolute;z-index:3;background:var(--toolbar-bg);bottom:100%;box-shadow:0 3px 8px rgb(0 0 0 / 24%);padding:8px;border-radius:8px;white-space:nowrap;box-sizing:border-box;}.s2dsyaf[data-alignment='left']{left:0;margin:4px;}.s2dsyaf[data-alignment='center']{left:50%;-webkit-transform:translate3d(-50%,0px,0px);-ms-transform:translate3d(-50%,0px,0px);transform:translate3d(-50%,0px,0px);margin:4px 0px;}.s2dsyaf[data-alignment='right']{right:0;margin:4px;}.s2dsyaf[data-fitcontainer='true']{max-width:100%;}
|
|
44
|
+
.s1f032bv{margin-bottom:8px;margin-top:4px;font-size:18px;}
|
|
45
|
+
.sw61axo{display:inline-block;background:var(--toolbar-bg);box-sizing:border-box;overflow-y:auto;min-width:200px;}
|
|
46
|
+
.s1shoasi{margin:2px 0;}.s1shoasi:not(:hover){opacity:0.2;}
|
|
47
|
+
.s1adt0vs{border:3px solid transparent;padding:4px 0px;position:relative;background:var(--toolbar-bg);box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.s1adt0vs[data-is-over='1']{border:3px dotted var(--font-hover-bg);}.s1adt0vs[data-is-dragging='1']{opacity:0.4;}.s1adt0vs[data-selected='1']{color:var(--font-selected-color);background:var(--font-selected-bg);}.s1adt0vs[data-selected='1'] .s1shoasi{color:white;}.s1adt0vs[data-selected='0'][data-disabled='0']{background:var(--font-bg);color:var(--font-color);}.s1adt0vs[data-selected='0'][data-disabled='0']:hover{color:var(--font-hover-color);background:var(--font-hover-bg);}.s1adt0vs[data-disabled='1']{cursor:default;color:var(--font-disabled-color);background:var(--font-disabled-bg);}.s1adt0vs[data-disabled='0']{cursor:move;}.s1adt0vs > span{height:20px;line-height:1;color:#8a8a8a;}.s1adt0vs > span > svg{fill:#8a8a8a;width:20px;height:20px;padding:0 4px;-webkit-transform:scale(0.75);-ms-transform:scale(0.75);transform:scale(0.75);}
|
|
48
|
+
.svyjq0t{margin:2px 0;}.svyjq0t[data-visible='false']{opacity:0.2;}
|
|
49
|
+
.s1vztggb{margin:2px 0;}.s1vztggb[data-locked='false']{opacity:0.2;}
|
|
50
|
+
.s1fgf9tg[data-grid='false'] svg{opacity:0.2;}
|
|
51
|
+
.s1rl6big{-webkit-flex:1;-ms-flex:1;flex:1;}
|
|
52
|
+
.sbpkotp{bottom:0;left:unset;top:unset;max-height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
|
|
53
|
+
.s12cgrwn{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;overflow-y:auto;}
|
|
54
|
+
.s1jzw7d9{opacity:0.6;text-align:center;padding:12px 0px;}
|
|
55
|
+
.s3kynji{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;bottom:unset;top:100%;}.s3kynji[data-vertical='1']{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
|
|
56
|
+
.s1614rl3{position:relative;display:inline-block;}
|
|
57
|
+
.s1qu0ers{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;bottom:unset;top:100%;}.s1qu0ers[data-vertical='1']{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
|
|
58
|
+
.s1y35t9y{position:relative;display:inline-block;}
|
|
59
|
+
.s1hezj2d{z-index:3;position:absolute;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;left:0;right:0;bottom:0;top:0;}.s1hezj2d[data-position='center']{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.s1hezj2d[data-position='bottom']{-webkit-align-items:end;-webkit-box-align:end;-ms-flex-align:end;align-items:end;}
|
|
60
|
+
.spuj31h{display:grid;background:var(--toolbar-bg);box-shadow:0 3px 8px rgb(0 0 0 / 24%);padding:4px;border-radius:8px;white-space:nowrap;position:relative;}
|
|
61
|
+
.s1ulcd40{position:absolute;left:0;top:0;right:0;bottom:0;background:#00000073;}
|
|
62
|
+
.s1rncfwv form{grid-template-columns:3fr 1fr 1fr;}.s1rncfwv form input{color:var(--font-color);border:1px solid var(--font-color);background:var(--toolbar-bg);outline:none;}
|
|
63
|
+
.s1gorp95{-webkit-flex:1;-ms-flex:1;flex:1;position:relative;height:100%;text-align:center;height:36px;}
|
|
64
|
+
.s1ivsaf6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;max-height:36px;background:var(--toolbar-bg);border-bottom:1px solid var(--divider-color);box-sizing:border-box;}
|
|
65
|
+
.sv0y70r{grid-template-columns:1fr 1fr 1fr;}
|
|
66
|
+
.s1dqu4j7{width:20px;height:20px;box-sizing:border-box;border-radius:50%;}.s1dqu4j7[data-mode='fill']{border:1px solid #80808038;background:var(--s1dqu4j7-0);}.s1dqu4j7[data-mode='stroke']{border:4px solid #80808038;}.s1dqu4j7[data-mode='stroke']:after{content:'';display:block;border-radius:100%;border:2px solid var(--s1dqu4j7-0);position:relative;width:18px;height:18px;left:-3px;top:-3px;box-sizing:border-box;}
|
|
67
|
+
.s1j0ldko{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;}
|
|
68
|
+
.s10ecqf5{width:20px;height:20px;box-sizing:border-box;border-radius:50%;color:var(--s10ecqf5-0);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:baseline;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-weight:bold;}
|
|
69
|
+
.layoutPanelOpened .sb1jkk3.sb1jkk3{color:var(--font-selected-color);background:var(--font-selected-bg);}.sb1jkk3[data-hidden='1']{display:none;}
|
|
70
|
+
.s4h1871{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:100%;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;}
|
|
71
|
+
.sfr849o{padding:16px;}
|
|
72
|
+
.s11cdkmf{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;}
|
|
73
|
+
.s16o63ah{font-family:var(--s16o63ah-0);}
|
|
74
|
+
.s1yz5lc1{display:inline-block;width:6px;height:2px;background:transparent;vertical-align:middle;}
|
|
75
|
+
.s1k64iv7{display:inline-block;}.s1k64iv7[data-type='0'] .s1yz5lc1{background:currentColor;}.s1k64iv7[data-type='2']{position:relative;left:3px;}.s1k64iv7[data-type='2'] .s1yz5lc1:nth-child(3n-1){background:currentColor;width:12px;}.s1k64iv7[data-type='2'] .s1yz5lc1:nth-child(n+11){display:none;}.s1k64iv7[data-type='1'] .s1yz5lc1:nth-child(2n+1){background:currentColor;}
|
|
76
|
+
.s1bq28wy{position:absolute;left:0;top:50%;-webkit-transform:translate3d(-25%,-50%,0px);-ms-transform:translate3d(-25%,-50%,0px);transform:translate3d(-25%,-50%,0px);display:inline-block;width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:15px solid currentColor;}
|
|
77
|
+
.sej9ve5{position:absolute;right:0;top:50%;-webkit-transform:translate3d(25%,-50%,0px);-ms-transform:translate3d(25%,-50%,0px);transform:translate3d(25%,-50%,0px);display:inline-block;width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:15px solid currentColor;}
|
|
78
|
+
.s5asd7a{position:relative;display:inline-block;width:60px;height:2px;background:currentColor;vertical-align:middle;}.s5asd7a[data-type='0'] .s1bq28wy,.s5asd7a[data-type='1'] .s1bq28wy{display:none;}.s5asd7a[data-type='0'] .sej9ve5,.s5asd7a[data-type='2'] .sej9ve5{display:none;}
|
|
79
|
+
.s17kh6p4{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;background:var(--toolbar-bg);position:relative;height:36px;border-top:1px solid var(--divider-color);box-sizing:border-box;}
|
|
80
|
+
.s1fluhcn{-webkit-flex:1;-ms-flex:1;flex:1;}
|
|
81
|
+
.sg7vrwb{grid-template-columns:repeat(auto-fill,40px);width:100%;}
|
|
82
|
+
.s1xg1lj6{display:inline-block;padding:12px 48px;margin:4px;max-width:calc(100% - 24px);overflow-wrap:break-word;box-sizing:border-box;-webkit-transition:all 500ms;transition:all 500ms;opacity:0;-webkit-transform:translate3d(0px,40px,0px);-ms-transform:translate3d(0px,40px,0px);transform:translate3d(0px,40px,0px);}.s1xg1lj6[data-type='0']{background:#646464;color:white;}.s1xg1lj6[data-type='1']{background:#c3a200;color:black;}.s1xg1lj6[data-type='2']{background:#911717;color:white;}.s1xg1lj6[data-type='3']{background:#088900;color:white;}.s1xg1lj6[data-is-shown='1']{opacity:1;-webkit-transform:translate3d(0px,0px,0px);-ms-transform:translate3d(0px,0px,0px);transform:translate3d(0px,0px,0px);}.s1xg1lj6[data-is-shown='0']{opacity:0;-webkit-transform:translate3d(0px,40px,0px);-ms-transform:translate3d(0px,40px,0px);transform:translate3d(0px,40px,0px);}
|
|
83
|
+
.sg1lk71{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;position:absolute;z-index:4;bottom:0;left:0;right:0;height:0px;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
|
84
|
+
.s15r7ba{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:absolute;z-index:2;top:0;bottom:0;left:0;right:0;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#00000050;-webkit-transition:opacity 300ms linear;transition:opacity 300ms linear;opacity:0;}.s15r7ba[data-loading='visible']{opacity:1;}
|
|
85
|
+
.s19n4ela{width:40px;height:40px;position:relative;-webkit-transform:rotate(10deg);-ms-transform:rotate(10deg);transform:rotate(10deg);-webkit-animation:react-paint-rotation-s19n4ela 1s infinite;animation:react-paint-rotation-s19n4ela 1s infinite;}@-webkit-keyframes react-paint-rotation-s19n4ela{from{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}@keyframes react-paint-rotation-s19n4ela{from{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}
|
|
86
|
+
.ssemdwq{border-radius:50%;position:absolute;width:15px;height:15px;}.ssemdwq:nth-child(1){left:0;background-color:#5c6bc0;}.ssemdwq:nth-child(2){right:0;background-color:#8bc34a;}.ssemdwq:nth-child(3){bottom:0;background-color:#ffb74d;}.ssemdwq:nth-child(4){bottom:0;right:0;background-color:#f44336;}
|
|
87
|
+
.sdhgr8u{--toolbar-bg:var(--sdhgr8u-0);--divider-color:var(--sdhgr8u-1);--font-radius:var(--sdhgr8u-2);--font-disabled-color:var(--sdhgr8u-3);--font-disabled-bg:var(--sdhgr8u-4);--font-color:var(--sdhgr8u-5);--font-bg:var(--sdhgr8u-6);--font-selected-color:var(--sdhgr8u-7);--font-selected-bg:var(--sdhgr8u-8);--font-hover-color:var(--sdhgr8u-9);--font-hover-bg:var(--sdhgr8u-10);--canvas-bg:var(--sdhgr8u-11);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:var(--font-color);position:relative;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.sdhgr8u hr{width:100%;border:none;border-top:1px solid var(--divider-color);}.sdhgr8u[data-grow='false']{max-width:var(--sdhgr8u-12);}.sdhgr8u[data-shrink='false']{min-width:var(--sdhgr8u-13);}
|
|
88
|
+
.sm24hcl{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;position:relative;max-width:100%;z-index:1;aspect-ratio:var(--sm24hcl-2);}.sm24hcl[data-grow='true']{width:100%;}.sm24hcl[data-grow='false']{width:var(--sm24hcl-1);}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yorab/react-paint",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": "Yohann Rabatel",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"dist/"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@babel/runtime": "^7.16.7",
|
|
15
16
|
"@linaria/core": "^3.0.0-beta.15",
|
|
16
17
|
"@linaria/react": "^3.0.0-beta.15",
|
|
17
18
|
"lodash": "^4.17.20"
|
|
@@ -23,7 +24,6 @@
|
|
|
23
24
|
"@babel/preset-env": "^7.16.8",
|
|
24
25
|
"@babel/preset-react": "^7.16.7",
|
|
25
26
|
"@babel/preset-typescript": "^7.16.7",
|
|
26
|
-
"@babel/runtime": "^7.16.7",
|
|
27
27
|
"@linaria/babel-preset": "^3.0.0-beta.15",
|
|
28
28
|
"@linaria/shaker": "^3.0.0-beta.15",
|
|
29
29
|
"@linaria/webpack-loader": "^3.0.0-beta.16",
|