@vue-flow/background
Advanced tools
Comparing version 1.0.2 to 1.0.3
import type { BackgroundProps } from './types' | ||
declare const _default: { | ||
new (...args: any[]): { | ||
$: import('vue').ComponentInternalInstance | ||
$data: {} | ||
$props: Partial<{}> & | ||
Omit< | ||
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<BackgroundProps>>> & | ||
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: string, ...args: any[]) => void | ||
$el: any | ||
$options: import('vue').ComponentOptionsBase< | ||
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<BackgroundProps>>>, | ||
{}, | ||
unknown, | ||
{}, | ||
{}, | ||
import('vue').ComponentOptionsMixin, | ||
import('vue').ComponentOptionsMixin, | ||
{}, | ||
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<BackgroundProps>>> & | ||
import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties | ||
__isFragment?: undefined | ||
__isTeleport?: undefined | ||
__isSuspense?: undefined | ||
} & import('vue').ComponentOptionsBase< | ||
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<BackgroundProps>>>, | ||
{}, | ||
unknown, | ||
{}, | ||
{}, | ||
import('vue').ComponentOptionsMixin, | ||
import('vue').ComponentOptionsMixin, | ||
{}, | ||
string, | ||
{} | ||
> & | ||
import('vue').VNodeProps & | ||
import('vue').AllowedComponentProps & | ||
import('vue').ComponentCustomProps & | ||
(new () => { | ||
$slots: { | ||
'pattern-container': (_: { id: string }) => any | ||
'pattern': (_: {}) => any | ||
'default': (_: { id: string }) => any | ||
} | ||
}) | ||
declare const _default: __VLS_WithTemplateSlots< | ||
import('vue').DefineComponent< | ||
__VLS_TypePropsToRuntimeProps<BackgroundProps>, | ||
{}, | ||
unknown, | ||
{}, | ||
{}, | ||
import('vue').ComponentOptionsMixin, | ||
import('vue').ComponentOptionsMixin, | ||
{}, | ||
string, | ||
import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, | ||
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<BackgroundProps>>>, | ||
{} | ||
>, | ||
{ | ||
'pattern-container': (_: { id: string }) => any | ||
'pattern': (_: {}) => any | ||
'default': (_: { id: string }) => 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> | ||
@@ -166,1 +35,6 @@ ? { | ||
} | ||
type __VLS_WithTemplateSlots<T, S> = T & { | ||
new (): { | ||
$slots: S | ||
} | ||
} |
@@ -1,1 +0,1 @@ | ||
var vueFlowBackground=function(n,e,r){"use strict";const u=["x","y","width","height"],h=["stroke","stroke-width","d"],f=["cx","cy","r","fill"],g={key:2,height:"100",width:"100"},m=["fill"],k=["x","y","fill"],w={name:"Background"},y=e.defineComponent({...w,props:{variant:{default:()=>"dots"},gap:{default:10},size:{default:.4},patternColor:null,bgColor:null,height:{default:100},width:{default:100},x:{default:0},y:{default:0}},setup(t){const z={dots:"#81818a",lines:"#eee"},{id:B,viewport:o}=r.useVueFlow(),l=e.computed(()=>{const a=t.gap&&t.gap*o.value.zoom,s=a&&o.value.x%a,C=a&&o.value.y%a,V=t.size*o.value.zoom;return{scaledGap:a,xOffset:s,yOffset:C,size:V}}),d=`pattern-${B}`,i=e.computed(()=>t.patternColor||z[t.variant||"dots"]),$=e.computed(()=>`M${l.value.scaledGap/2} 0 V${l.value.scaledGap} M0 ${l.value.scaledGap/2} H${l.value.scaledGap}`);return(a,s)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-flow__background vue-flow__container",style:e.normalizeStyle({height:`${t.height>100?100:t.height}%`,width:`${t.width>100?100:t.width}%`})},[e.renderSlot(a.$slots,"pattern-container",{id:d},()=>[e.createElementVNode("pattern",{id:d,x:l.value.xOffset,y:l.value.yOffset,width:l.value.scaledGap,height:l.value.scaledGap,patternUnits:"userSpaceOnUse"},[e.renderSlot(a.$slots,"pattern",{},()=>[t.variant==="lines"?(e.openBlock(),e.createElementBlock("path",{key:0,stroke:e.unref(i),"stroke-width":t.size,d:e.unref($)},null,8,h)):t.variant==="dots"?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.value.size,cy:l.value.size,r:l.value.size,fill:e.unref(i)},null,8,f)):e.createCommentVNode("",!0),t.bgColor?(e.openBlock(),e.createElementBlock("svg",g,[e.createElementVNode("rect",{width:"100%",height:"100%",fill:t.bgColor},null,8,m)])):e.createCommentVNode("",!0)])],8,u)]),e.createElementVNode("rect",{x:t.x,y:t.y,width:"100%",height:"100%",fill:`url(#${d})`},null,8,k),e.renderSlot(a.$slots,"default",{id:d})],4))}});var c=(t=>(t.Lines="lines",t.Dots="dots",t))(c||{});return n.Background=y,n.BackgroundVariant=c,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),n}({},Vue,VueFlow); | ||
var vueFlowBackground=function(o,e,s){"use strict";var a=(t=>(t.Lines="lines",t.Dots="dots",t))(a||{});const u=["x","y","width","height"],h=["stroke","stroke-width","d"],f=["cx","cy","r","fill"],g={key:2,height:"100",width:"100"},m=["fill"],k=["x","y","fill"],y={name:"Background"},w=e.defineComponent({...y,props:{variant:{default:()=>"dots"},gap:{default:10},size:{default:.4},patternColor:null,bgColor:null,height:{default:100},width:{default:100},x:{default:0},y:{default:0}},setup(t){const z={[a.Dots]:"#81818a",[a.Lines]:"#eee"},{id:B,viewport:c}=s.useVueFlow(),l=e.computed(()=>{const n=t.gap&&t.gap*c.value.zoom,r=n&&c.value.x%n,C=n&&c.value.y%n,V=t.size*c.value.zoom;return{scaledGap:n,xOffset:r,yOffset:C,size:V}}),i=`pattern-${B}`,d=e.computed(()=>t.patternColor||z[t.variant||a.Dots]),$=e.computed(()=>`M${l.value.scaledGap/2} 0 V${l.value.scaledGap} M0 ${l.value.scaledGap/2} H${l.value.scaledGap}`);return(n,r)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-flow__background vue-flow__container",style:e.normalizeStyle({height:`${t.height>100?100:t.height}%`,width:`${t.width>100?100:t.width}%`})},[e.renderSlot(n.$slots,"pattern-container",{id:i},()=>[e.createElementVNode("pattern",{id:i,x:l.value.xOffset,y:l.value.yOffset,width:l.value.scaledGap,height:l.value.scaledGap,patternUnits:"userSpaceOnUse"},[e.renderSlot(n.$slots,"pattern",{},()=>[t.variant===e.unref(a).Lines?(e.openBlock(),e.createElementBlock("path",{key:0,stroke:e.unref(d),"stroke-width":t.size,d:e.unref($)},null,8,h)):t.variant===e.unref(a).Dots?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.value.size,cy:l.value.size,r:l.value.size,fill:e.unref(d)},null,8,f)):e.createCommentVNode("",!0),t.bgColor?(e.openBlock(),e.createElementBlock("svg",g,[e.createElementVNode("rect",{width:"100%",height:"100%",fill:t.bgColor},null,8,m)])):e.createCommentVNode("",!0)])],8,u)]),e.createElementVNode("rect",{x:t.x,y:t.y,width:"100%",height:"100%",fill:`url(#${i})`},null,8,k),e.renderSlot(n.$slots,"default",{id:i})],4))}});return o.Background=w,o.BackgroundVariant=a,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),o}({},Vue,VueFlow); |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("@vue-flow/core"),g=["x","y","width","height"],m=["stroke","stroke-width","d"],k=["cx","cy","r","fill"],y={key:2,height:"100",width:"100"},w=["fill"],z=["x","y","fill"],$={name:"Background"},B=e.defineComponent({...$,props:{variant:{default:()=>"dots"},gap:{default:10},size:{default:.4},patternColor:null,bgColor:null,height:{default:100},width:{default:100},x:{default:0},y:{default:0}},setup(t){const s={dots:"#81818a",lines:"#eee"},{id:r,viewport:a}=v.useVueFlow(),l=e.computed(()=>{const o=t.gap&&t.gap*a.value.zoom,d=o&&a.value.x%o,h=o&&a.value.y%o,f=t.size*a.value.zoom;return{scaledGap:o,xOffset:d,yOffset:h,size:f}}),n=`pattern-${r}`,c=e.computed(()=>t.patternColor||s[t.variant||"dots"]),u=e.computed(()=>`M${l.value.scaledGap/2} 0 V${l.value.scaledGap} M0 ${l.value.scaledGap/2} H${l.value.scaledGap}`);return(o,d)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-flow__background vue-flow__container",style:e.normalizeStyle({height:`${t.height>100?100:t.height}%`,width:`${t.width>100?100:t.width}%`})},[e.renderSlot(o.$slots,"pattern-container",{id:n},()=>[e.createElementVNode("pattern",{id:n,x:l.value.xOffset,y:l.value.yOffset,width:l.value.scaledGap,height:l.value.scaledGap,patternUnits:"userSpaceOnUse"},[e.renderSlot(o.$slots,"pattern",{},()=>[t.variant==="lines"?(e.openBlock(),e.createElementBlock("path",{key:0,stroke:e.unref(c),"stroke-width":t.size,d:e.unref(u)},null,8,m)):t.variant==="dots"?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.value.size,cy:l.value.size,r:l.value.size,fill:e.unref(c)},null,8,k)):e.createCommentVNode("",!0),t.bgColor?(e.openBlock(),e.createElementBlock("svg",y,[e.createElementVNode("rect",{width:"100%",height:"100%",fill:t.bgColor},null,8,w)])):e.createCommentVNode("",!0)])],8,g)]),e.createElementVNode("rect",{x:t.x,y:t.y,width:"100%",height:"100%",fill:`url(#${n})`},null,8,z),e.renderSlot(o.$slots,"default",{id:n})],4))}});var i=(t=>(t.Lines="lines",t.Dots="dots",t))(i||{});exports.Background=B;exports.BackgroundVariant=i; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("@vue-flow/core");var o=(t=>(t.Lines="lines",t.Dots="dots",t))(o||{});const g=["x","y","width","height"],m=["stroke","stroke-width","d"],k=["cx","cy","r","fill"],y={key:2,height:"100",width:"100"},w=["fill"],z=["x","y","fill"],$={name:"Background"},B=e.defineComponent({...$,props:{variant:{default:()=>"dots"},gap:{default:10},size:{default:.4},patternColor:null,bgColor:null,height:{default:100},width:{default:100},x:{default:0},y:{default:0}},setup(t){const s={[o.Dots]:"#81818a",[o.Lines]:"#eee"},{id:d,viewport:a}=v.useVueFlow(),l=e.computed(()=>{const n=t.gap&&t.gap*a.value.zoom,r=n&&a.value.x%n,h=n&&a.value.y%n,f=t.size*a.value.zoom;return{scaledGap:n,xOffset:r,yOffset:h,size:f}}),c=`pattern-${d}`,i=e.computed(()=>t.patternColor||s[t.variant||o.Dots]),u=e.computed(()=>`M${l.value.scaledGap/2} 0 V${l.value.scaledGap} M0 ${l.value.scaledGap/2} H${l.value.scaledGap}`);return(n,r)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-flow__background vue-flow__container",style:e.normalizeStyle({height:`${t.height>100?100:t.height}%`,width:`${t.width>100?100:t.width}%`})},[e.renderSlot(n.$slots,"pattern-container",{id:c},()=>[e.createElementVNode("pattern",{id:c,x:l.value.xOffset,y:l.value.yOffset,width:l.value.scaledGap,height:l.value.scaledGap,patternUnits:"userSpaceOnUse"},[e.renderSlot(n.$slots,"pattern",{},()=>[t.variant===e.unref(o).Lines?(e.openBlock(),e.createElementBlock("path",{key:0,stroke:e.unref(i),"stroke-width":t.size,d:e.unref(u)},null,8,m)):t.variant===e.unref(o).Dots?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.value.size,cy:l.value.size,r:l.value.size,fill:e.unref(i)},null,8,k)):e.createCommentVNode("",!0),t.bgColor?(e.openBlock(),e.createElementBlock("svg",y,[e.createElementVNode("rect",{width:"100%",height:"100%",fill:t.bgColor},null,8,w)])):e.createCommentVNode("",!0)])],8,g)]),e.createElementVNode("rect",{x:t.x,y:t.y,width:"100%",height:"100%",fill:`url(#${c})`},null,8,z),e.renderSlot(n.$slots,"default",{id:c})],4))}});exports.Background=B;exports.BackgroundVariant=o; |
{ | ||
"name": "@vue-flow/background", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"private": false, | ||
@@ -25,3 +25,3 @@ "license": "MIT", | ||
"peerDependencies": { | ||
"@vue-flow/core": "^1.0.0", | ||
"@vue-flow/core": "^1.12.2", | ||
"vue": "^3.2.37" | ||
@@ -31,8 +31,8 @@ }, | ||
"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", | ||
"vue-tsc": "^1.0.11", | ||
"@vue-flow/core": "1.10.3" | ||
"@vitejs/plugin-vue": "^4.0.0", | ||
"unplugin-auto-import": "^0.12.1", | ||
"vite": "^4.0.4", | ||
"vite-plugin-vue-type-imports": "^0.2.4", | ||
"vue-tsc": "^1.0.24", | ||
"@vue-flow/core": "1.12.3" | ||
}, | ||
@@ -39,0 +39,0 @@ "publishConfig": { |
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
12202
174