@vue-flow/controls
Advanced tools
Comparing version 1.0.6 to 1.1.0
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("@vue-flow/core");const k={name:"ControlButton",compatConfig:{MODE:3}},p=(o,t)=>{const c=o.__vccOpts||o;for(const[l,s]of t)c[l]=s;return c},B={class:"vue-flow__controls-button"};function V(o,t,c,l,s,u){return e.openBlock(),e.createElementBlock("button",B,[e.renderSlot(o.$slots,"default")])}const r=p(k,[["render",V]]),C={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},$=e.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),g=[$];function z(o,t){return e.openBlock(),e.createElementBlock("svg",C,g)}const y={render:z},H={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},S=e.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1),E=[S];function N(o,t){return e.openBlock(),e.createElementBlock("svg",H,E)}const I={render:N},M={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",M,D)}const b={render:O},P={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},F=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),A=[F];function Z(o,t){return e.openBlock(),e.createElementBlock("svg",P,A)}const q={render:Z},L={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},j=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=[j];function U(o,t){return e.openBlock(),e.createElementBlock("svg",L,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:i.PanelPosition.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(o,{emit:t}){const{nodesDraggable:c,nodesConnectable:l,elementsSelectable:s,setInteractive:u,zoomIn:d,zoomOut:m,fitView:h}=i.useVueFlow(),a=e.computed(()=>c.value&&l.value&&s.value);function v(){d(),t("zoomIn")}function w(){m(),t("zoomOut")}function _(){h(o.fitViewParams),t("fitView")}function f(){u(!a.value),t("interactionChange",!a.value)}return(n,Q)=>(e.openBlock(),e.createBlock(e.unref(i.Panel),{class:"vue-flow__controls",position:o.position},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"top"),o.showZoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(n.$slots,"control-zoom-in",{},()=>[e.createVNode(r,{class:"vue-flow__controls-zoomin",onClick:v},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-zoom-in",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y))))])]),_:3})]),e.renderSlot(n.$slots,"control-zoom-out",{},()=>[e.createVNode(r,{class:"vue-flow__controls-zoomout",onClick:w},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-zoom-out",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(I))))])]),_:3})])],64)):e.createCommentVNode("",!0),o.showFitView?e.renderSlot(n.$slots,"control-fit-view",{key:1},()=>[e.createVNode(r,{class:"vue-flow__controls-fitview",onClick:_},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-fit-view",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(b))))])]),_:3})]):e.createCommentVNode("",!0),o.showInteractive?e.renderSlot(n.$slots,"control-interactive",{key:2},()=>[o.showInteractive?(e.openBlock(),e.createBlock(r,{key:0,class:"vue-flow__controls-interactive",onClick:f},{default:e.withCtx(()=>[e.unref(a)?e.renderSlot(n.$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(n.$slots,"icon-lock",{key:1},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(q))))])]),_:3})):e.createCommentVNode("",!0)]):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")]),_:3},8,["position"]))}});exports.ControlButton=r;exports.Controls=K; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("@vue-flow/core");const $={name:"ControlButton",compatConfig:{MODE:3}},g=(o,t)=>{const c=o.__vccOpts||o;for(const[r,s]of t)c[r]=s;return c},z={class:"vue-flow__controls-button"};function y(o,t,c,r,s,u){return e.openBlock(),e.createElementBlock("button",z,[e.renderSlot(o.$slots,"default")])}const l=g($,[["render",y]]),H={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},S=e.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),E=[S];function N(o,t){return e.openBlock(),e.createElementBlock("svg",H,E)}const x={render:N},I={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},M=e.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1),b=[M];function D(o,t){return e.openBlock(),e.createElementBlock("svg",I,b)}const O={render:D},Z={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},P=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),F=[P];function A(o,t){return e.openBlock(),e.createElementBlock("svg",Z,F)}const q={render:A},L={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},R=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),j=[R];function T(o,t){return e.openBlock(),e.createElementBlock("svg",L,j)}const U={render:T},G={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},J=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),K=[J];function Q(o,t){return e.openBlock(),e.createElementBlock("svg",G,K)}const W={render:Q},X={name:"Controls",compatConfig:{MODE:3}},Y=e.defineComponent({...X,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:i.PanelPosition.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(o,{emit:t}){const{nodesDraggable:c,nodesConnectable:r,elementsSelectable:s,setInteractive:u,zoomIn:m,zoomOut:v,fitView:h,viewport:d,minZoom:w,maxZoom:f}=i.useVueFlow(),a=e.computed(()=>c.value||r.value||s.value),_=e.computed(()=>d.value.zoom<=w.value),p=e.computed(()=>d.value.zoom>=f.value);function k(){m(),t("zoomIn")}function B(){v(),t("zoomOut")}function V(){h(o.fitViewParams),t("fitView")}function C(){u(!a.value),t("interactionChange",!a.value)}return(n,ee)=>(e.openBlock(),e.createBlock(e.unref(i.Panel),{class:"vue-flow__controls",position:o.position},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"top"),o.showZoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(n.$slots,"control-zoom-in",{},()=>[e.createVNode(l,{class:"vue-flow__controls-zoomin",disabled:e.unref(p),onClick:k},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-zoom-in",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(x))))])]),_:3},8,["disabled"])]),e.renderSlot(n.$slots,"control-zoom-out",{},()=>[e.createVNode(l,{class:"vue-flow__controls-zoomout",disabled:e.unref(_),onClick:B},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-zoom-out",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(O))))])]),_:3},8,["disabled"])])],64)):e.createCommentVNode("",!0),o.showFitView?e.renderSlot(n.$slots,"control-fit-view",{key:1},()=>[e.createVNode(l,{class:"vue-flow__controls-fitview",onClick:V},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-fit-view",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(q))))])]),_:3})]):e.createCommentVNode("",!0),o.showInteractive?e.renderSlot(n.$slots,"control-interactive",{key:2},()=>[o.showInteractive?(e.openBlock(),e.createBlock(l,{key:0,class:"vue-flow__controls-interactive",onClick:C},{default:e.withCtx(()=>[e.unref(a)?e.renderSlot(n.$slots,"icon-unlock",{key:0},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(W))))]):e.createCommentVNode("",!0),e.unref(a)?e.createCommentVNode("",!0):e.renderSlot(n.$slots,"icon-lock",{key:1},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(U))))])]),_:3})):e.createCommentVNode("",!0)]):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")]),_:3},8,["position"]))}});exports.ControlButton=l;exports.Controls=Y; |
import type { ControlProps } from './types' | ||
declare const _default: __VLS_WithTemplateSlots< | ||
@@ -13,7 +14,4 @@ import('vue').DefineComponent< | ||
zoomIn: () => void | ||
} & { | ||
zoomOut: () => void | ||
} & { | ||
fitView: () => void | ||
} & { | ||
interactionChange: (active: boolean) => void | ||
@@ -32,13 +30,13 @@ }, | ||
{ | ||
'top': (_: {}) => any | ||
'control-zoom-in': (_: {}) => any | ||
'icon-zoom-in': (_: {}) => any | ||
'control-zoom-out': (_: {}) => any | ||
'icon-zoom-out': (_: {}) => any | ||
'control-fit-view': (_: {}) => any | ||
'icon-fit-view': (_: {}) => any | ||
'control-interactive': (_: {}) => any | ||
'icon-unlock': (_: {}) => any | ||
'icon-lock': (_: {}) => any | ||
'default': (_: {}) => any | ||
top?(_: {}): any | ||
'control-zoom-in'?(_: {}): any | ||
'icon-zoom-in'?(_: {}): any | ||
'control-zoom-out'?(_: {}): any | ||
'icon-zoom-out'?(_: {}): any | ||
'control-fit-view'?(_: {}): any | ||
'icon-fit-view'?(_: {}): any | ||
'control-interactive'?(_: {}): any | ||
'icon-unlock'?(_: {}): any | ||
'icon-lock'?(_: {}): any | ||
default?(_: {}): any | ||
} | ||
@@ -45,0 +43,0 @@ > |
import './style.css' | ||
export { default as Controls } from './Controls.vue' | ||
export { default as ControlButton } from './ControlButton.vue' | ||
export * from './types' |
import type { FitViewParams, PanelPosition } from '@vue-flow/core' | ||
export interface ControlProps { | ||
@@ -3,0 +4,0 @@ /** Show the zoom icon */ |
@@ -1,1 +0,1 @@ | ||
var VueFlowControls=function(r,o,d){"use strict";const G="",h={name:"ControlButton",compatConfig:{MODE:3}},_=(t,e)=>{const l=t.__vccOpts||t;for(const[s,a]of e)l[s]=a;return l},w={class:"vue-flow__controls-button"};function f(t,e,l,s,a,m){return o.openBlock(),o.createElementBlock("button",w,[o.renderSlot(t.$slots,"default")])}const c=_(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 p={render:V},$={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},u={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},y=[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 H(t,e){return o.openBlock(),o.createElementBlock("svg",u,y)}const S={render:H},E={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 I(t,e){return o.openBlock(),o.createElementBlock("svg",E,N)}const M={render:I},x={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 F(t,e){return o.openBlock(),o.createElementBlock("svg",x,D)}const O={render:F},b={name:"Controls",compatConfig:{MODE:3}},P=o.defineComponent({...b,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:d.PanelPosition.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(t,{emit:e}){const{nodesDraggable:l,nodesConnectable:s,elementsSelectable:a,setInteractive:m,zoomIn:A,zoomOut:Z,fitView:L}=d.useVueFlow(),i=o.computed(()=>l.value&&s.value&&a.value);function j(){A(),e("zoomIn")}function T(){Z(),e("zoomOut")}function U(){L(t.fitViewParams),e("fitView")}function q(){m(!i.value),e("interactionChange",!i.value)}return(n,X)=>(o.openBlock(),o.createBlock(o.unref(d.Panel),{class:"vue-flow__controls",position:t.position},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"top"),t.showZoom?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.renderSlot(n.$slots,"control-zoom-in",{},()=>[o.createVNode(c,{class:"vue-flow__controls-zoomin",onClick:j},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"icon-zoom-in",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(p))))])]),_:3})]),o.renderSlot(n.$slots,"control-zoom-out",{},()=>[o.createVNode(c,{class:"vue-flow__controls-zoomout",onClick:T},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"icon-zoom-out",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(z))))])]),_:3})])],64)):o.createCommentVNode("",!0),t.showFitView?o.renderSlot(n.$slots,"control-fit-view",{key:1},()=>[o.createVNode(c,{class:"vue-flow__controls-fitview",onClick:U},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"icon-fit-view",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(S))))])]),_:3})]):o.createCommentVNode("",!0),t.showInteractive?o.renderSlot(n.$slots,"control-interactive",{key:2},()=>[t.showInteractive?(o.openBlock(),o.createBlock(c,{key:0,class:"vue-flow__controls-interactive",onClick:q},{default:o.withCtx(()=>[o.unref(i)?o.renderSlot(n.$slots,"icon-unlock",{key:0},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(O))))]):o.createCommentVNode("",!0),o.unref(i)?o.createCommentVNode("",!0):o.renderSlot(n.$slots,"icon-lock",{key:1},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(M))))])]),_:3})):o.createCommentVNode("",!0)]):o.createCommentVNode("",!0),o.renderSlot(n.$slots,"default")]),_:3},8,["position"]))}});return r.ControlButton=c,r.Controls=P,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r}({},Vue,VueFlowCore); | ||
var VueFlowControls=function(r,o,d){"use strict";const W="",_={name:"ControlButton",compatConfig:{MODE:3}},w=(t,e)=>{const l=t.__vccOpts||t;for(const[s,a]of e)l[s]=a;return l},f={class:"vue-flow__controls-button"};function k(t,e,l,s,a,m){return o.openBlock(),o.createElementBlock("button",f,[o.renderSlot(t.$slots,"default")])}const c=w(_,[["render",k]]),p={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",p,B)}const $={render:V},C={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},g=[o.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1)];function z(t,e){return o.openBlock(),o.createElementBlock("svg",C,g)}const u={render:z},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},N={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},I=[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 M(t,e){return o.openBlock(),o.createElementBlock("svg",N,I)}const b={render:M},x={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 F(t,e){return o.openBlock(),o.createElementBlock("svg",x,D)}const O={render:F},Z={name:"Controls",compatConfig:{MODE:3}},P=o.defineComponent({...Z,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:d.PanelPosition.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(t,{emit:e}){const{nodesDraggable:l,nodesConnectable:s,elementsSelectable:a,setInteractive:m,zoomIn:A,zoomOut:L,fitView:R,viewport:h,minZoom:j,maxZoom:T}=d.useVueFlow(),i=o.computed(()=>l.value||s.value||a.value),U=o.computed(()=>h.value.zoom<=j.value),q=o.computed(()=>h.value.zoom>=T.value);function G(){A(),e("zoomIn")}function J(){L(),e("zoomOut")}function K(){R(t.fitViewParams),e("fitView")}function Q(){m(!i.value),e("interactionChange",!i.value)}return(n,eo)=>(o.openBlock(),o.createBlock(o.unref(d.Panel),{class:"vue-flow__controls",position:t.position},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"top"),t.showZoom?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.renderSlot(n.$slots,"control-zoom-in",{},()=>[o.createVNode(c,{class:"vue-flow__controls-zoomin",disabled:o.unref(q),onClick:G},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"icon-zoom-in",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref($))))])]),_:3},8,["disabled"])]),o.renderSlot(n.$slots,"control-zoom-out",{},()=>[o.createVNode(c,{class:"vue-flow__controls-zoomout",disabled:o.unref(U),onClick:J},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"icon-zoom-out",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(u))))])]),_:3},8,["disabled"])])],64)):o.createCommentVNode("",!0),t.showFitView?o.renderSlot(n.$slots,"control-fit-view",{key:1},()=>[o.createVNode(c,{class:"vue-flow__controls-fitview",onClick:K},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"icon-fit-view",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(E))))])]),_:3})]):o.createCommentVNode("",!0),t.showInteractive?o.renderSlot(n.$slots,"control-interactive",{key:2},()=>[t.showInteractive?(o.openBlock(),o.createBlock(c,{key:0,class:"vue-flow__controls-interactive",onClick:Q},{default:o.withCtx(()=>[o.unref(i)?o.renderSlot(n.$slots,"icon-unlock",{key:0},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(O))))]):o.createCommentVNode("",!0),o.unref(i)?o.createCommentVNode("",!0):o.renderSlot(n.$slots,"icon-lock",{key:1},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(b))))])]),_:3})):o.createCommentVNode("",!0)]):o.createCommentVNode("",!0),o.renderSlot(n.$slots,"default")]),_:3},8,["position"]))}});return r.ControlButton=c,r.Controls=P,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r}({},Vue,VueFlowCore); |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("@vue-flow/core");const k={name:"ControlButton",compatConfig:{MODE:3}},p=(o,t)=>{const c=o.__vccOpts||o;for(const[l,s]of t)c[l]=s;return c},B={class:"vue-flow__controls-button"};function V(o,t,c,l,s,u){return e.openBlock(),e.createElementBlock("button",B,[e.renderSlot(o.$slots,"default")])}const r=p(k,[["render",V]]),C={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},$=e.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),g=[$];function z(o,t){return e.openBlock(),e.createElementBlock("svg",C,g)}const y={render:z},H={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},S=e.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1),E=[S];function N(o,t){return e.openBlock(),e.createElementBlock("svg",H,E)}const I={render:N},M={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",M,D)}const b={render:O},P={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},F=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),A=[F];function Z(o,t){return e.openBlock(),e.createElementBlock("svg",P,A)}const q={render:Z},L={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},j=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=[j];function U(o,t){return e.openBlock(),e.createElementBlock("svg",L,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:i.PanelPosition.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(o,{emit:t}){const{nodesDraggable:c,nodesConnectable:l,elementsSelectable:s,setInteractive:u,zoomIn:d,zoomOut:m,fitView:h}=i.useVueFlow(),a=e.computed(()=>c.value&&l.value&&s.value);function v(){d(),t("zoomIn")}function w(){m(),t("zoomOut")}function _(){h(o.fitViewParams),t("fitView")}function f(){u(!a.value),t("interactionChange",!a.value)}return(n,Q)=>(e.openBlock(),e.createBlock(e.unref(i.Panel),{class:"vue-flow__controls",position:o.position},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"top"),o.showZoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(n.$slots,"control-zoom-in",{},()=>[e.createVNode(r,{class:"vue-flow__controls-zoomin",onClick:v},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-zoom-in",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y))))])]),_:3})]),e.renderSlot(n.$slots,"control-zoom-out",{},()=>[e.createVNode(r,{class:"vue-flow__controls-zoomout",onClick:w},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-zoom-out",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(I))))])]),_:3})])],64)):e.createCommentVNode("",!0),o.showFitView?e.renderSlot(n.$slots,"control-fit-view",{key:1},()=>[e.createVNode(r,{class:"vue-flow__controls-fitview",onClick:_},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-fit-view",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(b))))])]),_:3})]):e.createCommentVNode("",!0),o.showInteractive?e.renderSlot(n.$slots,"control-interactive",{key:2},()=>[o.showInteractive?(e.openBlock(),e.createBlock(r,{key:0,class:"vue-flow__controls-interactive",onClick:f},{default:e.withCtx(()=>[e.unref(a)?e.renderSlot(n.$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(n.$slots,"icon-lock",{key:1},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(q))))])]),_:3})):e.createCommentVNode("",!0)]):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")]),_:3},8,["position"]))}});exports.ControlButton=r;exports.Controls=K; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("@vue-flow/core");const $={name:"ControlButton",compatConfig:{MODE:3}},g=(o,t)=>{const c=o.__vccOpts||o;for(const[r,s]of t)c[r]=s;return c},z={class:"vue-flow__controls-button"};function y(o,t,c,r,s,u){return e.openBlock(),e.createElementBlock("button",z,[e.renderSlot(o.$slots,"default")])}const l=g($,[["render",y]]),H={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},S=e.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),E=[S];function N(o,t){return e.openBlock(),e.createElementBlock("svg",H,E)}const x={render:N},I={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},M=e.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1),b=[M];function D(o,t){return e.openBlock(),e.createElementBlock("svg",I,b)}const O={render:D},Z={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},P=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),F=[P];function A(o,t){return e.openBlock(),e.createElementBlock("svg",Z,F)}const q={render:A},L={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},R=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),j=[R];function T(o,t){return e.openBlock(),e.createElementBlock("svg",L,j)}const U={render:T},G={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},J=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),K=[J];function Q(o,t){return e.openBlock(),e.createElementBlock("svg",G,K)}const W={render:Q},X={name:"Controls",compatConfig:{MODE:3}},Y=e.defineComponent({...X,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:i.PanelPosition.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(o,{emit:t}){const{nodesDraggable:c,nodesConnectable:r,elementsSelectable:s,setInteractive:u,zoomIn:m,zoomOut:v,fitView:h,viewport:d,minZoom:w,maxZoom:f}=i.useVueFlow(),a=e.computed(()=>c.value||r.value||s.value),_=e.computed(()=>d.value.zoom<=w.value),p=e.computed(()=>d.value.zoom>=f.value);function k(){m(),t("zoomIn")}function B(){v(),t("zoomOut")}function V(){h(o.fitViewParams),t("fitView")}function C(){u(!a.value),t("interactionChange",!a.value)}return(n,ee)=>(e.openBlock(),e.createBlock(e.unref(i.Panel),{class:"vue-flow__controls",position:o.position},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"top"),o.showZoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(n.$slots,"control-zoom-in",{},()=>[e.createVNode(l,{class:"vue-flow__controls-zoomin",disabled:e.unref(p),onClick:k},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-zoom-in",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(x))))])]),_:3},8,["disabled"])]),e.renderSlot(n.$slots,"control-zoom-out",{},()=>[e.createVNode(l,{class:"vue-flow__controls-zoomout",disabled:e.unref(_),onClick:B},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-zoom-out",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(O))))])]),_:3},8,["disabled"])])],64)):e.createCommentVNode("",!0),o.showFitView?e.renderSlot(n.$slots,"control-fit-view",{key:1},()=>[e.createVNode(l,{class:"vue-flow__controls-fitview",onClick:V},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-fit-view",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(q))))])]),_:3})]):e.createCommentVNode("",!0),o.showInteractive?e.renderSlot(n.$slots,"control-interactive",{key:2},()=>[o.showInteractive?(e.openBlock(),e.createBlock(l,{key:0,class:"vue-flow__controls-interactive",onClick:C},{default:e.withCtx(()=>[e.unref(a)?e.renderSlot(n.$slots,"icon-unlock",{key:0},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(W))))]):e.createCommentVNode("",!0),e.unref(a)?e.createCommentVNode("",!0):e.renderSlot(n.$slots,"icon-lock",{key:1},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(U))))])]),_:3})):e.createCommentVNode("",!0)]):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")]),_:3},8,["position"]))}});exports.ControlButton=l;exports.Controls=Y; |
{ | ||
"name": "@vue-flow/controls", | ||
"version": "1.0.6", | ||
"version": "1.1.0", | ||
"private": false, | ||
@@ -55,10 +55,9 @@ "license": "MIT", | ||
"devDependencies": { | ||
"vite": "^4.1.4", | ||
"vite-svg-loader": "^4.0.0", | ||
"vue": "^3.2.25", | ||
"vue-tsc": "^1.2.0", | ||
"@tooling/tsconfig": "0.0.0", | ||
"vue-tsc": "^1.6.5", | ||
"@tooling/eslint-config": "0.0.0", | ||
"@tooling/vite-config": "0.0.0", | ||
"@vue-flow/core": "1.19.2", | ||
"@tooling/eslint-config": "0.0.0" | ||
"@vue-flow/core": "1.20.1", | ||
"@tooling/tsconfig": "0.0.0" | ||
}, | ||
@@ -65,0 +64,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29473
7
333