@flozy/editor 4.6.3 → 4.6.4

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.
@@ -18,7 +18,7 @@ const Divider = props => {
18
18
  theme
19
19
  } = useEditorContext();
20
20
  const {
21
- borderColor = theme?.palette?.text?.primary || '#0F172A',
21
+ borderColor = theme?.palette?.primary?.main || '#0F172A',
22
22
  borderWidth = '1px',
23
23
  borderStyle = 'solid'
24
24
  } = element;
@@ -54,8 +54,16 @@ const Divider = props => {
54
54
  children: /*#__PURE__*/_jsx(IconButton, {
55
55
  size: "small",
56
56
  sx: {
57
+ background: theme?.palette?.greyshades?.light8,
58
+ border: theme?.palette?.type === 'dark' ? '1px solid #E4E8EB33' : 'none',
57
59
  boxShadow: '0px 0px 4px 0px #00000040',
58
- borderRadius: '50%'
60
+ borderRadius: '50%',
61
+ '& svg': {
62
+ stroke: theme?.palette?.text?.secondary3
63
+ },
64
+ '&.MuiIconButton-root:hover': {
65
+ background: `${theme?.palette?.greyshades?.light8} !important`
66
+ }
59
67
  },
60
68
  onClick: onSettings,
61
69
  children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
@@ -223,7 +223,7 @@ const Image = props => {
223
223
  const getWidth = () => {
224
224
  if (resizing) {
225
225
  return {
226
- width: `${size.width}px`,
226
+ width: `${size.widthInPercent}%`,
227
227
  height: objectFit ? `${size.height}px` : "auto"
228
228
  };
229
229
  } else {
@@ -53,7 +53,8 @@ const VideoContent = props => {
53
53
  ...videoSX
54
54
  },
55
55
  src: embedURL,
56
- title: alt
56
+ title: alt,
57
+ allowFullScreen: true
57
58
  });
58
59
  };
59
60
  const VideoPlaceholder = props => {
@@ -180,7 +181,7 @@ const Video = ({
180
181
  const getWidth = () => {
181
182
  if (resizing) {
182
183
  return {
183
- width: size.width ? `${size.width}px` : "100%",
184
+ width: size.widthInPercent ? `${size.widthInPercent}%` : "100%",
184
185
  height: url ? `${size.height || 370}px` : "auto"
185
186
  };
186
187
  } else {
@@ -102,7 +102,8 @@ const Uploader = props => {
102
102
  component: "label",
103
103
  variant: "text",
104
104
  style: {
105
- background: "none"
105
+ background: "none",
106
+ width: "100%"
106
107
  },
107
108
  sx: classes.uploadIcon,
108
109
  children: [/*#__PURE__*/_jsx("input", {
@@ -10,7 +10,7 @@ const useResize = ({
10
10
  const defaultSize = getBreakPointsValue(allSize);
11
11
  const {
12
12
  width,
13
- height
13
+ height = 370
14
14
  } = parentDOM?.getBoundingClientRect() || {
15
15
  ...defaultSize
16
16
  };
@@ -50,10 +50,11 @@ const useResize = ({
50
50
  setSize(currentSize => {
51
51
  const calcWidth = (currentSize.width || width) + e.movementX;
52
52
  const cWP = calcWidth / width * 100;
53
+ const calcHeight = (parseInt(currentSize.height) || height) + e.movementY;
53
54
  const calc = {
54
- width: calcWidth,
55
- height: (parseInt(currentSize.height) || height) + e.movementY,
56
- widthInPercent: cWP > 100 ? 100 : cWP
55
+ width: Math.max(calcWidth, 140),
56
+ height: Math.max(calcHeight, 50),
57
+ widthInPercent: cWP > 100 ? 100 : Math.max(cWP, 15)
57
58
  };
58
59
  latest = calc;
59
60
  return calc;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "4.6.3",
3
+ "version": "4.6.4",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"