@coppsary/motionly 1.0.0

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.
@@ -0,0 +1,44 @@
1
+ import js from '@eslint/js';
2
+ import tseslint from '@typescript-eslint/eslint-plugin';
3
+ import tsparser from '@typescript-eslint/parser';
4
+ import prettier from 'eslint-plugin-prettier';
5
+ import prettierConfig from 'eslint-config-prettier';
6
+
7
+ export default [
8
+ js.configs.recommended,
9
+ {
10
+ files: ['**/*.ts', '**/*.tsx'],
11
+ languageOptions: {
12
+ parser: tsparser,
13
+ parserOptions: {
14
+ ecmaVersion: 2022,
15
+ sourceType: 'module',
16
+ },
17
+ },
18
+ plugins: {
19
+ '@typescript-eslint': tseslint,
20
+ prettier,
21
+ },
22
+ rules: {
23
+ ...tseslint.configs.recommended.rules,
24
+ 'no-undef': 'off',
25
+ 'prettier/prettier': 'error',
26
+ '@typescript-eslint/no-explicit-any': 'error',
27
+ '@typescript-eslint/explicit-function-return-type': 'off',
28
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
29
+ '@typescript-eslint/no-unused-vars': [
30
+ 'error',
31
+ {
32
+ argsIgnorePattern: '^_',
33
+ varsIgnorePattern: '^_',
34
+ },
35
+ ],
36
+ '@typescript-eslint/no-non-null-assertion': 'warn',
37
+ 'no-console': ['warn', { allow: ['warn', 'error'] }],
38
+ },
39
+ },
40
+ prettierConfig,
41
+ {
42
+ ignores: ['dist', 'node_modules', '**/*.js', '.husky'],
43
+ },
44
+ ];
package/package.json ADDED
@@ -0,0 +1,95 @@
1
+ {
2
+ "name": "@coppsary/motionly",
3
+ "version": "1.0.0",
4
+ "license": "Apache-2.0",
5
+ "type": "module",
6
+ "bin": {
7
+ "motionly": "bin/motionly.js"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "bin",
12
+ "templates",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "engines": {
17
+ "node": ">=20.19.0"
18
+ },
19
+ "scripts": {
20
+ "dev": "vite",
21
+ "build": "tsc && vite build",
22
+ "serve": "node bin/motionly.js",
23
+ "preview": "vite preview",
24
+ "prepublishOnly": "npm run build",
25
+ "inspect:motion": "vite-node scripts/inspect-motion.ts",
26
+ "type-check": "tsc --noEmit",
27
+ "test": "vitest",
28
+ "test:ui": "vitest --ui",
29
+ "test:run": "vitest run",
30
+ "test:coverage": "vitest run --coverage",
31
+ "start": "vite",
32
+ "lint": "eslint src --ext .ts,.tsx",
33
+ "lint:fix": "eslint src --ext .ts,.tsx --fix",
34
+ "format": "prettier --write \"src/**/*.{ts,tsx,css,html}\" \"tests/**/*.{ts,tsx}\"",
35
+ "format:check": "prettier --check \"src/**/*.{ts,tsx,css,html}\" \"tests/**/*.{ts,tsx}\"",
36
+ "prepare": "husky"
37
+ },
38
+ "dependencies": {
39
+ "@vercel/analytics": "2.0.1",
40
+ "gsap": "^3.15.0",
41
+ "lucide-svelte": "^1.0.1",
42
+ "motion": "^12.42.2",
43
+ "motionly": "file:../../../../../tmp/motionly-1.0.0.tgz",
44
+ "svelte": "^5.56.4",
45
+ "svelvet": "^11.0.5"
46
+ },
47
+ "devDependencies": {
48
+ "@eslint/js": "^10.0.1",
49
+ "@sveltejs/vite-plugin-svelte": "^5.1.1",
50
+ "@types/node": "^26.1.1",
51
+ "@typescript-eslint/eslint-plugin": "^8.64.0",
52
+ "@typescript-eslint/parser": "^8.64.0",
53
+ "@vitest/coverage-v8": "^3.1.3",
54
+ "@vitest/ui": "^3.1.3",
55
+ "eslint": "^10.7.0",
56
+ "eslint-config-prettier": "^10.1.8",
57
+ "eslint-plugin-prettier": "^5.5.6",
58
+ "husky": "^9.1.7",
59
+ "jsdom": "^29.1.1",
60
+ "lint-staged": "^16.2.7",
61
+ "prettier": "^3.9.5",
62
+ "svelte-check": "^4.7.2",
63
+ "typescript": "^5.7.3",
64
+ "vite": "^6.4.3",
65
+ "vitest": "^3.1.3"
66
+ },
67
+ "lint-staged": {
68
+ "*.{ts,tsx}": [
69
+ "eslint --fix",
70
+ "prettier --write"
71
+ ],
72
+ "*.{css,html}": [
73
+ "prettier --write"
74
+ ]
75
+ },
76
+ "description": "<div align=\"center\"> <img src=\"public/logo.svg\" alt=\"Motionly Logo\" width=\"100\">",
77
+ "main": "eslint.config.js",
78
+ "directories": {
79
+ "doc": "docs",
80
+ "test": "tests"
81
+ },
82
+ "repository": {
83
+ "type": "git",
84
+ "url": "git+https://github.com/COPPSARY/Motionly.git"
85
+ },
86
+ "keywords": [],
87
+ "author": "",
88
+ "bugs": {
89
+ "url": "https://github.com/COPPSARY/Motionly/issues"
90
+ },
91
+ "homepage": "https://github.com/COPPSARY/Motionly#readme",
92
+ "publishConfig": {
93
+ "access": "public"
94
+ }
95
+ }
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: motionly
3
+ description: Create, edit, validate, and preview editable Motionly .motion animation projects. Use for Motionly storyboards, motion graphics, local assets, timing, presets, and project.motion files.
4
+ ---
5
+
6
+ # Motionly projects
7
+
8
+ Motionly is a visual motion-graphics editor. Its editable source is `project.motion`; normal users refine it in the editor rather than hand-writing it. Keep generated source readable and load it through Motionly's parser and renderer.
9
+
10
+ ## Project and asset workflow
11
+
12
+ - Read `AGENTS.md`, `project.motion`, and relevant files in `assets/` before editing.
13
+ - Reference media by filename under `assets/`: `import "./assets/logo.svg" as logo`.
14
+ - Keep filenames stable. A browser upload with the same filename resolves the same import. If its size or dimensions differ significantly, ask before replacing it.
15
+ - Preserve aspect ratio by setting only `width` or `height`.
16
+ - Use one focal subject per shot and purposeful scene changes. Avoid constant camera drift and the same fade on every layer.
17
+
18
+ ## Supported source
19
+
20
+ ```motion
21
+ canvas {
22
+ size 1920x1080
23
+ fps 60
24
+ duration 5s
25
+ background #020308
26
+ }
27
+
28
+ camera {
29
+ zoom 1
30
+ cameraAnimation "speedZoom(delay 3s duration 1s from 1 peak 1.08 to 1.02 ease power3.out)"
31
+ }
32
+
33
+ import "./assets/logo.svg" as logo
34
+
35
+ logo {
36
+ center
37
+ layer hero
38
+ width 240
39
+ opacity 1
40
+ animation "maskReveal(delay 300ms duration 800ms direction down ease power3.out)"
41
+ }
42
+
43
+ text title {
44
+ value "Make it move."
45
+ center
46
+ layer text
47
+ y 180
48
+ size 72
49
+ color #ffffff
50
+ opacity 1
51
+ textAnimation "keynoteText(split words stagger 80ms duration 750ms delay 1s ease power3.out)"
52
+ }
53
+ ```
54
+
55
+ - Use one `canvas`; `camera` is optional.
56
+ - Render an imported asset with its alias directly. Do not invent `asset`, `video`, `scene`, `group`, `rect`, or `layer` block types.
57
+ - Built-in visual blocks are `text`, `overlay`, and `effect`.
58
+ - Valid layers: `background`, `hero`, `supporting`, `content`, `details`, `text`, `effects`.
59
+ - Common properties: `x`, `y`, `width`, `height`, `scale`, `rotation`, `opacity`, `blur`, `size`, `weight`, `color`, `fill`, `center`, `cover`, `layer`, `duration`, `delay`, `easing`.
60
+ - Use `size`, not `fontSize`. Explicit animations use `easing`; preset options use `ease`.
61
+
62
+ Explicit animation:
63
+
64
+ ```motion
65
+ animate title {
66
+ from {
67
+ opacity 0
68
+ y 80
69
+ blur 10
70
+ }
71
+
72
+ to {
73
+ opacity 1
74
+ y 0
75
+ blur 0
76
+ }
77
+
78
+ duration 1s
79
+ delay 0s
80
+ easing power3.out
81
+ }
82
+ ```
83
+
84
+ Keyframes are percentage blocks inside `keyframes` inside `animate`. Persistent timeline rows use `track NAME { ... }`; media clips use `clip ALIAS { track NAME start 0s duration 5s trimIn 0s trimOut 0s }`. Project audio is `audio "./assets/music.mp3" { start 0s }`.
85
+
86
+ Prefer `power3.out`. Useful text presets: `keynoteText`, `wordReveal`, `charReveal`, `splitReveal`, `blurReveal`, `fadeUp`, `slideIn`, `scaleText`, `typewriter`, `maskReveal`, `gradientReveal`. Useful object/transition presets: `softReveal`, `maskReveal`, `dynamicSlide`, `shapeWipe`, `irisWipe`, `drawSVG`, `sceneExit`, `scaleReveal`. Use `drawSVG` only for simple stroked SVG logos. Camera presets include `slowPush`, `pan`, `pull`, and `speedZoom`.
87
+
88
+ ## Validate and preview
89
+
90
+ From the project folder:
91
+
92
+ ```bash
93
+ npx motionly dev
94
+ ```
95
+
96
+ This loads `project.motion` and `assets/`, opens the editor, and saves changes back to `project.motion`. Verify the canvas size, FPS, exact duration, imports, readable holds, transitions, final frame, and save/reload behavior before finishing.
@@ -0,0 +1,79 @@
1
+ # Motionly Agent Notes
2
+
3
+ Keep Motionly simple and visual.
4
+
5
+ Read the installed `motionly` skill before creating or substantially editing `project.motion`.
6
+
7
+ ## Product Rule
8
+
9
+ Motionly is a motion graphics editor around `.motion`. The user edits visually; `.motion` is the saved source format underneath.
10
+
11
+ Do not make users hand-write `.motion` for normal animation creation.
12
+
13
+ ## Project Files
14
+
15
+ - `project.motion` is the editable animation source.
16
+ - Keep local media in `assets/` and reference it by filename, such as `./assets/logo.svg`.
17
+ - Preserve asset aspect ratios by setting only `width` or `height`.
18
+ - Run `npx motionly dev` to load, validate, preview, and visually refine the project.
19
+
20
+ ## `.motion` Syntax
21
+
22
+ Use this shape:
23
+
24
+ ```motion
25
+ canvas {
26
+ size 1920x1080
27
+ fps 60
28
+ duration 5s
29
+ background #020308
30
+ }
31
+
32
+ text title {
33
+ value "Hello"
34
+ center
35
+ size 72
36
+ color #ffffff
37
+ opacity 1
38
+ }
39
+
40
+ animate title {
41
+ from {
42
+ opacity 0
43
+ y 80
44
+ blur 10
45
+ }
46
+
47
+ to {
48
+ opacity 1
49
+ y 0
50
+ blur 0
51
+ }
52
+
53
+ duration 1.2s
54
+ delay 0s
55
+ easing power3.out
56
+ }
57
+ ```
58
+
59
+ Prefer these properties: `x`, `y`, `scale`, `rotation`, `opacity`, `blur`, `size`, `color`, `center`, `duration`, `delay`, `easing`.
60
+
61
+ Use `size`, not `fontSize`. Use `easing`, not `ease`.
62
+
63
+ ## Preset Guidance
64
+
65
+ Presets should be subtle:
66
+
67
+ - Fade in: `opacity 0` to target opacity
68
+ - Rise in: `opacity 0`, `y + 80` to target
69
+ - Scale in: `opacity 0`, `scale .85` to target
70
+ - Blur reveal: `opacity 0`, `blur 12`, slight `y` offset to target
71
+ - Soft drift: slight `x` offset to target
72
+
73
+ Default to `power3.out` for smooth professional motion.
74
+
75
+ Build scenes around one focal subject. Use scene color changes and purposeful object movement to mark progression; avoid constant camera drift and repeating the same fade on every object.
76
+
77
+ For simple stroked SVG logos, `animation drawSVG(...)` animates their paths and resolves into the original artwork. Use it sparingly on a hero logo; use normal image reveals for detailed SVGs, mockups, and photos.
78
+
79
+ Use the small transition set when a shot actually changes: `shapeWipe`, `irisWipe`, `maskReveal`, `dynamicSlide`, and camera `speedZoom`. Prefer one strong transition per scene over stacking effects.
@@ -0,0 +1,17 @@
1
+ # {{name}}
2
+
3
+ This is a local Motionly project.
4
+
5
+ Motionly starts the project automatically after `init`. To reopen it later:
6
+
7
+ ```bash
8
+ npx motionly dev
9
+ ```
10
+
11
+ Motionly opens `project.motion`, resolves media from `assets/` by filename, and saves visual edits back to the project file. Put images, SVG, video, and audio in `assets/`, then import them from `project.motion`, for example:
12
+
13
+ ```motion
14
+ import "./assets/logo.svg" as logo
15
+ ```
16
+
17
+ The browser-only Motionly editor remains available with `npx motionly`.
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "{{name}}",
3
+ "created": "{{created}}",
4
+ "version": 1
5
+ }
@@ -0,0 +1,32 @@
1
+ canvas {
2
+ size 1920x1080
3
+ fps 60
4
+ duration 5s
5
+ background #020308
6
+ }
7
+
8
+ text title {
9
+ value "{{name}}"
10
+ center
11
+ size 72
12
+ color #ffffff
13
+ opacity 1
14
+ }
15
+
16
+ animate title {
17
+ from {
18
+ opacity 0
19
+ y 80
20
+ blur 10
21
+ }
22
+
23
+ to {
24
+ opacity 1
25
+ y 0
26
+ blur 0
27
+ }
28
+
29
+ duration 1.2s
30
+ delay 0s
31
+ easing power3.out
32
+ }