@motion.page/sdk 0.1.3 → 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.
- package/README.md +25 -26
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +2 -2
- package/package.json +1 -5
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ A high-performance animation SDK with a declarative API. Scroll-triggered animat
|
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@motion.page/sdk)
|
|
6
6
|
[](https://bundlephobia.com/package/@motion.page/sdk)
|
|
7
|
-
[](
|
|
7
|
+
[](#license)
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -12,6 +12,7 @@ A high-performance animation SDK with a declarative API. Scroll-triggered animat
|
|
|
12
12
|
|
|
13
13
|
- [Installation](#installation)
|
|
14
14
|
- [Quick Start](#quick-start)
|
|
15
|
+
- [AI Agent Support](#ai-agent-support)
|
|
15
16
|
- [Core Concept](#core-concept)
|
|
16
17
|
- [Implicit Values](#implicit-values)
|
|
17
18
|
- [API Reference](#api-reference)
|
|
@@ -42,8 +43,6 @@ yarn add @motion.page/sdk
|
|
|
42
43
|
pnpm add @motion.page/sdk
|
|
43
44
|
```
|
|
44
45
|
|
|
45
|
-
📖 Full documentation and interactive examples: [motion.page](https://motion.page)
|
|
46
|
-
|
|
47
46
|
> **⚠️ Browser-only:** This SDK requires a browser environment (`document`, `window`). In SSR frameworks (Next.js, Nuxt, Astro), wrap SDK calls in `useEffect`, `onMounted`, or client-side scripts.
|
|
48
47
|
|
|
49
48
|
For direct browser use without a bundler, see [Browser Build](#browser-build).
|
|
@@ -137,6 +136,24 @@ Motion('audio-fade', state, {
|
|
|
137
136
|
|
|
138
137
|
---
|
|
139
138
|
|
|
139
|
+
## AI Agent Support
|
|
140
|
+
|
|
141
|
+
This package includes built-in support for AI coding assistants.
|
|
142
|
+
|
|
143
|
+
**`llms.txt` included** — An `llms.txt` file (per the [llmstxt.org](https://llmstxt.org) standard) ships with the package and is automatically discoverable by AI assistants when `@motion.page/sdk` is installed in `node_modules`. It provides a structured index of the entire SDK API so agents can answer questions and generate correct code without hallucinating APIs.
|
|
144
|
+
|
|
145
|
+
**Full skill plugin** — For comprehensive AI-assisted development — complete API reference, 50+ examples, and GSAP / Framer Motion migration guides — install the official plugin:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Universal (40+ agents)
|
|
149
|
+
npx skills add motion-page/claude-plugin
|
|
150
|
+
|
|
151
|
+
# Claude Code
|
|
152
|
+
/install-plugin npm:@motion.page/claude-plugin
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
140
157
|
## Core Concept
|
|
141
158
|
|
|
142
159
|
Every animation in the SDK is a **named timeline**. The name is the first argument to `Motion()` and acts as a registry key — calling `Motion('same-name')` always returns the same `Timeline` instance.
|
|
@@ -1193,34 +1210,16 @@ import { Types } from '@motion.page/sdk';
|
|
|
1193
1210
|
|
|
1194
1211
|
---
|
|
1195
1212
|
|
|
1196
|
-
## AI Agent Support
|
|
1197
|
-
|
|
1198
|
-
This package includes built-in support for AI coding assistants.
|
|
1199
|
-
|
|
1200
|
-
**`llms.txt` included** — An `llms.txt` file (per the [llmstxt.org](https://llmstxt.org) standard) ships with the package and is automatically discoverable by AI assistants when `@motion.page/sdk` is installed in `node_modules`. It provides a structured index of the entire SDK API so agents can answer questions and generate correct code without hallucinating APIs.
|
|
1201
|
-
|
|
1202
|
-
**Full skill plugin** — For comprehensive AI-assisted development — complete API reference, 50+ examples, and GSAP / Framer Motion migration guides — install the official plugin:
|
|
1203
|
-
|
|
1204
|
-
```bash
|
|
1205
|
-
# Universal (40+ agents)
|
|
1206
|
-
npx skills add motion-page/claude-plugin
|
|
1207
|
-
|
|
1208
|
-
# Claude Code
|
|
1209
|
-
/install-plugin npm:@motion.page/claude-plugin
|
|
1210
|
-
```
|
|
1211
|
-
|
|
1212
|
-
---
|
|
1213
|
-
|
|
1214
1213
|
## Browser Build
|
|
1215
1214
|
|
|
1216
|
-
### Browser Build (IIFE)
|
|
1217
|
-
|
|
1218
1215
|
An IIFE build script is included but not part of the default build output. To generate a browser bundle:
|
|
1219
1216
|
|
|
1220
1217
|
```bash
|
|
1221
1218
|
bun run packages/sdk/scripts/build-iife.ts
|
|
1222
1219
|
```
|
|
1223
1220
|
|
|
1221
|
+
> **Note:** This script is available in the [source repository](https://motion.page) only. It is not included in the npm package.
|
|
1222
|
+
|
|
1224
1223
|
This creates a self-contained script that exposes `window.Motion` and `window.MotionTimeline`:
|
|
1225
1224
|
|
|
1226
1225
|
```html
|
|
@@ -1252,12 +1251,12 @@ Modern evergreen browsers:
|
|
|
1252
1251
|
|
|
1253
1252
|
## License
|
|
1254
1253
|
|
|
1255
|
-
**FSL-1.1-Apache-2.0** — [Functional Source License, Version 1.1, Apache 2.0 Future License](
|
|
1254
|
+
**FSL-1.1-Apache-2.0** — [Functional Source License, Version 1.1, Apache 2.0 Future License](#license)
|
|
1256
1255
|
|
|
1257
|
-
**TL;DR:** Free for everyone. Use it in your websites, apps, SaaS products, client projects — commercial or not.
|
|
1256
|
+
**TL;DR:** Free for everyone. Use it in your websites, apps, SaaS products, client projects — commercial or not. One restriction: you can't use it to build a competing animation builder tool.
|
|
1258
1257
|
|
|
1259
1258
|
**The one exception:** You cannot use this SDK to build a product that competes with Motion.page (e.g., a no-code animation builder, visual animation editor, or similar tool). If you're building something like that, [contact us](mailto:hello@motion.page) for an enterprise license.
|
|
1260
1259
|
|
|
1261
1260
|
After 2 years from each release, the code converts to the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) license with no restrictions at all.
|
|
1262
1261
|
|
|
1263
|
-
See [LICENSE](
|
|
1262
|
+
See [LICENSE](#license) for the full legal text.
|