feat: add vueflow pkg that exports all features
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@vue-flow/core",
|
||||
"name": "vueflow",
|
||||
"version": "1.0.0",
|
||||
"private": false,
|
||||
"license": "MIT",
|
||||
@@ -22,10 +22,8 @@
|
||||
],
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"prepare": "ts-patch install -s",
|
||||
"build": "vite build",
|
||||
"types": "pnpm prepare && vue-tsc --declaration --emitDeclarationOnly && tsc -p tsconfig.build.json && shx rm -rf tmp && pnpm lint:dist",
|
||||
"typedoc": "typedoc --options ./typedoc.json",
|
||||
"types": "tsc && shx rm -rf tmp && pnpm lint:dist",
|
||||
"theme": "postcss src/style.css -o dist/style.css && postcss src/theme-default.css -o dist/theme-default.css",
|
||||
"lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix --ignore-path ../../.gitignore .",
|
||||
"lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix ./dist",
|
||||
@@ -37,26 +35,15 @@
|
||||
"vue": "^3.2.25"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vueuse/core": "^9.3.0",
|
||||
"d3-drag": "^3.0.0",
|
||||
"d3-selection": "^3.0.0",
|
||||
"d3-zoom": "^3.0.0"
|
||||
"@vue-flow/additional-components": "workspace:*",
|
||||
"@vue-flow/core": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-replace": "^4.0.0",
|
||||
"@types/d3": "^7.4.0",
|
||||
"@vitejs/plugin-vue": "^2.3.4",
|
||||
"autoprefixer": "^10.4.8",
|
||||
"postcss": "^8.4.16",
|
||||
"postcss-cli": "^9.1.0",
|
||||
"postcss-nested": "^5.0.6",
|
||||
"ts-patch": "^2.0.2",
|
||||
"typedoc": "^0.23.10",
|
||||
"typescript-transform-paths": "^3.3.1",
|
||||
"unplugin-auto-import": "^0.11.2",
|
||||
"vite": "^2.9.15",
|
||||
"vite-plugin-vue-type-imports": "0.2.0",
|
||||
"vue-tsc": "^0.40.13"
|
||||
"vite": "^2.9.15"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
|
||||
@@ -1,50 +1,4 @@
|
||||
/**
|
||||
* Vue Flow
|
||||
* @module vue-flow
|
||||
*/
|
||||
|
||||
export { default as VueFlow } from './container/VueFlow/VueFlow.vue'
|
||||
|
||||
export { default as Handle } from './components/Handle/Handle.vue'
|
||||
|
||||
export { StraightEdge, StepEdge, BezierEdge, SimpleBezierEdge, SmoothStepEdge, BaseEdge, EdgeText } from './components/Edges'
|
||||
|
||||
export { getBezierPath, getSimpleBezierPath, getSmoothStepPath, getStraightPath } from './components/Edges/utils'
|
||||
|
||||
export {
|
||||
isNode,
|
||||
isEdge,
|
||||
addEdge,
|
||||
updateEdge,
|
||||
getOutgoers,
|
||||
getIncomers,
|
||||
getConnectedEdges,
|
||||
getTransformForBounds,
|
||||
getRectOfNodes,
|
||||
graphPosToZoomedPos,
|
||||
getNodesInside,
|
||||
getMarkerId,
|
||||
getBoundsofRects,
|
||||
} from './utils/graph'
|
||||
|
||||
/**
|
||||
* Intended for options API
|
||||
* In composition API you can access apply utilities from `useVueFlow`
|
||||
*/
|
||||
export { applyChanges, applyEdgeChanges, applyNodeChanges } from './utils/changes'
|
||||
|
||||
export { defaultEdgeTypes, defaultNodeTypes } from './store'
|
||||
|
||||
export { VueFlow as VueFlowInjection, NodeId as NodeIdInjection } from './context'
|
||||
|
||||
export { default as useZoomPanHelper } from './composables/useZoomPanHelper'
|
||||
|
||||
export { default as useVueFlow, Storage as GlobalVueFlowStorage } from './composables/useVueFlow'
|
||||
|
||||
export { default as useHandle } from './composables/useHandle'
|
||||
|
||||
export { default as useNode } from './composables/useNode'
|
||||
|
||||
export { default as useEdge } from './composables/useEdge'
|
||||
|
||||
export * from './types'
|
||||
import '@vue-flow/core/dist/style.css'
|
||||
import '@vue-flow/core/dist/theme-default.css'
|
||||
export * from '@vue-flow/additional-components'
|
||||
export * from '@vue-flow/core'
|
||||
|
||||
@@ -16,15 +16,12 @@
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "./dist",
|
||||
"types": ["vite/client", "vue/macros"],
|
||||
"emitDeclarationOnly": true,
|
||||
"types": ["vite/client"],
|
||||
"jsx": "preserve",
|
||||
"paths": {
|
||||
"~/*": ["src/*"]
|
||||
},
|
||||
"plugins": [
|
||||
// Transform paths in output .d.ts files (Include this line if you output declarations files)
|
||||
{ "transform": "typescript-transform-paths", "afterDeclarations": true }
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": ["./src"],
|
||||
"exclude": ["node_modules", "dist"],
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import { resolve } from 'path'
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import vueTypes from 'vite-plugin-vue-type-imports'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import replace from '@rollup/plugin-replace'
|
||||
import pkg from './package.json'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
@@ -12,7 +7,7 @@ export default defineConfig({
|
||||
alias: {
|
||||
'~': resolve('src'),
|
||||
},
|
||||
extensions: ['.ts', '.vue'],
|
||||
extensions: ['.ts'],
|
||||
},
|
||||
build: {
|
||||
emptyOutDir: false,
|
||||
@@ -37,21 +32,4 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
vue({
|
||||
reactivityTransform: true,
|
||||
}),
|
||||
vueTypes(),
|
||||
AutoImport({
|
||||
imports: ['vue', '@vueuse/core', 'vue/macros'],
|
||||
dts: 'src/auto-imports.d.ts',
|
||||
}),
|
||||
replace({
|
||||
__VUE_FLOW_VERSION__: JSON.stringify(pkg.version),
|
||||
preventAssignment: true,
|
||||
}),
|
||||
],
|
||||
optimizeDeps: {
|
||||
include: ['@vueuse/core', 'd3-zoom', 'd3-selection', 'd3-drag'],
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user