Skip to content

Commit

Permalink
Fix docs, export ContextMenu component
Browse files Browse the repository at this point in the history
  • Loading branch information
newcat committed Jan 2, 2024
1 parent d5c0419 commit f72d153
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 19 deletions.
4 changes: 2 additions & 2 deletions packages/renderer-vue/src/components.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export { default as Minimap } from "./components/Minimap.vue";
export { default as Connection } from "./connection/ConnectionView.vue";
export { default as ConnectionWrapper } from "./connection/ConnectionWrapper.vue";
export { default as TemporaryConnection } from "./connection/TemporaryConnection.vue";
export { ContextMenu } from "./contextmenu";
export { default as Node } from "./node/Node.vue";
export { default as NodeInterface } from "./node/NodeInterface.vue";
export { default as NodePalette } from "./nodepalette/NodePalette.vue";
export { default as ContextMenu } from "./components/ContextMenu.vue";
export { default as Minimap } from "./components/Minimap.vue";
export { default as Sidebar } from "./sidebar/Sidebar.vue";
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,9 @@
</template>

<script setup lang="ts">
import { computed, Ref, ref, watch } from "vue";
import { computed, ref, watch } from "vue";
import { onClickOutside } from "@vueuse/core";
export interface IMenuItem {
label?: string;
value?: any;
isDivider?: boolean;
submenu?: IMenuItem[];
disabled?: boolean | Readonly<Ref<boolean>>;
}
import { IMenuItem } from "./types";
const props = withDefaults(
defineProps<{
Expand Down
2 changes: 2 additions & 0 deletions packages/renderer-vue/src/contextmenu/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as ContextMenu } from "./ContextMenu.vue";
export * from "./types";
9 changes: 9 additions & 0 deletions packages/renderer-vue/src/contextmenu/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { Ref } from "vue";

export interface IMenuItem {
label?: string;
value?: any;
isDivider?: boolean;
submenu?: IMenuItem[];
disabled?: boolean | Readonly<Ref<boolean>>;
}
6 changes: 3 additions & 3 deletions packages/renderer-vue/src/editor/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ import { computed, provide, Ref, ref, toRef } from "vue";
import { AbstractNode } from "@baklavajs/core";
import { IBaklavaViewModel } from "../viewModel";
import { providePlugin, useDragMove } from "../utility";
import { usePanZoom } from "./panZoom";
import { useTemporaryConnection } from "./temporaryConnection";
import { useContextMenu } from "../contextMenu";
import { providePlugin, useDragMove } from "../utility";
import { useContextMenu } from "./contextMenu";
import Background from "./Background.vue";
import Node from "../node/Node.vue";
Expand All @@ -103,7 +103,7 @@ import Sidebar from "../sidebar/Sidebar.vue";
import Minimap from "../components/Minimap.vue";
import NodePalette from "../nodepalette/NodePalette.vue";
import Toolbar from "../toolbar/Toolbar.vue";
import ContextMenu from "../components/ContextMenu.vue";
import ContextMenu from "../contextmenu/ContextMenu.vue";
const props = defineProps<{ viewModel: IBaklavaViewModel }>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Ref, computed, ref, reactive } from "vue";
import { AbstractNode } from "@baklavajs/core";
import { IMenuItem } from "./components/ContextMenu.vue";
import { IBaklavaViewModel } from "./viewModel";
import { useNodeCategories, useTransform } from "./utility";
import { IMenuItem } from "../contextmenu";
import { IBaklavaViewModel } from "../viewModel";
import { useNodeCategories, useTransform } from "../utility";

export function useContextMenu(viewModel: Ref<IBaklavaViewModel>) {
const show = ref(false);
Expand Down
2 changes: 1 addition & 1 deletion packages/renderer-vue/src/node/Node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import { ref, computed, nextTick, onUpdated, onMounted, onBeforeUnmount } from "
import { AbstractNode, GRAPH_NODE_TYPE_PREFIX, IGraphNode } from "@baklavajs/core";
import { useGraph, useViewModel } from "../utility";
import ContextMenu from "../components/ContextMenu.vue";
import { ContextMenu } from "../contextmenu";
import VerticalDots from "../icons/VerticalDots.vue";
import NodeInterface from "./NodeInterface.vue";
Expand Down
2 changes: 1 addition & 1 deletion packages/renderer-vue/src/nodepalette/PaletteEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import { computed, defineComponent, ref } from "vue";
import { GRAPH_NODE_TYPE_PREFIX } from "@baklavajs/core";
import ContextMenu, { IMenuItem } from "../components/ContextMenu.vue";
import { IMenuItem, ContextMenu } from "../contextmenu";
import VerticalDots from "../icons/VerticalDots.vue";
import { useGraph, useViewModel } from "../utility";
Expand Down

0 comments on commit f72d153

Please sign in to comment.