-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add inspector properties panel
- Loading branch information
Showing
37 changed files
with
1,145 additions
and
545 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,27 @@ | ||
<script lang="ts" setup> | ||
import { ref } from 'vue' | ||
import { ToolbarButton, ToolbarRoot, ToolbarToggleGroup } from 'radix-vue' | ||
const tabList = ref([ | ||
{ title: 'Hierarchy', key: 'hierarchy', icon: 'i-ri-node-tree' }, | ||
]) | ||
</script> | ||
|
||
<template> | ||
<AGUIPanel h="full" w="full"> | ||
<AGUIDetails title="Hierarchy"> | ||
<slot /> | ||
</AGUIDetails> | ||
<AGUITabs :list="tabList"> | ||
<AGUITabPanel> | ||
<ToolbarRoot class="flex items-center justify-center p-1"> | ||
<ToolbarToggleGroup /> | ||
<AGUIInput class="flex flex-grow" placeholder="Search" /> | ||
<ToolbarButton | ||
class="ml-1" | ||
> | ||
<AGUIIconButton size="mini" icon="i-ri-search-line" /> | ||
</ToolbarButton> | ||
</ToolbarRoot> | ||
<HierarchyView /> | ||
</AGUITabPanel> | ||
</AGUITabs> | ||
</AGUIPanel> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
<script lang="ts" setup> | ||
import { ref } from 'vue' | ||
const tabList = ref([ | ||
{ title: 'Inspector', key: 'inspector', icon: 'i-ri-information-fill' }, | ||
]) | ||
</script> | ||
|
||
<template> | ||
<AGUIPanel h="full" w="full"> | ||
<AGUIDetails w="full" title="Inspector" open> | ||
<InspectorView /> | ||
<slot /> | ||
</AGUIDetails> | ||
<AGUITabs :list="tabList"> | ||
<AGUITabPanel> | ||
<InspectorView /> | ||
</AGUITabPanel> | ||
</AGUITabs> | ||
</AGUIPanel> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<!-- eslint-disable no-console --> | ||
<script lang="ts" setup> | ||
import { ref } from 'vue' | ||
import type { TreeNode, Trees } from '@advjs/gui' | ||
import AGUITree from '@advjs/gui/client/components/tree/AGUITree.vue' | ||
const treeData = ref<Trees>([ | ||
{ | ||
name: 'Level one 1', | ||
children: [ | ||
{ | ||
name: 'Level two 1-1', | ||
children: [ | ||
{ | ||
name: 'Level three 1-1-1', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
name: 'Level one 2', | ||
visible: true, | ||
children: [ | ||
{ | ||
name: 'Level two 2-1', | ||
visible: true, | ||
children: [ | ||
{ | ||
name: 'Level three 2-1-1', | ||
}, | ||
], | ||
}, | ||
{ | ||
name: 'Level two 2-2', | ||
children: [ | ||
{ | ||
name: 'Level three 2-2-1', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
name: 'Level one 3', | ||
expanded: true, | ||
children: [ | ||
{ | ||
name: 'Level two 3-1', | ||
expanded: true, | ||
children: [ | ||
{ | ||
name: 'Level three 3-1-1', | ||
selectable: true, | ||
}, | ||
{ | ||
name: 'Level three 3-1-2 Long Name Long Name Long Name Long Name Long Name Long Name', | ||
selectable: true, | ||
}, | ||
], | ||
}, | ||
{ | ||
name: 'Level two 3-2', | ||
visible: false, | ||
children: [ | ||
{ | ||
name: 'Level three 3-2-1', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
]) | ||
function onSelected(nodes: Trees) { | ||
console.log('onSelected', nodes) | ||
} | ||
function onUnselected(nodes: Trees) { | ||
console.log('onUnselected', nodes) | ||
} | ||
function hide(nodes: Trees) { | ||
console.log('hide', nodes) | ||
} | ||
function show(nodes: Trees) { | ||
console.log('show', nodes) | ||
} | ||
function collapse(nodes: Trees) { | ||
console.log('collapse', nodes) | ||
} | ||
function expand(nodes: Trees) { | ||
console.log('expand', nodes) | ||
} | ||
function activate(node: TreeNode) { | ||
console.log('activate', node) | ||
} | ||
</script> | ||
|
||
<template> | ||
<AGUITree | ||
:data="treeData" | ||
@node-selected="onSelected" | ||
@node-unselected="onUnselected" | ||
@node-hide="hide" | ||
@node-show="show" | ||
@node-collapse="collapse" | ||
@node-expand="expand" | ||
@node-activate="activate" | ||
/> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<script lang="ts" setup> | ||
import { ref } from 'vue' | ||
import type { AGUIPropertiesPanelProps, Vector3 } from '@advjs/gui' | ||
const items = ref<AGUIPropertiesPanelProps[]>([ | ||
{ | ||
icon: 'i-mdi-axis-arrow', | ||
title: 'Transform', | ||
properties: [ | ||
{ | ||
name: 'Position', | ||
value: { | ||
x: 0, | ||
y: 0, | ||
z: 0, | ||
}, | ||
}, | ||
{ | ||
name: 'Rotation', | ||
value: { | ||
x: 0, | ||
y: 0, | ||
z: 0, | ||
}, | ||
}, | ||
{ | ||
name: 'Scale', | ||
value: { | ||
x: 0, | ||
y: 0, | ||
z: 0, | ||
}, | ||
}, | ||
], | ||
}, | ||
]) | ||
const defaultOpenItems = items.value.map(item => item.title).concat('test') | ||
const vector3 = ref<Vector3>({ | ||
x: 0, | ||
y: 0, | ||
z: 0, | ||
}) | ||
</script> | ||
|
||
<template> | ||
<AGUIAccordion type="multiple" :default-value="defaultOpenItems"> | ||
<AGUIPropertiesPanel v-for="item in items" :key="item.title" :item="item" /> | ||
<AGUIAccordionItem | ||
:item="{ | ||
icon: 'i-ri-cloud-line', | ||
title: 'test', | ||
}" | ||
> | ||
<AGUIForm> | ||
<AGUIFormItem label="Default"> | ||
<AGUIInputVector v-model="vector3" /> | ||
</AGUIFormItem> | ||
|
||
<AGUIFormItem label="Default"> | ||
<AGUICheckbox /> | ||
</AGUIFormItem> | ||
<AGUIFormItem label="Checked" description="Checked Checkbox"> | ||
<AGUICheckbox checked /> | ||
</AGUIFormItem> | ||
<AGUIFormItem label="Disabled"> | ||
<AGUICheckbox disabled /> | ||
</AGUIFormItem> | ||
</AGUIForm> | ||
</AGUIAccordionItem> | ||
</AGUIAccordion> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
028c3bb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
advjs – ./docs
advjs.vercel.app
advjs-git-main-yunyoujun.vercel.app
advjs.org
www.advjs.org
advjs-yunyoujun.vercel.app
docs.advjs.org
028c3bb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
advjs-parser – ./
advjs-parser-git-main-yunyoujun.vercel.app
parser.advjs.org
advjs-parser-yunyoujun.vercel.app
advjs-parser.vercel.app