Skip to content

Commit

Permalink
chore: upgrade deps & optimize agui
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Feb 14, 2024
1 parent 7b8b742 commit a66f1f4
Show file tree
Hide file tree
Showing 17 changed files with 1,268 additions and 679 deletions.
6 changes: 3 additions & 3 deletions demo/use-dialog-box/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
},
"dependencies": {
"@advjs/parser": "workspace:*",
"vue": "^3.4.15"
"vue": "^3.4.19"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.3",
"vite": "^5.0.12",
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.2",
"vue-tsc": "^1.8.27"
}
}
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@iconify-json/vscode-icons": "^1.1.33",
"unocss": "0.58.5",
"unplugin-vue-components": "^0.26.0",
"vite-plugin-pwa": "^0.17.5",
"vitepress": "1.0.0-rc.41"
"vite-plugin-pwa": "^0.18.1",
"vitepress": "1.0.0-rc.42"
}
}
10 changes: 5 additions & 5 deletions editor/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@advjs/editor",
"version": "0.0.0",
"private": true,
"packageManager": "[email protected].1",
"packageManager": "[email protected].2",
"description": "ADV.JS Editor",
"scripts": {
"build": "nuxi build",
Expand All @@ -21,7 +21,7 @@
},
"devDependencies": {
"@advjs/gui": "workspace:*",
"@iconify-json/carbon": "^1.1.28",
"@iconify-json/carbon": "^1.1.30",
"@iconify-json/ep": "^1.1.14",
"@iconify-json/mdi": "^1.1.64",
"@iconify-json/twemoji": "^1.1.15",
Expand All @@ -30,11 +30,11 @@
"@pinia/nuxt": "^0.5.1",
"@unocss/eslint-config": "^0.58.5",
"@unocss/nuxt": "^0.58.5",
"@vite-pwa/nuxt": "^0.4.0",
"@vite-pwa/nuxt": "^0.5.0",
"@vueuse/nuxt": "^10.7.2",
"baklavajs": "2.3.0",
"baklavajs": "2.4.0",
"consola": "^3.2.3",
"nuxt": "^3.10.0",
"nuxt": "^3.10.2",
"nuxt-monaco-editor": "git+https://github.com/jontybrook/nuxt-monaco-editor.git#patch1",
"pinia": "^2.1.7"
}
Expand Down
10 changes: 5 additions & 5 deletions editor/vrm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"nprogress": "^0.2.0",
"pinia": "^2.1.7",
"prism-theme-vars": "^0.2.4",
"vue": "^3.4.15",
"vue": "^3.4.19",
"vue-demi": "^0.14.7",
"vue-i18n": "^9.9.1",
"vue-router": "^4.2.5"
Expand All @@ -32,21 +32,21 @@
"@advjs/shared": "workspace:*",
"@advjs/types": "workspace:*",
"@advjs/unocss": "workspace:*",
"@iconify-json/carbon": "^1.1.28",
"@iconify-json/carbon": "^1.1.30",
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@types/markdown-it-link-attributes": "^3.0.4",
"@types/nprogress": "^0.2.3",
"@vitejs/plugin-vue": "^5.0.3",
"@vitejs/plugin-vue": "^5.0.4",
"critters": "^0.0.20",
"markdown-it-link-attributes": "^4.0.1",
"markdown-it-prism": "^2.3.0",
"unocss": "^0.58.5",
"unplugin-vue-components": "^0.26.0",
"unplugin-vue-markdown": "^0.26.0",
"unplugin-vue-router": "^0.7.0",
"vite": "^5.0.12",
"vite": "^5.1.2",
"vite-plugin-inspect": "^0.8.3",
"vite-plugin-pwa": "^0.17.5",
"vite-plugin-pwa": "^0.18.1",
"vite-plugin-vue-layouts": "^0.11.0",
"vite-ssg": "0.23.6"
}
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"version": "0.0.1",
"private": true,
"packageManager": "[email protected].1",
"packageManager": "[email protected].2",
"description": "面向未来与前端的 ADV 文字冒险游戏引擎。",
"author": {
"name": "YunYouJun",
Expand Down Expand Up @@ -74,9 +74,9 @@
"@antfu/ni": "^0.21.12",
"@types/fs-extra": "^11.0.4",
"@types/howler": "^2.2.11",
"@types/node": "^20.11.16",
"@types/node": "^20.11.17",
"@types/prompts": "^2.4.9",
"@types/semver": "^7.5.6",
"@types/semver": "^7.5.7",
"@types/unist": "^3.0.2",
"@types/wicg-file-system-access": "^2023.10.4",
"@types/yargs": "^17.0.32",
Expand All @@ -90,16 +90,16 @@
"eslint": "8.56.0",
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-format": "^0.1.0",
"husky": "^9.0.10",
"lint-staged": "^15.2.1",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"npm-run-all": "^4.1.5",
"rimraf": "^5.0.5",
"tsup": "^8.0.1",
"tsx": "^4.7.0",
"typedoc": "^0.25.7",
"tsup": "^8.0.2",
"tsx": "^4.7.1",
"typedoc": "^0.25.8",
"typescript": "^5.3.3",
"unbuild": "^2.0.0",
"vite": "^5.0.12",
"vite": "^5.1.2",
"vitest": "^1.2.2",
"vue-tsc": "^1.8.27"
},
Expand Down
12 changes: 6 additions & 6 deletions packages/advjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
"@advjs/types": "workspace:*",
"@antfu/ni": "^0.21.12",
"@antfu/utils": "^0.7.7",
"@iconify-json/carbon": "^1.1.28",
"@iconify-json/carbon": "^1.1.30",
"@iconify-json/ri": "^1.1.19",
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@types/mdast": "4.0.3",
"@vitejs/plugin-vue": "^5.0.3",
"c12": "^1.6.1",
"@vitejs/plugin-vue": "^5.0.4",
"c12": "^1.8.0",
"consola": "^3.2.3",
"debug": "^4.3.4",
"defu": "^6.1.4",
Expand All @@ -75,15 +75,15 @@
"resolve-from": "^5.0.0",
"resolve-global": "^2.0.0",
"sass": "^1.70.0",
"semver": "^7.5.4",
"semver": "^7.6.0",
"unocss": "^0.58.5",
"unplugin-vue-components": "^0.26.0",
"unplugin-vue-markdown": "^0.26.0",
"unplugin-vue-router": "^0.7.0",
"vite": "^5.0.12",
"vite": "^5.1.2",
"vite-plugin-vue-devtools": "^7.0.14",
"vite-plugin-vue-layouts": "^0.11.0",
"vue": "^3.4.15",
"vue": "^3.4.19",
"vue-i18n": "^9.9.1",
"vue-router": "^4.2.5",
"yargs": "^17.7.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/benchmarks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"generate:json-xml": "tsx src/json-xml/generate.ts --generate"
},
"devDependencies": {
"@faker-js/faker": "^8.4.0",
"@faker-js/faker": "^8.4.1",
"@types/xml2js": "^0.4.14",
"benny": "^3.7.1",
"consola": "^3.2.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"pinia": "^2.1.7",
"pixi.js": "8.0.0-beta.8",
"resolve": "^1.22.8",
"swiper": "^11.0.5",
"vue": "^3.4.15",
"swiper": "^11.0.6",
"vue": "^3.4.19",
"vue-router": "^4.2.5"
},
"optionalDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/gui/client/components/accordion/AGUIAccordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ withDefaults(
} & Partial<AccordionRootProps>>(),
{
type: 'multiple',
defaultValue: '',
},
)
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ defineProps<{
:value="subItem.label"
>
<ContextMenuItemIndicator class="ContextMenuItemIndicator">
<Icon icon="radix-icons:dot-filled" />
<div class="i-radix-icons:dot-filled" />
</ContextMenuItemIndicator>
{{ subItem.label }}
</ContextMenuRadioItem>
Expand Down Expand Up @@ -70,7 +70,7 @@ defineProps<{
>
{{ item.label }}
<div class="RightSlot">
<Icon icon="radix-icons:chevron-right" />
<div class="i-radix-icons:chevron-right" />
</div>
</ContextMenuSubTrigger>
<ContextMenuPortal>
Expand Down
13 changes: 6 additions & 7 deletions packages/gui/client/components/menu/AGUIMenubar.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup lang="ts">
import { Icon } from '@iconify/vue'
import { ref } from 'vue'
import {
MenubarCheckboxItem,
Expand Down Expand Up @@ -91,7 +90,7 @@ export interface Menu {
<div
class="RightSlot"
>
<Icon icon="radix-icons:chevron-right" />
<div class="i-radix-icons:chevron-right" />
</div>
</MenubarSubTrigger>
<MenubarPortal>
Expand Down Expand Up @@ -168,7 +167,7 @@ export interface Menu {
<div
class="RightSlot"
>
<Icon icon="radix-icons:chevron-right" />
<div class="i-radix-icons:chevron-right" />
</div>
</MenubarSubTrigger>

Expand Down Expand Up @@ -239,7 +238,7 @@ export interface Menu {
class="MenubarCheckboxItem"
>
<MenubarItemIndicator class="MenubarItemIndicator">
<Icon icon="radix-icons:check" />
<div class="i-radix-icons:check" />
</MenubarItemIndicator>
Show Bookmarks
<div
Expand All @@ -253,7 +252,7 @@ export interface Menu {
class="MenubarCheckboxItem"
>
<MenubarItemIndicator class="MenubarItemIndicator">
<Icon icon="radix-icons:check" />
<div class="i-radix-icons:check" />
</MenubarItemIndicator>
Show Full URLs
</MenubarCheckboxItem>
Expand Down Expand Up @@ -310,7 +309,7 @@ export interface Menu {
value="pedro"
>
<MenubarItemIndicator class="MenubarItemIndicator">
<Icon icon="radix-icons:dot-filled" />
<div class="i-radix-icons:dot-filled" />
</MenubarItemIndicator>
Pedro Duarte
</MenubarRadioItem>
Expand All @@ -319,7 +318,7 @@ export interface Menu {
value="colm"
>
<MenubarItemIndicator class="MenubarItemIndicator">
<Icon icon="radix-icons:dot-filled" />
<div class="i-radix-icons:dot-filled" />
</MenubarItemIndicator>
Colm Tuite
</MenubarRadioItem>
Expand Down
11 changes: 5 additions & 6 deletions packages/gui/client/components/select/AGUISelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
SelectValue,
SelectViewport,
} from 'radix-vue'
import { Icon } from '@iconify/vue'
type OptionType = string | { value: string, label?: string, icon?: string }
Expand Down Expand Up @@ -43,7 +42,7 @@ function onUpdateModelValue(value: string) {
:aria-label="placeholder"
>
<SelectValue :placeholder="placeholder" />
<Icon icon="radix-icons:chevron-down" op="60" />
<div class="i-radix-icons:chevron-down" op="60" />
</SelectTrigger>

<SelectPortal>
Expand All @@ -52,7 +51,7 @@ function onUpdateModelValue(value: string) {
side="bottom"
>
<SelectScrollUpButton class="SelectScrollButton">
<Icon icon="radix-icons:chevron-up" />
<div class="i-radix-icons:chevron-up" />
</SelectScrollUpButton>

<SelectViewport class="agui-select-viewport">
Expand All @@ -70,7 +69,7 @@ function onUpdateModelValue(value: string) {
:value="option"
>
<SelectItemIndicator class="agui-select-item-indicator">
<Icon icon="radix-icons:check" />
<div class="i-radix-icons:check" />
</SelectItemIndicator>
<SelectItemText>
{{ option }}
Expand All @@ -83,7 +82,7 @@ function onUpdateModelValue(value: string) {
:value="option.value"
>
<SelectItemIndicator class="agui-select-item-indicator">
<Icon icon="radix-icons:check" />
<div class="i-radix-icons:check" />
</SelectItemIndicator>
<div mr-1 :class="option.icon" />
<SelectItemText>
Expand All @@ -95,7 +94,7 @@ function onUpdateModelValue(value: string) {
</SelectViewport>

<SelectScrollDownButton class="SelectScrollButton agui-select-scroll-button">
<Icon icon="radix-icons:chevron-down" />
<div class="i-radix-icons:chevron-down" />
</SelectScrollDownButton>
</SelectContent>
</SelectPortal>
Expand Down
25 changes: 24 additions & 1 deletion packages/gui/client/components/toolbar/AGUIToolbar.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<script lang="ts" setup>
import { ToolbarButton, ToolbarRoot, ToolbarSeparator } from 'radix-vue'
import { ToggleGroupItem, ToggleGroupRoot, ToolbarButton, ToolbarRoot, ToolbarSeparator } from 'radix-vue'
import type { ToolbarItem } from './types'
defineProps<{
items: ToolbarItem[]
}>()
const toggleGroupItemClasses
= 'cursor-pointer bg-dark-200 shadow hover:bg-dark-100 text-mauve11 flex w-8 items-center justify-center text-base leading-4 first:rounded-l last:rounded-r focus:z-10 shadow focus:shadow-[0_0_0_1px] focus:shadow-dark-600 focus:outline-none'
</script>

<template>
Expand All @@ -25,6 +29,7 @@ defineProps<{
v-else-if="item.type === 'button'"
:key="item.name"
class="agui-button h-20px"
:title="item.title"
@click="item.onClick"
>
<div
Expand All @@ -35,6 +40,24 @@ defineProps<{
{{ item.name }}
</span>
</ToolbarButton>

<ToggleGroupRoot
v-else-if="item.type === 'toggle-group'"
:key="`group:${item.name}`"
v-model="item.value"
class="flex"
>
<ToggleGroupItem
v-for="bItem in item.children"
:key="bItem.value"
:value="bItem.value"
:aria-label="bItem.label"
:class="`${bItem.class} ${toggleGroupItemClasses}`"
@click="bItem.onClick"
>
<div :class="bItem.icon" class="h-[15px] w-[15px]" />
</ToggleGroupItem>
</ToggleGroupRoot>
</template>
</ToolbarRoot>
</template>
Loading

0 comments on commit a66f1f4

Please sign in to comment.