@vue-flow/controls
Advanced tools
Comparing version 1.0.1 to 1.0.2
import type { ControlProps } from './types' | ||
declare const _default: { | ||
new (...args: any[]): { | ||
$: import('vue').ComponentInternalInstance | ||
$data: {} | ||
$props: Partial<{}> & | ||
Omit< | ||
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ControlProps>>> & { | ||
onZoomIn?: (() => any) | undefined | ||
onZoomOut?: (() => any) | undefined | ||
onFitView?: (() => any) | undefined | ||
onInteractionChange?: ((active: boolean) => any) | undefined | ||
} & import('vue').VNodeProps & | ||
import('vue').AllowedComponentProps & | ||
import('vue').ComponentCustomProps, | ||
never | ||
> | ||
$attrs: { | ||
[x: string]: unknown | ||
} | ||
$refs: { | ||
[x: string]: unknown | ||
} | ||
$slots: Readonly<{ | ||
[name: string]: import('vue').Slot | undefined | ||
}> | ||
$root: | ||
| import('vue').ComponentPublicInstance< | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
false, | ||
import('vue').ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}> | ||
> | ||
| null | ||
$parent: | ||
| import('vue').ComponentPublicInstance< | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
false, | ||
import('vue').ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}> | ||
> | ||
| null | ||
$emit: ((event: 'zoomIn') => void) & | ||
((event: 'zoomOut') => void) & | ||
((event: 'fitView') => void) & | ||
((event: 'interactionChange', active: boolean) => void) | ||
$el: any | ||
$options: import('vue').ComponentOptionsBase< | ||
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ControlProps>>> & { | ||
onZoomIn?: (() => any) | undefined | ||
onZoomOut?: (() => any) | undefined | ||
onFitView?: (() => any) | undefined | ||
onInteractionChange?: ((active: boolean) => any) | undefined | ||
}, | ||
{}, | ||
unknown, | ||
{}, | ||
{}, | ||
import('vue').ComponentOptionsMixin, | ||
import('vue').ComponentOptionsMixin, | ||
{ | ||
zoomIn: () => void | ||
} & { | ||
zoomOut: () => void | ||
} & { | ||
fitView: () => void | ||
} & { | ||
interactionChange: (active: boolean) => void | ||
}, | ||
string, | ||
{} | ||
> & { | ||
beforeCreate?: ((() => void) | (() => void)[]) | undefined | ||
created?: ((() => void) | (() => void)[]) | undefined | ||
beforeMount?: ((() => void) | (() => void)[]) | undefined | ||
mounted?: ((() => void) | (() => void)[]) | undefined | ||
beforeUpdate?: ((() => void) | (() => void)[]) | undefined | ||
updated?: ((() => void) | (() => void)[]) | undefined | ||
activated?: ((() => void) | (() => void)[]) | undefined | ||
deactivated?: ((() => void) | (() => void)[]) | undefined | ||
beforeDestroy?: ((() => void) | (() => void)[]) | undefined | ||
beforeUnmount?: ((() => void) | (() => void)[]) | undefined | ||
destroyed?: ((() => void) | (() => void)[]) | undefined | ||
unmounted?: ((() => void) | (() => void)[]) | undefined | ||
renderTracked?: (((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]) | undefined | ||
renderTriggered?: (((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]) | undefined | ||
errorCaptured?: | ||
| ( | ||
| (( | ||
err: unknown, | ||
instance: | ||
| import('vue').ComponentPublicInstance< | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
false, | ||
import('vue').ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}> | ||
> | ||
| null, | ||
info: string, | ||
) => boolean | void) | ||
| (( | ||
err: unknown, | ||
instance: | ||
| import('vue').ComponentPublicInstance< | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
{}, | ||
false, | ||
import('vue').ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}> | ||
> | ||
| null, | ||
info: string, | ||
) => boolean | void)[] | ||
) | ||
| undefined | ||
} | ||
$forceUpdate: () => void | ||
$nextTick: typeof import('vue').nextTick | ||
$watch( | ||
source: string | Function, | ||
cb: Function, | ||
options?: import('vue').WatchOptions<boolean> | undefined, | ||
): import('vue').WatchStopHandle | ||
} & Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ControlProps>>> & { | ||
declare const _default: __VLS_WithTemplateSlots< | ||
import('vue').DefineComponent< | ||
__VLS_TypePropsToRuntimeProps<ControlProps>, | ||
{}, | ||
unknown, | ||
{}, | ||
{}, | ||
import('vue').ComponentOptionsMixin, | ||
import('vue').ComponentOptionsMixin, | ||
{ | ||
zoomIn: () => void | ||
} & { | ||
zoomOut: () => void | ||
} & { | ||
fitView: () => void | ||
} & { | ||
interactionChange: (active: boolean) => void | ||
}, | ||
string, | ||
import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, | ||
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ControlProps>>> & { | ||
onZoomIn?: (() => any) | undefined | ||
@@ -152,52 +27,22 @@ onZoomOut?: (() => any) | undefined | ||
onInteractionChange?: ((active: boolean) => any) | undefined | ||
} & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties | ||
__isFragment?: undefined | ||
__isTeleport?: undefined | ||
__isSuspense?: undefined | ||
} & import('vue').ComponentOptionsBase< | ||
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ControlProps>>> & { | ||
onZoomIn?: (() => any) | undefined | ||
onZoomOut?: (() => any) | undefined | ||
onFitView?: (() => any) | undefined | ||
onInteractionChange?: ((active: boolean) => any) | undefined | ||
}, | ||
{}, | ||
unknown, | ||
{}, | ||
{}, | ||
import('vue').ComponentOptionsMixin, | ||
import('vue').ComponentOptionsMixin, | ||
}, | ||
{} | ||
>, | ||
{ | ||
zoomIn: () => void | ||
} & { | ||
zoomOut: () => void | ||
} & { | ||
fitView: () => void | ||
} & { | ||
interactionChange: (active: boolean) => void | ||
}, | ||
string, | ||
{} | ||
> & | ||
import('vue').VNodeProps & | ||
import('vue').AllowedComponentProps & | ||
import('vue').ComponentCustomProps & | ||
(new () => { | ||
$slots: { | ||
'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 | ||
} | ||
> | ||
export default _default | ||
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T | ||
declare type __VLS_TypePropsToRuntimeProps<T> = { | ||
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T | ||
type __VLS_TypePropsToRuntimeProps<T> = { | ||
[K in keyof T]-?: {} extends Pick<T, K> | ||
@@ -212,1 +57,6 @@ ? { | ||
} | ||
type __VLS_WithTemplateSlots<T, S> = T & { | ||
new (): { | ||
$slots: S | ||
} | ||
} |
@@ -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 u(t,e){return o.openBlock(),o.createElementBlock("svg",y,H)}const S={render:u},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 E(t,e){return o.openBlock(),o.createElementBlock("svg",I,N)}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(S))))])]),_: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.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r}({},Vue,VueFlow); | ||
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); |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[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"},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; |
{ | ||
"name": "@vue-flow/controls", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"private": false, | ||
@@ -25,3 +25,3 @@ "license": "MIT", | ||
"peerDependencies": { | ||
"@vue-flow/core": "^1.6.0", | ||
"@vue-flow/core": "^1.12.2", | ||
"vue": "^3.2.37" | ||
@@ -31,9 +31,9 @@ }, | ||
"devDependencies": { | ||
"@vitejs/plugin-vue": "^3.2.0", | ||
"unplugin-auto-import": "^0.12.0", | ||
"vite": "^3.2.5", | ||
"vite-plugin-vue-type-imports": "0.2.0", | ||
"@vitejs/plugin-vue": "^4.0.0", | ||
"unplugin-auto-import": "^0.12.1", | ||
"vite": "^4.0.4", | ||
"vite-plugin-vue-type-imports": "^0.2.4", | ||
"vite-svg-loader": "^3.6.0", | ||
"vue-tsc": "^1.0.11", | ||
"@vue-flow/core": "1.10.3" | ||
"vue-tsc": "^1.0.24", | ||
"@vue-flow/core": "1.12.3" | ||
}, | ||
@@ -40,0 +40,0 @@ "publishConfig": { |
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
22933
293