motionary 9.9.0 → 10.1.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/CHANGELOG.md +41 -0
- package/README.md +45 -0
- package/bin/create-motionary-plugin.mjs +124 -0
- package/dist/chunks/{audio-C1uFaOKQ.js → audio-D95jwlOh.js} +3 -3
- package/dist/chunks/{audio-C1uFaOKQ.js.map → audio-D95jwlOh.js.map} +1 -1
- package/dist/chunks/{base-DWYNLg6P.js → base-BnRyfuyM.js} +2 -2
- package/dist/chunks/{base-DWYNLg6P.js.map → base-BnRyfuyM.js.map} +1 -1
- package/dist/chunks/{builtins-DoCY96r9.js → builtins-CqIq1zBv.js} +3 -3
- package/dist/chunks/{builtins-DoCY96r9.js.map → builtins-CqIq1zBv.js.map} +1 -1
- package/dist/chunks/{core-DoR4w-E4.js → core-DsGoL9EY.js} +2 -2
- package/dist/chunks/{core-DoR4w-E4.js.map → core-DsGoL9EY.js.map} +1 -1
- package/dist/chunks/{core-BhuojMcL.js → core-XA2yhn1b.js} +2 -2
- package/dist/chunks/{core-BhuojMcL.js.map → core-XA2yhn1b.js.map} +1 -1
- package/dist/chunks/{fx-XBDr7-dH.js → fx-CtnrFEg9.js} +2 -2
- package/dist/chunks/{fx-XBDr7-dH.js.map → fx-CtnrFEg9.js.map} +1 -1
- package/dist/chunks/{gpu-DvLHwLxy.js → gpu-CDcXiNA8.js} +2 -2
- package/dist/chunks/{gpu-DvLHwLxy.js.map → gpu-CDcXiNA8.js.map} +1 -1
- package/dist/chunks/keyframes-CyH_abhI.js +183 -0
- package/dist/chunks/keyframes-CyH_abhI.js.map +1 -0
- package/dist/chunks/keyframes-cUdsXSXQ.cjs +187 -0
- package/dist/chunks/keyframes-cUdsXSXQ.cjs.map +1 -0
- package/dist/chunks/{manifest-BDpbuI-9.js → manifest-D58HXVY-.js} +2 -2
- package/dist/chunks/{manifest-BDpbuI-9.js.map → manifest-D58HXVY-.js.map} +1 -1
- package/dist/chunks/{player-CYGvna09.js → player-48Zy_NBG.js} +4 -4
- package/dist/chunks/{player-CYGvna09.js.map → player-48Zy_NBG.js.map} +1 -1
- package/dist/chunks/registry-C0xLNq3-.cjs +81 -0
- package/dist/chunks/registry-C0xLNq3-.cjs.map +1 -0
- package/dist/chunks/{registry-BRM2BRRY.js → registry-gFJRpPES.js} +2 -2
- package/dist/chunks/{registry-BRM2BRRY.js.map → registry-gFJRpPES.js.map} +1 -1
- package/dist/chunks/registry-jF8VIA_9.js +69 -0
- package/dist/chunks/registry-jF8VIA_9.js.map +1 -0
- package/dist/chunks/{spring-CAlkc1co.js → spring-CZDNyqWp.js} +2 -2
- package/dist/chunks/{spring-CAlkc1co.js.map → spring-CZDNyqWp.js.map} +1 -1
- package/dist/chunks/tween-DDObu9iA.js +542 -0
- package/dist/chunks/tween-DDObu9iA.js.map +1 -0
- package/dist/chunks/tween-JEthWrjo.cjs +554 -0
- package/dist/chunks/tween-JEthWrjo.cjs.map +1 -0
- package/dist/chunks/{variants-BBfyVPYm.js → variants-GU3yIL4F.js} +2 -2
- package/dist/chunks/{variants-BBfyVPYm.js.map → variants-GU3yIL4F.js.map} +1 -1
- package/dist/components/a11y.js +2 -2
- package/dist/components/angular.js +8 -8
- package/dist/components/background.js +2 -2
- package/dist/components/bridge.js +1 -1
- package/dist/components/cards.js +2 -2
- package/dist/components/click.js +3 -3
- package/dist/components/core.cjs +219 -0
- package/dist/components/core.cjs.map +1 -0
- package/dist/components/core.d.cts +81 -0
- package/dist/components/core.d.ts +81 -0
- package/dist/components/core.js +214 -0
- package/dist/components/core.js.map +1 -0
- package/dist/components/depth.js +3 -3
- package/dist/components/design.js +3 -3
- package/dist/components/dsl.js +2 -2
- package/dist/components/effects.js +9 -9
- package/dist/components/engine.js +2 -2
- package/dist/components/feedback.js +1 -1
- package/dist/components/fx-3d.js +2 -2
- package/dist/components/fx-ai.js +2 -2
- package/dist/components/fx-chart.js +2 -2
- package/dist/components/fx-cinema.js +2 -2
- package/dist/components/fx-cyber.js +2 -2
- package/dist/components/fx-festival.js +2 -2
- package/dist/components/fx-focus.js +2 -2
- package/dist/components/fx-form.js +2 -2
- package/dist/components/fx-game.js +2 -2
- package/dist/components/fx-genart.js +2 -2
- package/dist/components/fx-geo.js +2 -2
- package/dist/components/fx-gesture.js +2 -2
- package/dist/components/fx-gpu.js +3 -3
- package/dist/components/fx-light.js +2 -2
- package/dist/components/fx-lottie.js +2 -2
- package/dist/components/fx-morph.js +2 -2
- package/dist/components/fx-music.js +3 -3
- package/dist/components/fx-organic.js +2 -2
- package/dist/components/fx-paper.js +2 -2
- package/dist/components/fx-perf.js +2 -2
- package/dist/components/fx-physics.js +2 -2
- package/dist/components/fx-retro.js +2 -2
- package/dist/components/fx-safe.js +2 -2
- package/dist/components/fx-shop.js +2 -2
- package/dist/components/fx-social.js +2 -2
- package/dist/components/fx-spatial.js +2 -2
- package/dist/components/fx-surface.js +2 -2
- package/dist/components/fx-text.js +2 -2
- package/dist/components/fx-transitions.js +3 -3
- package/dist/components/fx-video.js +2 -2
- package/dist/components/fx-weather.js +2 -2
- package/dist/components/fx.js +6 -6
- package/dist/components/fx2.cjs +1 -10
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +1 -6
- package/dist/components/fx2.d.ts +1 -6
- package/dist/components/fx2.js +7 -15
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/gesture.js +4 -4
- package/dist/components/interaction.js +1 -1
- package/dist/components/layout.js +1 -1
- package/dist/components/marketplace.cjs +104 -0
- package/dist/components/marketplace.cjs.map +1 -1
- package/dist/components/marketplace.d.cts +33 -2
- package/dist/components/marketplace.d.ts +33 -2
- package/dist/components/marketplace.js +105 -5
- package/dist/components/marketplace.js.map +1 -1
- package/dist/components/native.js +3 -3
- package/dist/components/packs.js +1 -1
- package/dist/components/page.js +3 -3
- package/dist/components/perf.js +2 -2
- package/dist/components/physics.js +3 -3
- package/dist/components/plugins.cjs +138 -0
- package/dist/components/plugins.cjs.map +1 -0
- package/dist/components/plugins.d.cts +120 -0
- package/dist/components/plugins.d.ts +120 -0
- package/dist/components/plugins.js +105 -0
- package/dist/components/plugins.js.map +1 -0
- package/dist/components/reveal.js +1 -1
- package/dist/components/solid.js +8 -8
- package/dist/components/svelte.js +8 -8
- package/dist/components/svg.js +1 -1
- package/dist/components/text.js +2 -2
- package/dist/components/timeline.js +3 -3
- package/dist/components/transitions.js +1 -1
- package/dist/components/ui.js +4 -4
- package/dist/components/vue.js +8 -8
- package/dist/components/webgl.js +1 -1
- package/dist/components/widgets.cjs +420 -199
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +42 -2
- package/dist/components/widgets.d.ts +42 -2
- package/dist/components/widgets.js +428 -209
- package/dist/components/widgets.js.map +1 -1
- package/dist/components.js +10 -10
- package/dist/index.js +2 -2
- package/dist/llms-full.txt +3018 -0
- package/dist/llms.txt +207 -0
- package/dist/manifest.json +7562 -0
- package/dist/manifest.schema.json +85 -0
- package/dist/runtime/format-css.cjs +184 -0
- package/dist/runtime/format-css.cjs.map +1 -0
- package/dist/runtime/format-css.d.cts +174 -0
- package/dist/runtime/format-css.d.ts +174 -0
- package/dist/runtime/format-css.iife.js +2 -0
- package/dist/runtime/format-css.iife.js.map +1 -0
- package/dist/runtime/format-css.js +176 -0
- package/dist/runtime/format-css.js.map +1 -0
- package/dist/runtime/format-motion.cjs +138 -0
- package/dist/runtime/format-motion.cjs.map +1 -0
- package/dist/runtime/format-motion.d.cts +208 -0
- package/dist/runtime/format-motion.d.ts +208 -0
- package/dist/runtime/format-motion.iife.js +2 -0
- package/dist/runtime/format-motion.iife.js.map +1 -0
- package/dist/runtime/format-motion.js +132 -0
- package/dist/runtime/format-motion.js.map +1 -0
- package/dist/runtime.cjs +78 -0
- package/dist/runtime.cjs.map +1 -0
- package/dist/runtime.d.cts +236 -0
- package/dist/runtime.d.ts +236 -0
- package/dist/runtime.iife.js +2 -0
- package/dist/runtime.iife.js.map +1 -0
- package/dist/runtime.js +54 -0
- package/dist/runtime.js.map +1 -0
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +85 -14
- package/docs/components.md +66 -0
- package/docs/core.md +47 -0
- package/docs/deprecations.md +1 -1
- package/docs/runtime/core.md +55 -0
- package/docs/runtime/format-css.md +59 -0
- package/docs/runtime/format-motion.md +56 -0
- package/docs/upgrading-10.md +1 -1
- package/package.json +88 -6
package/docs/ROADMAP.md
CHANGED
|
@@ -1,14 +1,85 @@
|
|
|
1
|
-
# Motionary 路线图(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
# Motionary 路线图(10.0 之后)
|
|
2
|
+
|
|
3
|
+
10.0 已发布:全新架构 —— 零依赖核心 `motionary/core`(gzip 后不到 10 KB,实测约 2 KB:`createMotion()`、入场预设、`play` / `bind` / `reveal`、统一暂停与倍速)、所有特效插件化(`motionary/plugins`,按需 `createMotion().use(retro, cinema)`)、GPU 特效默认使用 WebGPU(不支持时回退 WebGL2 → Canvas);移除 9.9 弃用的 `registerEffectPacks()`;`motionary` 与 `use-scroll-animate` 同时成为 npm `latest`。
|
|
4
|
+
|
|
5
|
+
下面是 10.1 → 11.0 的计划(2026-10-09 修订)。每个版本一个主题 + 一组新组件,另外贯穿两条长期主线:
|
|
6
|
+
|
|
7
|
+
- **主线 A · AI 可读组件**:让 AI 模型能自己发现、理解并正确使用每一个组件 —— 机器可读的组件清单 `components.json`、`llms.txt`、逐组件 Markdown 文档、`AGENTS.md` 提示指南,以及 `motionary-mcp` MCP 服务器。
|
|
8
|
+
- **主线 B · 自研通用前置模块 `motionary/runtime`**:**不再依赖 GSAP、SplitType、Lenis、Three.js、lottie-web、Matter.js、Embla 等第三方库,也不做"全家桶"大包。** Motionary 自己从零实现一个零依赖运行时:共享 ticker / RAF 调度器、tween + timeline 引擎与缓动、模块注册与清晰错误,以及一组按功能 / 格式拆分的模块。每个模块一个子路径(`motionary/runtime/<module>`),可 tree-shake,只为用到的部分付费;可单独通过 CDN 使用(ESM 与自注册 IIFE);导入时不访问 `window`(SSR 安全),能放进 Web Worker 的部分支持 Worker;自带 TypeScript 类型;适用于纯 HTML `<script>`、ESM 打包器、React / Vue / Svelte / Angular。全部为原创实现,不复制、不逆向任何第三方库代码(GSAP 许可证禁止逆向工程)。
|
|
9
|
+
|
|
10
|
+
## 主线 B 的统一规则(从 10.1 起强制执行)
|
|
11
|
+
|
|
12
|
+
需要 runtime 模块(或官方第三方运行时,见下文)的组件,在以下 **5 处** 都必须写明前置条件:画廊卡片、Store 详情、文档页、README 对应章节、AI 组件清单(manifest)。前置条件固定包含:
|
|
13
|
+
|
|
14
|
+
1. **安装命令**:runtime 模块只需 `npm i motionary` 一次;官方运行时写出确切命令(如 `npm i @rive-app/canvas`);
|
|
15
|
+
2. **导入路径**:如 `motionary/runtime/scroll`;
|
|
16
|
+
3. **CDN 地址**:可直接复制的 `<script>`(主版本固定,如 `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js`)以及 ESM 地址;
|
|
17
|
+
4. **引入顺序与注册代码**:先 `use(scroll)`(会同时注册核心),再注册组件;CDN 先加载 `runtime.iife.js`,再加载模块 IIFE(自动注册);
|
|
18
|
+
5. **最小用法示例**。
|
|
19
|
+
|
|
20
|
+
Store 卡片显示 **「Requires: motionary/runtime/<module>」** 徽章(官方运行时为 `Requires: @rive-app/canvas` 等)。缺少模块时组件显示并抛出清晰错误(包含上面几项与文档链接)。CI 的 `npm run check:peer-docs` 检查 5 处是否齐全;每个模块有固定的 gzip 体积预算,CI 强制(`size-budget.json`)。
|
|
21
|
+
|
|
22
|
+
## 格式兼容:每种格式一个独立加载器模块
|
|
23
|
+
|
|
24
|
+
`motionary/runtime` 尽可能兼容常见动画 / 资源格式,全部自研、零依赖,每种格式一个可 tree-shake 的加载器模块,各有体积预算、真实样例文件测试(自制或 CC0 / CC-BY 样例并注明出处)、文档页兼容性表格与 AI 清单条目:
|
|
25
|
+
|
|
26
|
+
- **矢量**:Lottie JSON(形状、预合成、遮罩 / 轨道遮罩、修剪路径、渐变、文本层、表达式子集)+ dotLottie(`.lottie` zip,主题 / 状态机可行子集);SVG(SMIL `animate` / `animateTransform` / `animateMotion` 回放、路径变形、CSS 动画 SVG)。
|
|
27
|
+
- **CSS / Web**:CSS `@keyframes` 与 Web Animations API 关键帧导入 timeline;Motion / Framer 风格关键帧 JSON。
|
|
28
|
+
- **位图 / 序列**:精灵图(TexturePacker / Aseprite JSON)、GIF / APNG / 动画 WebP 拆帧到 canvas、图片序列、视频(MP4 / WebM)纹理与滚动拖动。
|
|
29
|
+
- **3D**:glTF 2.0 / GLB(网格、PBR 基础、蒙皮、变形目标、动画)、OBJ / MTL。
|
|
30
|
+
- **物理 / 数据**:自定义、带版本号的场景 JSON(`motionary-scene@1`)。
|
|
31
|
+
|
|
32
|
+
### 使用官方第三方运行时的组件(及原因)
|
|
33
|
+
|
|
34
|
+
只有我们**无法合理自行实现**的格式才使用官方运行时,一律作为**可选** `peerDependencies`(`peerDependenciesMeta.optional: true`),首次使用时懒加载,缺失时清晰报错,并同样满足 5 处前置条件规则 + Requires 徽章:
|
|
35
|
+
|
|
36
|
+
| 组件 / 功能 | 官方运行时 | 原因 |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `<usa-rive>`(10.6) | `@rive-app/canvas`(或 `@rive-app/webgl2`) | `.riv` 是 Rive 的专有二进制格式,没有公开的完整规范,自研无法保证正确性 |
|
|
39
|
+
| Lottie 全保真模式(可选,10.6+) | `lottie-web` | 自研播放器只覆盖文档列出的子集;需要子集之外特性(3D 图层、效果等)时可切换到官方播放器 |
|
|
40
|
+
| dotLottie 完整状态机(可选,10.9) | `@lottiefiles/dotlottie-web` | 完整状态机规范庞大且仍在演进,自研只做子集 |
|
|
41
|
+
| glTF Draco / KTX2(Basis) 压缩(可选,10.9) | `draco3d`、`basis_universal` 官方解码器 | 专用压缩解码器(WASM),自研成本与风险过高 |
|
|
42
|
+
|
|
43
|
+
## 各版本计划
|
|
44
|
+
|
|
45
|
+
- ✅ **v10.1** — 插件生态 + AI 清单 + runtime 核心:插件开发脚手架(`create-motionary-plugin`)、插件签名校验(SRI 风格 SHA-256 完整性)与版本兼容检查。
|
|
46
|
+
- 主线 A:机器可读组件清单 `components.json`(Pages 根目录 + npm 包内 `motionary/manifest.json`,带 JSON Schema),每个组件包含:标签名、attributes、事件、插槽、方法、导入路径、CDN URL、最小示例、前置条件;Pages 根目录提供 `llms.txt` 与 `llms-full.txt`,均在构建时由源码生成。
|
|
47
|
+
- 主线 B:**runtime 核心** —— 共享 ticker / RAF 调度器、tween + timeline 引擎与缓动、`use()` / `requireModule()` 注册 API 与清晰错误、「Requires: motionary/runtime/…」徽章、前置条件模板、`check:peer-docs`(检查 runtime 模块文档与 5 处前置条件)、清单列出 runtime 模块。
|
|
48
|
+
- 格式:CSS `@keyframes` + WAAPI 关键帧(`motionary/runtime/format-css`)、Motion / Framer 关键帧 JSON(`motionary/runtime/format-motion`)。
|
|
49
|
+
- 新组件:插件详情卡 `<usa-plugin-card>`(Requires: motionary/runtime)、安装按钮 `<usa-install-button>`。
|
|
50
|
+
- **v10.2** — 核心 DSL 化:`motionary/core` 直接支持 `data-motion` 声明式语法。
|
|
51
|
+
- 主线 A:逐组件 Markdown 文档(`/docs/components/<tag>.md`,由清单生成);仓库根目录新增 `AGENTS.md` 与提示指南。
|
|
52
|
+
- 主线 B:**scroll 模块**(`motionary/runtime/scroll`)—— pin、scrub、markers、start / end 规则(自研,功能对标 ScrollTrigger,但不复制其代码或 API)。
|
|
53
|
+
- 格式:SVG SMIL 回放、路径变形、CSS 动画 SVG(`motionary/runtime/format-svg`)。
|
|
54
|
+
- 新组件:动效检查器面板、`<usa-scroll-scene>`(Requires: motionary/runtime/scroll)。
|
|
55
|
+
- **v10.3** — View Transitions 2.0:跨文档页面转场、共享元素动画。
|
|
56
|
+
- 主线 B:**text 模块** —— 逐字 / 逐词 / 逐行拆分(保留可访问文本)。
|
|
57
|
+
- 格式:精灵图(TexturePacker / Aseprite JSON)、图片序列(`motionary/runtime/format-sprite`)。
|
|
58
|
+
- 新组件:路由转场容器、`<usa-text-splitter>`(`<usa-split-text>` 已被 4.x 文本组件占用)。
|
|
59
|
+
- **v10.4** — 滚动驱动 3.0:原生 `animation-timeline` 优先、JS 回退插件化。
|
|
60
|
+
- 主线 A:发布 `motionary-mcp` MCP 服务器(`npx motionary-mcp`,stdio):`list_components`、`search_components`、`get_component`、`get_example`、`scaffold_snippet`(自动带上前置条件)。
|
|
61
|
+
- 主线 B:**smooth 模块** —— 平滑滚动(减少动态效果时停用)。
|
|
62
|
+
- 格式:GIF(自研 LZW)、APNG、动画 WebP 拆帧到 canvas。
|
|
63
|
+
- 新组件:滚动进度环、视差分层容器、`<usa-smooth-scroll>`。
|
|
64
|
+
- **v10.5** — WebGPU 特效 2.0:计算着色器粒子、后处理链。
|
|
65
|
+
- 主线 B:**gl 模块** —— 迷你 WebGL2 场景(网格 / 基础几何体、相机、灯光、着色器材质;不是 Three.js 克隆)。
|
|
66
|
+
- 格式:OBJ / MTL、glTF 2.0 / GLB 基础、视频纹理。
|
|
67
|
+
- 新组件:粒子画布、着色器背景、`<usa-gl-scene>`(保留别名 `<usa-three-scene>`)。
|
|
68
|
+
- **v10.6** — 动效设计令牌 2.0:W3C Design Tokens 格式导入导出。
|
|
69
|
+
- 主线 B:**vector 模块** —— 矢量动画播放器,支持文档列出的 Lottie JSON 子集(形状、变换、修剪路径、基础遮罩、预合成、渐变;文档列出不支持的特性)+ dotLottie。
|
|
70
|
+
- 官方运行时:`<usa-rive>`(Requires: @rive-app/canvas,可选 peer,懒加载)。
|
|
71
|
+
- 新组件:令牌编辑器、`<usa-lottie-player>`、`<usa-rive>`。
|
|
72
|
+
- **v10.7** — AI 辅助动效:自然语言 → 动效描述、动效建议。
|
|
73
|
+
- 主线 A:MCP 2.0 —— `suggest_motion`、`validate_snippet`;AI 使用评测集(运行 AI 写的片段检验能否直接工作)。
|
|
74
|
+
- 主线 B:**physics 模块** —— 2D 刚体(圆 / 盒 / 多边形)、约束;场景 JSON `motionary-scene@1`。
|
|
75
|
+
- 新组件:动效提示输入框、`<usa-physics-playground>`。
|
|
76
|
+
- **v10.8** — 跨端 3.0:小程序适配、鸿蒙 ArkTS 示例。
|
|
77
|
+
- 主线 B:**drag-snap 模块** —— 拖拽吸附 / 惯性轮播。
|
|
78
|
+
- 格式:glTF 蒙皮 / 变形目标 / 动画;Lottie 文本层 + 表达式子集。
|
|
79
|
+
- 新组件:跨端预览器、`<usa-snap-carousel>`(`<usa-carousel>` 已被 6.2 轮播占用)。
|
|
80
|
+
- **v10.9** — 11.0 预备:11.0 弃用警告、`upgrading-11.md` 与 `usa-codemod-11`。
|
|
81
|
+
- 主线 A:清单 Schema v2 定稿(11.0 起冻结)。
|
|
82
|
+
- 主线 B:全部 runtime 模块审计、逐模块体积预算复核;dotLottie 主题 / 状态机子集;Draco / KTX2 官方解码器挂钩。
|
|
83
|
+
- **v11.0** — 下一代:核心继续瘦身(目标 < 5 KB)、移除 10.9 弃用项;清单 Schema v2 与 `motionary-mcp` 1.0 稳定版;`motionary/runtime/*` 转为稳定 API;npm `latest`。
|
|
84
|
+
|
|
85
|
+
完整的格式兼容性矩阵(格式 / 版本 / 支持特性 / 已知缺口 / 回退方案)见各模块文档页 `docs/runtime/<module>.md`。
|
package/docs/components.md
CHANGED
|
@@ -1310,6 +1310,72 @@ usePlugins(definePlugin('acme/sparkle', [sparkleEffect]));
|
|
|
1310
1310
|
```
|
|
1311
1311
|
- `registerEffectPacks()` is deprecated (removed in 10.0) → `registerAllPlugins()`; `npx usa-codemod-10 --write src`. See docs/upgrading-10.md.
|
|
1312
1312
|
|
|
1313
|
+
### v10.0 New architecture — `motionary/core` (< 10 KB gzip) + `motionary/plugins`
|
|
1314
|
+
|
|
1315
|
+
```js
|
|
1316
|
+
import { createMotion } from 'motionary/core';
|
|
1317
|
+
import { retro, cinema } from 'motionary/plugins';
|
|
1318
|
+
const motion = createMotion().use(retro, cinema);
|
|
1319
|
+
motion.reveal('.card', 'fade-up', { stagger: 80 });
|
|
1320
|
+
motion.bind(button, 'vhs-glitch', { trigger: 'click' });
|
|
1321
|
+
```
|
|
1322
|
+
- Zero dependencies, ≈ 2 KB gzip; every effect pack is a plugin; WebGPU is the default GPU backend. `registerEffectPacks()` is removed → `registerAllPlugins()` (`npx usa-codemod-10 --write src`). See docs/core.md and docs/upgrading-10.md.
|
|
1323
|
+
|
|
1324
|
+
### v10.1 Runtime (`motionary/runtime`) + AI manifest: `<usa-plugin-card>`, `<usa-install-button>` (`components/widgets`)
|
|
1325
|
+
|
|
1326
|
+
`motionary/runtime` is Motionary's own zero-dependency animation runtime (ticker, tween + timeline, easing, module registry) with one tree-shakable module per feature / format — see [docs/runtime/](runtime/). Components that need a module carry a **Requires** badge and list their prerequisites below.
|
|
1327
|
+
|
|
1328
|
+
```html
|
|
1329
|
+
<usa-plugin-card name="retro" title="Retro" version="1.2.0" author="Motionary" engine="^10.0.0" downloads="12400">
|
|
1330
|
+
<p>Pixel, CRT, VHS and Y2K effects.</p>
|
|
1331
|
+
</usa-plugin-card>
|
|
1332
|
+
<usa-install-button package="motionary" managers="npm pnpm yarn bun cdn" cdn="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></usa-install-button>
|
|
1333
|
+
```
|
|
1334
|
+
|
|
1335
|
+
| Element | Attributes | Methods / events |
|
|
1336
|
+
|---|---|---|
|
|
1337
|
+
| `<usa-plugin-card>` (Requires: motionary/runtime) | `name`, `title`, `version`, `author`, `engine` (semver), `downloads`, `integrity`, `src` | `toggle(open?)`, `verify()`, `compat()`; `usa:toggle`, `usa:verified`, `usa:runtime-missing` |
|
|
1338
|
+
| `<usa-install-button>` | `package`, `managers`, `cdn`, `dev`, `manager` | `command(manager)`, `copy()`; `usa:copy` |
|
|
1339
|
+
|
|
1340
|
+
AI manifest: `motionary/manifest.json` (Pages: `/components.json`, `/llms.txt`, `/llms-full.txt`).
|
|
1341
|
+
|
|
1342
|
+
<!-- prereqs:start -->
|
|
1343
|
+
## Prerequisites of runtime-powered components
|
|
1344
|
+
|
|
1345
|
+
Generated from `showcase/catalog/prereqs.js`. Runtime modules: see [docs/runtime/](runtime/).
|
|
1346
|
+
|
|
1347
|
+
### `<usa-plugin-card>` — Requires: motionary/runtime
|
|
1348
|
+
|
|
1349
|
+
- **Install:** `npm i motionary`
|
|
1350
|
+
- **Import order & registration:** Import motionary/runtime and call use() once at start-up, before any runtime-powered component mounts. CDN: the IIFE registers itself (window.MotionaryRuntime).
|
|
1351
|
+
|
|
1352
|
+
```js
|
|
1353
|
+
import { use } from 'motionary/runtime';
|
|
1354
|
+
import { definePluginCard } from 'motionary/components/widgets';
|
|
1355
|
+
|
|
1356
|
+
use();
|
|
1357
|
+
definePluginCard(); // registers <usa-plugin-card> — after the prerequisites
|
|
1358
|
+
```
|
|
1359
|
+
|
|
1360
|
+
- **CDN:**
|
|
1361
|
+
|
|
1362
|
+
```html
|
|
1363
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
1364
|
+
<!-- then the component bundles -->
|
|
1365
|
+
<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
|
|
1366
|
+
<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
|
|
1367
|
+
```
|
|
1368
|
+
|
|
1369
|
+
- **Minimal example:**
|
|
1370
|
+
|
|
1371
|
+
```html
|
|
1372
|
+
<usa-plugin-card name="retro" title="Retro" version="1.2.0" author="Motionary" engine="^10.0.0" downloads="12400">
|
|
1373
|
+
<p>Pixel, CRT, VHS and Y2K effects.</p>
|
|
1374
|
+
</usa-plugin-card>
|
|
1375
|
+
```
|
|
1376
|
+
|
|
1377
|
+
<!-- prereqs:end -->
|
|
1378
|
+
|
|
1313
1379
|
## Frameworks
|
|
1314
1380
|
|
|
1315
1381
|
Custom elements work in every framework. Register once (e.g. in your entry file), then use the tags.
|
package/docs/core.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# `motionary/core` — the 10.0 zero-dependency core
|
|
2
|
+
|
|
3
|
+
`motionary/core` is the whole runtime of Motionary 10: no dependencies, no side effects, **under 10 KB gzip** (about 2 KB today; a size budget and a test keep it there). Everything else — every effect pack, every GPU background — is a plugin you add with `use()`.
|
|
4
|
+
|
|
5
|
+
```js
|
|
6
|
+
import { createMotion } from 'motionary/core';
|
|
7
|
+
import { retro, cinema } from 'motionary/plugins';
|
|
8
|
+
|
|
9
|
+
const motion = createMotion().use(retro, cinema);
|
|
10
|
+
|
|
11
|
+
motion.reveal('.card', 'fade-up', { stagger: 80 }); // scroll-in entrances
|
|
12
|
+
motion.bind(button, 'vhs-glitch', { trigger: 'click' }); // effect on a trigger
|
|
13
|
+
await motion.play(hero, 'dolly-in', { duration: 900 }); // play once, await it
|
|
14
|
+
motion.pause(); motion.setRate(0.5); motion.resume(); // one control for everything it started
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## API
|
|
18
|
+
|
|
19
|
+
- `createMotion({ reducedMotion?: 'user' | 'reduce', rate?: number })` → instance:
|
|
20
|
+
- `use(...plugins)` — add plugins (`{ name, effects?, install?(motion) }`); a plugin is installed once, the first effect with a name wins.
|
|
21
|
+
- `play(el, effect, options?, event?)` — run an effect, resolves when it finishes; unknown effects throw ("add its plugin with use()").
|
|
22
|
+
- `bind(el, effect, { trigger: 'click' | 'hover' | 'enter' | 'load' | 'loop' | 'manual', once?, ...options })` → `off()`.
|
|
23
|
+
- `reveal(targets, preset = 'fade-up', { stagger, delay, duration, easing, once, threshold })` → `off()`; elements are hidden until they enter the viewport.
|
|
24
|
+
- `animate(el, keyframes, options)` — `el.animate()` tracked by the instance.
|
|
25
|
+
- `pause()`, `resume()`, `setRate(rate)`, `paused`, `rate`, `has(name)`, `effects()`, `reduced()`, `destroy()`.
|
|
26
|
+
- `PRESETS` — `fade`, `fade-up`, `fade-down`, `fade-left`, `fade-right`, `scale`, `zoom-in`, `zoom-out`, `blur-in`, `flip-up` (registered as `enter` effects on every instance).
|
|
27
|
+
- `preferredBackend()` — `'webgpu'` when `navigator.gpu` exists (the 10.0 default), else `'webgl2'`, else `'canvas'`.
|
|
28
|
+
- `VERSION` — `'10.0.0'`.
|
|
29
|
+
|
|
30
|
+
## Plugins
|
|
31
|
+
|
|
32
|
+
`motionary/plugins` exports every built-in effect pack as a plugin (`retro`, `cinema`, `paper`, `cyber`, `weather`, … and `ALL_PLUGINS`). Each import pulls in only its own pack. The same plugins work with `usePlugins()` from `motionary/fx2` for the `<usa-*>` elements and `data-usa-fx` attributes.
|
|
33
|
+
|
|
34
|
+
Your own plugin:
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
const sparkle = { name: 'acme/sparkle', effects: [{ name: 'sparkle', kind: 'attention', run: (el, o, ctx) => ctx.animate(el, [{ filter: 'brightness(1)' }, { filter: 'brightness(1.8)' }, { filter: 'brightness(1)' }], 400) }] };
|
|
38
|
+
createMotion().use(sparkle);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Reduced motion
|
|
42
|
+
|
|
43
|
+
Honoured everywhere (the OS setting, or `reducedMotion: 'reduce'`): entrance presets fade instead of moving; `loop`, `background` and `cursor` effects are skipped unless the effect says `reduced: 'run'`; effects receive `ctx.reduced` to degrade themselves.
|
|
44
|
+
|
|
45
|
+
## Upgrading
|
|
46
|
+
|
|
47
|
+
`registerEffectPacks()` (deprecated in 9.9) is removed — use `registerAllPlugins()` or, better, only the plugins you need. `npx usa-codemod-10 --write src` rewrites it. The full `motionary` package, `motionary/components` and every `<usa-*>` element keep working unchanged. See [upgrading-10.md](./upgrading-10.md).
|
package/docs/deprecations.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Deprecations
|
|
2
2
|
|
|
3
|
-
## Deprecated in 9.9, removed in 10.0
|
|
3
|
+
## Deprecated in 9.9, removed in 10.0 (released)
|
|
4
4
|
|
|
5
5
|
See [upgrading-10.md](./upgrading-10.md) — `registerEffectPacks()` (use `registerAllPlugins()` or `usePlugins(...)`). Run `npx usa-codemod-10 --write src`.
|
|
6
6
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# motionary/runtime — Runtime core
|
|
2
|
+
|
|
3
|
+
> Generated from `showcase/catalog/prereqs.js` by `scripts/gen-runtime-docs.mjs` — edit the data, not this page.
|
|
4
|
+
|
|
5
|
+
Shared ticker (one rAF loop), tween + timeline engine with easing, module registry with clear errors.
|
|
6
|
+
|
|
7
|
+
Part of Motionary's own zero-dependency runtime. Size budget: **5.5 KB gzip** (enforced in CI).
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
1. **Install:** `npm i motionary`
|
|
12
|
+
2. **Import path:** `motionary/runtime`
|
|
13
|
+
3. **CDN:**
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
ESM from a CDN: `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.js`
|
|
20
|
+
|
|
21
|
+
4. **Import order & registration:** Import motionary/runtime and call use() once at start-up, before any runtime-powered component mounts. CDN: the IIFE registers itself (window.MotionaryRuntime).
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
import { use } from 'motionary/runtime';
|
|
25
|
+
use();
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Example
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
import { use, tween, timeline } from 'motionary/runtime';
|
|
32
|
+
use();
|
|
33
|
+
tween('.box', { to: { x: 120, opacity: 1 }, duration: 500, ease: 'back-out' });
|
|
34
|
+
timeline().to('.a', { to: { y: -20 } }).to('.b', { to: { scale: 1.2 } }, '<+=100');
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Exports
|
|
38
|
+
|
|
39
|
+
`use` · `requireModule` · `hasModule` · `getTicker` · `tween` · `timeline` · `Tween` · `Timeline` · `EASES` · `parseEase` · `cubicBezier` · `steps` · `RuntimeModuleError`
|
|
40
|
+
|
|
41
|
+
## Compatibility
|
|
42
|
+
|
|
43
|
+
| Feature | Supported | Notes |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| Plain objects (numeric props) | ✅ yes | any numeric property |
|
|
46
|
+
| Elements: CSS lengths, %, unitless, colours, custom properties | ✅ yes | hex, rgb(), rgba(), transparent |
|
|
47
|
+
| Transform shorthands x y rotate scale scaleX scaleY skewX skewY | ✅ yes | composed in that order |
|
|
48
|
+
| Timeline positions (<, >, +=, -=, labels) | ✅ yes | |
|
|
49
|
+
| repeat / yoyo / reverse / seek / timeScale | ✅ yes | |
|
|
50
|
+
| SSR / Node import | ✅ yes | no window access at import |
|
|
51
|
+
| Web Workers | ✅ yes | ticker falls back to setTimeout without rAF |
|
|
52
|
+
|
|
53
|
+
## Components that need it
|
|
54
|
+
|
|
55
|
+
- `<usa-plugin-card>` — Plugin detail card
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# motionary/runtime/format-css — CSS @keyframes & WAAPI keyframes loader
|
|
2
|
+
|
|
3
|
+
> Generated from `showcase/catalog/prereqs.js` by `scripts/gen-runtime-docs.mjs` — edit the data, not this page.
|
|
4
|
+
|
|
5
|
+
Import CSS @keyframes text or live CSSKeyframesRule objects and Web Animations API keyframes (array or property-indexed) into a runtime timeline.
|
|
6
|
+
|
|
7
|
+
Part of Motionary's own zero-dependency runtime. Size budget: **2.5 KB gzip** (enforced in CI).
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
1. **Install:** `npm i motionary`
|
|
12
|
+
2. **Import path:** `motionary/runtime/format-css`
|
|
13
|
+
3. **CDN:**
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
17
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-css.iife.js"></script>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
ESM from a CDN: `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-css.js`
|
|
21
|
+
|
|
22
|
+
4. **Import order & registration:** Register the core first, then the module: use(formatCss) also registers the core. CDN: load runtime.iife.js, then runtime/format-css.iife.js (it registers itself).
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { use } from 'motionary/runtime';
|
|
26
|
+
import { formatCss } from 'motionary/runtime/format-css';
|
|
27
|
+
use(formatCss);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { use } from 'motionary/runtime';
|
|
34
|
+
import { formatCss, parseKeyframes, playKeyframes } from 'motionary/runtime/format-css';
|
|
35
|
+
use(formatCss);
|
|
36
|
+
const [pulse] = parseKeyframes('@keyframes pulse { from { opacity: .4 } 50% { opacity: 1; transform: scale(1.1) } to { opacity: .4 } }');
|
|
37
|
+
playKeyframes(document.querySelector('.dot'), pulse, { duration: 1200, repeat: -1 });
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Exports
|
|
41
|
+
|
|
42
|
+
`formatCss` · `parseKeyframes` · `fromCssRule` · `fromWaapi` · `toWaapi` · `playKeyframes`
|
|
43
|
+
|
|
44
|
+
## Compatibility
|
|
45
|
+
|
|
46
|
+
| Feature | Supported | Notes |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| @keyframes from / to / percentages / selector lists | ✅ yes | duplicate offsets merged, later wins |
|
|
49
|
+
| -webkit- / -moz- prefixed @keyframes | ✅ yes | |
|
|
50
|
+
| animation-timing-function per keyframe | ✅ yes | names, cubic-bezier(), steps() |
|
|
51
|
+
| transform lists (translate / rotate / scale / skew) | ✅ yes | tweened as shorthands |
|
|
52
|
+
| matrix() / 3D transforms | ◐ partial | switch discretely at the segment midpoint |
|
|
53
|
+
| WAAPI array + property-indexed keyframes, offsets, easing | ✅ yes | offsets distributed like the WAAPI |
|
|
54
|
+
| composite: add / accumulate | ✕ no | ignored (replace) |
|
|
55
|
+
| @property typed interpolation | ✕ no | non-numeric values switch discretely |
|
|
56
|
+
|
|
57
|
+
## Components that need it
|
|
58
|
+
|
|
59
|
+
_None yet._
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# motionary/runtime/format-motion — Motion / Framer keyframe JSON loader
|
|
2
|
+
|
|
3
|
+
> Generated from `showcase/catalog/prereqs.js` by `scripts/gen-runtime-docs.mjs` — edit the data, not this page.
|
|
4
|
+
|
|
5
|
+
Play Motion / Framer-style { initial, animate, transition } JSON (arrays as keyframes, times, repeatType, springs) with the runtime.
|
|
6
|
+
|
|
7
|
+
Part of Motionary's own zero-dependency runtime. Size budget: **2.5 KB gzip** (enforced in CI).
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
1. **Install:** `npm i motionary`
|
|
12
|
+
2. **Import path:** `motionary/runtime/format-motion`
|
|
13
|
+
3. **CDN:**
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
17
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-motion.iife.js"></script>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
ESM from a CDN: `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-motion.js`
|
|
21
|
+
|
|
22
|
+
4. **Import order & registration:** Register the core first, then the module: use(formatMotion) also registers the core. CDN: load runtime.iife.js, then runtime/format-motion.iife.js (it registers itself).
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { use } from 'motionary/runtime';
|
|
26
|
+
import { formatMotion } from 'motionary/runtime/format-motion';
|
|
27
|
+
use(formatMotion);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { use } from 'motionary/runtime';
|
|
34
|
+
import { formatMotion, playMotion } from 'motionary/runtime/format-motion';
|
|
35
|
+
use(formatMotion);
|
|
36
|
+
playMotion(document.querySelector('.card'), { initial: { opacity: 0, y: 40 }, animate: { opacity: 1, y: 0 }, transition: { type: 'spring', stiffness: 180, damping: 14 } });
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Exports
|
|
40
|
+
|
|
41
|
+
`formatMotion` · `fromMotion` · `playMotion` · `springEase` · `motionEase`
|
|
42
|
+
|
|
43
|
+
## Compatibility
|
|
44
|
+
|
|
45
|
+
| Feature | Supported | Notes |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| initial / animate, arrays as keyframes, times | ✅ yes | |
|
|
48
|
+
| transition duration / delay (s), ease names + cubic arrays | ✅ yes | easeIn/Out/InOut, circ*, back*, anticipate≈back-in-out |
|
|
49
|
+
| repeat (Infinity), repeatType loop / reverse / mirror | ✅ yes | mirror = reverse |
|
|
50
|
+
| per-property transitions | ✅ yes | |
|
|
51
|
+
| type: "spring" (stiffness, damping, mass, bounce + duration) | ✅ yes | simulated into an easing curve |
|
|
52
|
+
| variants, gestures (whileHover…), layout animations | ✕ no | out of scope |
|
|
53
|
+
|
|
54
|
+
## Components that need it
|
|
55
|
+
|
|
56
|
+
_None yet._
|
package/docs/upgrading-10.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Upgrading to 10.0
|
|
2
2
|
|
|
3
|
-
10.0.0 is
|
|
3
|
+
10.0.0 is released — a new architecture: a zero-dependency core under 10 KB (`motionary/core`), every effect pack delivered as a plugin, and WebGPU as the default backend for GPU effects. 9.9 warned once in the console for everything that went away, and a codemod rewrites it:
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
npx usa-codemod-10 src # dry run: lists every change (and what needs a manual edit)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motionary",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"description": "Motionary (formerly use-scroll-animate): dependency-free scroll animations + 94 animated Web Components — 214 scroll-reveal presets, card/click/button morphs, physics, page transitions, generative & sound-reactive backgrounds, cursor/gesture effects, themes, micro-interactions, <usa-player>, WebGL. React, Vue, Svelte, Solid, Angular or plain HTML.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -138,6 +138,26 @@
|
|
|
138
138
|
"default": "./dist/components/native.cjs"
|
|
139
139
|
}
|
|
140
140
|
},
|
|
141
|
+
"./core": {
|
|
142
|
+
"import": {
|
|
143
|
+
"types": "./dist/components/core.d.ts",
|
|
144
|
+
"default": "./dist/components/core.js"
|
|
145
|
+
},
|
|
146
|
+
"require": {
|
|
147
|
+
"types": "./dist/components/core.d.cts",
|
|
148
|
+
"default": "./dist/components/core.cjs"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"./plugins": {
|
|
152
|
+
"import": {
|
|
153
|
+
"types": "./dist/components/plugins.d.ts",
|
|
154
|
+
"default": "./dist/components/plugins.js"
|
|
155
|
+
},
|
|
156
|
+
"require": {
|
|
157
|
+
"types": "./dist/components/plugins.d.cts",
|
|
158
|
+
"default": "./dist/components/plugins.cjs"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
141
161
|
"./fx": {
|
|
142
162
|
"import": {
|
|
143
163
|
"types": "./dist/components/fx2.d.ts",
|
|
@@ -1158,6 +1178,26 @@
|
|
|
1158
1178
|
"default": "./dist/components/native.cjs"
|
|
1159
1179
|
}
|
|
1160
1180
|
},
|
|
1181
|
+
"./components/core": {
|
|
1182
|
+
"import": {
|
|
1183
|
+
"types": "./dist/components/core.d.ts",
|
|
1184
|
+
"default": "./dist/components/core.js"
|
|
1185
|
+
},
|
|
1186
|
+
"require": {
|
|
1187
|
+
"types": "./dist/components/core.d.cts",
|
|
1188
|
+
"default": "./dist/components/core.cjs"
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
"./components/plugins": {
|
|
1192
|
+
"import": {
|
|
1193
|
+
"types": "./dist/components/plugins.d.ts",
|
|
1194
|
+
"default": "./dist/components/plugins.js"
|
|
1195
|
+
},
|
|
1196
|
+
"require": {
|
|
1197
|
+
"types": "./dist/components/plugins.d.cts",
|
|
1198
|
+
"default": "./dist/components/plugins.cjs"
|
|
1199
|
+
}
|
|
1200
|
+
},
|
|
1161
1201
|
"./components/lite": {
|
|
1162
1202
|
"import": {
|
|
1163
1203
|
"types": "./dist/components/lite.d.ts",
|
|
@@ -1168,6 +1208,38 @@
|
|
|
1168
1208
|
"default": "./dist/components/lite.cjs"
|
|
1169
1209
|
}
|
|
1170
1210
|
},
|
|
1211
|
+
"./runtime": {
|
|
1212
|
+
"import": {
|
|
1213
|
+
"types": "./dist/runtime.d.ts",
|
|
1214
|
+
"default": "./dist/runtime.js"
|
|
1215
|
+
},
|
|
1216
|
+
"require": {
|
|
1217
|
+
"types": "./dist/runtime.d.cts",
|
|
1218
|
+
"default": "./dist/runtime.cjs"
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
"./runtime/format-css": {
|
|
1222
|
+
"import": {
|
|
1223
|
+
"types": "./dist/runtime/format-css.d.ts",
|
|
1224
|
+
"default": "./dist/runtime/format-css.js"
|
|
1225
|
+
},
|
|
1226
|
+
"require": {
|
|
1227
|
+
"types": "./dist/runtime/format-css.d.cts",
|
|
1228
|
+
"default": "./dist/runtime/format-css.cjs"
|
|
1229
|
+
}
|
|
1230
|
+
},
|
|
1231
|
+
"./runtime/format-motion": {
|
|
1232
|
+
"import": {
|
|
1233
|
+
"types": "./dist/runtime/format-motion.d.ts",
|
|
1234
|
+
"default": "./dist/runtime/format-motion.js"
|
|
1235
|
+
},
|
|
1236
|
+
"require": {
|
|
1237
|
+
"types": "./dist/runtime/format-motion.d.cts",
|
|
1238
|
+
"default": "./dist/runtime/format-motion.cjs"
|
|
1239
|
+
}
|
|
1240
|
+
},
|
|
1241
|
+
"./manifest.json": "./dist/manifest.json",
|
|
1242
|
+
"./manifest.schema.json": "./dist/manifest.schema.json",
|
|
1171
1243
|
"./components.css": "./dist/components.css",
|
|
1172
1244
|
"./components/reveal.css": "./dist/components/reveal.css",
|
|
1173
1245
|
"./components/text.css": "./dist/components/text.css",
|
|
@@ -1208,18 +1280,21 @@
|
|
|
1208
1280
|
"./dist/presets-extended.umd.js"
|
|
1209
1281
|
],
|
|
1210
1282
|
"scripts": {
|
|
1211
|
-
"build": "npm run clean && node --max-old-space-size=6144 ./node_modules/rollup/dist/bin/rollup -c rollup.config.mjs",
|
|
1283
|
+
"build": "npm run clean && node --max-old-space-size=6144 ./node_modules/rollup/dist/bin/rollup -c rollup.config.mjs && node scripts/gen-manifest.mjs",
|
|
1212
1284
|
"dev": "rollup -c rollup.config.mjs -w",
|
|
1213
1285
|
"typecheck": "tsc --noEmit -p .",
|
|
1214
1286
|
"test": "vitest run",
|
|
1215
1287
|
"check:exports": "node scripts/check-exports.mjs",
|
|
1216
|
-
"lint:package": "publint && attw --pack . --profile node16 --exclude-entrypoints ./components.css ./components/reveal.css ./components/text.css ./components/interaction.css ./components/feedback.css ./components/background.css ./components/transitions.css ./components/physics.css ./components/cards.css ./components/click.css ./components/ui.css ./components/page.css ./components/timeline.css ./components/gesture.css ./components/svg.css ./components/webgl.css ./components/depth.css ./components/layout.css ./components/packs.css ./components/fx.css",
|
|
1288
|
+
"lint:package": "publint && attw --pack . --profile node16 --exclude-entrypoints ./manifest.json ./manifest.schema.json ./components.css ./components/reveal.css ./components/text.css ./components/interaction.css ./components/feedback.css ./components/background.css ./components/transitions.css ./components/physics.css ./components/cards.css ./components/click.css ./components/ui.css ./components/page.css ./components/timeline.css ./components/gesture.css ./components/svg.css ./components/webgl.css ./components/depth.css ./components/layout.css ./components/packs.css ./components/fx.css",
|
|
1217
1289
|
"size": "node scripts/size.mjs",
|
|
1218
1290
|
"prepublishOnly": "npm run typecheck && npm test && npm run build && npm run check:exports",
|
|
1219
1291
|
"size:check": "node scripts/size.mjs --check",
|
|
1220
1292
|
"sync:exports": "node scripts/sync-exports.mjs",
|
|
1221
1293
|
"bench": "node scripts/bench.mjs",
|
|
1222
|
-
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\""
|
|
1294
|
+
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
1295
|
+
"manifest": "node scripts/gen-manifest.mjs",
|
|
1296
|
+
"docs:runtime": "node scripts/gen-runtime-docs.mjs",
|
|
1297
|
+
"check:peer-docs": "node scripts/check-peer-docs.mjs"
|
|
1223
1298
|
},
|
|
1224
1299
|
"keywords": [
|
|
1225
1300
|
"motionary",
|
|
@@ -1247,7 +1322,13 @@
|
|
|
1247
1322
|
"typescript",
|
|
1248
1323
|
"reduced-motion",
|
|
1249
1324
|
"electron",
|
|
1250
|
-
"webview2"
|
|
1325
|
+
"webview2",
|
|
1326
|
+
"tween",
|
|
1327
|
+
"timeline",
|
|
1328
|
+
"animation-runtime",
|
|
1329
|
+
"lottie-alternative",
|
|
1330
|
+
"llms-txt",
|
|
1331
|
+
"ai-manifest"
|
|
1251
1332
|
],
|
|
1252
1333
|
"author": "HarrisonCN",
|
|
1253
1334
|
"license": "MIT",
|
|
@@ -1294,6 +1375,7 @@
|
|
|
1294
1375
|
"usa-codemod-7": "./bin/usa-codemod-7.mjs",
|
|
1295
1376
|
"usa-codemod-8": "./bin/usa-codemod-8.mjs",
|
|
1296
1377
|
"usa-codemod-9": "./bin/usa-codemod-9.mjs",
|
|
1297
|
-
"usa-codemod-10": "./bin/usa-codemod-10.mjs"
|
|
1378
|
+
"usa-codemod-10": "./bin/usa-codemod-10.mjs",
|
|
1379
|
+
"create-motionary-plugin": "./bin/create-motionary-plugin.mjs"
|
|
1298
1380
|
}
|
|
1299
1381
|
}
|