@lark-apaas/miaoda-core 0.1.0-alpha.15 → 0.1.0-alpha.17

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.
@@ -6,7 +6,7 @@ const chinaGeoJson = {
6
6
  type: 'Feature',
7
7
  properties: {
8
8
  adcode: 110000,
9
- name: "\u5317\u4EAC\u5E02",
9
+ name: '北京市',
10
10
  center: [
11
11
  116.405285,
12
12
  39.904989
@@ -1011,7 +1011,7 @@ const chinaGeoJson = {
1011
1011
  type: 'Feature',
1012
1012
  properties: {
1013
1013
  adcode: 120000,
1014
- name: "\u5929\u6D25\u5E02",
1014
+ name: '天津市',
1015
1015
  center: [
1016
1016
  117.190182,
1017
1017
  39.125596
@@ -2064,7 +2064,7 @@ const chinaGeoJson = {
2064
2064
  type: 'Feature',
2065
2065
  properties: {
2066
2066
  adcode: 130000,
2067
- name: "\u6CB3\u5317\u7701",
2067
+ name: '河北省',
2068
2068
  center: [
2069
2069
  114.502461,
2070
2070
  38.045474
@@ -6653,7 +6653,7 @@ const chinaGeoJson = {
6653
6653
  type: 'Feature',
6654
6654
  properties: {
6655
6655
  adcode: 140000,
6656
- name: "\u5C71\u897F\u7701",
6656
+ name: '山西省',
6657
6657
  center: [
6658
6658
  112.549248,
6659
6659
  37.857014
@@ -8558,7 +8558,7 @@ const chinaGeoJson = {
8558
8558
  type: 'Feature',
8559
8559
  properties: {
8560
8560
  adcode: 150000,
8561
- name: "\u5185\u8499\u53E4\u81EA\u6CBB\u533A",
8561
+ name: '内蒙古自治区',
8562
8562
  center: [
8563
8563
  111.670801,
8564
8564
  40.818311
@@ -16241,7 +16241,7 @@ const chinaGeoJson = {
16241
16241
  type: 'Feature',
16242
16242
  properties: {
16243
16243
  adcode: 210000,
16244
- name: "\u8FBD\u5B81\u7701",
16244
+ name: '辽宁省',
16245
16245
  center: [
16246
16246
  123.429096,
16247
16247
  41.796767
@@ -19370,7 +19370,7 @@ const chinaGeoJson = {
19370
19370
  type: 'Feature',
19371
19371
  properties: {
19372
19372
  adcode: 220000,
19373
- name: "\u5409\u6797\u7701",
19373
+ name: '吉林省',
19374
19374
  center: [
19375
19375
  125.3245,
19376
19376
  43.886841
@@ -22867,7 +22867,7 @@ const chinaGeoJson = {
22867
22867
  type: 'Feature',
22868
22868
  properties: {
22869
22869
  adcode: 230000,
22870
- name: "\u9ED1\u9F99\u6C5F\u7701",
22870
+ name: '黑龙江省',
22871
22871
  center: [
22872
22872
  126.642464,
22873
22873
  45.756967
@@ -28240,7 +28240,7 @@ const chinaGeoJson = {
28240
28240
  type: 'Feature',
28241
28241
  properties: {
28242
28242
  adcode: 310000,
28243
- name: "\u4E0A\u6D77\u5E02",
28243
+ name: '上海市',
28244
28244
  center: [
28245
28245
  121.472644,
28246
28246
  31.231706
@@ -28769,7 +28769,7 @@ const chinaGeoJson = {
28769
28769
  type: 'Feature',
28770
28770
  properties: {
28771
28771
  adcode: 320000,
28772
- name: "\u6C5F\u82CF\u7701",
28772
+ name: '江苏省',
28773
28773
  center: [
28774
28774
  118.767413,
28775
28775
  32.041544
@@ -30594,7 +30594,7 @@ const chinaGeoJson = {
30594
30594
  type: 'Feature',
30595
30595
  properties: {
30596
30596
  adcode: 330000,
30597
- name: "\u6D59\u6C5F\u7701",
30597
+ name: '浙江省',
30598
30598
  center: [
30599
30599
  120.153576,
30600
30600
  30.287459
@@ -33439,7 +33439,7 @@ const chinaGeoJson = {
33439
33439
  type: 'Feature',
33440
33440
  properties: {
33441
33441
  adcode: 340000,
33442
- name: "\u5B89\u5FBD\u7701",
33442
+ name: '安徽省',
33443
33443
  center: [
33444
33444
  117.283042,
33445
33445
  31.86119
@@ -35876,7 +35876,7 @@ const chinaGeoJson = {
35876
35876
  type: 'Feature',
35877
35877
  properties: {
35878
35878
  adcode: 350000,
35879
- name: "\u798F\u5EFA\u7701",
35879
+ name: '福建省',
35880
35880
  center: [
35881
35881
  119.306239,
35882
35882
  26.075302
@@ -38501,7 +38501,7 @@ const chinaGeoJson = {
38501
38501
  type: 'Feature',
38502
38502
  properties: {
38503
38503
  adcode: 360000,
38504
- name: "\u6C5F\u897F\u7701",
38504
+ name: '江西省',
38505
38505
  center: [
38506
38506
  115.892151,
38507
38507
  28.676493
@@ -40654,7 +40654,7 @@ const chinaGeoJson = {
40654
40654
  type: 'Feature',
40655
40655
  properties: {
40656
40656
  adcode: 370000,
40657
- name: "\u5C71\u4E1C\u7701",
40657
+ name: '山东省',
40658
40658
  center: [
40659
40659
  117.000923,
40660
40660
  36.675807
@@ -43351,7 +43351,7 @@ const chinaGeoJson = {
43351
43351
  type: 'Feature',
43352
43352
  properties: {
43353
43353
  adcode: 410000,
43354
- name: "\u6CB3\u5357\u7701",
43354
+ name: '河南省',
43355
43355
  center: [
43356
43356
  113.665412,
43357
43357
  34.757975
@@ -45848,7 +45848,7 @@ const chinaGeoJson = {
45848
45848
  type: 'Feature',
45849
45849
  properties: {
45850
45850
  adcode: 420000,
45851
- name: "\u6E56\u5317\u7701",
45851
+ name: '湖北省',
45852
45852
  center: [
45853
45853
  114.298572,
45854
45854
  30.584355
@@ -48589,7 +48589,7 @@ const chinaGeoJson = {
48589
48589
  type: 'Feature',
48590
48590
  properties: {
48591
48591
  adcode: 430000,
48592
- name: "\u6E56\u5357\u7701",
48592
+ name: '湖南省',
48593
48593
  center: [
48594
48594
  112.982279,
48595
48595
  28.19409
@@ -51138,7 +51138,7 @@ const chinaGeoJson = {
51138
51138
  type: 'Feature',
51139
51139
  properties: {
51140
51140
  adcode: 440000,
51141
- name: "\u5E7F\u4E1C\u7701",
51141
+ name: '广东省',
51142
51142
  center: [
51143
51143
  113.280637,
51144
51144
  23.125178
@@ -54463,7 +54463,7 @@ const chinaGeoJson = {
54463
54463
  type: 'Feature',
54464
54464
  properties: {
54465
54465
  adcode: 450000,
54466
- name: "\u5E7F\u897F\u58EE\u65CF\u81EA\u6CBB\u533A",
54466
+ name: '广西壮族自治区',
54467
54467
  center: [
54468
54468
  108.320004,
54469
54469
  22.82402
@@ -57300,7 +57300,7 @@ const chinaGeoJson = {
57300
57300
  type: 'Feature',
57301
57301
  properties: {
57302
57302
  adcode: 460000,
57303
- name: "\u6D77\u5357\u7701",
57303
+ name: '海南省',
57304
57304
  center: [
57305
57305
  110.33119,
57306
57306
  20.031971
@@ -61253,7 +61253,7 @@ const chinaGeoJson = {
61253
61253
  type: 'Feature',
61254
61254
  properties: {
61255
61255
  adcode: 500000,
61256
- name: "\u91CD\u5E86\u5E02",
61256
+ name: '重庆市',
61257
61257
  center: [
61258
61258
  106.504962,
61259
61259
  29.533155
@@ -63662,7 +63662,7 @@ const chinaGeoJson = {
63662
63662
  type: 'Feature',
63663
63663
  properties: {
63664
63664
  adcode: 510000,
63665
- name: "\u56DB\u5DDD\u7701",
63665
+ name: '四川省',
63666
63666
  center: [
63667
63667
  104.065735,
63668
63668
  30.659462
@@ -68455,7 +68455,7 @@ const chinaGeoJson = {
68455
68455
  type: 'Feature',
68456
68456
  properties: {
68457
68457
  adcode: 520000,
68458
- name: "\u8D35\u5DDE\u7701",
68458
+ name: '贵州省',
68459
68459
  center: [
68460
68460
  106.713478,
68461
68461
  26.578343
@@ -71152,7 +71152,7 @@ const chinaGeoJson = {
71152
71152
  type: 'Feature',
71153
71153
  properties: {
71154
71154
  adcode: 530000,
71155
- name: "\u4E91\u5357\u7701",
71155
+ name: '云南省',
71156
71156
  center: [
71157
71157
  102.712251,
71158
71158
  25.040609
@@ -75397,7 +75397,7 @@ const chinaGeoJson = {
75397
75397
  type: 'Feature',
75398
75398
  properties: {
75399
75399
  adcode: 540000,
75400
- name: "\u897F\u85CF\u81EA\u6CBB\u533A",
75400
+ name: '西藏自治区',
75401
75401
  center: [
75402
75402
  91.132212,
75403
75403
  29.660361
@@ -80934,7 +80934,7 @@ const chinaGeoJson = {
80934
80934
  type: 'Feature',
80935
80935
  properties: {
80936
80936
  adcode: 610000,
80937
- name: "\u9655\u897F\u7701",
80937
+ name: '陕西省',
80938
80938
  center: [
80939
80939
  108.948024,
80940
80940
  34.263161
@@ -83983,7 +83983,7 @@ const chinaGeoJson = {
83983
83983
  type: 'Feature',
83984
83984
  properties: {
83985
83985
  adcode: 620000,
83986
- name: "\u7518\u8083\u7701",
83986
+ name: '甘肃省',
83987
83987
  center: [
83988
83988
  103.823557,
83989
83989
  36.058039
@@ -89176,7 +89176,7 @@ const chinaGeoJson = {
89176
89176
  type: 'Feature',
89177
89177
  properties: {
89178
89178
  adcode: 630000,
89179
- name: "\u9752\u6D77\u7701",
89179
+ name: '青海省',
89180
89180
  center: [
89181
89181
  101.778916,
89182
89182
  36.623178
@@ -93665,7 +93665,7 @@ const chinaGeoJson = {
93665
93665
  type: 'Feature',
93666
93666
  properties: {
93667
93667
  adcode: 640000,
93668
- name: "\u5B81\u590F\u56DE\u65CF\u81EA\u6CBB\u533A",
93668
+ name: '宁夏回族自治区',
93669
93669
  center: [
93670
93670
  106.278179,
93671
93671
  38.46637
@@ -95162,7 +95162,7 @@ const chinaGeoJson = {
95162
95162
  type: 'Feature',
95163
95163
  properties: {
95164
95164
  adcode: 650000,
95165
- name: "\u65B0\u7586\u7EF4\u543E\u5C14\u81EA\u6CBB\u533A",
95165
+ name: '新疆维吾尔自治区',
95166
95166
  center: [
95167
95167
  87.617733,
95168
95168
  43.792818
@@ -100731,7 +100731,7 @@ const chinaGeoJson = {
100731
100731
  type: 'Feature',
100732
100732
  properties: {
100733
100733
  adcode: 710000,
100734
- name: "\u53F0\u6E7E\u7701",
100734
+ name: '台湾省',
100735
100735
  center: [
100736
100736
  121.509062,
100737
100737
  25.044332
@@ -101512,7 +101512,7 @@ const chinaGeoJson = {
101512
101512
  type: 'Feature',
101513
101513
  properties: {
101514
101514
  adcode: 810000,
101515
- name: "\u9999\u6E2F\u7279\u522B\u884C\u653F\u533A",
101515
+ name: '香港特别行政区',
101516
101516
  center: [
101517
101517
  114.173355,
101518
101518
  22.320048
@@ -102013,7 +102013,7 @@ const chinaGeoJson = {
102013
102013
  type: 'Feature',
102014
102014
  properties: {
102015
102015
  adcode: 820000,
102016
- name: "\u6FB3\u95E8\u7279\u522B\u884C\u653F\u533A",
102016
+ name: '澳门特别行政区',
102017
102017
  center: [
102018
102018
  113.54909,
102019
102019
  22.198951
@@ -1,68 +1,96 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import "react-router-dom";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useMemo, useRef } from "react";
3
+ import { useLocation, useNavigate } from "react-router-dom";
4
4
  import { connectToParent } from "penpal";
5
- import "../../hooks/useUpdatingRef.js";
5
+ import { useUpdatingRef } from "../../hooks/useUpdatingRef.js";
6
6
  import { postMessage } from "../../utils/postMessage.js";
7
7
  import { getPreviewParentOrigin } from "../../utils/getParentOrigin.js";
8
8
  import { childApi } from "./childApi.js";
9
9
  import "./LogInterceptor.js";
10
- var __webpack_modules__ = {
11
- "./src/components/AppContainer/IframeBridge.tsx": function(module, __unused_webpack___webpack_exports__, __webpack_require__) {
12
- module = __webpack_require__.hmd(module);
13
- var IframeBridge_RouteMessageType = /*#__PURE__*/ function(RouteMessageType) {
14
- RouteMessageType["RouteChange"] = "RouteChange";
15
- RouteMessageType["RouteBack"] = "RouteBack";
16
- RouteMessageType["RouteForward"] = "RouteForward";
17
- return RouteMessageType;
18
- }(IframeBridge_RouteMessageType || {});
19
- function listenHot() {
20
- if (module.hot) module.hot.addStatusHandler((status)=>{
21
- if ("apply" === status) postMessage({
22
- type: 'Hmr',
23
- data: {}
24
- });
25
- });
10
+ var IframeBridge_RouteMessageType = /*#__PURE__*/ function(RouteMessageType) {
11
+ RouteMessageType["RouteChange"] = "RouteChange";
12
+ RouteMessageType["RouteBack"] = "RouteBack";
13
+ RouteMessageType["RouteForward"] = "RouteForward";
14
+ return RouteMessageType;
15
+ }(IframeBridge_RouteMessageType || {});
16
+ function isRouteMessageType(type) {
17
+ return Object.values(IframeBridge_RouteMessageType).includes(type);
18
+ }
19
+ function listenHot() {}
20
+ async function connectParent() {
21
+ connectToParent({
22
+ parentOrigin: getPreviewParentOrigin(),
23
+ methods: {
24
+ ...childApi
26
25
  }
27
- async function connectParent() {
28
- connectToParent({
29
- parentOrigin: getPreviewParentOrigin(),
30
- methods: {
31
- ...childApi
32
- }
33
- });
26
+ });
27
+ }
28
+ if ('production' !== process.env.NODE_ENV) {
29
+ listenHot();
30
+ connectParent();
31
+ }
32
+ function IframeBridge() {
33
+ const location = useLocation();
34
+ const navigate = useNavigate();
35
+ const navigateRef = useUpdatingRef(navigate);
36
+ const isActive = useRef(false);
37
+ const historyBack = useCallback(()=>{
38
+ navigateRef.current(-1);
39
+ isActive.current = true;
40
+ }, [
41
+ navigateRef
42
+ ]);
43
+ const historyForward = useCallback(()=>{
44
+ navigateRef.current(1);
45
+ isActive.current = true;
46
+ }, [
47
+ navigateRef
48
+ ]);
49
+ const operatorMessage = useMemo(()=>({
50
+ ["RouteBack"]: historyBack,
51
+ ["RouteForward"]: historyForward,
52
+ ["RouteChange"]: navigateRef.current
53
+ }), [
54
+ historyBack,
55
+ historyForward,
56
+ navigateRef
57
+ ]);
58
+ useEffect(()=>{
59
+ postMessage({
60
+ type: 'PreviewReady',
61
+ data: {}
62
+ });
63
+ }, []);
64
+ useEffect(()=>{
65
+ if (isActive.current) {
66
+ isActive.current = false;
67
+ return;
34
68
  }
35
- if ('production' !== process.env.NODE_ENV) {
36
- listenHot();
37
- connectParent();
69
+ postMessage({
70
+ type: 'ChildLocationChange',
71
+ data: location
72
+ });
73
+ }, [
74
+ location
75
+ ]);
76
+ const handleMessage = useCallback((event)=>{
77
+ const { data } = event;
78
+ if (isRouteMessageType(data?.type)) operatorMessage[data?.type](data?.data);
79
+ }, [
80
+ operatorMessage
81
+ ]);
82
+ useEffect(()=>{
83
+ window.addEventListener('message', handleMessage);
84
+ return ()=>{
85
+ window.removeEventListener('message', handleMessage);
86
+ };
87
+ }, [
88
+ handleMessage
89
+ ]);
90
+ return /*#__PURE__*/ jsx("div", {
91
+ style: {
92
+ display: 'none'
38
93
  }
39
- }
40
- };
41
- var __webpack_module_cache__ = {};
42
- function __webpack_require__(moduleId) {
43
- var cachedModule = __webpack_module_cache__[moduleId];
44
- if (void 0 !== cachedModule) return cachedModule.exports;
45
- var module = __webpack_module_cache__[moduleId] = {
46
- id: moduleId,
47
- loaded: false,
48
- exports: {}
49
- };
50
- __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
51
- module.loaded = true;
52
- return module.exports;
94
+ });
53
95
  }
54
- (()=>{
55
- __webpack_require__.hmd = (module)=>{
56
- module = Object.create(module);
57
- if (!module.children) module.children = [];
58
- Object.defineProperty(module, 'exports', {
59
- enumerable: true,
60
- set: ()=>{
61
- throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
62
- }
63
- });
64
- return module;
65
- };
66
- })();
67
- __webpack_require__("./src/components/AppContainer/IframeBridge.tsx");
68
96
  export { IframeBridge as default };
@@ -29,7 +29,7 @@ function PageHoc(props) {
29
29
  data: base64
30
30
  });
31
31
  }).catch((error)=>{
32
- console.error("\u622A\u56FE\u5931\u8D25:", error);
32
+ console.error('截图失败:', error);
33
33
  });
34
34
  }, 1000);
35
35
  }, []);
@@ -50,11 +50,11 @@ const RenderError = (props)=>{
50
50
  }),
51
51
  /*#__PURE__*/ jsx("p", {
52
52
  className: "text-l/[22px] text-[#1F2329] font-medium mb-2",
53
- children: "\u54CE\u5440\uFF0C\u5199\u9519\u4EE3\u7801\u4E86"
53
+ children: "哎呀,写错代码了"
54
54
  }),
55
55
  /*#__PURE__*/ jsx("p", {
56
56
  className: "text-sm/[22px] text-[#646A73] font-normal mb-2",
57
- children: "\u53EF\u590D\u5236\u9519\u8BEF\u4FE1\u606F\uFF0C\u6216\u544A\u8BC9\u5999\u642D\u8FDB\u884C\u4FEE\u590D"
57
+ children: "可复制错误信息,或告诉妙搭进行修复"
58
58
  }),
59
59
  /*#__PURE__*/ jsxs("div", {
60
60
  className: "flex space-x-4",
@@ -62,12 +62,12 @@ const RenderError = (props)=>{
62
62
  /*#__PURE__*/ jsx(Button, {
63
63
  className: "bg-white text-gray-600 font-[400] border rounded-[6px] shadow-xs hover:bg-gray-100 active:bg-gray-200 focus:outline-hidden h-[32px] border-[#D0D3D6]",
64
64
  onClick: onClickCopy,
65
- children: "\u590D\u5236\u9519\u8BEF\u4FE1\u606F"
65
+ children: "复制错误信息"
66
66
  }),
67
67
  /*#__PURE__*/ jsx(Button, {
68
68
  className: "h-[32px] text-sm font-medium text-white bg-blue-600 border border-transparent rounded-[6px] shadow-xs hover:bg-blue-600 active:bg-blue-700 focus:outline-hidden ",
69
69
  onClick: onClickRepair,
70
- children: "\u544A\u8BC9\u5999\u642D\u4FEE\u590D"
70
+ children: "告诉妙搭修复"
71
71
  })
72
72
  ]
73
73
  })
@@ -30,13 +30,13 @@ const NotFound = ()=>{
30
30
  }),
31
31
  /*#__PURE__*/ jsx("p", {
32
32
  className: "text-l/[22px] text-[14px] text-[#1F2329] font-medium",
33
- children: 'production' !== process.env.NODE_ENV ? "\u54CE\u5440\uFF0C\u8FD9\u4E2A\u9875\u9762\u5C1A\u672A\u751F\u6210" : '404'
33
+ children: 'production' !== process.env.NODE_ENV ? '哎呀,这个页面尚未生成' : '404'
34
34
  }),
35
35
  'production' !== process.env.NODE_ENV ? /*#__PURE__*/ jsxs(Fragment, {
36
36
  children: [
37
37
  /*#__PURE__*/ jsx("p", {
38
38
  className: "text-sm/[22px] text-[14px] text-[#646A73] font-normal mt-1",
39
- children: "\u6233\u4E0B\u65B9\u6309\u94AE\uFF0C\u6211\u53EF\u4EE5\u6839\u636E\u4E0A\u4E0B\u6587\u5E2E\u4F60\u751F\u6210\u4E00\u4E2A"
39
+ children: "戳下方按钮,我可以根据上下文帮你生成一个"
40
40
  }),
41
41
  /*#__PURE__*/ jsxs("button", {
42
42
  className: "h-[32px] text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md shadow-xs hover:bg-blue-600 active:bg-blue-700 focus:outline-hidden focus:ring-2 focus:ring-blue-500 px-3 flex flex-row items-center mt-3",
@@ -47,7 +47,7 @@ const NotFound = ()=>{
47
47
  alt: "Icon",
48
48
  className: "w-[14px] h-[14px] mr-1"
49
49
  }),
50
- "\u544A\u8BC9\u5999\u642D\u751F\u6210\u4E00\u4E2A"
50
+ "告诉妙搭生成一个"
51
51
  ]
52
52
  })
53
53
  ]
@@ -68,7 +68,7 @@ function BottomNav({ navList = [], className, maxBottomItems = 6 }) {
68
68
  hasMoreItems ? /*#__PURE__*/ jsx(MoreNavItem, {
69
69
  direction: "vertical",
70
70
  className: "text-xs",
71
- name: "\u66F4\u591A",
71
+ name: "更多",
72
72
  onClick: toggleExpanded,
73
73
  isExpanded: isExpanded,
74
74
  expandedNavItemsPath: expandedNavItemsPath
@@ -67,7 +67,7 @@ const TitleBar = ({ navList, className })=>{
67
67
  }) : null,
68
68
  /*#__PURE__*/ jsx("span", {
69
69
  className: "text-xl text-center font-medium w-full text-ellipsis overflow-hidden whitespace-nowrap ",
70
- children: appName || "\u65B0\u5E94\u7528"
70
+ children: appName || '新应用'
71
71
  }),
72
72
  /*#__PURE__*/ jsx("div", {
73
73
  className: "text-center justify-center text-token-text-title font-medium leading-relaxed"
@@ -80,7 +80,7 @@ const TitleBar = ({ navList, className })=>{
80
80
  className: "flex items-center justify-between border-gray-200 border-t py-4 ",
81
81
  children: [
82
82
  /*#__PURE__*/ jsx("div", {
83
- children: "\u5F53\u524D\u7528\u6237"
83
+ children: "当前用户"
84
84
  }),
85
85
  /*#__PURE__*/ jsxs("div", {
86
86
  className: "flex items-center",
@@ -109,7 +109,7 @@ const TitleBar = ({ navList, className })=>{
109
109
  },
110
110
  children: [
111
111
  /*#__PURE__*/ jsx("div", {
112
- children: "\u9000\u51FA\u767B\u5F55"
112
+ children: "退出登录"
113
113
  }),
114
114
  /*#__PURE__*/ jsx("div", {
115
115
  className: "flex items-center",
@@ -34,7 +34,7 @@ function TopNav({ navList = [], align = 'left', className, activeClassName }) {
34
34
  /*#__PURE__*/ jsx("span", {
35
35
  className: "max-w-[240px] font-medium w-full truncate",
36
36
  title: appName,
37
- children: appName || "\u65B0\u5E94\u7528"
37
+ children: appName || '新应用'
38
38
  })
39
39
  ]
40
40
  })
@@ -41,7 +41,7 @@ function UserProfileUI({ user }) {
41
41
  style: {
42
42
  marginRight: 0
43
43
  },
44
- children: "\u6682\u505C\u4F7F\u7528"
44
+ children: "暂停使用"
45
45
  })
46
46
  ]
47
47
  }),
@@ -65,7 +65,7 @@ function UserProfileUI({ user }) {
65
65
  href: getChatAppLink(user.feishu_open_id),
66
66
  target: "_blank",
67
67
  rel: "noopener noreferrer",
68
- children: "\u6D88\u606F"
68
+ children: "消息"
69
69
  })
70
70
  }) : null
71
71
  ]
@@ -78,7 +78,7 @@ function UserProfileUI({ user }) {
78
78
  children: [
79
79
  /*#__PURE__*/ jsx("span", {
80
80
  className: "text-sm text-[#646A73] min-w-[74px]",
81
- children: "\u90E8\u95E8"
81
+ children: "部门"
82
82
  }),
83
83
  /*#__PURE__*/ jsx("span", {
84
84
  className: clsxWithTw('text-sm text-[#1F2329] flex-1 break-all', {
@@ -93,7 +93,7 @@ function UserProfileUI({ user }) {
93
93
  children: [
94
94
  /*#__PURE__*/ jsx("span", {
95
95
  className: "text-sm text-[#646A73] min-w-[74px]",
96
- children: "\u90AE\u7BB1"
96
+ children: "邮箱"
97
97
  }),
98
98
  user.email ? /*#__PURE__*/ jsx("a", {
99
99
  href: `mailto:${user.email}`,
@@ -16,7 +16,7 @@ const formatI18nProfile = (profile)=>({
16
16
  });
17
17
  const getChatAppLink = (openId)=>`https://applink.feishu.cn/client/chat/open?openId=${openId}`;
18
18
  const INVALID_USER = {
19
- name: "\u65E0\u6548\u4EBA\u5458",
19
+ name: '无效人员',
20
20
  avatar: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miao/no-person.svg',
21
21
  email: '',
22
22
  department: '',
@@ -141,7 +141,7 @@ const UserSelect = ({ mode = 'single', defaultValue, value, onChange, placeholde
141
141
  })
142
142
  }) : /*#__PURE__*/ jsx("span", {
143
143
  className: "py-[1px] px-1 text-[#8F959E]",
144
- children: "\u65E0\u7ED3\u679C\uFF0C\u5EFA\u8BAE\u66F4\u6362\u641C\u7D22\u8BCD"
144
+ children: "无结果,建议更换搜索词"
145
145
  }),
146
146
  optionRender: optionRender,
147
147
  options: options,
@@ -14,7 +14,7 @@ const textVariantMap = {
14
14
  };
15
15
  function UserWithAvatar({ data, size = 'medium', mode = 'tag', className }) {
16
16
  const { avatar, name } = data;
17
- const displayName = name || "\u65E0\u6548\u4EBA\u5458";
17
+ const displayName = name || '无效人员';
18
18
  return /*#__PURE__*/ jsxs("div", {
19
19
  className: clsxWithTw('flex items-center gap-1 rounded-full', {
20
20
  'bg-[rgba(31,35,41,0.1)]': 'tag' === mode,
@@ -8,15 +8,15 @@ const Welcome = ()=>/*#__PURE__*/ jsxs("div", {
8
8
  children: [
9
9
  /*#__PURE__*/ jsx("div", {
10
10
  className: "text-2xl font-bold mb-3",
11
- children: "\u6B22\u8FCE\u4F7F\u7528\u5999\u642D \uD83D\uDC4B"
11
+ children: "欢迎使用妙搭 \uD83D\uDC4B"
12
12
  }),
13
13
  /*#__PURE__*/ jsx("div", {
14
14
  className: "text-[#646A73] text-sm",
15
- children: "1. \u968F\u65F6\u53D1\u9001\u6D88\u606F\uFF0C\u5F00\u59CB\u6784\u5EFA\u4F60\u7684\u4E13\u5C5E\u5E94\u7528"
15
+ children: "1. 随时发送消息,开始构建你的专属应用"
16
16
  }),
17
17
  /*#__PURE__*/ jsx("div", {
18
18
  className: "text-[#646A73] text-sm",
19
- children: "2. \u65E0\u9700\u62C5\u5FC3\u4EE3\u7801\u5B9E\u73B0\uFF0C\u5999\u642D\u5E2E\u4F60\u4E00\u4E00\u89E3\u51B3"
19
+ children: "2. 无需担心代码实现,妙搭帮你一一解决"
20
20
  })
21
21
  ]
22
22
  }),
@@ -19,7 +19,7 @@ function LogoInfo({ className, logoClassName }) {
19
19
  /*#__PURE__*/ jsxs("span", {
20
20
  className: "w-full truncate",
21
21
  children: [
22
- name || "\u65B0\u5E94\u7528",
22
+ name || '新应用',
23
23
  " "
24
24
  ]
25
25
  })
@@ -80,7 +80,7 @@ const NavItem = /*#__PURE__*/ react.forwardRef((props, ref)=>{
80
80
  });
81
81
  });
82
82
  NavItem.displayName = 'NavItem';
83
- const MoreNavItem = ({ expandedNavItemsPath, onClick, isExpanded, name = "\u66F4\u591A", ...restProps })=>{
83
+ const MoreNavItem = ({ expandedNavItemsPath, onClick, isExpanded, name = '更多', ...restProps })=>{
84
84
  const { pathname } = useLocation();
85
85
  const isActive = useMemo(()=>{
86
86
  const matched = expandedNavItemsPath.some((path)=>{
@@ -36,7 +36,7 @@ function UserAvatarMenu({ className }) {
36
36
  children: [
37
37
  /*#__PURE__*/ jsx(LogOut, {}),
38
38
  /*#__PURE__*/ jsx("span", {
39
- children: "\u9000\u51FA\u767B\u5F55"
39
+ children: "退出登录"
40
40
  })
41
41
  ]
42
42
  })
@@ -1,6 +1,6 @@
1
1
  const themeMetaOptions = {
2
2
  themeColors: {
3
- title: "\u4E3B\u9898\u8272",
3
+ title: '主题色',
4
4
  options: [
5
5
  {
6
6
  value: '--blue-700',
@@ -33,7 +33,7 @@ const themeMetaOptions = {
33
33
  ]
34
34
  },
35
35
  themeRadius: {
36
- title: "\u5706\u89D2",
36
+ title: '圆角',
37
37
  options: [
38
38
  {
39
39
  value: {
@@ -70,7 +70,7 @@ const themeMetaOptions = {
70
70
  ]
71
71
  },
72
72
  themeSpaces: {
73
- title: "\u95F4\u8DDD",
73
+ title: '间距',
74
74
  options: [
75
75
  {
76
76
  value: {
@@ -70,7 +70,7 @@ const generateTailwindRadiusToken = (radiusRemValue)=>{
70
70
  options: [
71
71
  {
72
72
  value: 'rounded-none',
73
- label: "none\uFF080px\uFF09",
73
+ label: 'none(0px)',
74
74
  rawValue: '0'
75
75
  },
76
76
  {
@@ -119,7 +119,7 @@ const generateTailwindRadiusToken = (radiusRemValue)=>{
119
119
  options: [
120
120
  {
121
121
  value: 'rounded-none',
122
- label: "none\uFF080px\uFF09",
122
+ label: 'none(0px)',
123
123
  rawValue: '0'
124
124
  },
125
125
  {
@@ -4,14 +4,14 @@ import { isSanboxMode } from "../utils/utils.js";
4
4
  function useLogout() {
5
5
  const [isLoading, setIsLoading] = useState(false);
6
6
  async function handlerLogout() {
7
- if ('production' !== process.env.NODE_ENV) return void console.log("\u53EA\u6709\u751F\u4EA7\u73AF\u5883\u624D\u6267\u884C\u767B\u51FA");
7
+ if ('production' !== process.env.NODE_ENV) return void console.log('只有生产环境才执行登出');
8
8
  if (isSanboxMode()) {
9
9
  setIsLoading(true);
10
10
  try {
11
11
  const dataloom = await getDataloom();
12
12
  await dataloom.service.session.signOut();
13
13
  } catch (error) {
14
- console.error("\u767B\u51FA\u5931\u8D25", error);
14
+ console.error('登出失败', error);
15
15
  } finally{
16
16
  setIsLoading(false);
17
17
  }
@@ -24,7 +24,7 @@ function useLogout() {
24
24
  });
25
25
  window.location.reload();
26
26
  } catch (error) {
27
- console.error("\u767B\u51FA\u5931\u8D25", error);
27
+ console.error('登出失败', error);
28
28
  } finally{
29
29
  setIsLoading(false);
30
30
  }
@@ -2,7 +2,7 @@ import { useContext } from "react";
2
2
  import { ThemeProviderContext } from "../components/theme/index.js";
3
3
  const useTheme = ()=>{
4
4
  const context = useContext(ThemeProviderContext);
5
- if (void 0 === context) throw new Error("useTheme \u5FC5\u987B\u5728 ThemeProvider \u5185\u4F7F\u7528");
5
+ if (void 0 === context) throw new Error('useTheme 必须在 ThemeProvider 内使用');
6
6
  return context;
7
7
  };
8
8
  export { useTheme };
@@ -43,7 +43,7 @@ async function generateTextStream(options, onChunk) {
43
43
  });
44
44
  if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
45
45
  const reader = response.body?.getReader();
46
- if (!reader) throw new Error("\u65E0\u6CD5\u83B7\u53D6\u54CD\u5E94\u6D41");
46
+ if (!reader) throw new Error('无法获取响应流');
47
47
  let fullContent = '';
48
48
  let fullReasoningContent = '';
49
49
  const decoder = new TextDecoder();
@@ -62,7 +62,7 @@ async function generateTextStream(options, onChunk) {
62
62
  content: '',
63
63
  reasoning_content: '',
64
64
  success: false,
65
- error: data.msg || "\u751F\u6210\u5931\u8D25"
65
+ error: data.msg || '生成失败'
66
66
  };
67
67
  if (data.data.content) fullContent += data.data.content;
68
68
  if (data.data.reasoning_content) fullReasoningContent += data.data.reasoning_content;
@@ -77,7 +77,7 @@ async function generateTextStream(options, onChunk) {
77
77
  success: true
78
78
  };
79
79
  } catch (parseError) {
80
- console.error(`\u{89E3}\u{6790}JSON\u{5931}\u{8D25}: ${jsonStr}`);
80
+ console.error(`解析JSON失败: ${jsonStr}`);
81
81
  }
82
82
  }
83
83
  }
@@ -91,7 +91,7 @@ async function generateTextStream(options, onChunk) {
91
91
  content: '',
92
92
  reasoning_content: '',
93
93
  success: false,
94
- error: error instanceof Error ? error.message : "\u672A\u77E5\u9519\u8BEF"
94
+ error: error instanceof Error ? error.message : '未知错误'
95
95
  };
96
96
  }
97
97
  }
@@ -6,7 +6,7 @@ async function copyToClipboard(text) {
6
6
  }
7
7
  return fallbackCopyToClipboard(text);
8
8
  } catch (error) {
9
- console.error("\u590D\u5236\u5230\u526A\u5207\u677F\u5931\u8D25:", error);
9
+ console.error('复制到剪切板失败:', error);
10
10
  return false;
11
11
  }
12
12
  }
@@ -25,7 +25,7 @@ function fallbackCopyToClipboard(text) {
25
25
  document.body.removeChild(textArea);
26
26
  return successful;
27
27
  } catch (error) {
28
- console.error("\u964D\u7EA7\u590D\u5236\u65B9\u6848\u5931\u8D25:", error);
28
+ console.error('降级复制方案失败:', error);
29
29
  return false;
30
30
  }
31
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/miaoda-core",
3
- "version": "0.1.0-alpha.15",
3
+ "version": "0.1.0-alpha.17",
4
4
  "types": "./lib/index.d.ts",
5
5
  "main": "./lib/index.js",
6
6
  "files": [
@@ -76,7 +76,7 @@
76
76
  "@ant-design/colors": "^7.2.1",
77
77
  "@ant-design/cssinjs": "^1.24.0",
78
78
  "@data-loom/js": "0.3.1",
79
- "@lark-apaas/miaoda-inspector": "workspace:*",
79
+ "@lark-apaas/miaoda-inspector": "0.1.0-alpha.7",
80
80
  "clsx": "~2.0.1",
81
81
  "dayjs": "^1.11.13",
82
82
  "echarts": "^6.0.0",
@@ -93,7 +93,7 @@
93
93
  "@changesets/cli": "^2.29.5",
94
94
  "@rsbuild/core": "~1.4.13",
95
95
  "@rsbuild/plugin-react": "^1.3.4",
96
- "@rslib/core": "^0.12.0",
96
+ "@rslib/core": "^0.15.0",
97
97
  "@storybook/addon-essentials": "^8.6.14",
98
98
  "@storybook/addon-interactions": "^8.6.14",
99
99
  "@storybook/addon-links": "^8.6.14",