Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Oct 10, 2022

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.

Releases

vueflow@1.0.0

Major Changes

  • #311 e175cf81 Thanks @bcakmakoglu! - # What's changed?

    • Add vueflow pkg that exports all features
    <script setup>
    // `vueflow` pkg exports all features, i.e. core + additional components
    import { VueFlow, Background, MiniMap, Controls } from 'vueflow'
    </script>
    
    <template>
      <VueFlow>
        <Background />
        <MiniMap />
        <Controls />
      </VueFlow>
    </template>

    Chores

    • Rename core pkg directory to core from vue-flow
    • Rename bundle outputs

Patch Changes

@vue-flow/additional-components@1.1.0

Minor Changes

  • #311 2e2c449b Thanks @bcakmakoglu! - # What's changed?

    • Add Panel component
      • Wrap MiniMap and Controls with Panel
    • Add position prop to MiniMap and Controls
      Example:
    <VueFlow v-model="elements">
      <MiniMap position="top-right" />
      <Controls position="top-left" />
    </VueFlow>

    Bugfixes

    • Fix MiniMap and Controls cancelling selections

Patch Changes

  • #311 e175cf81 Thanks @bcakmakoglu! - # What's changed?

    • Add vueflow pkg that exports all features
    <script setup>
    // `vueflow` pkg exports all features, i.e. core + additional components
    import { VueFlow, Background, MiniMap, Controls } from 'vueflow'
    </script>
    
    <template>
      <VueFlow>
        <Background />
        <MiniMap />
        <Controls />
      </VueFlow>
    </template>

    Chores

    • Rename core pkg directory to core from vue-flow
    • Rename bundle outputs

@vue-flow/core@1.1.0

Minor Changes

  • #311 78f9ee1c Thanks @bcakmakoglu! - # What's changed?

    • Add HandleConnectable type
    • Update connectable prop of Handle to HandleConnectable type
    • Allow to specify if Handles are connectable
      • any number of connections
      • none
      • single connection
      • or a cb to determine whether the Handle is connectable

    Example:

    <script lang="ts" setup>
      import { Handle, HandleConnectable } from '@vue-flow/core'
    
      const handleConnectable: HandleConnectable = (node, connectedEdges) => {
        console.log(node, connectedEdges)
        return true
      }
    </script>
    <template>
      <!-- single connection -->
      <Handle type="target" position="left" connectable="single" />
      <div>Custom Node</div>
      <!-- cb -->
      <Handle id="a" position="right" :connectable="handleConnectable" />
    </template>
    • Update node.connectable prop to HandleConnectable

    For Example:

    const nodes = ref([
      {
        id: '1',
        position: { x: 0, y: 0 },
        connectable: 'single', // each handle is only connectable once (default node for example)
      },
      {
        id: '2',
        position: { x: 200, y: 0 },
        connectable: (node, connectedEdges) => {
          return true // will allow any number of connections
        },
      },
      {
        id: '3',
        position: { x: 400, y: 0 },
        connectable: true, // will allow any number of connections
      },
      {
        id: '4',
        position: { x: 200, y: 0 },
        connectable: false, // will disable handles
      },
    ])

Patch Changes

  • #311 e175cf81 Thanks @bcakmakoglu! - # What's changed?

    • Add vueflow pkg that exports all features
    <script setup>
    // `vueflow` pkg exports all features, i.e. core + additional components
    import { VueFlow, Background, MiniMap, Controls } from 'vueflow'
    </script>
    
    <template>
      <VueFlow>
        <Background />
        <MiniMap />
        <Controls />
      </VueFlow>
    </template>

    Chores

    • Rename core pkg directory to core from vue-flow
    • Rename bundle outputs
  • #311 e1c28a26 Thanks @bcakmakoglu! - # What's changed?

    • Simplify useHandle usage
    • Pass props to the composable as possible refs
      • Still returns onClick & onMouseDown handlers but only expects mouse event now

    Before:

    <script lang="ts" setup>
    import { useHandle, NodeId } from '@vue-flow/core'
    
    const nodeId = inject(NodeId)
    
    const handleId = 'my-handle'
    
    const type = 'source'
    
    const isValidConnection = () => true
    
    const { onMouseDown } = useHandle()
    
    const onMouseDownHandler = (event: MouseEvent) => {
      onMouseDown(event, handleId, nodeId, type === 'target', isValidConnection, undefined)
    }
    </script>
    
    <template>
      <div @mousedown="onMouseDownHandler" />
    </template>

    After:

    <script lang="ts" setup>
    import { useHandle, useNode } from '@vue-flow/core'
    
    const { nodeId } = useNode()
    
    const handleId = 'my-handle'
    
    const type = 'source'
    
    const isValidConnection = () => true
    
    const { onMouseDown } = useHandle({
      nodeId,
      handleId,
      isValidConnection,
      type,
    })
    </script>
    
    <template>
      <div @mousedown="onMouseDown" />
    </template>
  • #311 08ad1735 Thanks @bcakmakoglu! - # Bugfixes

    • Edges not returned by getter when paneReady event is triggered

@vercel
Copy link

vercel bot commented Oct 10, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
vue-flow-docs ✅ Ready (Inspect) Visit Preview Oct 10, 2022 at 7:41PM (UTC)
vue-flow-typedoc ✅ Ready (Inspect) Visit Preview Oct 10, 2022 at 7:41PM (UTC)

@github-actions github-actions bot force-pushed the changeset-release/master branch from 6b3d8af to db0740c Compare October 10, 2022 19:39
@vercel vercel bot temporarily deployed to Preview – vue-flow-typedoc October 10, 2022 19:40 Inactive
@bcakmakoglu bcakmakoglu merged commit d224d59 into master Oct 10, 2022
@bcakmakoglu bcakmakoglu deleted the changeset-release/master branch October 10, 2022 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Related to a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants