Skip to content

Commit

Permalink
chore: update version
Browse files Browse the repository at this point in the history
  • Loading branch information
ckvv committed Mar 26, 2024
1 parent 6f89e18 commit 907edbc
Show file tree
Hide file tree
Showing 30 changed files with 1,238 additions and 1,028 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,3 @@ import { VButton } from '@ckpack/v-ui';
</VButton>
</template>
```

3 changes: 3 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { mdDemoPlugin } from './plugins';

export default defineConfig({
vite: {
ssr: {
noExternal: ['@vue/repl'],
},
resolve: {
alias: {
...alias,
Expand Down
5 changes: 3 additions & 2 deletions docs/.vitepress/plugins/demo-block.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { computed, ref } from 'vue';
import { ReplStore } from '@vue/repl';
import { useStore } from '@vue/repl';
const props = defineProps({
description: {
Expand Down Expand Up @@ -28,7 +28,8 @@ const editLink = computed(() => decodeURIComponent(props.editLink));
const openlink = url => window.open(url);
const store = new ReplStore();
const store = useStore();
// const store = new ReplStore();
store.setFiles({ 'src/App.vue': decodeURIComponent(code.value) });
</script>

Expand Down
37 changes: 17 additions & 20 deletions docs/.vitepress/plugins/repl-wrapper.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup>
import '@vue/repl/style.css';
import { watchEffect } from 'vue';
import { Repl, ReplStore } from '@vue/repl';
import { ref, watchEffect } from 'vue';
import { Repl, useStore, useVueImportMap } from '@vue/repl';
import CodeMirror from '@vue/repl/codemirror-editor';
// import Monaco from '@vue/repl/monaco-editor';
Expand All @@ -15,32 +15,29 @@ setVH();
const query = new URLSearchParams(location.search);
const defaultSerializedState = 'eNp9kc1uwyAQhF8l4pyYQ26RFfUvh/bQVm2PXFy8cYjxgmBxLUV+92LcuG4V5YZmhuHb5cRurc3aAGzDcoLG6oJgK3CxyNvVZyAyuH2AfRE05XxSBOZ8FmZLphprHK2awmZHbzC2nYYS8WN4wTaLpAzajaxtIevYF9RgCHYgsn7DuSwx3i9Bq9ZlCMTRNnwe56XylE4xJ9jQ2AvsIwF5aXCvqn/vS9NYpcG9WFIG/3IUWpuvp6SRC7A86/IAsr6gH3034r468OBaEGzyqHAV0Gjv3p+hi+fJbEwZdExfMd/AGx0GxjF2F7CM2LNcon1M61RYffhdR4D+PNQAmraR8oLFL72/Mvov7jpbT1vsvwGBTq3o';
const store = new ReplStore({
// initialize repl with previously serialized state
serializedState: location.hash.slice(1) || defaultSerializedState,
const {
importMap: builtinImportMap,
vueVersion,
productionMode,
} = useVueImportMap({});
builtinImportMap.value.imports['@ckpack/v-ui'] = 'https://cdn.jsdelivr.net/npm/@ckpack/v-ui@latest/dist/v-ui.js';
const store = useStore({
builtinImportMap,
vueVersion,
productionMode,
// starts on the output pane (mobile only) if the URL has a showOutput query
showOutput: query.has('showOutput'),
showOutput: ref(query.has('showOutput')),
// starts on a different tab on the output pane if the URL has a outputMode query
// and default to the "preview" tab
outputMode: query.get('outputMode') || 'preview',
// specify the default URL to import Vue runtime from in the sandbox
// default is the CDN link from jsdelivr.com with version matching Vue's version
// from peerDependency
// defaultVueRuntimeURL: 'cdn link to vue.runtime.esm-browser.js',
});
outputMode: ref(query.get('outputMode') || 'preview'),
}, location.hash.slice(1) || defaultSerializedState);
// persist state to URL hash
watchEffect(() => history.replaceState({}, '', store.serialize()));
// pre-set import map
store.setImportMap({
imports: {
'@ckpack/v-ui': 'https://cdn.jsdelivr.net/npm/@ckpack/v-ui@latest/dist/v-ui.js',
},
});
const previewOptions = {
customCode: {
importCode: 'import VUI from \'@ckpack/v-ui\';',
Expand Down
2 changes: 0 additions & 2 deletions docs/compoents/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<<< @/_demos/button/outlined.vue
--demo 使用 `outlined` 定义轮廓按钮(中强调)。由于轮廓的缘故,比文本按钮更强调。


## 调整尺寸
<<< @/_demos/button/size.vue
--demo 使用 `size` 调整按钮尺寸, 可使用`small`,`medium`,`large`三种值
Expand Down Expand Up @@ -53,4 +52,3 @@
| 插槽名 | 描述 |
| :----- | :------- |
| default | 默认插槽 |

2 changes: 0 additions & 2 deletions docs/compoents/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
| :----- | :------- |
| default | 默认插槽 |


## Form Item API

### Form Item 属性
Expand All @@ -47,4 +46,3 @@
| 插槽名 | 描述 |
| :----- | :------- |
| default | 默认插槽 |

6 changes: 0 additions & 6 deletions docs/compoents/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ svg {
```
:::


## 基础用法

<<< @/_demos/icon/svg.vue
Expand Down Expand Up @@ -71,7 +70,6 @@ svg {
| hover-color | 图标悬停颜色 | `string` | 继承颜色
| cursor | 图标光标 | `string` | default


## 其他

### 使用 [iconfont](https://www.iconfont.cn/)
Expand All @@ -85,7 +83,3 @@ svg {
+ 传入引用图标的`Symbol`
<<< @/_demos/icon/iconfont.vue
1 change: 0 additions & 1 deletion docs/compoents/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@
| 插槽名 | 描述 |
| :----- | :------- |
| default | 默认插槽 |

1 change: 0 additions & 1 deletion docs/compoents/space.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@
| 插槽名 | 描述 |
| :----- | :------- |
| default | 默认插槽 |

1 change: 0 additions & 1 deletion docs/compoents/theme-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<<< @/_demos/theme-provider/base.vue
--demo 一般无需直接使用`theme-provider`, 使用`config-provider`即可配置。


## API

### theme-provider 属性
Expand Down
3 changes: 1 addition & 2 deletions docs/en/compoents/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ this is a button
<<< @/_demos/button/outlined.vue
--demo Use `outlined` to define outlined buttons (middle emphasis). More emphasis than text buttons because of the outline.


## Resize
<<< @/_demos/button/size.vue
--demo Use `size` to adjust the button size, you can use `small`, `medium`, `large` three values
Expand Down Expand Up @@ -52,4 +51,4 @@ property name | description | type | default value |

| Slot Name | Description |
| :----- | :------- |
| default | default slot |
| default | default slot |
2 changes: 1 addition & 1 deletion docs/en/compoents/config-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ property name | description | type | default value |

| Slot Name | Description |
| :----- | :------- |
| default | default slot |
| default | default slot |
4 changes: 1 addition & 3 deletions docs/en/compoents/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ svg {
```
:::


## Basic usage

<<< @/_demos/icon/svg.vue
Expand Down Expand Up @@ -71,7 +70,6 @@ property name | description | type | default value |
| hover-color | icon hover color | `string` | inherited color
| cursor | icon cursor | `string` | default


## other

### Use [iconfont](https://www.iconfont.cn/)
Expand All @@ -84,4 +82,4 @@ property name | description | type | default value |
+ Pass in the `Symbol` that refers to the icon
<<< @/_demos/icon/iconfont.vue
<<< @/_demos/icon/iconfont.vue
2 changes: 1 addition & 1 deletion docs/en/compoents/space.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ property name | description | type | default value |

| Slot Name | Description |
| :----- | :------- |
| default | default slot |
| default | default slot |
3 changes: 1 addition & 2 deletions docs/en/compoents/theme-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ The style of the component injected by `theme-provider`, because the same compon
<<< @/_demos/theme-provider/base.vue
--demo generally does not need to use `theme-provider` directly, use `config-provider` to configure.


## API

### theme-provider attribute
Expand All @@ -18,4 +17,4 @@ none

| Slot Name | Description |
| :----- | :------- |
| default | default slot |
| default | default slot |
3 changes: 1 addition & 2 deletions docs/en/guide/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
+ npm: https://www.npmjs.com/package/@ckpack/v-ui
+ CDN: https://cdn.jsdelivr.net/npm/@ckpack/v-ui@latest/


## Script commands

```shell
Expand Down Expand Up @@ -46,4 +45,4 @@ npm run docs:serve
`@ant-design/colors`, `@emotion/css`
### devDependencies

`@antfu/eslint-config`, `@commitlint/cli`, `@commitlint/config-conventional`, `@vitejs/plugin-vue`, `@vue/tsconfig`, `eslint`, `fast-glob` , `husky`, `lint-staged`, `standard-version`, `tsx`, `typescript`, `vite`, `vite-plugin-dts`, `vitepress` , `vue`
`@antfu/eslint-config`, `@commitlint/cli`, `@commitlint/config-conventional`, `@vitejs/plugin-vue`, `@vue/tsconfig`, `eslint`, `fast-glob` , `husky`, `lint-staged`, `standard-version`, `tsx`, `typescript`, `vite`, `vite-plugin-dts`, `vitepress` , `vue`
2 changes: 1 addition & 1 deletion docs/en/guide/base/conflict.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ app.mount('#app');
</v-button>
</v-config-provider>
</template>
```
```
2 changes: 1 addition & 1 deletion docs/en/guide/base/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ You can also import directly through the browser's `script` tag.
See the Pen <a href="https://codepen.io/chenkai0520/pen/wvxKYWj">
@ckpack/v-ui</a> by chenkai (<a href="https://codepen.io/chenkai0520">@chenkai0520</a>)
on <a href="https://codepen.io">CodePen</a>.
</iframe>
</iframe>
2 changes: 1 addition & 1 deletion docs/en/guide/base/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ import { themes } from '@ckpack/v-ui';
</v-button>
</v-config-provider>
</template>
```
```
2 changes: 1 addition & 1 deletion docs/en/guide/base/token.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ The `@ckpack/v-ui` component internally uses `token` to generate a series of CSS
--v-color-primary-active: #6842cf;
}
```
:::
:::
2 changes: 1 addition & 1 deletion docs/en/guide/custom-develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ Add a document corresponding to the component name under the `docs/guide/compone

<<< @/_demos/button/theme.vue
--demo define button theme color by `theme`
```
```
2 changes: 1 addition & 1 deletion docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ features:
details: 🔨 Define component prefixes, CSS variable prefixes, and CSS class prefixes through configuration to avoid component name or style conflicts
- title: Fully Shakeable Tree
details: 💪 All components support on-demand loading by default
---
---
2 changes: 1 addition & 1 deletion docs/en/play.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
layout: home
---
<repl-wrapper />
<repl-wrapper />
3 changes: 1 addition & 2 deletions docs/guide/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
+ npm: https://www.npmjs.com/package/@ckpack/v-ui
+ CDN: https://cdn.jsdelivr.net/npm/@ckpack/v-ui@latest/


## 脚本命令

```shell
Expand Down Expand Up @@ -46,4 +45,4 @@ npm run docs:serve
`@ant-design/colors``@emotion/css`
### devDependencies

`@antfu/eslint-config``@commitlint/cli``@commitlint/config-conventional``@vitejs/plugin-vue``@vue/tsconfig``eslint``fast-glob``husky``lint-staged``standard-version``tsx``typescript``vite``vite-plugin-dts``vitepress``vue`
`@antfu/eslint-config``@commitlint/cli``@commitlint/config-conventional``@vitejs/plugin-vue``@vue/tsconfig``eslint``fast-glob``husky``lint-staged``standard-version``tsx``typescript``vite``vite-plugin-dts``vitepress``vue`
2 changes: 0 additions & 2 deletions docs/guide/base/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,3 @@ import { themes } from '@ckpack/v-ui';
</v-config-provider>
</template>
```


2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ features:
details: 🔨 通过配置定义组件前缀、CSS变量前缀、CSS类前缀,避免组件名称或样式冲突
- title: 完全的可摇树
details: 💪 所有组件默认即支持按需加载
---
---
2 changes: 1 addition & 1 deletion docs/play.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
layout: home
---
<repl-wrapper />
<repl-wrapper />
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,27 @@
"vue": "^3.3.x"
},
"dependencies": {
"@ant-design/colors": "^7.0.0",
"@ant-design/colors": "^7.0.2",
"@emotion/css": "^11.11.2",
"async-validator": "^4.2.5"
},
"devDependencies": {
"@antfu/eslint-config": "2.1.1",
"@antfu/eslint-config": "2.9.0",
"@types/node": "^20.x",
"@vitejs/plugin-vue": "^4.5.0",
"@vue/repl": "^2.8.1",
"@vue/tsconfig": "^0.4.0",
"eslint": "^8.54.0",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/repl": "^4.1.1",
"@vue/tsconfig": "^0.5.1",
"eslint": "^8.57.0",
"fast-glob": "^3.3.2",
"lint-staged": "^15.1.0",
"simple-git-hooks": "^2.9.0",
"lint-staged": "^15.2.2",
"simple-git-hooks": "^2.11.1",
"standard-version": "^9.5.0",
"tsx": "^4.6.0",
"typescript": "5.3.2",
"vite": "^5.0.3",
"vite-plugin-dts": "3.6.3",
"vitepress": "1.0.0-rc.31",
"vue": "^3.3.9"
"tsx": "^4.7.1",
"typescript": "5.4.3",
"vite": "^5.2.6",
"vite-plugin-dts": "3.7.3",
"vitepress": "1.0.1",
"vue": "^3.4.21"
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged",
Expand Down
Loading

0 comments on commit 907edbc

Please sign in to comment.