@zakkster/lite-tools 2.0.7 → 2.0.8
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/LiteEngine.d.ts +2 -2
- package/LiteEngine.js +4 -4
- package/README.md +2 -2
- package/package.json +1 -1
package/LiteEngine.d.ts
CHANGED
|
@@ -100,7 +100,7 @@ export { Tween } from '@zakkster/lite-tween';
|
|
|
100
100
|
export { SpringStandalone, SpringPool } from '@zakkster/lite-spring';
|
|
101
101
|
export { Gradient } from '@zakkster/lite-gradient';
|
|
102
102
|
export { seedNoise, simplex2, simplex3, fbm2, fbm3, curl2 } from '@zakkster/lite-noise';
|
|
103
|
-
export {
|
|
103
|
+
export { createTimeline } from '@zakkster/lite-timeline';
|
|
104
104
|
|
|
105
105
|
// Interaction + utility
|
|
106
106
|
export { GestureTracker } from '@zakkster/lite-gesture';
|
|
@@ -155,7 +155,7 @@ import type {SnowEngine} from '@zakkster/lite-snow';
|
|
|
155
155
|
import type {SparkEngine} from '@zakkster/lite-sparks';
|
|
156
156
|
import type {FireworksEngine} from '@zakkster/lite-fireworks';
|
|
157
157
|
import type {GestureTracker} from '@zakkster/lite-gesture';
|
|
158
|
-
import type {
|
|
158
|
+
import type {createTimeline} from '@zakkster/lite-timeline';
|
|
159
159
|
|
|
160
160
|
/** All recipes return at least a destroy() method. */
|
|
161
161
|
interface Destroyable {
|
package/LiteEngine.js
CHANGED
|
@@ -99,7 +99,7 @@ export {Tween} from '@zakkster/lite-tween';
|
|
|
99
99
|
export {SpringStandalone, SpringPool} from '@zakkster/lite-spring';
|
|
100
100
|
export {Gradient} from '@zakkster/lite-gradient';
|
|
101
101
|
export {seedNoise, simplex2, simplex3, fbm2, fbm3, curl2} from '@zakkster/lite-noise';
|
|
102
|
-
export {
|
|
102
|
+
export {createTimeline} from '@zakkster/lite-timeline';
|
|
103
103
|
|
|
104
104
|
// Interaction + utility
|
|
105
105
|
export {GestureTracker} from '@zakkster/lite-gesture';
|
|
@@ -164,7 +164,7 @@ import {Tween} from '@zakkster/lite-tween';
|
|
|
164
164
|
import {SpringPool} from '@zakkster/lite-spring';
|
|
165
165
|
import {Gradient} from '@zakkster/lite-gradient';
|
|
166
166
|
import {seedNoise, fbm2} from '@zakkster/lite-noise';
|
|
167
|
-
import {
|
|
167
|
+
import {createTimeline} from '@zakkster/lite-timeline';
|
|
168
168
|
import {GestureTracker} from '@zakkster/lite-gesture';
|
|
169
169
|
import {confetti as confettiFn} from '@zakkster/lite-confetti';
|
|
170
170
|
import {liteId} from '@zakkster/lite-id';
|
|
@@ -1292,7 +1292,7 @@ export const Recipes = {
|
|
|
1292
1292
|
currentIndex = clamp(idx, 0, slides.length - 1);
|
|
1293
1293
|
const targetX = -currentIndex * slideWidth;
|
|
1294
1294
|
const startX = offsetX;
|
|
1295
|
-
const tl =
|
|
1295
|
+
const tl = createTimeline();
|
|
1296
1296
|
tl.add({
|
|
1297
1297
|
duration: 400, onUpdate(t) {
|
|
1298
1298
|
offsetX = startX + (targetX - startX) * easeOutCubic(t);
|
|
@@ -1335,7 +1335,7 @@ export const Recipes = {
|
|
|
1335
1335
|
timelineShowcase(elements, overlayCanvas, options = {}) {
|
|
1336
1336
|
const {brandColor = {l: 0.6, c: 0.25, h: 280}} = options;
|
|
1337
1337
|
const els = typeof elements === 'string' ? document.querySelectorAll(elements) : elements;
|
|
1338
|
-
const tl =
|
|
1338
|
+
const tl = createTimeline({loop: false});
|
|
1339
1339
|
|
|
1340
1340
|
// Stagger each element in with eased opacity + translateY
|
|
1341
1341
|
let offset = 0;
|
package/README.md
CHANGED
|
@@ -558,7 +558,7 @@ carousel.goTo(2);
|
|
|
558
558
|
console.log(carousel.getCurrentIndex()); // 2
|
|
559
559
|
```
|
|
560
560
|
|
|
561
|
-
**Composes:** `GestureTracker` (pan + panEnd with velocity) + `
|
|
561
|
+
**Composes:** `GestureTracker` (pan + panEnd with velocity) + `createTimeline` + `easeOutCubic`
|
|
562
562
|
|
|
563
563
|
</details>
|
|
564
564
|
|
|
@@ -577,7 +577,7 @@ const show = Recipes.timelineShowcase('.feature-card', overlayCanvas, {
|
|
|
577
577
|
show.play(); // stagger in → confetti burst
|
|
578
578
|
```
|
|
579
579
|
|
|
580
|
-
**Composes:** `
|
|
580
|
+
**Composes:** `createTimeline` + `easeOutBack` (overshoot entrance) + `confetti()` (fire-and-forget)
|
|
581
581
|
|
|
582
582
|
</details>
|
|
583
583
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zakkster/lite-tools",
|
|
3
3
|
"author": "Zahary Shinikchiev <shinikchiev@yahoo.com>",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.8",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "The standard library for high-performance web presentation — 45+ micro-libraries, 24 recipes, zero-GC, deterministic, tree-shakeable.",
|
|
7
7
|
"type": "module",
|