Skip to content

Commit be35d49

Browse files
authored
Merge pull request #77 from ant-design/refacotr/pro-builder
refactor: ProEditor 改名为 ProBuilder
2 parents 78099c6 + 1f34606 commit be35d49

61 files changed

Lines changed: 152 additions & 152 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v3
16+
with:
17+
token: ${{ secrets.CI_GITHUB_TOKEN }}
1618

1719
- name: Install pnpm
1820
uses: pnpm/action-setup@v2
@@ -36,6 +38,8 @@ jobs:
3638
runs-on: ubuntu-latest
3739
steps:
3840
- uses: actions/checkout@v3
41+
with:
42+
token: ${{ secrets.CI_GITHUB_TOKEN }}
3943

4044
- name: Install pnpm
4145
uses: pnpm/action-setup@v2

docs/pro-editor/demos/buttonAsset/_Component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { useProEditorStore } from '@ant-design/pro-editor';
1+
import { useProBuilderStore } from '@ant-design/pro-editor';
22
import { Button } from 'antd';
33
import isEqual from 'fast-deep-equal';
44
import { memo } from 'react';
55

66
export const ButtonComponent = memo(() => {
7-
const data = useProEditorStore((s) => s.config, isEqual);
7+
const data = useProBuilderStore((s) => s.config, isEqual);
88

99
console.log(data);
1010
return <Button {...data} />;

docs/pro-editor/demos/buttonAsset/_Panel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { RedoOutlined, UndoOutlined } from '@ant-design/icons';
2-
import { LevaPanel, useProEditorStore } from '@ant-design/pro-editor';
2+
import { LevaPanel, useProBuilderStore } from '@ant-design/pro-editor';
33
import { Button, Divider } from 'antd';
44
import isEqual from 'fast-deep-equal';
55
import { FC, memo } from 'react';
@@ -9,8 +9,8 @@ import { shallow } from 'zustand/shallow';
99
import { ButtonConfig, buttonModel } from './models';
1010

1111
export const ButtonPanel: FC = memo(() => {
12-
const data = useProEditorStore((s) => s.config, isEqual);
13-
const [updateConfig, undo, redo, undoStack, redoStack] = useProEditorStore(
12+
const data = useProBuilderStore((s) => s.config, isEqual);
13+
const [updateConfig, undo, redo, undoStack, redoStack] = useProBuilderStore(
1414
(s) => [s.setConfig, s.undo, s.redo, s.undoStack().length, s.redoStack().length],
1515
shallow,
1616
);

docs/pro-editor/demos/buttonAssets.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/**
22
* iframe: 600
33
*/
4-
import { ComponentAsset, ProEditor } from '@ant-design/pro-editor';
4+
import { ComponentAsset, ProBuilder } from '@ant-design/pro-editor';
55

66
import { buttonAssetParams } from './buttonAsset';
77

88
const ButtonComponentAsset = new ComponentAsset(buttonAssetParams);
99

1010
export default () => (
11-
<ProEditor
11+
<ProBuilder
1212
componentAsset={ButtonComponentAsset}
1313
style={{ height: '100vh' }}
1414
__EDITOR_STORE_DEVTOOLS__={{ name: 'ButtonEditor' }}

docs/pro-editor/demos/controlledPresence.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* iframe: 800
33
*/
4-
import { AwarenessEditor, ComponentAsset, ProEditor } from '@/index';
4+
import { AwarenessEditor, ComponentAsset, ProBuilder } from '@/index';
55
import { JsonViewer } from '@textea/json-viewer';
66
import { useLocalStorageState } from 'ahooks';
77
import { Flexbox } from 'react-layout-kit';
@@ -15,7 +15,7 @@ export default () => {
1515

1616
return (
1717
<Flexbox>
18-
<ProEditor
18+
<ProBuilder
1919
componentAsset={assets}
2020
editorAwareness={presence}
2121
onEditorAwarenessChange={setPresence}

docs/pro-editor/demos/defaultAssets.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* iframe: 600
33
*/
44
import { demoAssets } from '@/ComponentAsset/demoAssets';
5-
import { ComponentAsset, ProEditor } from '@ant-design/pro-editor';
5+
import { ComponentAsset, ProBuilder } from '@ant-design/pro-editor';
66

77
export default () => (
8-
<ProEditor
8+
<ProBuilder
99
componentAsset={
1010
new ComponentAsset({
1111
...demoAssets,

docs/pro-editor/demos/empty.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* iframe: 300
33
*/
4-
import { ProEditor } from '@ant-design/pro-editor';
4+
import { ProBuilder } from '@ant-design/pro-editor';
55

6-
export default () => <ProEditor style={{ height: '100vh' }} />;
6+
export default () => <ProBuilder style={{ height: '100vh' }} />;

docs/pro-editor/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
2-
title: ProEditor 配置容器
3-
atomId: ProEditor
2+
title: ProBuilder 配置容器
3+
atomId: ProBuilder
44
group: 组件
55
nav:
66
title: 装配器
77
order: 3
88
---
99

10-
# ProEditor 装配器容器
10+
# ProBuilder 装配器容器
1111

12-
使用 ProEditor 可以快速构建出组件的配置界面。
12+
使用 ProBuilder 可以快速构建出组件的配置界面。
1313

1414
## 以 Button 示例
1515

docs/pro-editor/provider.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
title: ProEditorProvider
2+
title: ProBuilderProvider
33
group: 组件
44
---
55

6-
# ProEditorProvider
6+
# ProBuilderProvider
77

88
如果:
99

1010
- 希望在不是 ProEditor 组件子元素的组件中使用 `useProEditor`、useConfig、`useViewport` 等 ProEditor 钩子;
1111
- 在页面上有多个 ProEditor 实例;
1212
- 需要在不是 ProEditor 组件子元素的组件中访问内部状态,或使用 ProEditor 所提供的数据方法。
1313

14-
那么你就需要用 `ProEditorProvider` 包裹相应的应用组件。
14+
那么你就需要用 `ProBuilderProvider` 包裹相应的应用组件。

docs/pro-editor/usePresenceAsset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ const getPresenceAsset = () => {
2222

2323
:::warning
2424

25-
注:该 hook 只能在被 `ProEditorProvider` 包裹的组件中使用,或者在 `<ProEditor />` 组件的子组件中使用。
25+
注:该 hook 只能在被 `ProBuilderProvider` 包裹的组件中使用,或者在 `<ProEditor />` 组件的子组件中使用。
2626

2727
:::

0 commit comments

Comments
 (0)