@blocklet/editor 2.4.58 → 2.4.60

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.
@@ -19,7 +19,7 @@ export default function Card({ title, body, image, icon, href, horizontal = fals
19
19
  flexDirection: horizontal ? 'row' : 'column',
20
20
  cursor: isLink ? 'pointer' : 'default',
21
21
  transition: 'all 0.2s ease-in-out',
22
- '&:hover': isLink && !image ? { borderColor: 'primary.main' } : {},
22
+ '&:hover': !image ? { borderColor: 'primary.main' } : {},
23
23
  border: 1,
24
24
  borderColor: 'divider',
25
25
  borderRadius: 1,
@@ -39,7 +39,7 @@ export default function Card({ title, body, image, icon, href, horizontal = fals
39
39
  flexDirection: 'column',
40
40
  gap: 1,
41
41
  ...(horizontal && { flexDirection: 'row', alignItems: 'center' }),
42
- }, children: [renderIcon(), _jsx(Typography, { variant: "h5", component: "h3", sx: {
42
+ }, children: [renderIcon(), _jsx(Typography, { variant: "h5", component: "h4", sx: {
43
43
  fontWeight: 600,
44
44
  color: 'text.primary',
45
45
  }, children: title })] }), body && (_jsx(Typography, { variant: "body2", sx: {
@@ -327,7 +327,7 @@ const ImageContainer = ({ success, loading, error, confirmText, uploadImage, pla
327
327
  return (_jsxs(Box, { sx: {
328
328
  position: 'relative',
329
329
  ...(showBorder && {
330
- p: 2,
330
+ p: 1,
331
331
  border: 1,
332
332
  borderColor: 'divider',
333
333
  borderRadius: 1,
@@ -75,6 +75,25 @@ const StyledEditorWrapper = styled(Box) `
75
75
  .PlaygroundEditorTheme__tableCellHeader {
76
76
  background-color: ${({ theme }) => theme.palette.grey[50]} !important;
77
77
  }
78
+
79
+ @container blocklet-editor (max-width: 700px) {
80
+ .be-editable img,
81
+ .be-editable *:has(img) {
82
+ width: 100% !important;
83
+ }
84
+ }
85
+
86
+ .be-editable div:has(> video) {
87
+ padding: 8px;
88
+ border: 1px solid ${({ theme }) => theme.palette.divider};
89
+ border-radius: ${({ theme }) => theme.shape.borderRadius}px;
90
+ overflow: hidden;
91
+ line-height: 1;
92
+ }
93
+
94
+ .be-editable video {
95
+ border-radius: 4px;
96
+ }
78
97
  `;
79
98
  export function StyledEditorContent({ ref = undefined, children, ...rest }) {
80
99
  return (_jsxs(StyledEditorWrapper, { ref: ref, ...rest, children: [_jsx(EditorGlobalStyle, {}), children] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/editor",
3
- "version": "2.4.58",
3
+ "version": "2.4.60",
4
4
  "main": "lib/index.js",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -70,7 +70,7 @@
70
70
  "ufo": "^1.5.4",
71
71
  "url-join": "^4.0.1",
72
72
  "zustand": "^4.5.5",
73
- "@blocklet/pdf": "2.4.58"
73
+ "@blocklet/pdf": "2.4.60"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@babel/core": "^7.25.2",