@blocklet/pages-kit 0.2.330 → 0.2.332

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.
@@ -108,12 +108,14 @@ export default function ThemeProvider({ children }) {
108
108
  },
109
109
  };
110
110
  const tempTheme = createTheme({
111
- typography: Object.assign({ fontFamily: bodyFontFamily }, Object.fromEntries(new Array(5).fill(0).map((_, index) => [
111
+ typography: Object.assign(Object.assign({ fontFamily: bodyFontFamily }, Object.fromEntries(new Array(5).fill(0).map((_, index) => [
112
112
  `h${index + 1}`,
113
113
  {
114
114
  fontFamily: headingFontFamily,
115
115
  },
116
- ]))),
116
+ ]))), { button: {
117
+ textTransform: 'none',
118
+ } }),
117
119
  palette: {
118
120
  primary,
119
121
  secondary: {
@@ -220,7 +220,7 @@ export const translations = {
220
220
  showSlider: '显示版本历史',
221
221
  retryTip: 'Agent 算力不足,请稍后重试...',
222
222
  retry: '重试',
223
- errorCodeTip: 'Agent 发现代码存在一些语法错误,请求重试...',
223
+ errorCodeTip: 'Agent 发现代码存在一些语法问题,请求重试...',
224
224
  },
225
225
  },
226
226
  };
@@ -53,7 +53,7 @@ function RetryComponent({ message, tip }) {
53
53
  } }), _jsxs(Typography, { variant: "h6", sx: {
54
54
  display: 'flex',
55
55
  alignItems: 'center',
56
- }, children: [tip || t('v0.retryTip'), _jsx(TransparentTooltip, { arrow: true, placement: "top", title: _jsx(MessageErrorView, { error: (message === null || message === void 0 ? void 0 : message.error) || new Error('Empty response from AI or Code not found'), sx: {
56
+ }, children: [tip || t('v0.retryTip'), _jsx(TransparentTooltip, { arrow: true, placement: "top", title: _jsx(MessageErrorView, { error: (message === null || message === void 0 ? void 0 : message.error) || new Error('Code syntax errors'), sx: {
57
57
  mr: 0,
58
58
  } }), children: _jsx(Box, { component: Icon, icon: "akar-icons:info", sx: {
59
59
  ml: 1,
@@ -8,7 +8,6 @@ import { getLineClamp } from '../utils';
8
8
  const BASE_QUESTION_SX = {
9
9
  fontWeight: 500,
10
10
  fontSize: 13,
11
- lineHeight: 1.6,
12
11
  };
13
12
  export default function UserQuestion({ question }) {
14
13
  var _a;
@@ -32,7 +31,7 @@ export default function UserQuestion({ question }) {
32
31
  return (_jsx(Box, { ref: containerRef, display: "flex", alignItems: "center", sx: Object.assign(Object.assign({}, BASE_QUESTION_SX), { color: 'textColor' }), children: _jsx(ClickToCopy, { locale: locale, unstyled: true, disableHoverListener: true, disableFocusListener: true, disableTouchListener: true, children: _jsx(Tooltip, { placement: "bottom", arrow: true, title: _jsxs(Box, { sx: {
33
32
  display: 'flex',
34
33
  alignItems: 'center',
35
- }, children: [_jsx(Typography, { sx: Object.assign(Object.assign({}, BASE_QUESTION_SX), { lineHeight: 1, color: 'white' }), children: question }), _jsx(Box, { id: "copy-button-wrapper", component: "span", sx: {
34
+ }, children: [_jsx(Typography, { sx: Object.assign(Object.assign({}, BASE_QUESTION_SX), { color: 'white' }), children: question }), _jsx(Box, { id: "copy-button-wrapper", component: "span", sx: {
36
35
  ml: 0.5,
37
36
  mt: 0.25,
38
37
  fontSize: 14,
@@ -23,7 +23,7 @@ export default function CustomComponentRenderer(_a) {
23
23
  var { dev } = _a, props = __rest(_a, ["dev"]);
24
24
  const inheritedDev = useDev();
25
25
  const BuiltinComponent = BuiltinComponents[props.componentId];
26
- return (_jsx(ErrorBoundary, { fallbackRender: (props === null || props === void 0 ? void 0 : props.fallbackRender) || ErrorView, resetKeys: [Date.now()], children: _jsx(DevProvider, { dev: dev !== null && dev !== void 0 ? dev : inheritedDev, children: BuiltinComponent ? (_jsx(BuiltinComponent, Object.assign({}, props))) : (_jsx(ComponentRenderer, Object.assign({}, props, { instanceId: (_b = props.instanceId) !== null && _b !== void 0 ? _b : props.componentId }))) }) }));
26
+ return (_jsx(ErrorBoundary, { fallbackRender: (props === null || props === void 0 ? void 0 : props.fallbackRender) || ErrorView, children: _jsx(DevProvider, { dev: dev !== null && dev !== void 0 ? dev : inheritedDev, children: BuiltinComponent ? (_jsx(BuiltinComponent, Object.assign({}, props))) : (_jsx(ComponentRenderer, Object.assign({}, props, { instanceId: (_b = props.instanceId) !== null && _b !== void 0 ? _b : props.componentId }))) }) }));
27
27
  }
28
28
  const BuiltinComponents = {
29
29
  'blocklet-react-component': BlockletReactComponentRenderer,