@scntix/animate 0.0.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/LICENSE +21 -0
- package/README.md +74 -0
- package/_runtime/bundler/scntix_animate_wasm.js +9 -0
- package/_runtime/bundler/scntix_animate_wasm_bg.js +5849 -0
- package/_runtime/node/scntix_animate_wasm.cjs +5922 -0
- package/_runtime/types/bundler.d.ts +1426 -0
- package/_runtime/types/node.d.ts +1426 -0
- package/_runtime/types/web.d.ts +1890 -0
- package/_runtime/wasm/scntix_animate_wasm_bg.wasm +0 -0
- package/_runtime/web/scntix_animate_wasm.js +5950 -0
- package/cjs/animation.cjs +15 -0
- package/cjs/browser.cjs +16 -0
- package/cjs/index.cjs +1 -0
- package/cjs/input.cjs +14 -0
- package/cjs/layout.cjs +10 -0
- package/cjs/motion.cjs +13 -0
- package/cjs/node.cjs +1 -0
- package/cjs/scroll.cjs +10 -0
- package/cjs/svg.cjs +9 -0
- package/cjs/text.cjs +10 -0
- package/cjs/utils.cjs +7 -0
- package/esm/animation.js +13 -0
- package/esm/browser.js +14 -0
- package/esm/bundler.js +1 -0
- package/esm/index.js +1 -0
- package/esm/input.js +12 -0
- package/esm/layout.js +8 -0
- package/esm/motion.js +11 -0
- package/esm/scroll.js +8 -0
- package/esm/svg.js +7 -0
- package/esm/text.js +8 -0
- package/esm/utils.js +5 -0
- package/esm/web.js +2 -0
- package/esm-node/animation.js +13 -0
- package/esm-node/browser.js +14 -0
- package/esm-node/index.js +1 -0
- package/esm-node/input.js +12 -0
- package/esm-node/layout.js +8 -0
- package/esm-node/motion.js +11 -0
- package/esm-node/node.js +72 -0
- package/esm-node/scroll.js +8 -0
- package/esm-node/svg.js +7 -0
- package/esm-node/text.js +8 -0
- package/esm-node/utils.js +5 -0
- package/package.json +149 -0
- package/types/animation.d.ts +13 -0
- package/types/browser.d.ts +14 -0
- package/types/bundler.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/input.d.ts +12 -0
- package/types/layout.d.ts +8 -0
- package/types/motion.d.ts +11 -0
- package/types/node.d.ts +1 -0
- package/types/scroll.d.ts +8 -0
- package/types/svg.d.ts +7 -0
- package/types/text.d.ts +8 -0
- package/types/utils.d.ts +5 -0
- package/types/web.d.ts +2 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Scntix
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# @scntix/animate
|
|
2
|
+
|
|
3
|
+
WebAssembly animation engine — production-grade DOM animations powered by Rust
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @scntix/animate
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Bundler Usage
|
|
12
|
+
|
|
13
|
+
Use the root package or grouped subpaths in Vite, Next, and other bundler apps:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { init, animate, Easing } from "@scntix/animate";
|
|
17
|
+
|
|
18
|
+
await init();
|
|
19
|
+
|
|
20
|
+
animate(".card", {
|
|
21
|
+
x: 120,
|
|
22
|
+
duration: 0.6,
|
|
23
|
+
ease: Easing.outQuad,
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { animate } from "@scntix/animate/animation";
|
|
29
|
+
import { createDrawable } from "@scntix/animate/svg";
|
|
30
|
+
import { splitText } from "@scntix/animate/text";
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Direct Browser Usage
|
|
34
|
+
|
|
35
|
+
Use the explicit browser entry only when you are not relying on a bundler:
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import initScntix, { animate } from "@scntix/animate/web";
|
|
39
|
+
|
|
40
|
+
await initScntix();
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Node Usage
|
|
44
|
+
|
|
45
|
+
Use the dedicated Node entry when you need the Node runtime surface:
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import { animate } from "@scntix/animate/node";
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Export Groups
|
|
52
|
+
|
|
53
|
+
- `animation`: animate, animateObject, createAnimatable, createTimer, +7 more
|
|
54
|
+
- `motion`: Easing, followValue, mapValue, motionValue, +5 more
|
|
55
|
+
- `input`: createDraggable, createHover, createObserver, createPan, +6 more
|
|
56
|
+
- `scroll`: createScrollObserver, createScrollSmoother, scrollTo, WasmScrollObserver, +2 more
|
|
57
|
+
- `text`: scrambleText, splitText, textReplace, WasmScrambleText, +2 more
|
|
58
|
+
- `layout`: flipCapture, flipFrom, layoutTransition, WasmFlipAnimation, +2 more
|
|
59
|
+
- `svg`: createDrawable, createMotionPath, DrawableHandle, MotionPathValues, +1 more
|
|
60
|
+
- `browser`: commitStyles, createScope, easingToLinear, init, +8 more
|
|
61
|
+
- `utils`: Utils, version, WasmEngine
|
|
62
|
+
|
|
63
|
+
## Environment Notes
|
|
64
|
+
|
|
65
|
+
- Root package and grouped subpaths are the default choice for Vite, Next, and bundlers.
|
|
66
|
+
- `/web` is the explicit direct-browser entry for non-bundler usage.
|
|
67
|
+
- `/node` is the explicit Node runtime entry.
|
|
68
|
+
- TypeScript declarations are generated for the root package and grouped subpaths.
|
|
69
|
+
|
|
70
|
+
## Internal Layout
|
|
71
|
+
|
|
72
|
+
- Public entrypoints live at the package root under `esm/`, `esm-node/`, `cjs/`, and `types/`.
|
|
73
|
+
- Internal wasm runtime assets live under `_runtime/`.
|
|
74
|
+
- Subpath imports are the recommended choice when you want smaller consumer bundles.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* @ts-self-types="../types/bundler.d.ts" */
|
|
2
|
+
|
|
3
|
+
import * as wasm from "../wasm/scntix_animate_wasm_bg.wasm";
|
|
4
|
+
import { __wbg_set_wasm } from "./scntix_animate_wasm_bg.js";
|
|
5
|
+
__wbg_set_wasm(wasm);
|
|
6
|
+
wasm.__wbindgen_start();
|
|
7
|
+
export {
|
|
8
|
+
DrawableHandle, Easing, MotionPathValues, PathMorph, ReducedMotion, Utils, WasmAnimatable, WasmAnimation, WasmDraggable, WasmEngine, WasmFlipAnimation, WasmFlipState, WasmHoverGesture, WasmInertia, WasmKeyframeSequence, WasmLayoutTransition, WasmMotionValue, WasmObserver, WasmPanGesture, WasmPhysics2D, WasmPhysicsProps, WasmPressGesture, WasmScope, WasmScrambleText, WasmScrollObserver, WasmScrollSmoother, WasmScrollTo, WasmSpring, WasmTextReplace, WasmTextSplitter, WasmTimeline, WasmTimer, WasmViewTransition, WasmWaapiAnimation, animate, animateObject, commitStyles, createAnimatable, createDraggable, createDrawable, createHover, createMotionPath, createObserver, createPan, createPress, createScope, createScrollObserver, createScrollSmoother, createTimer, easingToLinear, flipCapture, flipFrom, followValue, init, layoutTransition, mapValue, motionValue, registerTransformProperties, scopeRegisterJs, scrambleText, scrollTo, splitText, stagger, staggerSimple, startViewTransition, textReplace, version, waapi
|
|
9
|
+
} from "./scntix_animate_wasm_bg.js";
|