@blocklet/editor 2.4.65 → 2.4.67

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.
@@ -10,7 +10,7 @@ export default function Card({ title, body, image, icon, href, horizontal = fals
10
10
  return (_jsx(Box, { component: Icon, icon: icon, sx: {
11
11
  display: 'inline-block',
12
12
  fontSize: '1.5em',
13
- color: 'primary.dark',
13
+ color: 'primary.main',
14
14
  } }));
15
15
  };
16
16
  const cardContent = (_jsxs(MuiCard, { sx: {
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, alpha, styled, GlobalStyles, useTheme } from '@mui/material';
2
+ import { Box, styled, GlobalStyles, useTheme } from '@mui/material';
3
3
  const getShapeRadiusValue = (theme) => {
4
4
  if (typeof theme.shape.borderRadius === 'number') {
5
5
  return theme.shape.borderRadius;
@@ -8,7 +8,6 @@ const getShapeRadiusValue = (theme) => {
8
8
  };
9
9
  const StyledEditorWrapper = styled(Box) `
10
10
  position: relative;
11
- color: ${({ theme }) => alpha(theme.palette.text.primary, 0.8)};
12
11
  .be-editable {
13
12
  transition: padding-bottom 0.2s;
14
13
  code {
@@ -150,9 +149,22 @@ const StyledEditorWrapper = styled(Box) `
150
149
  border-radius: 8px;
151
150
  }
152
151
 
152
+ /* table 上下边距调 */
153
153
  .be-editable p > table {
154
154
  margin: 0;
155
155
  }
156
+
157
+ /* list item 内 code block 对齐问题 */
158
+ .be-editable li > code {
159
+ margin-left: -20px;
160
+ }
161
+
162
+ /* heading 紧邻的 table 上边距, 调大 */
163
+ .be-editable h1 + p:has(table),
164
+ .be-editable h2 + p:has(table),
165
+ .be-editable h3 + p:has(table) {
166
+ padding-top: 4px;
167
+ }
156
168
  `;
157
169
  export function StyledEditorContent({ ref = undefined, children, ...rest }) {
158
170
  return (_jsxs(StyledEditorWrapper, { ref: ref, ...rest, children: [_jsx(EditorGlobalStyle, {}), children] }));
@@ -252,7 +252,7 @@ const createCustomTheme = (theme) => {
252
252
  left: 0;
253
253
  top: 0;
254
254
  // border-right: 1px solid #ccc;
255
- padding: 16px 8px;
255
+ padding: 16px;
256
256
  color: #777;
257
257
  white-space: pre-wrap;
258
258
  text-align: right;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/editor",
3
- "version": "2.4.65",
3
+ "version": "2.4.67",
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.65"
73
+ "@blocklet/pdf": "2.4.67"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@babel/core": "^7.25.2",