@it-compiles/anima 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/define-animation.d.ts +1 -1
- package/dist/index.js +4 -1969
- package/dist/index.js.map +1 -1
- package/dist/react/RenderDialog.d.ts +10 -0
- package/dist/react/TimelineControls.d.ts +12 -0
- package/dist/react/index.d.ts +4 -0
- package/dist/react.js +2422 -7
- package/dist/react.js.map +1 -1
- package/dist/video-renderer-Buv1c43x.js +3424 -0
- package/dist/video-renderer-Buv1c43x.js.map +1 -0
- package/dist/vite/plugin.d.ts +1 -1
- package/dist/vite.js.map +1 -1
- package/package.json +11 -3
- package/dist/player-MRRNy8I9.js +0 -1458
- package/dist/player-MRRNy8I9.js.map +0 -1
package/dist/vite.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.js","sources":["../src/vite/plugin.ts"],"sourcesContent":["import type { Plugin } from 'vite';\n\nexport interface AnimaPluginOptions {\n /**\n * Glob patterns for animation files that should get HMR support\n * @default ['**\\/*.animation.ts', '**\\/*.animation.tsx']\n */\n include?: string[];\n}\n\n/**\n * Vite plugin for Anima animations.\n * Provides HMR support that preserves playback time when animation files change.\n *\n * @example\n * ```ts\n * // vite.config.ts\n * import { defineConfig } from 'vite';\n * import react from '@vitejs/plugin-react';\n * import { animaPlugin } from '@
|
|
1
|
+
{"version":3,"file":"vite.js","sources":["../src/vite/plugin.ts"],"sourcesContent":["import type { Plugin } from 'vite';\n\nexport interface AnimaPluginOptions {\n /**\n * Glob patterns for animation files that should get HMR support\n * @default ['**\\/*.animation.ts', '**\\/*.animation.tsx']\n */\n include?: string[];\n}\n\n/**\n * Vite plugin for Anima animations.\n * Provides HMR support that preserves playback time when animation files change.\n *\n * @example\n * ```ts\n * // vite.config.ts\n * import { defineConfig } from 'vite';\n * import react from '@vitejs/plugin-react';\n * import { animaPlugin } from '@it-compiles/anima/vite';\n *\n * export default defineConfig({\n * plugins: [react(), animaPlugin()],\n * });\n * ```\n */\nexport function animaPlugin(options: AnimaPluginOptions = {}): Plugin {\n const {\n include = ['**/*.animation.ts', '**/*.animation.tsx'],\n } = options;\n\n const isAnimationFile = (id: string): boolean => {\n return include.some((pattern) => {\n // Simple glob matching for common patterns\n const regex = pattern\n .replace(/\\*\\*/g, '.*')\n .replace(/\\*/g, '[^/]*')\n .replace(/\\./g, '\\\\.');\n return new RegExp(regex).test(id);\n });\n };\n\n return {\n name: 'vite-plugin-anima',\n\n // Handle HMR for animation files\n handleHotUpdate({ file, modules }) {\n if (isAnimationFile(file)) {\n // Let Vite handle the HMR normally\n // The AnimaPlayer component will preserve time automatically\n // because it stores currentTime in a ref before recreating the player\n return modules;\n }\n },\n };\n}\n\nexport default animaPlugin;\n"],"names":[],"mappings":"AA0BO,SAAS,YAAY,UAA8B,IAAY;AAClE,QAAM;AAAA,IACF,UAAU,CAAC,qBAAqB,oBAAoB;AAAA,EAAA,IACpD;AAEJ,QAAM,kBAAkB,CAAC,OAAwB;AAC7C,WAAO,QAAQ,KAAK,CAAC,YAAY;AAE7B,YAAM,QAAQ,QACT,QAAQ,SAAS,IAAI,EACrB,QAAQ,OAAO,OAAO,EACtB,QAAQ,OAAO,KAAK;AACzB,aAAO,IAAI,OAAO,KAAK,EAAE,KAAK,EAAE;AAAA,IACpC,CAAC;AAAA,EACL;AAEA,SAAO;AAAA,IACH,MAAM;AAAA;AAAA,IAGN,gBAAgB,EAAE,MAAM,WAAW;AAC/B,UAAI,gBAAgB,IAAI,GAAG;AAIvB,eAAO;AAAA,MACX;AAAA,IACJ;AAAA,EAAA;AAER;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@it-compiles/anima",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -30,18 +30,26 @@
|
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": ">=18.0.0",
|
|
32
32
|
"react-dom": ">=18.0.0",
|
|
33
|
-
"vite": ">=5.0.0"
|
|
33
|
+
"vite": ">=5.0.0",
|
|
34
|
+
"lucide-react": ">=0.300.0",
|
|
35
|
+
"@radix-ui/react-dialog": ">=1.0.0"
|
|
34
36
|
},
|
|
35
37
|
"peerDependenciesMeta": {
|
|
36
38
|
"react": { "optional": true },
|
|
37
39
|
"react-dom": { "optional": true },
|
|
38
|
-
"vite": { "optional": true }
|
|
40
|
+
"vite": { "optional": true },
|
|
41
|
+
"lucide-react": { "optional": true },
|
|
42
|
+
"@radix-ui/react-dialog": { "optional": true }
|
|
39
43
|
},
|
|
40
44
|
"dependencies": {
|
|
41
45
|
"mp4-muxer": "^5.2.2"
|
|
42
46
|
},
|
|
43
47
|
"devDependencies": {
|
|
48
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
44
49
|
"@vitejs/plugin-react": "^5.1.1",
|
|
50
|
+
"lucide-react": "^0.562.0",
|
|
51
|
+
"react": "^19.2.0",
|
|
52
|
+
"react-dom": "^19.2.0",
|
|
45
53
|
"vite": "^7.2.4",
|
|
46
54
|
"vite-plugin-dts": "^4.5.4"
|
|
47
55
|
}
|