Skip to content

Commit

Permalink
fix|ci: Fix the grow animation and update dependencies
Browse files Browse the repository at this point in the history
The old version of `vite-plugin-dts` has been not available
  • Loading branch information
sheepbox8646 committed Nov 30, 2024
1 parent 818881b commit f4327a7
Show file tree
Hide file tree
Showing 29 changed files with 218 additions and 238 deletions.
2 changes: 1 addition & 1 deletion extensions/animations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/chart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/emoji/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/geometry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/google-fonts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/lights/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/math/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/mindmap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/platform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/skia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/three/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/typst/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion extensions/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"@vue-motion/core": "workspace:*",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
},
"workspaces": [
"./app"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
3 changes: 0 additions & 3 deletions packages/core/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ export default defineConfig({
rollupOptions: {
external: ["vue"],
},
commonjsOptions: {
transformMixedEsModules: true,
},
},
plugins: [
vue(),
Expand Down
2 changes: 1 addition & 1 deletion packages/export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/lib/src/animations/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface ColorableMixin {
discolorateFillTo: (to: string) => void;
}

interface RGB {
export interface RGB {
r: number;
g: number;
b: number;
Expand Down
18 changes: 11 additions & 7 deletions packages/lib/src/widgets/line.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { defineProps } from "vue";
import { defineProps, computed } from "vue";
import { defineWidget } from "@vue-motion/core";
import type { Vector } from "../animations/typings";
import type { Growable } from "../animations";
Expand All @@ -15,18 +15,22 @@ export type LineMixin = LineOptions & FigureMixin;
const props = defineProps<LineOptions>();
const options = defineWidget(props);
const dx = options.to[0] - options.from[0];
const dy = options.to[1] - options.from[1];
const currentX = options.from[0] + dx * (options.progress ?? 1);
const currentY = options.from[1] + dy * (options.progress ?? 1);
const current = computed(() => {
const dx = options.to[0] - options.from[0];
const dy = options.to[1] - options.from[1];
return {
x: options.from[0] + dx * (options.progress ?? 1),
y: options.from[1] + dy * (options.progress ?? 1),
};
});
</script>

<template>
<line
v-bind="figure(options)"
:x1="options.from[0]"
:y1="options.from[1]"
:x2="currentX"
:y2="currentY"
:x2="current.x"
:y2="current.y"
/>
</template>
11 changes: 9 additions & 2 deletions packages/lib/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,27 @@ export default defineConfig({
build: {
lib: {
entry: "src/index.ts",
name: "VueMotionLib",
name: "VueMotionCore",
formats: ["es", "cjs", "iife"],
fileName: "index",
},
rollupOptions: {
external: ["vue"],
},
commonjsOptions: {
transformMixedEsModules: true,
},
},
plugins: [
vue(),
dts({
include: ["./src/**/*.ts", "./src/**/*.vue"],
include: ["./src/**/*.ts"],
rollupTypes: true,
copyDtsFiles: true,
outDir: "./dist",
aliasesExclude: [/@vue-motion\/core/],
staticImport: true,
insertTypesEntry: true,
}),
],
});
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"vite": "catalog:",
"vite-plugin-dts": "^3.9.1"
"vite-plugin-dts": "4.3.0"
}
}
Loading

0 comments on commit f4327a7

Please sign in to comment.