Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vue-flow/controls

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue-flow/controls - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

./dist/vue-flow-controls.js

2

dist/vue-flow-controls.iife.js

@@ -1,1 +0,1 @@

var vueFlowControls=function(r,o,d){"use strict";const G="",_={name:"ControlButton"},h=(t,e)=>{const n=t.__vccOpts||t;for(const[s,a]of e)n[s]=a;return n},w={class:"vue-flow__controls-button"};function f(t,e,n,s,a,m){return o.openBlock(),o.createElementBlock("button",w,[o.renderSlot(t.$slots,"default")])}const l=h(_,[["render",f]]),k={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},B=[o.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function V(t,e){return o.openBlock(),o.createElementBlock("svg",k,B)}const $={render:V},p={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},C=[o.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1)];function g(t,e){return o.openBlock(),o.createElementBlock("svg",p,C)}const z={render:g},y={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},H=[o.createElementVNode("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1)];function S(t,e){return o.openBlock(),o.createElementBlock("svg",y,H)}const I={render:S},N={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},u=[o.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1)];function E(t,e){return o.openBlock(),o.createElementBlock("svg",N,u)}const b={render:E},M={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},x=[o.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1)];function F(t,e){return o.openBlock(),o.createElementBlock("svg",M,x)}const D={render:F},O={name:"Controls"},R=o.defineComponent({...O,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:()=>"bottom-left"}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(t,{emit:e}){const n=d.useVueFlow(),s=o.toRef(n,"nodesDraggable"),a=o.toRef(n,"nodesConnectable"),m=o.toRef(n,"elementsSelectable"),A=o.toRef(n,"setInteractive"),P=o.toRef(n,"zoomIn"),Z=o.toRef(n,"zoomOut"),j=o.toRef(n,"fitView"),i=o.computed(()=>s.value&&a.value&&m.value),L=()=>{P.value(),e("zoomIn")},T=()=>{Z.value(),e("zoomOut")},U=()=>{j.value(t.fitViewParams),e("fitView")},q=()=>{A.value(!i.value),e("interactionChange",!i.value)};return(c,Y)=>(o.openBlock(),o.createBlock(o.unref(d.Panel),{class:"vue-flow__controls",position:t.position},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"top"),t.showZoom?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.renderSlot(c.$slots,"control-zoom-in",{},()=>[o.createVNode(l,{class:"vue-flow__controls-zoomin",onClick:L},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"icon-zoom-in",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref($))))])]),_:3})]),o.renderSlot(c.$slots,"control-zoom-out",{},()=>[o.createVNode(l,{class:"vue-flow__controls-zoomout",onClick:T},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"icon-zoom-out",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(z))))])]),_:3})])],64)):o.createCommentVNode("",!0),t.showFitView?o.renderSlot(c.$slots,"control-fit-view",{key:1},()=>[o.createVNode(l,{class:"vue-flow__controls-fitview",onClick:U},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"icon-fit-view",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(I))))])]),_:3})]):o.createCommentVNode("",!0),t.showInteractive?o.renderSlot(c.$slots,"control-interactive",{key:2},()=>[t.showInteractive?(o.openBlock(),o.createBlock(l,{key:0,class:"vue-flow__controls-interactive",onClick:q},{default:o.withCtx(()=>[o.unref(i)?o.renderSlot(c.$slots,"icon-unlock",{key:0},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(D))))]):o.createCommentVNode("",!0),o.unref(i)?o.createCommentVNode("",!0):o.renderSlot(c.$slots,"icon-lock",{key:1},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(b))))])]),_:3})):o.createCommentVNode("",!0)]):o.createCommentVNode("",!0),o.renderSlot(c.$slots,"default")]),_:3},8,["position"]))}});return r.ControlButton=l,r.Controls=R,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r}({},Vue,VueFlow);
var vueFlowControls=function(r,o,d){"use strict";const G="",_={name:"ControlButton",compatConfig:{MODE:3}},h=(t,e)=>{const n=t.__vccOpts||t;for(const[s,a]of e)n[s]=a;return n},f={class:"vue-flow__controls-button"};function w(t,e,n,s,a,m){return o.openBlock(),o.createElementBlock("button",f,[o.renderSlot(t.$slots,"default")])}const l=h(_,[["render",w]]),k={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},p=[o.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function B(t,e){return o.openBlock(),o.createElementBlock("svg",k,p)}const V={render:B},$={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},C=[o.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1)];function g(t,e){return o.openBlock(),o.createElementBlock("svg",$,C)}const z={render:g},y={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},H=[o.createElementVNode("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1)];function S(t,e){return o.openBlock(),o.createElementBlock("svg",y,H)}const E={render:S},I={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},N=[o.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1)];function u(t,e){return o.openBlock(),o.createElementBlock("svg",I,N)}const M={render:u},b={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},D=[o.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1)];function O(t,e){return o.openBlock(),o.createElementBlock("svg",b,D)}const x={render:O},F={name:"Controls",compatConfig:{MODE:3}},R=o.defineComponent({...F,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:()=>"bottom-left"}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(t,{emit:e}){const n=d.useVueFlow(),s=o.toRef(n,"nodesDraggable"),a=o.toRef(n,"nodesConnectable"),m=o.toRef(n,"elementsSelectable"),A=o.toRef(n,"setInteractive"),P=o.toRef(n,"zoomIn"),Z=o.toRef(n,"zoomOut"),j=o.toRef(n,"fitView"),i=o.computed(()=>s.value&&a.value&&m.value),L=()=>{P.value(),e("zoomIn")},T=()=>{Z.value(),e("zoomOut")},U=()=>{j.value(t.fitViewParams),e("fitView")},q=()=>{A.value(!i.value),e("interactionChange",!i.value)};return(c,Y)=>(o.openBlock(),o.createBlock(o.unref(d.Panel),{class:"vue-flow__controls",position:t.position},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"top"),t.showZoom?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.renderSlot(c.$slots,"control-zoom-in",{},()=>[o.createVNode(l,{class:"vue-flow__controls-zoomin",onClick:L},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"icon-zoom-in",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(V))))])]),_:3})]),o.renderSlot(c.$slots,"control-zoom-out",{},()=>[o.createVNode(l,{class:"vue-flow__controls-zoomout",onClick:T},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"icon-zoom-out",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(z))))])]),_:3})])],64)):o.createCommentVNode("",!0),t.showFitView?o.renderSlot(c.$slots,"control-fit-view",{key:1},()=>[o.createVNode(l,{class:"vue-flow__controls-fitview",onClick:U},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"icon-fit-view",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(E))))])]),_:3})]):o.createCommentVNode("",!0),t.showInteractive?o.renderSlot(c.$slots,"control-interactive",{key:2},()=>[t.showInteractive?(o.openBlock(),o.createBlock(l,{key:0,class:"vue-flow__controls-interactive",onClick:q},{default:o.withCtx(()=>[o.unref(i)?o.renderSlot(c.$slots,"icon-unlock",{key:0},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(x))))]):o.createCommentVNode("",!0),o.unref(i)?o.createCommentVNode("",!0):o.renderSlot(c.$slots,"icon-lock",{key:1},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(M))))])]),_:3})):o.createCommentVNode("",!0)]):o.createCommentVNode("",!0),o.renderSlot(c.$slots,"default")]),_:3},8,["position"]))}});return r.ControlButton=l,r.Controls=R,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r}({},Vue,VueFlow);

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("@vue-flow/core");const p={name:"ControlButton"},B=(o,t)=>{const n=o.__vccOpts||o;for(const[r,s]of t)n[r]=s;return n},V={class:"vue-flow__controls-button"};function $(o,t,n,r,s,i){return e.openBlock(),e.createElementBlock("button",V,[e.renderSlot(o.$slots,"default")])}const l=B(p,[["render",$]]),C={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},g=e.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),z=[g];function y(o,t){return e.openBlock(),e.createElementBlock("svg",C,z)}const H={render:y},S={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},I=e.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1),N=[I];function E(o,t){return e.openBlock(),e.createElementBlock("svg",S,N)}const b={render:E},x={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},M=e.createElementVNode("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),D=[M];function O(o,t){return e.openBlock(),e.createElementBlock("svg",x,D)}const R={render:O},F={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},A=e.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),P=[A];function Z(o,t){return e.openBlock(),e.createElementBlock("svg",F,P)}const q={render:Z},j={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},L=e.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),T=[L];function U(o,t){return e.openBlock(),e.createElementBlock("svg",j,T)}const G={render:U},J={name:"Controls"},K=e.defineComponent({...J,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:()=>"bottom-left"}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(o,{emit:t}){const n=u.useVueFlow(),r=e.toRef(n,"nodesDraggable"),s=e.toRef(n,"nodesConnectable"),i=e.toRef(n,"elementsSelectable"),d=e.toRef(n,"setInteractive"),m=e.toRef(n,"zoomIn"),v=e.toRef(n,"zoomOut"),h=e.toRef(n,"fitView"),a=e.computed(()=>r.value&&s.value&&i.value),_=()=>{m.value(),t("zoomIn")},w=()=>{v.value(),t("zoomOut")},f=()=>{h.value(o.fitViewParams),t("fitView")},k=()=>{d.value(!a.value),t("interactionChange",!a.value)};return(c,Q)=>(e.openBlock(),e.createBlock(e.unref(u.Panel),{class:"vue-flow__controls",position:o.position},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"top"),o.showZoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(c.$slots,"control-zoom-in",{},()=>[e.createVNode(l,{class:"vue-flow__controls-zoomin",onClick:_},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"icon-zoom-in",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(H))))])]),_:3})]),e.renderSlot(c.$slots,"control-zoom-out",{},()=>[e.createVNode(l,{class:"vue-flow__controls-zoomout",onClick:w},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"icon-zoom-out",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(b))))])]),_:3})])],64)):e.createCommentVNode("",!0),o.showFitView?e.renderSlot(c.$slots,"control-fit-view",{key:1},()=>[e.createVNode(l,{class:"vue-flow__controls-fitview",onClick:f},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"icon-fit-view",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(R))))])]),_:3})]):e.createCommentVNode("",!0),o.showInteractive?e.renderSlot(c.$slots,"control-interactive",{key:2},()=>[o.showInteractive?(e.openBlock(),e.createBlock(l,{key:0,class:"vue-flow__controls-interactive",onClick:k},{default:e.withCtx(()=>[e.unref(a)?e.renderSlot(c.$slots,"icon-unlock",{key:0},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(G))))]):e.createCommentVNode("",!0),e.unref(a)?e.createCommentVNode("",!0):e.renderSlot(c.$slots,"icon-lock",{key:1},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(q))))])]),_:3})):e.createCommentVNode("",!0)]):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"default")]),_:3},8,["position"]))}});exports.ControlButton=l;exports.Controls=K;
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("@vue-flow/core");const p={name:"ControlButton",compatConfig:{MODE:3}},B=(o,t)=>{const n=o.__vccOpts||o;for(const[r,s]of t)n[r]=s;return n},V={class:"vue-flow__controls-button"};function C(o,t,n,r,s,i){return e.openBlock(),e.createElementBlock("button",V,[e.renderSlot(o.$slots,"default")])}const l=B(p,[["render",C]]),$={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},g=e.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),z=[g];function y(o,t){return e.openBlock(),e.createElementBlock("svg",$,z)}const H={render:y},S={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},E=e.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1),I=[E];function N(o,t){return e.openBlock(),e.createElementBlock("svg",S,I)}const M={render:N},b={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},x=e.createElementVNode("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),D=[x];function O(o,t){return e.openBlock(),e.createElementBlock("svg",b,D)}const R={render:O},F={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},A=e.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),P=[A];function Z(o,t){return e.openBlock(),e.createElementBlock("svg",F,P)}const q={render:Z},j={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},L=e.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),T=[L];function U(o,t){return e.openBlock(),e.createElementBlock("svg",j,T)}const G={render:U},J={name:"Controls",compatConfig:{MODE:3}},K=e.defineComponent({...J,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:()=>"bottom-left"}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(o,{emit:t}){const n=u.useVueFlow(),r=e.toRef(n,"nodesDraggable"),s=e.toRef(n,"nodesConnectable"),i=e.toRef(n,"elementsSelectable"),d=e.toRef(n,"setInteractive"),m=e.toRef(n,"zoomIn"),v=e.toRef(n,"zoomOut"),h=e.toRef(n,"fitView"),a=e.computed(()=>r.value&&s.value&&i.value),f=()=>{m.value(),t("zoomIn")},_=()=>{v.value(),t("zoomOut")},w=()=>{h.value(o.fitViewParams),t("fitView")},k=()=>{d.value(!a.value),t("interactionChange",!a.value)};return(c,Q)=>(e.openBlock(),e.createBlock(e.unref(u.Panel),{class:"vue-flow__controls",position:o.position},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"top"),o.showZoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(c.$slots,"control-zoom-in",{},()=>[e.createVNode(l,{class:"vue-flow__controls-zoomin",onClick:f},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"icon-zoom-in",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(H))))])]),_:3})]),e.renderSlot(c.$slots,"control-zoom-out",{},()=>[e.createVNode(l,{class:"vue-flow__controls-zoomout",onClick:_},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"icon-zoom-out",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(M))))])]),_:3})])],64)):e.createCommentVNode("",!0),o.showFitView?e.renderSlot(c.$slots,"control-fit-view",{key:1},()=>[e.createVNode(l,{class:"vue-flow__controls-fitview",onClick:w},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"icon-fit-view",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(R))))])]),_:3})]):e.createCommentVNode("",!0),o.showInteractive?e.renderSlot(c.$slots,"control-interactive",{key:2},()=>[o.showInteractive?(e.openBlock(),e.createBlock(l,{key:0,class:"vue-flow__controls-interactive",onClick:k},{default:e.withCtx(()=>[e.unref(a)?e.renderSlot(c.$slots,"icon-unlock",{key:0},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(G))))]):e.createCommentVNode("",!0),e.unref(a)?e.createCommentVNode("",!0):e.renderSlot(c.$slots,"icon-lock",{key:1},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(q))))])]),_:3})):e.createCommentVNode("",!0)]):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"default")]),_:3},8,["position"]))}});exports.ControlButton=l;exports.Controls=K;
{
"name": "@vue-flow/controls",
"version": "1.0.2",
"version": "1.0.3",
"private": false,

@@ -36,3 +36,3 @@ "license": "MIT",

"vue-tsc": "^1.0.24",
"@vue-flow/core": "1.12.3"
"@vue-flow/core": "1.14.3"
},

@@ -39,0 +39,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc