@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.
@@ -113,12 +113,14 @@ function ThemeProvider({ children }) {
113
113
  },
114
114
  };
115
115
  const tempTheme = (0, material_1.createTheme)({
116
- typography: Object.assign({ fontFamily: bodyFontFamily }, Object.fromEntries(new Array(5).fill(0).map((_, index) => [
116
+ typography: Object.assign(Object.assign({ fontFamily: bodyFontFamily }, Object.fromEntries(new Array(5).fill(0).map((_, index) => [
117
117
  `h${index + 1}`,
118
118
  {
119
119
  fontFamily: headingFontFamily,
120
120
  },
121
- ]))),
121
+ ]))), { button: {
122
+ textTransform: 'none',
123
+ } }),
122
124
  palette: {
123
125
  primary,
124
126
  secondary: {
@@ -223,7 +223,7 @@ exports.translations = {
223
223
  showSlider: '显示版本历史',
224
224
  retryTip: 'Agent 算力不足,请稍后重试...',
225
225
  retry: '重试',
226
- errorCodeTip: 'Agent 发现代码存在一些语法错误,请求重试...',
226
+ errorCodeTip: 'Agent 发现代码存在一些语法问题,请求重试...',
227
227
  },
228
228
  },
229
229
  };
@@ -59,7 +59,7 @@ function RetryComponent({ message, tip }) {
59
59
  } }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "h6", sx: {
60
60
  display: 'flex',
61
61
  alignItems: 'center',
62
- }, children: [tip || t('v0.retryTip'), (0, jsx_runtime_1.jsx)(TransparentTooltip_1.default, { arrow: true, placement: "top", title: (0, jsx_runtime_1.jsx)(MessageErrorView_1.default, { error: (message === null || message === void 0 ? void 0 : message.error) || new Error('Empty response from AI or Code not found'), sx: {
62
+ }, children: [tip || t('v0.retryTip'), (0, jsx_runtime_1.jsx)(TransparentTooltip_1.default, { arrow: true, placement: "top", title: (0, jsx_runtime_1.jsx)(MessageErrorView_1.default, { error: (message === null || message === void 0 ? void 0 : message.error) || new Error('Code syntax errors'), sx: {
63
63
  mr: 0,
64
64
  } }), children: (0, jsx_runtime_1.jsx)(material_1.Box, { component: react_1.Icon, icon: "akar-icons:info", sx: {
65
65
  ml: 1,
@@ -33,7 +33,6 @@ const utils_1 = require("../utils");
33
33
  const BASE_QUESTION_SX = {
34
34
  fontWeight: 500,
35
35
  fontSize: 13,
36
- lineHeight: 1.6,
37
36
  };
38
37
  function UserQuestion({ question }) {
39
38
  var _a;
@@ -57,7 +56,7 @@ function UserQuestion({ question }) {
57
56
  return ((0, jsx_runtime_1.jsx)(material_1.Box, { ref: containerRef, display: "flex", alignItems: "center", sx: Object.assign(Object.assign({}, BASE_QUESTION_SX), { color: 'textColor' }), children: (0, jsx_runtime_1.jsx)(ClickToCopy_1.default, { locale: locale, unstyled: true, disableHoverListener: true, disableFocusListener: true, disableTouchListener: true, children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, { placement: "bottom", arrow: true, title: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
58
57
  display: 'flex',
59
58
  alignItems: 'center',
60
- }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { sx: Object.assign(Object.assign({}, BASE_QUESTION_SX), { lineHeight: 1, color: 'white' }), children: question }), (0, jsx_runtime_1.jsx)(material_1.Box, { id: "copy-button-wrapper", component: "span", sx: {
59
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { sx: Object.assign(Object.assign({}, BASE_QUESTION_SX), { color: 'white' }), children: question }), (0, jsx_runtime_1.jsx)(material_1.Box, { id: "copy-button-wrapper", component: "span", sx: {
61
60
  ml: 0.5,
62
61
  mt: 0.25,
63
62
  fontSize: 14,
@@ -42,7 +42,7 @@ function CustomComponentRenderer(_a) {
42
42
  var { dev } = _a, props = __rest(_a, ["dev"]);
43
43
  const inheritedDev = (0, DevProvider_1.useDev)();
44
44
  const BuiltinComponent = BuiltinComponents[props.componentId];
45
- return ((0, jsx_runtime_1.jsx)(react_error_boundary_1.ErrorBoundary, { fallbackRender: (props === null || props === void 0 ? void 0 : props.fallbackRender) || ErrorView, resetKeys: [Date.now()], children: (0, jsx_runtime_1.jsx)(DevProvider_1.DevProvider, { dev: dev !== null && dev !== void 0 ? dev : inheritedDev, children: BuiltinComponent ? ((0, jsx_runtime_1.jsx)(BuiltinComponent, Object.assign({}, props))) : ((0, jsx_runtime_1.jsx)(ComponentRenderer, Object.assign({}, props, { instanceId: (_b = props.instanceId) !== null && _b !== void 0 ? _b : props.componentId }))) }) }));
45
+ return ((0, jsx_runtime_1.jsx)(react_error_boundary_1.ErrorBoundary, { fallbackRender: (props === null || props === void 0 ? void 0 : props.fallbackRender) || ErrorView, children: (0, jsx_runtime_1.jsx)(DevProvider_1.DevProvider, { dev: dev !== null && dev !== void 0 ? dev : inheritedDev, children: BuiltinComponent ? ((0, jsx_runtime_1.jsx)(BuiltinComponent, Object.assign({}, props))) : ((0, jsx_runtime_1.jsx)(ComponentRenderer, Object.assign({}, props, { instanceId: (_b = props.instanceId) !== null && _b !== void 0 ? _b : props.componentId }))) }) }));
46
46
  }
47
47
  exports.default = CustomComponentRenderer;
48
48
  const BuiltinComponents = {