@infinityfx/lively 4.0.4 → 4.0.5

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.
Files changed (94) hide show
  1. package/.rollup.cache/F/projects/code/lively/dist/animatable.js +147 -0
  2. package/.rollup.cache/F/projects/code/lively/dist/animatable.js.map +1 -0
  3. package/.rollup.cache/F/projects/code/lively/dist/animate.js +26 -0
  4. package/.rollup.cache/F/projects/code/lively/dist/animate.js.map +1 -0
  5. package/.rollup.cache/F/projects/code/lively/dist/core/action.js +28 -0
  6. package/.rollup.cache/F/projects/code/lively/dist/core/action.js.map +1 -0
  7. package/.rollup.cache/F/projects/code/lively/dist/core/cache.js +55 -0
  8. package/.rollup.cache/F/projects/code/lively/dist/core/cache.js.map +1 -0
  9. package/.rollup.cache/F/projects/code/lively/dist/core/clip.js +71 -0
  10. package/.rollup.cache/F/projects/code/lively/dist/core/clip.js.map +1 -0
  11. package/.rollup.cache/F/projects/code/lively/dist/core/link.js +39 -0
  12. package/.rollup.cache/F/projects/code/lively/dist/core/link.js.map +1 -0
  13. package/.rollup.cache/F/projects/code/lively/dist/core/timeline.js +107 -0
  14. package/.rollup.cache/F/projects/code/lively/dist/core/timeline.js.map +1 -0
  15. package/.rollup.cache/F/projects/code/lively/dist/core/track.js +147 -0
  16. package/.rollup.cache/F/projects/code/lively/dist/core/track.js.map +1 -0
  17. package/.rollup.cache/F/projects/code/lively/dist/core/utils.js +95 -0
  18. package/.rollup.cache/F/projects/code/lively/dist/core/utils.js.map +1 -0
  19. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-audio.js +63 -0
  20. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-audio.js.map +1 -0
  21. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-link.js +7 -0
  22. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-link.js.map +1 -0
  23. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-path.js +15 -0
  24. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-path.js.map +1 -0
  25. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-reduced-motion.js +14 -0
  26. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-reduced-motion.js.map +1 -0
  27. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-scroll.js +21 -0
  28. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-scroll.js.map +1 -0
  29. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-spring.js +37 -0
  30. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-spring.js.map +1 -0
  31. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-trigger.js +15 -0
  32. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-trigger.js.map +1 -0
  33. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-viewport.js +27 -0
  34. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-viewport.js.map +1 -0
  35. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-visible.js +26 -0
  36. package/.rollup.cache/F/projects/code/lively/dist/hooks/use-visible.js.map +1 -0
  37. package/.rollup.cache/F/projects/code/lively/dist/hooks.js +11 -0
  38. package/.rollup.cache/F/projects/code/lively/dist/hooks.js.map +1 -0
  39. package/.rollup.cache/F/projects/code/lively/dist/index.js +4 -0
  40. package/.rollup.cache/F/projects/code/lively/dist/index.js.map +1 -0
  41. package/.rollup.cache/F/projects/code/lively/dist/layout/layout-group.js +209 -0
  42. package/.rollup.cache/F/projects/code/lively/dist/layout/layout-group.js.map +1 -0
  43. package/.rollup.cache/F/projects/code/lively/dist/layout/morph.js +48 -0
  44. package/.rollup.cache/F/projects/code/lively/dist/layout/morph.js.map +1 -0
  45. package/.rollup.cache/F/projects/code/lively/dist/layout/typable.js +21 -0
  46. package/.rollup.cache/F/projects/code/lively/dist/layout/typable.js.map +1 -0
  47. package/.rollup.cache/F/projects/code/lively/dist/layout.js +5 -0
  48. package/.rollup.cache/F/projects/code/lively/dist/layout.js.map +1 -0
  49. package/.rollup.cache/F/projects/code/lively/dist/tsconfig.tsbuildinfo +1 -0
  50. package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/core/utils.d.ts +1 -0
  51. package/dist/animatable.js +1 -1
  52. package/dist/animate.js +1 -1
  53. package/dist/core/action.js +1 -1
  54. package/dist/core/action.js.map +1 -1
  55. package/dist/core/cache.js +1 -1
  56. package/dist/core/cache.js.map +1 -1
  57. package/dist/core/clip.js +1 -1
  58. package/dist/core/clip.js.map +1 -1
  59. package/dist/core/timeline.js +1 -1
  60. package/dist/core/timeline.js.map +1 -1
  61. package/dist/core/track.js +1 -1
  62. package/dist/core/track.js.map +1 -1
  63. package/dist/core/utils.js +1 -1
  64. package/dist/core/utils.js.map +1 -1
  65. package/dist/hooks/use-audio.js +1 -1
  66. package/dist/hooks/use-scroll.js +1 -1
  67. package/dist/layout/layout-group.js +1 -1
  68. package/dist/layout/morph.js +1 -1
  69. package/dist/layout/typable.js +1 -1
  70. package/package.json +1 -1
  71. package/tsconfig.json +4 -2
  72. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/animatable.d.ts +0 -0
  73. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/animate.d.ts +0 -0
  74. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/core/action.d.ts +0 -0
  75. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/core/cache.d.ts +0 -0
  76. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/core/clip.d.ts +0 -0
  77. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/core/link.d.ts +0 -0
  78. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/core/timeline.d.ts +0 -0
  79. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/core/track.d.ts +0 -0
  80. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/hooks/use-audio.d.ts +0 -0
  81. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/hooks/use-link.d.ts +0 -0
  82. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/hooks/use-path.d.ts +0 -0
  83. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/hooks/use-reduced-motion.d.ts +0 -0
  84. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/hooks/use-scroll.d.ts +0 -0
  85. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/hooks/use-spring.d.ts +0 -0
  86. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/hooks/use-trigger.d.ts +0 -0
  87. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/hooks/use-viewport.d.ts +0 -0
  88. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/hooks/use-visible.d.ts +0 -0
  89. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/hooks.d.ts +0 -0
  90. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/index.d.ts +0 -0
  91. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/layout/layout-group.d.ts +0 -0
  92. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/layout/morph.d.ts +0 -0
  93. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/layout/typable.d.ts +0 -0
  94. /package/{dist → .rollup.cache/F/projects/code/lively/dist}/types/layout.d.ts +0 -0
@@ -0,0 +1,209 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Children, cloneElement, isValidElement, useLayoutEffect, useRef, useState } from "react";
4
+ import Animatable from "../animatable";
5
+ import { Groups } from "./morph";
6
+ function traverseTree(tree, callback, partialIndex = []) {
7
+ const array = 'nodes' in tree ? tree.nodes : tree;
8
+ for (let i = 0; i < array.length; i++) {
9
+ const index = [...partialIndex, i];
10
+ let returnValue = callback(array[i], index);
11
+ if (!returnValue)
12
+ returnValue = traverseTree(array[i].nodes, callback, index);
13
+ if (returnValue)
14
+ return returnValue;
15
+ }
16
+ }
17
+ // find a node tree index based on a component key
18
+ function findIndex(tree, key) {
19
+ return traverseTree(tree, (node, index) => {
20
+ if (node.key === key)
21
+ return index;
22
+ }) || null;
23
+ }
24
+ // get a node from a node tree based on an index
25
+ function getNode(tree, index) {
26
+ let node = tree[index[0]];
27
+ for (let i = 1; i < index.length; i++) {
28
+ if (!node)
29
+ break;
30
+ node = node.nodes[index[i]];
31
+ }
32
+ return node;
33
+ }
34
+ // delete/replace/insert a node into a node tree based on an index
35
+ function spliceNode(tree, index, deleteCount, insert) {
36
+ const i = index[index.length - 1];
37
+ const nodes = index.length > 1 ? getNode(tree, index.slice(0, -1))?.nodes : tree;
38
+ if (nodes)
39
+ insert ? nodes.splice(i, deleteCount, insert) : nodes.splice(i, deleteCount);
40
+ }
41
+ // compare a node tree with a react component tree
42
+ // and take note of new components that are mounting
43
+ function compareTree({ tree, nodes, mounting, partialIndex = [], keys = new Set(), parent = ['', 0] }) {
44
+ Children.forEach(nodes, (child, i) => {
45
+ const isElement = isValidElement(child);
46
+ const hasElements = isElement && (Array.isArray(child.props.children) || isValidElement(child.props.children));
47
+ const isValidLively = isElement && child.type.isLively && 'id' in child.props;
48
+ const shouldTraverse = hasElements && (!child.type.isLively || child.props.traverseLayout);
49
+ const index = [...partialIndex, i];
50
+ const node = hasElements && !child.type.isLively ?
51
+ cloneElement(child, undefined, []) :
52
+ child;
53
+ const [pkey, poffset] = parent;
54
+ const key = isValidLively ? child.props.id : `$l.${pkey ? pkey + '.' : ''}${index.slice(-poffset).join('')}`;
55
+ const renderedIndex = findIndex(tree, key);
56
+ const target = renderedIndex ? getNode(tree, renderedIndex) : undefined;
57
+ if (!target || (!isValidLively && !target.key.startsWith('$l.'))) {
58
+ mounting.set(key, {
59
+ node,
60
+ index
61
+ });
62
+ }
63
+ else {
64
+ if (renderedIndex && renderedIndex.join('') !== index.join('')) {
65
+ spliceNode(tree, renderedIndex, 1);
66
+ spliceNode(tree, index, 0, target);
67
+ }
68
+ target.node = node;
69
+ }
70
+ if (shouldTraverse)
71
+ compareTree({
72
+ tree,
73
+ nodes: child.props.children,
74
+ mounting,
75
+ partialIndex: index,
76
+ keys,
77
+ parent: isValidLively ?
78
+ [key, 1] :
79
+ poffset ?
80
+ [pkey, poffset + 1] :
81
+ undefined
82
+ });
83
+ keys.add(key);
84
+ });
85
+ return keys;
86
+ }
87
+ // convert a node tree to a react component tree
88
+ function renderTree(tree) {
89
+ const array = tree.map(node => {
90
+ if (!isValidElement(node.node))
91
+ return node.node;
92
+ return node.nodes.length ?
93
+ cloneElement(node.node, { key: node.key }, renderTree(node.nodes)) :
94
+ cloneElement(node.node, { key: node.key });
95
+ });
96
+ return array.length > 1 ? array : array[0];
97
+ }
98
+ /**
99
+ * Animate layout changes or unmounts.
100
+ *
101
+ * @see {@link https://lively.infinityfx.dev/docs/components/layout-group}
102
+ */
103
+ export default function LayoutGroup({ children, transition, initialMount = true }) {
104
+ const preventMount = useRef(!initialMount);
105
+ const ref = useRef(null);
106
+ const [_, forceUpdate] = useState({});
107
+ const rendered = useRef([]);
108
+ const mounting = useRef(new Map());
109
+ const timeout = useRef(undefined);
110
+ const unmountDelay = useRef(0);
111
+ const unmounting = useRef(new Set());
112
+ // get keys of current render passes' children
113
+ // and register any newly mounted nodes
114
+ const keys = compareTree({
115
+ tree: rendered.current,
116
+ nodes: children,
117
+ mounting: mounting.current
118
+ });
119
+ // filter out newly mounted nodes that aren't animatables
120
+ mounting.current.forEach((_, key) => {
121
+ if (!keys.has(key))
122
+ mounting.current.delete(key);
123
+ });
124
+ // register any nodes that have unmounted compared to the currently rendered nodes
125
+ traverseTree(rendered.current, node => {
126
+ if (!keys.has(node.key))
127
+ unmounting.current.add(node.key);
128
+ });
129
+ if (unmounting.current.size && ref.current) {
130
+ // loop over nodes to check for nodes that need to be unmounted
131
+ for (const child of ref.current.children) {
132
+ const id = child.current?.id, isUnmounting = unmounting.current.has(id);
133
+ if (!child.current)
134
+ continue;
135
+ // if node remounted during unmount animation, then cancel the unmounting
136
+ // and replay mount animation
137
+ if (isUnmounting && keys.has(id)) {
138
+ unmounting.current.delete(id);
139
+ child.current.trigger('mount', { immediate: true });
140
+ child.current.timeline.mounted = true;
141
+ continue;
142
+ }
143
+ // if node needs to be unmounted and is animatable, try to play unmount animation and register animation duration
144
+ if (isUnmounting && child.current.timeline.mounted) {
145
+ const ends = Date.now() + child.current.trigger('unmount', { immediate: true }) * 1000;
146
+ unmountDelay.current = Math.max(unmountDelay.current, ends);
147
+ if (child.current.group) {
148
+ const morph = Groups[child.current.group].get(child.current.timeline);
149
+ if (morph)
150
+ morph.state = 'unmounted';
151
+ }
152
+ child.current.timeline.mounted = false;
153
+ }
154
+ }
155
+ const delay = unmountDelay.current - Date.now();
156
+ clearTimeout(timeout.current);
157
+ // removes unmounted nodes from the rendered nodes tree
158
+ const afterUnmount = (update = true) => {
159
+ unmounting.current.forEach(key => {
160
+ const index = findIndex(rendered.current, key);
161
+ if (index)
162
+ spliceNode(rendered.current, index, 1);
163
+ });
164
+ unmounting.current.clear();
165
+ if (update)
166
+ forceUpdate({});
167
+ };
168
+ if (delay > 0) {
169
+ timeout.current = setTimeout(afterUnmount, delay);
170
+ }
171
+ else {
172
+ afterUnmount(false);
173
+ }
174
+ }
175
+ // only mount new nodes when no old nodes need to be unmounted
176
+ if (!unmounting.current.size && mounting.current.size) { // maybe do this simultanously with unmount (requires unmounts to happen with position absolute..)
177
+ mounting.current.forEach(({ node, index }, key) => {
178
+ spliceNode(rendered.current, index, 0, {
179
+ key,
180
+ node,
181
+ nodes: []
182
+ });
183
+ });
184
+ mounting.current.clear();
185
+ }
186
+ // observe any changes inbetween renders
187
+ useLayoutEffect(() => {
188
+ if (!ref.current)
189
+ return;
190
+ let child, children = ref.current.children.slice();
191
+ // loop over all animatable children
192
+ while (child = children.pop()) {
193
+ if (preventMount.current && child.current)
194
+ child.current.timeline.mounted = true;
195
+ // if child can't be compared to the rendered tree or should not adaptively animate, then skip this child
196
+ if (!child.current?.id ||
197
+ !child.current.timeline.mounted ||
198
+ !child.current.adaptive ||
199
+ findIndex(rendered.current, child.current.id) === null)
200
+ continue;
201
+ // else we transition between the old and new layout of this child
202
+ child.current.timeline.transition(undefined, transition);
203
+ children.push(...child.current.children);
204
+ }
205
+ preventMount.current = false;
206
+ });
207
+ return _jsx(Animatable, { ref: ref, passthrough: true, cachable: [], children: renderTree(rendered.current) });
208
+ }
209
+ //# sourceMappingURL=layout-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-group.js","sourceRoot":"","sources":["../../src/layout/layout-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClG,OAAO,UAA8B,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAQjC,SAAS,YAAY,CAAC,IAAmB,EAAE,QAA8C,EAAE,eAAyB,EAAE;IAClH,MAAM,KAAK,GAAG,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAElD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,MAAM,KAAK,GAAG,CAAC,GAAG,YAAY,EAAE,CAAC,CAAC,CAAC;QAEnC,IAAI,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,WAAW;YAAE,WAAW,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;QAE9E,IAAI,WAAW;YAAE,OAAO,WAAW,CAAC;IACxC,CAAC;AACL,CAAC;AAED,kDAAkD;AAClD,SAAS,SAAS,CAAC,IAAY,EAAE,GAAW;IACxC,OAAO,YAAY,CA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AClB,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAC/B,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ;gBACvB,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,IAAI;gBAAE,SAAS;YAErE,kEAAkE;YAClE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YACzD,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC7C,CAAC;QAED,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,OAAO,KAAC,UAAU,IAAC,GAAG,EAAE,GAAG,EAAE,WAAW,QAAC,QAAQ,EAAE,EAAE,YAChD,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,GACpB,CAAC;AAClB,CAAC"}
@@ -0,0 +1,48 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { use, useLayoutEffect, useRef } from "react";
4
+ import Animatable, { AnimatableContext } from "../animatable";
5
+ import { combineRefs } from "../core/utils";
6
+ export const Groups = {};
7
+ /**
8
+ * Peform layout morphs between components when one mounts and unmount.
9
+ *
10
+ * @see {@link https://lively.infinityfx.dev/docs/components/morph}
11
+ */
12
+ export default function Morph({ children, group, transition, ...props }) {
13
+ const parent = use(AnimatableContext);
14
+ const id = parent?.group ? `${parent.group}.${group}` : group;
15
+ if (!(id in Groups))
16
+ Groups[id] = new Map();
17
+ const ref = useRef(null);
18
+ useLayoutEffect(() => {
19
+ const timeline = ref.current?.timeline;
20
+ if (!timeline)
21
+ return;
22
+ if (!Groups[id].has(timeline)) {
23
+ Groups[id].set(timeline, { state: 'mounted' });
24
+ }
25
+ else {
26
+ const entry = Groups[id].get(timeline);
27
+ entry.state = 'mounted';
28
+ }
29
+ const targets = Array.from(Groups[id].entries());
30
+ const target = targets.find(([_, data]) => data.state === 'unmounted');
31
+ if (target && !timeline.mounted) {
32
+ timeline.transition(target[0], transition);
33
+ target[1].state = 'collected';
34
+ }
35
+ else if (!timeline.mounted) {
36
+ ref.current?.trigger('mount');
37
+ }
38
+ timeline.mounted = true;
39
+ return () => {
40
+ const entry = Groups[id].get(timeline);
41
+ entry.state = 'unmounted';
42
+ setTimeout(() => entry.state = 'collected', 1);
43
+ };
44
+ }, []);
45
+ return _jsx(Animatable, { ...props, group: id, manual: true, ref: combineRefs(ref, props.ref), children: children });
46
+ }
47
+ Morph.isLively = true;
48
+ //# sourceMappingURL=morph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"morph.js","sourceRoot":"","sources":["../../src/layout/morph.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,UAAU,EAAE,EAAE,iBAAiB,EAAmC,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,CAAC,MAAM,MAAM,GAIf,EAAE,CAAC;AAEP;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAK,EAMlD;IACf,MAAM,MAAM,GAAG,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACtC,MAAM,EAAE,GAAG,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;IAC9D,IAAI,CAAC,CAAC,EAAE,IAAI,MAAM,CAAC;QAAE,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;IAE5C,MAAM,GAAG,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IAE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K,CAAC,KAAK,GAAG,WAAW,CAAC;YAC1B,UAAU,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,GAAG,WAAW,EAAE,CAAC,CAAC,CAAC;QACnD,CAAC,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,KAAC,UAAU,OAAK,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,QAAC,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,YAC3E,QAAQ,GACA,CAAC;AAClB,CAAC;AAED,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC"}
@@ -0,0 +1,21 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Children } from "react";
4
+ import Animatable from "../animatable";
5
+ /**
6
+ * Wrap around text to animate it.
7
+ *
8
+ * @see {@link https://lively.infinityfx.dev/docs/components/typable}
9
+ */
10
+ export default function Typable({ children, stagger = 1, staggerLimit = Number.MAX_VALUE, ...props }) {
11
+ return _jsx(Animatable, { ...props, stagger: stagger * -1, staggerLimit: staggerLimit, children: Children.map(children, child => {
12
+ if (typeof child !== 'string' && typeof child !== 'number')
13
+ return child;
14
+ return child
15
+ .toString()
16
+ .split('')
17
+ .map(char => _jsx("span", { style: { whiteSpace: char === ' ' ? 'pre-wrap' : undefined }, children: char }));
18
+ }) });
19
+ }
20
+ Typable.isLively = true;
21
+ //# sourceMappingURL=typable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typable.js","sourceRoot":"","sources":["../../src/layout/typable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,UAA+B,MAAM,eAAe,CAAC;AAE5D;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,GAAG,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC,SAAS,EAAE,GAAG,KAAK,EAAmB;IAEjH,OAAO,KAAC,UAAU,OAAK,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,YAC1E,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE;YAC5B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ;gBAAE,OAAO,KAAK,CAAC;YAEzE,OAAO,KAAK;iBACP,QAAQ,EAAE;iBACV,KAAK,CAAC,EAAE,CAAC;iBACT,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,eAAM,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAAE,YAAG,IAAI,GAAQ,CAAC,CAAC;QACxG,CAAC,CAAC,GACO,CAAC;AAClB,CAAC;AAED,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC"}
@@ -0,0 +1,5 @@
1
+ import LayoutGroup from "./layout/layout-group";
2
+ import Morph from "./layout/morph";
3
+ import Typable from "./layout/typable";
4
+ export { LayoutGroup, Morph, Typable };
5
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,OAAO,EACH,WAAW,EACX,KAAK,EACL,OAAO,EACV,CAAC"}
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/typescript/lib/lib.es2023.d.ts","../node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../node_modules/typescript/lib/lib.es2023.array.d.ts","../node_modules/typescript/lib/lib.es2023.collection.d.ts","../node_modules/typescript/lib/lib.es2023.intl.d.ts","../node_modules/typescript/lib/lib.esnext.array.d.ts","../node_modules/typescript/lib/lib.esnext.collection.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../node_modules/typescript/lib/lib.esnext.string.d.ts","../node_modules/typescript/lib/lib.esnext.promise.d.ts","../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../node_modules/typescript/lib/lib.esnext.object.d.ts","../node_modules/typescript/lib/lib.esnext.regexp.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/tslib/tslib.d.ts","../node_modules/@types/react/global.d.ts","../node_modules/csstype/index.d.ts","../node_modules/@types/react/index.d.ts","../node_modules/@types/react/jsx-runtime.d.ts","../src/core/cache.ts","../src/core/utils.ts","../src/core/track.ts","../src/core/action.ts","../src/core/link.ts","../src/core/clip.ts","../src/hooks/use-trigger.ts","../src/core/timeline.ts","../src/animatable.tsx","../src/animate.tsx","../src/hooks/use-link.ts","../src/hooks/use-reduced-motion.ts","../src/hooks/use-scroll.ts","../src/hooks/use-path.ts","../src/hooks/use-viewport.ts","../src/hooks/use-visible.ts","../src/hooks/use-audio.ts","../src/hooks/use-spring.ts","../src/hooks.ts","../src/index.ts","../src/layout/morph.tsx","../src/layout/layout-group.tsx","../src/layout/typable.tsx","../src/layout.ts","../node_modules/@types/estree/index.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/minimatch/index.d.ts","../node_modules/@types/glob/index.d.ts","../node_modules/@types/react-dom/index.d.ts","../node_modules/@types/resolve/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","17edc026abf73c5c2dd508652d63f68ec4efd9d4856e3469890d27598209feb5",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"9c00a480825408b6a24c63c1b71362232927247595d7c97659bc24dc68ae0757","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"4a882ffbb4ed09d9b7734f784aebb1dfe488d63725c40759165c5d9c657ca029",{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true},"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","a305ee2f90e34e9e70aba9a9e9a154ce20c4d5cd1499cd21b8dc3617e1e5c810","42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3",{"version":"6a72b3d16fadf637354af566b7a3116bd9ae1bf82fa85748194b3882e20c9872","signature":"163b308184fbfe429ef03b3a44eb6f1d8a2719d7cf4b99a6acd7c2937b50cdb0"},{"version":"52c1a3fdd80165b67812bceca098e2db1813d95a5608b18210b68184562342e7","signature":"ef216e62f609c5b034d653fe6720b3a32b608f55729b7777cd8622960fd17cfb"},{"version":"1825af831be2fe27a3fa623856a83ff35157198bc09280cd84ee00c25e780a76","signature":"328bd8809e995ee9846cd0780d9512651736ca07d415150d3e0ecd294ee9dbde"},{"version":"8452afbcac66e3f8db08aab3219468c89bead4225ae22f7bda79651460cfba26","signature":"b701d07d725fdbd52c2c5414f7b261c3c9a659f7ed8b65cef6e00a3dad204258"},{"version":"39644538dbe46560bb25c9b6790905fe59e913c4a501c77d447d8b9b21c9081f","signature":"3a92dda6ee0906e5627eb372c852050eccfb715a313baf8fa771aeb421f188a0"},{"version":"a5c68267225c3b6f3071a915d4ccd162951aae82261dad851a958d67ea75452e","signature":"fcd62d43c4b10710620c942bcc303d08fbe6b1637e01ddd50c41a6a63d2058ae"},{"version":"46ac9c11b5e6212e5156bb535756b60477ac624fc3bb532e551de6e6c46aa9ac","signature":"ad0f4b7c7df368c834fdae70d95fecd56fa87c087f70f4153038c273ffebf05d"},{"version":"5ba6ee52b56c32cab54ddf22f9df9f3d7fe77c89b39d9a856df5b7fe78bc168d","signature":"b97a1f80970000029a1691deca081f50dcc6b6398154f7b19fd3158e32dae2be"},{"version":"c484a1f31d668a5251eaae8793d4c8f5178fceb79e4f79c04b652cffb679b481","signature":"4b31aaef9b88270199b6544ce56026b681514e2469804092bcca98c11d6d1cec"},{"version":"b0fcfb391f7c9be72769287279ee7abec02afe97ea1c3d5149bf75a3584d94a9","signature":"c322b9305b515ca46926ea451a6f5fc30b116b9a1c808ebfc4b1d61129d7ef34"},{"version":"689fd50b4138b903d4d8da8dc8f1bed8774cdbfc5e88126b45b14127bc6efcba","signature":"fe8beb9e93ebff8b8a5f30cef504acd33a02209229123a60d620fffb19c739b2"},{"version":"2e9d408dec35668f3826e2727dbe2d00911bf7a20098bc4c9d14100edab3f491","signature":"c575e6823a24d8f924678ddf22ad927648a8e8292e8bec64a3d159ba960074fd"},{"version":"786ad2486cb2ade3053ed5a26156b0959948ee980e94e6abec39b1083bdd74f5","signature":"5572586175812848be193de5dd7643b6823e44241c123b14022593c5154237d3"},{"version":"1395307a4ebd06ac6a42d5601212bcf6fafd04224aef2d768c6c08d1a984dd90","signature":"2a739cd6ca7ead8afda840553559d35cd158da0f40edcbd81ebd70599f906b01"},{"version":"9cb80606efae65c3becb06fb24e807dd0a13189018a0f08ce6efd50814590608","signature":"a1416c0abfbd1cd75ed7827935f23ff9643cd16cebd701f71a2021c9601cc5f4"},{"version":"beef36f7445ee01729a0fa35cd9a1b7e8be09e90bd9505308db48fa588afd924","signature":"193e2058ec66b9a22df45865abf47d2a98572d3d6ea56b11c3297bdf5bbb74b6"},{"version":"f0e7ead8f0fa3e6fd8e388ca2a296f19a882c6ed878b3b495710ac7ecd675b2d","signature":"432f8d6f886dacbde9183d8dfbbff10f579a5a6a218e1442988c0bcf51f33956"},{"version":"a45aeec17b5236108953988910bba0a01aa89d4f5445ef81636e7cbae5349357","signature":"0c959d4f26222868af03950a30d78d836132350ebc7122ed86956c0ac6b7ac60"},{"version":"af61ce607434278e95414e782453447cec403851a8beb0e3dc02e8d8a209d77d","signature":"944a38ecd96c01a6bdb4ca89ec15a8893977225953671266848f852c5dfbeb9e"},{"version":"d7dcf8f20df9be3094d0cb73a8e5cbf3e5a69615b1d794fe121f4d6be70aeefc","signature":"e3b66ed1af6b16491210ad6b1402e661b86e8f804216752073c92906996cb917"},{"version":"27fc90c97940f3dba18af3fa5df35a2974d440902fef3c6e7cb50778b7a797f9","signature":"e639a41c30b9eb5a67204092ebefcadbdda4c7fbe02485aa8bb3014696332a93"},{"version":"4ad1d3c33ada1561eb545b889c51e5f1fa5d302048733fa304f1b78fc1df8c7c","signature":"934e3055d017102a70b247862502fa18fc159ec1e4e9967f5a8b3e774b68e0f3"},{"version":"56efa6c25db1b4e7d363f2f945e54a78ba3c2b6e7a3263b29fe77b64fc00a0f1","signature":"a16ce7132834de92028cd61e5546d59cf26bd09d505c464da5bb7ce27944fb2e"},{"version":"60944089907f8fb7c2ff36faeef7a2078a5d6ce0ed09f02981edcfea4ed29893","signature":"012a8f44667aa3e805d272dcc20ec1308b46b98abd5e8e288ff75b32b020a125"},"785b9d575b49124ce01b46f5b9402157c7611e6532effa562ac6aebec0074dfc","9122ed7070e054b73ebab37c2373a196def2d90e7d1a9a7fcd9d46b0e51fae78","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"3e4624c306340ad303cc536a07004e81336c3f088308a9e4a9f4c957a3cda2fd","affectsGlobalScope":true},"0c0cee62cb619aed81133b904f644515ba3064487002a7da83fd8aa07b1b4abd","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","025fc13211ed47d2798269017af3ec869122a050d5431a6ad3c1997900e65c58","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","75ecef44f126e2ae018b4abbd85b6e8a2e2ba1638ebec56cc64274643ce3567b","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"249a2b90439cdfd51709539fbfa4dfe0791cbae6efce1e9b327ba8f8cd703f49","affectsGlobalScope":true},"40b991dc3365179e1365643589e168d7ea0588b4dd5bbb3a974ffefa7cb05e7f","bf057bb805c5e1c0e795ac7c759d40ebbe0e9894df9be3413bbdd8d1a2fc229e","74f2bb83d1ccf390f48681be57a30c09e85b4c7a801267746e382b2386fc667e","7bac475dcdd9f7e4e9da934d32c305bc889c4ce3c8ac0ef45a93a8d670fff607","5d357e7965026197a3152fa4e990fa7a4cbaf1578a17dff920ff1a71a325e198","8acf99b1c8682276a63ea5bb68433782715892726b97e4604a415e4e56bce41c",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"3b145a2351f5cf16abf999c8d5f4481c74dffdc54ec1e9a89992e2622e1226c5","a907bf91df26df2400858ef75f749498fb5cf00062bf90a737ac3949cc07978d","d270fd4b565eda11a0a737c181892316b7a1ace06c7988d0246219c3df11db06","70caef0271088abc5f5ae7ff6d84421d35bb192b690fbaa1b2ecf2b0ef01deb6",{"version":"59a638a504490fecaacf0020b9814b6abee37edb66047eb1ab9f7c2274bf1da0","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","d1a78a3c5708807e8de3e399f91df4797c62e44b02195eefc2209b2e713e54ee","8c4c1a64db28930732033c31418f817dcb9d09d706766707ae6d38f23faf0c53","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","12a70315c8281e46d65696086dd25827408e967b305a22276ae2779fe519e0fe","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","29d613c3964ea75b2b4e0d17098245c34529282e9cc72b7e4eeb2a7b12c27cb7",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","a381f079c4804442f179d742fdb2e495fe28d67a47cac673485f75ae2e77aeca","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"bfe39beb986d2a2e512c091cbe924f1c415bc65de54de0e2f6a0dc6f84c183d9","affectsGlobalScope":true},"2af17363f8a062e3a8cd1b26030af0058b3f86e783f4fc6aa9f57247f240ebaa","06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","dfe08140492cdc135fb7fd9c4a652c05207b61a436906079b87da1d3111314bf","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","089e1f8603cbc35ab977c8dcc662eb754b82fca32ed1dfb16bd682726c2d5432","8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"82fc37849846a3a0264047621d5beb6ce2ddeb2f83bdee2c79523af3c3282d97","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","fd326577c62145816fe1acc306c734c2396487f76719d3785d4e825b34540b33","df1f0af64d4087d4032c57bf23d3d6199b9e276a29a6ad89794f0d2442d6b85e","8baa5d0febc68db886c40bf341e5c90dc215a90cd64552e47e8184be6b7e3358"],"root":[[79,102]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"declarationDir":"./types","emitDeclarationOnly":false,"esModuleInterop":true,"importHelpers":true,"jsx":4,"module":99,"noEmitHelpers":true,"noUncheckedIndexedAccess":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7},"fileIdsList":[[148],[119,120,148,155,156],[104,148],[107,148],[108,113,148],[109,119,120,127,136,147,148],[109,110,119,127,148],[111,148],[112,113,120,128,148],[113,136,144,148],[114,116,119,127,148],[115,148],[116,117,148],[118,119,148],[119,148],[119,120,121,136,147,148],[119,120,121,136,139,148],[148,152],[122,127,136,147,148],[119,120,122,123,127,136,144,147,148],[122,124,136,144,147,148],[104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154],[119,125,148],[126,147,148],[116,119,127,136,148],[128,148],[129,148],[107,130,148],[131,146,148,152],[132,148],[133,148],[119,134,148],[134,135,148,150],[119,136,137,138,139,148],[136,138,148],[136,137,148],[139,148],[140,148],[119,142,143,148],[142,143,148],[113,127,136,144,148],[145,148],[127,146,148],[108,122,133,147,148],[113,148],[136,148,149],[148,150],[148,151],[108,113,119,121,130,136,147,148,150,152],[136,148,153],[77,148],[75,76,148],[74,77,78,79,80,84,85,86,148],[74,77,78,84,87,148],[74,78,81,84,148],[74,78,80,81,82,83,148],[74,78,84,148],[74,78,79,80,81,83,84,148],[74,78,79,80,82,84,148],[74,78,85,89,90,91,92,93,94,95,96,148],[74,77,78,83,89,148],[74,77,78,83,148],[74,77,78,148],[74,77,78,89,148],[74,77,78,85,93,148],[74,78,87,88,148],[74,78,99,100,101,148],[74,77,78,81,87,99,148],[74,77,78,80,81,86,87,148],[74,77,78,87,148]],"referencedMap":[[103,1],[157,2],[156,1],[104,3],[105,3],[107,4],[108,5],[109,6],[110,7],[111,8],[112,9],[113,10],[114,11],[115,12],[116,13],[117,13],[118,14],[119,15],[120,16],[121,17],[106,18],[154,1],[122,19],[123,20],[124,21],[155,22],[125,23],[126,24],[127,25],[128,26],[129,27],[130,28],[131,29],[132,30],[133,31],[134,32],[135,33],[136,34],[138,35],[137,36],[139,37],[140,38],[141,1],[142,39],[143,40],[144,41],[145,42],[146,43],[147,44],[148,45],[149,46],[150,47],[151,48],[152,49],[153,50],[158,51],[75,1],[77,52],[78,51],[159,1],[76,1],[74,1],[72,1],[73,1],[12,1],[13,1],[15,1],[14,1],[2,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[23,1],[3,1],[24,1],[4,1],[25,1],[29,1],[26,1],[27,1],[28,1],[30,1],[31,1],[32,1],[5,1],[33,1],[34,1],[35,1],[36,1],[6,1],[40,1],[37,1],[38,1],[39,1],[41,1],[7,1],[42,1],[47,1],[48,1],[43,1],[44,1],[45,1],[46,1],[8,1],[52,1],[49,1],[50,1],[51,1],[53,1],[9,1],[54,1],[55,1],[56,1],[59,1],[57,1],[58,1],[60,1],[61,1],[10,1],[62,1],[1,1],[63,1],[64,1],[11,1],[69,1],[66,1],[65,1],[70,1],[68,1],[71,1],[67,1],[87,53],[88,54],[82,55],[79,55],[84,56],[83,57],[86,58],[81,59],[80,55],[97,60],[95,61],[89,62],[92,63],[90,63],[91,64],[96,64],[85,63],[93,61],[94,65],[98,66],[102,67],[100,68],[99,69],[101,70]]},"version":"5.5.2"}
@@ -17,6 +17,7 @@ export declare function pick<T extends {
17
17
  [key: string]: any;
18
18
  }, K extends keyof T>(map: T, keys: K[]): { [key in K]: T[K]; };
19
19
  export declare function combineRefs(...refs: (React.Ref<any> | undefined)[]): (el: any) => void;
20
+ export declare const limitSmallestQuantity: (val: number, e: number) => number;
20
21
  export declare const lengthToOffset: (val: any) => number;
21
22
  export declare class IndexedMap<K, V> extends Map<K, V> {
22
23
  stack: V[];
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as e}from"tslib";import{jsx as n}from"react/jsx-runtime";import{createContext as r,useRef as t,use as i,useMemo as a,useCallback as o,useImperativeHandle as s,useEffect as u,useLayoutEffect as l,Children as c,isValidElement as d,cloneElement as m}from"react";import p from"./core/clip.js";import f from"./core/timeline.js";import{merge as h,pick as v,combineRefs as g}from"./core/utils.js";const y=r(null);function b(r){const b=t(null),j=t([]),x=i(y),w=r.inherit&&x?h({},r,v(x,["group","animations","triggers","animate","initial","stagger","staggerLimit","deform","disabled","paused"])):r,{id:O="",inherit:L,triggers:k=[],disabled:E,adaptive:z=!1,manual:A=!1,paused:C}=w,M=void 0!==r.order?r.order:(L&&(null==x?void 0:x.index)||-1)+1,D=t([]),T=a((()=>{const e={animate:p.from(w.animate,w.initial)};for(const n in w.animations)e[n]=p.from(w.animations[n],w.initial);return e}),[]),V=t(new f(Object.assign(Object.assign({},w),{mountClips:k.reduce(((e,{name:n,on:r})=>("mount"===r&&e.push(T[n||"animate"]),e)),[])}))),q=o(((e,n={},t=1)=>{var i;const a=T[e];if(E||L&&t<2)return 0;h(n,{reverse:null==a?void 0:a.reverse});let o=0,s=n.delay||0,u=a?V.current.time(a):0;for(const r of j.current)(null===(i=r.current)||void 0===i?void 0:i.inherit)&&(o=Math.max(r.current.play(e,h({delay:s+u},n),t+1),o));const l=(n.reverse?o:s)*(M/t+1/t);return a&&V.current.add(a,h({delay:l},n)),r.onAnimationEnd&&setTimeout(r.onAnimationEnd.bind({},e),1e3*(u+l)),u+l}),[E,L,M]);function B(n,r={}){let t=0;for(let i of k){const{name:a,on:o}=i,s=e(i,["name","on"]);o===n&&(t=Math.max(q(a||"animate",h(s,r)),t))}return t}return s(g(b,r.ref),(()=>({play:q,trigger:B,timeline:V.current,children:j.current,inherit:L,adaptive:z,group:w.group,id:O})),[k]),u((()=>V.current.pause(!(!C&&!E))),[C,E]),u((()=>{for(let n=0;n<k.length;n++){let r=k[n],{name:t,on:i}=r,a=e(r,["name","on"]);if("string"==typeof i)continue;const o="boolean"==typeof i?i:i.called,s=D.current[n];void 0!==s&&o&&o!==s&&q(t||"animate",a),D.current[n]=o}}),[k]),l((()=>{const e=()=>V.current.cache();return V.current.link(w.animate),window.addEventListener("resize",e),null==x||x.add(b),document.fonts.ready.then((()=>{A||V.current.mounted||B("mount"),V.current.mounted=!0})),()=>{window.removeEventListener("resize",e),V.current.unlink(),null==x||x.remove(b)}}),[]),n(y,{value:Object.assign(Object.assign({},r.passthrough?x:Object.assign({index:M},w)),{add:e=>{r.passthrough&&(null==x||x.add(e)),j.current.includes(e)||j.current.push(e)},remove:e=>{r.passthrough&&(null==x||x.remove(e));const n=j.current.indexOf(e)||-1;n>=0&&j.current.splice(n,1)}}),children:c.map(r.children,(e=>d(e)?m(e,{ref:g((e=>V.current.insert(e)),e.props.ref),pathLength:1,style:h({backfaceVisibility:"hidden",willChange:"transform"},e.props.style,T.animate.initial,{strokeDasharray:1}),"data-lively-offset-boundary":!(!["x","y"].some((e=>{var n;return null===(n=r.cachable)||void 0===n?void 0:n.includes(e)}))&&void 0!==r.cachable)||void 0}):e))})}b.isLively=!0;export{y as AnimatableContext,b as default};
2
+ import{jsx as e}from"react/jsx-runtime";import{createContext as r,useRef as n,use as t,useMemo as i,useCallback as a,useImperativeHandle as o,useEffect as s,useLayoutEffect as u,Children as c,isValidElement as d,cloneElement as m}from"react";import l from"./core/clip.js";import p from"./core/timeline.js";import{merge as f,pick as h,combineRefs as g}from"./core/utils.js";const v=r(null);function y(r){const y=n(null),b=n([]),x=t(v),w=r.inherit&&x?f({},r,h(x,["group","animations","triggers","animate","initial","stagger","staggerLimit","deform","disabled","paused"])):r,{id:L="",inherit:j,triggers:k=[],disabled:E,adaptive:z=!1,manual:A=!1,paused:C}=w,M=void 0!==r.order?r.order:(j&&x?.index||-1)+1,D=n([]),O=i((()=>{const e={animate:l.from(w.animate,w.initial)};for(const r in w.animations)e[r]=l.from(w.animations[r],w.initial);return e}),[]),T=n(new p({...w,mountClips:k.reduce(((e,{name:r,on:n})=>("mount"===n&&e.push(O[r||"animate"]),e)),[])})),V=a(((e,n={},t=1)=>{const i=O[e];if(E||j&&t<2)return 0;f(n,{reverse:i?.reverse});let a=0,o=n.delay||0,s=i?T.current.time(i):0;for(const r of b.current)r.current?.inherit&&(a=Math.max(r.current.play(e,f({delay:o+s},n),t+1),a));const u=(n.reverse?a:o)*(M/t+1/t);return i&&T.current.add(i,f({delay:u},n)),r.onAnimationEnd&&setTimeout(r.onAnimationEnd.bind({},e),1e3*(s+u)),s+u}),[E,j,M]);function q(e,r={}){let n=0;for(const{name:t,on:i,...a}of k)i===e&&(n=Math.max(V(t||"animate",f(a,r)),n));return n}return o(g(y,r.ref),(()=>({play:V,trigger:q,timeline:T.current,children:b.current,inherit:j,adaptive:z,group:w.group,id:L})),[k]),s((()=>T.current.pause(!(!C&&!E))),[C,E]),s((()=>{for(let e=0;e<k.length;e++){let{name:r,on:n,...t}=k[e];if("string"==typeof n)continue;const i="boolean"==typeof n?n:n.called,a=D.current[e];void 0!==a&&i&&i!==a&&V(r||"animate",t),D.current[e]=i}}),[k]),u((()=>{const e=()=>T.current.cache();return T.current.link(w.animate),window.addEventListener("resize",e),x?.add(y),document.fonts.ready.then((()=>{A||T.current.mounted||q("mount"),T.current.mounted=!0})),()=>{window.removeEventListener("resize",e),T.current.unlink(),x?.remove(y)}}),[]),e(v,{value:{...r.passthrough?x:{index:M,...w},add:e=>{r.passthrough&&x?.add(e),b.current.includes(e)||b.current.push(e)},remove:e=>{r.passthrough&&x?.remove(e);const n=b.current.indexOf(e)||-1;n>=0&&b.current.splice(n,1)}},children:c.map(r.children,(e=>d(e)?m(e,{ref:g((e=>T.current.insert(e)),e.props.ref),pathLength:1,style:f({backfaceVisibility:"hidden",willChange:"transform"},e.props.style,O.animate.initial,{strokeDasharray:1}),"data-lively-offset-boundary":!(!["x","y"].some((e=>r.cachable?.includes(e)))&&void 0!==r.cachable)||void 0}):e))})}y.isLively=!0;export{v as AnimatableContext,y as default};
3
3
  //# sourceMappingURL=animatable.js.map
package/dist/animate.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as i}from"tslib";import{jsx as r,Fragment as t}from"react/jsx-runtime";import{Children as e,isValidElement as n,cloneElement as a}from"react";import o from"./animatable.js";function l(l){var{children:m,animations:p=[{translate:["0px 16px","0px 0px"],opacity:[0,1],duration:.35}],levels:s=2}=l,c=i(l,["children","animations","levels"]);return r(t,{children:function i(t,l=s){let m,f=s-l;for(;!(m=p[f])&&f>=0;)f--;return l<1||e.count(t)<1?t:r(o,Object.assign({},c,{animate:m,inherit:l<s||c.inherit,children:e.map(t,(r=>n(r)?a(r,{},i(r.props.children,l-1)):r))}))}(m)})}l.isLively=!0;export{l as default};
2
+ import{jsx as r,Fragment as t}from"react/jsx-runtime";import{Children as i,isValidElement as e,cloneElement as n}from"react";import a from"./animatable.js";function o({children:o,animations:p=[{translate:["0px 16px","0px 0px"],opacity:[0,1],duration:.35}],levels:l=2,...m}){return r(t,{children:function t(o,c=l){let s,u=l-c;for(;!(s=p[u])&&u>=0;)u--;return c<1||i.count(o)<1?o:r(a,{...m,animate:s,inherit:c<l||m.inherit,children:i.map(o,(r=>e(r)?n(r,{},t(r.props.children,c-1)):r))})}(o)})}o.isLively=!0;export{o as default};
3
3
  //# sourceMappingURL=animate.js.map
@@ -1,2 +1,2 @@
1
- class i{constructor(i,t,s,n={}){this.commit=!0,this.onfinish=null,this.composite=s.composite,s.composite="combine"===s.composite?"accumulate":"replace",this.animation=i.element.animate(t,s),this.dynamic=n,this.track=i,this.animation.onfinish=this.finish.bind(this)}finish(){var i;try{this.commit&&this.animation.commitStyles()}catch(i){}this.animation.cancel(),null===(i=this.onfinish)||void 0===i||i.call(this)}step(i){var t,s;const n=(null===(t=this.animation.effect)||void 0===t?void 0:t.getComputedTiming().progress)||0;for(const t in this.dynamic)this.track.apply(t,null===(s=this.dynamic[t])||void 0===s?void 0:s.call(this.track,n,i))}}export{i as default};
1
+ class i{constructor(i,t,s,n={}){this.commit=!0,this.onfinish=null,this.composite=s.composite,s.composite="combine"===s.composite?"accumulate":"replace",this.animation=i.element.animate(t,s),this.dynamic=n,this.track=i,this.animation.onfinish=this.finish.bind(this)}finish(){try{this.commit&&this.animation.commitStyles()}catch(i){}this.animation.cancel(),this.onfinish?.()}step(i){const t=this.animation.effect?.getComputedTiming().progress||0;for(const s in this.dynamic)this.track.apply(s,this.dynamic[s]?.call(this.track,t,i))}}export{i as default};
2
2
  //# sourceMappingURL=action.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"action.js","sources":["../../src/core/action.ts"],"sourcesContent":[null],"names":["Action","constructor","track","keyframes","config","dynamic","this","commit","onfinish","composite","animation","element","animate","finish","bind","commitStyles","ex","cancel","_a","call","step","index","progress","effect","getComputedTiming","prop","apply","_b"],"mappings":"AAGc,MAAOA,EASjB,WAAAC,CAAYC,EAAcC,EAAkDC,EAAqFC,EAA6B,CAAA,GAN9LC,KAAMC,QAAY,EAIlBD,KAAQE,SAAwB,KAG5BF,KAAKG,UAAYL,EAAOK,UACvBL,EAAeK,UAAiC,YAArBL,EAAOK,UAA0B,aAAe,UAC5EH,KAAKI,UAAYR,EAAMS,QAAQC,QAAQT,EAAWC,GAClDE,KAAKD,QAAUA,EACfC,KAAKJ,MAAQA,EAEbI,KAAKI,UAAUF,SAAWF,KAAKO,OAAOC,KAAKR,KAC9C,CAED,MAAAO,SACI,IACQP,KAAKC,QAAQD,KAAKI,UAAUK,cACnC,CAAC,MAAOC,GAAM,CACfV,KAAKI,UAAUO,SAEF,QAAbC,EAAAZ,KAAKE,gBAAQ,IAAAU,GAAAA,EAAAC,KAAAb,KAChB,CAED,IAAAc,CAAKC,WACD,MAAMC,WAAWJ,EAAAZ,KAAKI,UAAUa,6BAAQC,oBAAoBF,WAAY,EAExE,IAAK,MAAMG,KAAQnB,KAAKD,QACpBC,KAAKJ,MAAMwB,MAAMD,EAAqD,QAA/CE,EAAArB,KAAKD,QAAQoB,UAAkC,IAAAE,OAAA,EAAAA,EAAAR,KAAKb,KAAKJ,MAAOoB,EAAUD,GAExG"}
1
+ {"version":3,"file":"action.js","sources":["../../src/core/action.ts"],"sourcesContent":[null],"names":["Action","constructor","track","keyframes","config","dynamic","this","commit","onfinish","composite","animation","element","animate","finish","bind","commitStyles","ex","cancel","step","index","progress","effect","getComputedTiming","prop","apply","call"],"mappings":"AAGc,MAAOA,EASjB,WAAAC,CAAYC,EAAcC,EAAkDC,EAAqFC,EAA6B,CAAA,GAN9LC,KAAMC,QAAY,EAIlBD,KAAQE,SAAwB,KAG5BF,KAAKG,UAAYL,EAAOK,UACvBL,EAAeK,UAAiC,YAArBL,EAAOK,UAA0B,aAAe,UAC5EH,KAAKI,UAAYR,EAAMS,QAAQC,QAAQT,EAAWC,GAClDE,KAAKD,QAAUA,EACfC,KAAKJ,MAAQA,EAEbI,KAAKI,UAAUF,SAAWF,KAAKO,OAAOC,KAAKR,KAC9C,CAED,MAAAO,GACI,IACQP,KAAKC,QAAQD,KAAKI,UAAUK,cACnC,CAAC,MAAOC,GAAM,CACfV,KAAKI,UAAUO,SAEfX,KAAKE,YACR,CAED,IAAAU,CAAKC,GACD,MAAMC,EAAWd,KAAKI,UAAUW,QAAQC,oBAAoBF,UAAY,EAExE,IAAK,MAAMG,KAAQjB,KAAKD,QACpBC,KAAKJ,MAAMsB,MAAMD,EAAMjB,KAAKD,QAAQkB,IAAkCE,KAAKnB,KAAKJ,MAAOkB,EAAUD,GAExG"}
@@ -1,2 +1,2 @@
1
- import e from"./clip.js";class t{constructor(e,t=["x","y","sx","sy","borderRadius","backgroundColor","color","rotate"]){this.element=e,this.include=t.map((e=>"strokeLength"===e?"strokeDashoffset":e)),this.computed=getComputedStyle(e),this.data=this.read()}read(){const e={};for(const t of this.include)e[t]=this.computed[t];if(this.element instanceof SVGElement)return e;e.sx=this.element.offsetWidth,e.sy=this.element.offsetHeight,e.x=e.sx/2,e.y=e.sy/2;let t=this.element;for(;t&&(e.x+=t.offsetLeft,e.y+=t.offsetTop,t=t.offsetParent,!(null==t?void 0:t.dataset.livelyOffsetBoundary)););return e}update(){this.data=this.read()}difference(t=this.data,{duration:s=.5,easing:o="ease",reverse:i=!1}){const a=this.read(),r=[[1,1],[1,1]],n=[["0px","0px"],["0px","0px"]],c={duration:s,easing:o,reverse:i,composite:"combine"},d=Object.assign(Object.assign({},c),{composite:"override"});for(const e of this.include)switch(e){case"x":case"y":n[0]["x"==e?0:1]=t[e]-a[e]+"px";break;case"sx":case"sy":r[0]["sx"==e?0:1]=0===a[e]?1:t[e]/a[e];break;default:d[e]=[t[e],a[e]]}return c.scale=r.map((e=>e.join(" "))),c.translate=n.map((e=>e.join(" "))),[new e(c),new e(d)]}}export{t as StyleCache};
1
+ import e from"./clip.js";class t{constructor(e,t=["x","y","sx","sy","borderRadius","backgroundColor","color","rotate"]){this.element=e,this.include=t.map((e=>"strokeLength"===e?"strokeDashoffset":e)),this.computed=getComputedStyle(e),this.data=this.read()}read(){const e={};for(const t of this.include)e[t]=this.computed[t];if(this.element instanceof SVGElement)return e;e.sx=this.element.offsetWidth,e.sy=this.element.offsetHeight,e.x=e.sx/2,e.y=e.sy/2;let t=this.element;for(;t&&(e.x+=t.offsetLeft,e.y+=t.offsetTop,t=t.offsetParent,!t?.dataset.livelyOffsetBoundary););return e}update(){this.data=this.read()}difference(t=this.data,{duration:s=.5,easing:o="ease",reverse:r=!1}){const a=this.read(),i=[[1,1],[1,1]],n=[["0px","0px"],["0px","0px"]],c={duration:s,easing:o,reverse:r,composite:"combine"},f={...c,composite:"override"};for(const e of this.include)switch(e){case"x":case"y":n[0]["x"==e?0:1]=t[e]-a[e]+"px";break;case"sx":case"sy":i[0]["sx"==e?0:1]=0===a[e]?1:t[e]/a[e];break;default:f[e]=[t[e],a[e]]}return c.scale=i.map((e=>e.join(" "))),c.translate=n.map((e=>e.join(" "))),[new e(c),new e(f)]}}export{t as StyleCache};
2
2
  //# sourceMappingURL=cache.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cache.js","sources":["../../src/core/cache.ts"],"sourcesContent":[null],"names":["StyleCache","constructor","element","include","this","map","key","computed","getComputedStyle","data","read","prop","SVGElement","sx","offsetWidth","sy","offsetHeight","x","y","parent","offsetLeft","offsetTop","offsetParent","dataset","livelyOffsetBoundary","update","difference","from","duration","easing","reverse","to","scale","translate","keyframes1","composite","keyframes2","Object","assign","val","join","Clip"],"mappings":"+BAeaA,EAOT,WAAAC,CAAYC,EAAmCC,EAAyB,CAAC,IAAK,IAAK,KAAM,KAAM,eAAgB,kBAAmB,QAAS,WACvIC,KAAKF,QAAUA,EACfE,KAAKD,QAAUA,EAAQE,KAAIC,GAAe,iBAARA,EAAyB,mBAAqBA,IAChFF,KAAKG,SAAWC,iBAAiBN,GACjCE,KAAKK,KAAOL,KAAKM,MACpB,CAED,IAAAA,GACI,MAAMD,EAAO,CAAA,EAGb,IAAK,MAAME,KAAQP,KAAKD,QAASM,EAAKE,GAAQP,KAAKG,SAASI,GAE5D,GAAIP,KAAKF,mBAAmBU,WAAY,OAAOH,EAC/CA,EAAKI,GAAKT,KAAKF,QAAQY,YACvBL,EAAKM,GAAKX,KAAKF,QAAQc,aACvBP,EAAKQ,EA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","element","include","this","map","key","computed","getComputedStyle","data","read","prop","SVGElement","sx","offsetWidth","sy","offsetHeight","x","y","parent","offsetLeft","offsetTop","offsetParent","dataset","livelyOffsetBoundary","update","difference","from","duration","easing","reverse","to","scale","translate","keyframes1","composite","keyframes2","val","join","Clip"],"mappings":"+BAeaA,EAOT,WAAAC,CAAYC,EAAmCC,EAAyB,CAAC,IAAK,IAAK,KAAM,KAAM,eAAgB,kBAAmB,QAAS,WACvIC,KAAKF,QAAUA,EACfE,KAAKD,QAAUA,EAAQE,KAAIC,GAAe,iBAARA,EAAyB,mBAAqBA,IAChFF,KAAKG,SAAWC,iBAAiBN,GACjCE,KAAKK,KAAOL,KAAKM,MACpB,CAED,IAAAA,GACI,MAAMD,EAAO,CAAA,EAGb,IAAK,MAAME,KAAQP,KAAKD,QAASM,EAAKE,GAAQP,KAAKG,SAASI,GAE5D,GAAIP,KAAKF,mBAAmBU,WAAY,OAAOH,EAC/CA,EAAKI,GAAKT,KAAKF,QAAQY,YACvBL,EAAKM,GAAKX,KAAKF,QAAQc,aACvBP,EAAKQ,EAAIR,EAAKI,GAAK,EACnBJ,EAAKS,EAAIT,EAAKM,GAAK,EAEnB,IAAII,EAA6Bf,KAAKF,QACtC,KAAOiB,IACHV,EAAKQ,GAAKE,EAAOC,WACjBX,EAAKS,GAAKC,EAAOE,UAEjBF,EAASA,EAAOG,cACZH,GAAQI,QAAQC,wBAGxB,OAAOf,CACV,CAED,MAAAgB,GACIrB,KAAKK,KAAOL,KAAKM,MACpB,CAED,UAAAgB,CAAWC,EAAkBvB,KAAKK,MAAMmB,SAAEA,EAAW,GAAGC,OAAEA,EAAS,OAAMC,QAAEA,GAAU,IACjF,MAAMC,EAAK3B,KAAKM,OAEVsB,EAAQ,CAAC,CAAC,EAAG,GAAI,CAAC,EAAG,IACvBC,EAAY,CAAC,CAAC,MAAO,OAAQ,CAAC,MAAO,QACnCC,EAA6B,CAAEN,WAAUC,SAAQC,UAASK,UAAW,WACvEC,EAA6B,IAAKF,EAAYC,UAAW,YAE7D,IAAK,MAAM7B,KAAOF,KAAKD,QACnB,OAAQG,GACJ,IAAK,IACL,IAAK,IACD2B,EAAU,GAAU,KAAP3B,EAAa,EAAI,GAAKqB,EAAKrB,GAAOyB,EAAGzB,GAAO,KACzD,MACJ,IAAK,KACL,IAAK,KACD0B,EAAM,GAAU,MAAP1B,EAAc,EAAI,GAAiB,IAAZyB,EAAGzB,GAAa,EAAIqB,EAAKrB,GAAOyB,EAAGzB,GACnE,MACJ,QAAS8B,EAAW9B,GAAO,CAACqB,EAAKrB,GAAeyB,EAAGzB,IAO3D,OAHA4B,EAAWF,MAAQA,EAAM3B,KAAIgC,GAAOA,EAAIC,KAAK,OAC7CJ,EAAWD,UAAYA,EAAU5B,KAAIgC,GAAOA,EAAIC,KAAK,OAE9C,CAAC,IAAIC,EAAKL,GAAa,IAAIK,EAAKH,GAC1C"}
package/dist/core/clip.js CHANGED
@@ -1,2 +1,2 @@
1
- import{__rest as t}from"tslib";import e from"./action.js";import{isLink as i}from"./link.js";import{normalizeAnimatableKeyframes as s,createDynamic as r,distributeAnimatableKeyframes as a,merge as n}from"./utils.js";class o{constructor(e,o){var{duration:h=1,delay:l=0,repeat:m=1,alternate:c=!1,easing:d="ease",reverse:y=!1,composite:p="none"}=e,f=t(e,["duration","delay","repeat","alternate","easing","reverse","composite"]);void 0===o&&(o={}),this.dynamic={};const u={};for(let t in f){let e=f[t],n=o[t];if(e instanceof Function){i(e)||(this.dynamic[t]=e);continue}const h=Array.isArray(e)?e:[e];h.length<2&&void 0!==n&&h.unshift(n),null===h[0]&&(void 0!==n?h[0]=n:h.splice(0,1)),s(h)&&("borderRadius"!==t?a(t,h,u):this.dynamic[t]=r(t,Object.values(a(t,h)),d))}this.keyframes=Object.values(u),this.initial=n({},o,this.keyframes.length?this.keyframes[0]:{}),delete this.initial.offset,this.isEmpty=!this.keyframes.length&&!Object.keys(this.dynamic).length,this.duration=this.isEmpty?0:h,this.delay=l,this.repeat=m,this.alternate=c,this.easing=d,this.reverse=y,this.composite=p}static from(t,e){return t instanceof o?t:new o(t||{},e)}unique(t){const e=new o({});for(const i in this)this.hasOwnProperty(i)&&(e[i]=i in t?t[i]:this[i]);return e}play(t,{composite:i=this.composite,reverse:s=this.reverse,commit:r=!0,delay:a=0}){if(this.isEmpty)return;const n=new e(t,this.keyframes,{duration:1e3*this.duration,delay:1e3*(a+this.delay),iterations:this.repeat,direction:this.alternate?s?"alternate-reverse":"alternate":s?"reverse":"normal",fill:"both",easing:this.easing,composite:i},this.dynamic);n.commit=r,t.push(n)}}export{o as default};
1
+ import t from"./action.js";import{isLink as e}from"./link.js";import{normalizeAnimatableKeyframes as i,createDynamic as s,distributeAnimatableKeyframes as n,merge as r}from"./utils.js";class a{constructor({duration:t=1,delay:a=0,repeat:o=1,alternate:h=!1,easing:l="ease",reverse:c=!1,composite:m="none",...y},d={}){this.dynamic={};const f={};for(let t in y){let r=y[t],a=d[t];if(r instanceof Function){e(r)||(this.dynamic[t]=r);continue}const o=Array.isArray(r)?r:[r];o.length<2&&void 0!==a&&o.unshift(a),null===o[0]&&(void 0!==a?o[0]=a:o.splice(0,1)),i(o)&&("borderRadius"!==t?n(t,o,f):this.dynamic[t]=s(t,Object.values(n(t,o)),l))}this.keyframes=Object.values(f),this.initial=r({},d,this.keyframes.length?this.keyframes[0]:{}),delete this.initial.offset,this.isEmpty=!this.keyframes.length&&!Object.keys(this.dynamic).length,this.duration=this.isEmpty?0:t,this.delay=a,this.repeat=o,this.alternate=h,this.easing=l,this.reverse=c,this.composite=m}static from(t,e){return t instanceof a?t:new a(t||{},e)}unique(t){const e=new a({});for(const i in this)this.hasOwnProperty(i)&&(e[i]=i in t?t[i]:this[i]);return e}play(e,{composite:i=this.composite,reverse:s=this.reverse,commit:n=!0,delay:r=0}){if(this.isEmpty)return;const a=new t(e,this.keyframes,{duration:1e3*this.duration,delay:1e3*(r+this.delay),iterations:this.repeat,direction:this.alternate?s?"alternate-reverse":"alternate":s?"reverse":"normal",fill:"both",easing:this.easing,composite:i},this.dynamic);a.commit=n,e.push(a)}}export{a as default};
2
2
  //# sourceMappingURL=clip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clip.js","sources":["../../src/core/clip.ts"],"sourcesContent":[null],"names":["Clip","constructor","_a","initial","duration","delay","repeat","alternate","easing","reverse","composite","properties","__rest","this","dynamic","keyframes","prop","val","init","Function","isLink","arr","Array","isArray","length","undefined","unshift","splice","normalizeAnimatableKeyframes","distributeAnimatableKeyframes","createDynamic","Object","values","merge","offset","isEmpty","keys","from","data","unique","config","clip","key","hasOwnProperty","play","track","commit","action","Action","iterations","direction","fill","push"],"mappings":"wNAoCc,MAAOA,EAcjB,WAAAC,CAAYC,EAAiJC,GAAjJ,IAAAC,SAAEA,EAAW,EAACC,MAAEA,EAAQ,EAACC,OAAEA,EAAS,EAACC,UAAEA,GAAY,EAAKC,OAAEA,EAAS,OAAMC,QAAEA,GAAU,EAAKC,UAAEA,EAAY,QAAuCR,EAA5BS,EAAUC,EAAAV,EAA7H,+EAAiJ,IAAAC,IAAAA,EAAgC,CAAA,GAV7LU,KAAOC,QAAsB,GAWzB,MAAMC,EAEF,CAAA,EAEJ,IAAK,IAAIC,KAAQL,EAAY,CACzB,IAAIM,EAAMN,EAAWK,GAAwBE,EAAOf,EAAQa,GAE5D,GAAIC,aAAeE,SAAU,CACpBC,EAAOH,KAAMJ,KAAKC,QAAQE,GAAyBC,GACxD,QACH,CAED,MAAMI,EAAMC,MAAMC,QAAQN,GAAOA,EAAM,CAACA,GAEpCI,EAAIG,OAAS,QAAcC,IAATP,GAAoBG,EAAIK,QAAQR,GACvC,OAAXG,EAAI,UAAsBI,IAATP,EAAqBG,EAAI,GAAKH,EAAOG,EAAIM,OAAO,EAAG,IAEnEC,EAA6BP,KAErB,iBAATL,EAKJa,EAA8Bb,EAAMK,EAAYN,GAJ5CF,KAAKC,QAAQE,GAAQc,EAAcd,EAAMe,OAAOC,OAAOH,EAA8Bb,EAAMK,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core/clip.ts"],"sourcesContent":[null],"names":["Clip","constructor","duration","delay","repeat","alternate","easing","reverse","composite","properties","initial","this","dynamic","keyframes","prop","val","init","Function","isLink","arr","Array","isArray","length","undefined","unshift","splice","normalizeAnimatableKeyframes","distributeAnimatableKeyframes","createDynamic","Object","values","merge","offset","isEmpty","keys","from","data","unique","config","clip","key","hasOwnProperty","play","track","commit","action","Action","iterations","direction","fill","push"],"mappings":"yLAoCc,MAAOA,EAcjB,WAAAC,EAAYC,SAAEA,EAAW,EAACC,MAAEA,EAAQ,EAACC,OAAEA,EAAS,EAACC,UAAEA,GAAY,EAAKC,OAAEA,EAAS,OAAMC,QAAEA,GAAU,EAAKC,UAAEA,EAAY,UAAWC,GAA8BC,EAA8B,IAV3LC,KAAOC,QAAsB,GAWzB,MAAMC,EAEF,CAAA,EAEJ,IAAK,IAAIC,KAAQL,EAAY,CACzB,IAAIM,EAAMN,EAAWK,GAAwBE,EAAON,EAAQI,GAE5D,GAAIC,aAAeE,SAAU,CACpBC,EAAOH,KAAMJ,KAAKC,QAAQE,GAAyBC,GACxD,QACH,CAED,MAAMI,EAAMC,MAAMC,QAAQN,GAAOA,EAAM,CAACA,GAEpCI,EAAIG,OAAS,QAAcC,IAATP,GAAoBG,EAAIK,QAAQR,GACvC,OAAXG,EAAI,UAAsBI,IAATP,EAAqBG,EAAI,GAAKH,EAAOG,EAAIM,OAAO,EAAG,IAEnEC,EAA6BP,KAErB,iBAATL,EAKJa,EAA8Bb,EAAMK,EAAYN,GAJ5CF,KAAKC,QAAQE,GAAQc,EAAcd,EAAMe,OAAOC,OAAOH,EAA8Bb,EAAMK,IAAcb,GAKhH,CAEDK,KAAKE,UAAYgB,OAAOC,OAAOjB,GAC/BF,KAAKD,QAAUqB,EAAM,CAAE,EAAErB,EAASC,KAAKE,UAAUS,OAAUX,KAAKE,UAAU,GAAa,CAAE,UAElFF,KAAKD,QAAQsB,OACpBrB,KAAKsB,SAAWtB,KAAKE,UAAUS,SAAWO,OAAOK,KAAKvB,KAAKC,SAASU,OACpEX,KAAKT,SAAWS,KAAKsB,QAAU,EAAI/B,EACnCS,KAAKR,MAAQA,EACbQ,KAAKP,OAASA,EACdO,KAAKN,UAAYA,EACjBM,KAAKL,OAASA,EACdK,KAAKJ,QAAUA,EACfI,KAAKH,UAAYA,CACpB,CAED,WAAO2B,CAAKC,EAA8B1B,GACtC,OAAO0B,aAAgBpC,EAAOoC,EAAO,IAAIpC,EAAKoC,GAAQ,CAAA,EAAI1B,EAC7D,CAED,MAAA2B,CAAOC,GACH,MAAMC,EAAO,IAAIvC,EAAK,CAAA,GAEtB,IAAK,MAAMwC,KAAO7B,KACVA,KAAK8B,eAAeD,KACnBD,EAAaC,GAAOA,KAAOF,EAASA,EAAOE,GAAgB7B,KAAK6B,IAIzE,OAAOD,CACV,CAED,IAAAG,CAAKC,GAAcnC,UAAEA,EAAYG,KAAKH,UAASD,QAAEA,EAAUI,KAAKJ,QAAOqC,OAAEA,GAAS,EAAIzC,MAAEA,EAAQ,IAC5F,GAAIQ,KAAKsB,QAAS,OAElB,MAAMY,EAAS,IAAIC,EAAOH,EAAOhC,KAAKE,UAAW,CAC7CX,SAA0B,IAAhBS,KAAKT,SACfC,MAA8B,KAAtBA,EAAQQ,KAAKR,OACrB4C,WAAYpC,KAAKP,OACjB4C,UAAWrC,KAAKN,UACXE,EAAU,oBAAsB,YAChCA,EAAU,UAAY,SAC3B0C,KAAM,OACN3C,OAAQK,KAAKL,OACbE,aACDG,KAAKC,SAERiC,EAAOD,OAASA,EAEhBD,EAAMO,KAAKL,EACd"}
@@ -1,2 +1,2 @@
1
- import t from"./clip.js";import{isLink as s}from"./link.js";import i from"./track.js";import{IndexedMap as e,merge as a}from"./utils.js";class r{constructor({stagger:t=.1,staggerLimit:s=10,deform:i=!0,cachable:a,mountClips:r}){this.index=0,this.paused=!1,this.tracks=new e,this.frame=0,this.linked=[],this.mounted=!1,this.stagger=t,this.staggerLimit=s-1,this.deform=i,this.cachable=a,this.mountClips=r}step(){cancelAnimationFrame(this.frame),this.paused||this.tracks.stack.forEach(((t,s)=>t.step(s))),this.frame=requestAnimationFrame(this.step.bind(this))}time(t){return this.tracks.size?t.duration+t.delay+this.stagger*Math.max(Math.min(this.staggerLimit,this.tracks.size-1),0):0}receiver(s,i,e){if(!this.paused)for(let r=0;r<this.tracks.size;r++){const c=this.tracks.stack[r],h=i(r);e.duration?(a(e,{composite:"override"}),new t(Object.assign(Object.assign({},e),{[s]:h})).play(c,{})):(c.apply(s,h),c.correct())}}link(i){if(this.step(),!(this.linked.length||!i||i instanceof t))for(let t in i){const e=i[t];if(s(e)){const s=this.receiver.bind(this,t,e);e.subscribe(s),this.linked.push((()=>e.unsubscribe(s))),s({})}}}unlink(){cancelAnimationFrame(this.frame),this.linked.forEach((t=>t())),this.linked=[]}transition(t,s={}){for(let i=0;i<this.tracks.size;i++)this.tracks.stack[i].transition(null==t?void 0:t.tracks.stack[i],s)}insert(t){if((t instanceof HTMLElement||t instanceof SVGElement)&&!this.tracks.has(t)){const s=new i(t,this.deform,this.cachable);this.tracks.set(t,s),this.mounted&&this.mountClips.forEach((t=>t.play(s,{})))}}add(t,{immediate:s=!1,composite:i,reverse:e,delay:a=0,commit:r}){let c,h=0;for(;c=this.tracks.stack[h];)c.element.isConnected?(s&&c.clear(),t.play(c,{delay:a+Math.min(h,this.staggerLimit)*(this.stagger<0?t.duration/this.tracks.size:1)*Math.abs(this.stagger),composite:i,reverse:e,commit:r}),h++):this.tracks.delete(c.element)}pause(t){for(const s of this.tracks.stack)s.pause(t);this.paused=t}cache(){for(const t of this.tracks.stack)t.cache.update()}}export{r as default};
1
+ import t from"./clip.js";import{isLink as s}from"./link.js";import i from"./track.js";import{IndexedMap as e,merge as a}from"./utils.js";class r{constructor({stagger:t=.1,staggerLimit:s=10,deform:i=!0,cachable:a,mountClips:r}){this.index=0,this.paused=!1,this.tracks=new e,this.frame=0,this.linked=[],this.mounted=!1,this.stagger=t,this.staggerLimit=s-1,this.deform=i,this.cachable=a,this.mountClips=r}step(){cancelAnimationFrame(this.frame),this.paused||this.tracks.stack.forEach(((t,s)=>t.step(s))),this.frame=requestAnimationFrame(this.step.bind(this))}time(t){return this.tracks.size?t.duration+t.delay+this.stagger*Math.max(Math.min(this.staggerLimit,this.tracks.size-1),0):0}receiver(s,i,e){if(!this.paused)for(let r=0;r<this.tracks.size;r++){const c=this.tracks.stack[r],h=i(r);e.duration?(a(e,{composite:"override"}),new t({...e,[s]:h}).play(c,{})):requestAnimationFrame((()=>{c.apply(s,h),c.correct()}))}}link(i){if(this.step(),!(this.linked.length||!i||i instanceof t))for(let t in i){const e=i[t];if(s(e)){const s=this.receiver.bind(this,t,e);e.subscribe(s),this.linked.push((()=>e.unsubscribe(s))),s({})}}}unlink(){cancelAnimationFrame(this.frame),this.linked.forEach((t=>t())),this.linked=[]}transition(t,s={}){for(let i=0;i<this.tracks.size;i++)this.tracks.stack[i].transition(t?.tracks.stack[i],s)}insert(t){if((t instanceof HTMLElement||t instanceof SVGElement)&&!this.tracks.has(t)){const s=new i(t,this.deform,this.cachable);this.tracks.set(t,s),this.mounted&&this.mountClips.forEach((t=>t.play(s,{})))}}add(t,{immediate:s=!1,composite:i,reverse:e,delay:a=0,commit:r}){let c,h=0;for(;c=this.tracks.stack[h];)c.element.isConnected?(s&&c.clear(),t.play(c,{delay:a+Math.min(h,this.staggerLimit)*(this.stagger<0?t.duration/this.tracks.size:1)*Math.abs(this.stagger),composite:i,reverse:e,commit:r}),h++):this.tracks.delete(c.element)}pause(t){for(const s of this.tracks.stack)s.pause(t);this.paused=t}cache(){for(const t of this.tracks.stack)t.cache.update()}}export{r as default};
2
2
  //# sourceMappingURL=timeline.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeline.js","sources":["../../src/core/timeline.ts"],"sourcesContent":[null],"names":["Timeline","constructor","stagger","staggerLimit","deform","cachable","mountClips","this","index","paused","tracks","IndexedMap","frame","linked","mounted","step","cancelAnimationFrame","stack","forEach","track","i","requestAnimationFrame","bind","time","clip","size","duration","delay","Math","max","min","receiver","prop","link","config","value","merge","composite","Clip","Object","assign","play","apply","correct","length","isLink","subscribe","push","unsubscribe","unlink","transition","from","options","insert","element","HTMLElement","SVGElement","has","Track","set","add","immediate","reverse","commit","isConnected","clear","abs","delete","pause","cache","update"],"mappings":"yIAcc,MAAOA,EAcjB,WAAAC,EAAYC,QAAEA,EAAU,GAAGC,aAAEA,EAAe,GAAEC,OAAEA,GAAS,EAAIC,SAAEA,EAAQC,WAAEA,IAZzEC,KAAKC,MAAW,EAKhBD,KAAME,QAAY,EAClBF,KAAAG,OAAqC,IAAIC,EACzCJ,KAAKK,MAAW,EAChBL,KAAMM,OAAmB,GACzBN,KAAOO,SAAY,EAUfP,KAAKL,QAAUA,EACfK,KAAKJ,aAAeA,EAAe,EACnCI,KAAKH,OAASA,EACdG,KAAKF,SAAWA,EAChBE,KAAKD,WAAaA,CACrB,CAED,IAAAS,GACIC,qBAAqBT,KAAKK,OAErBL,KAAKE,QAAQF,KAAKG,OAAOO,MAAMC,SAAQ,CAACC,EAAOC,IAAMD,EAAMJ,KAAKK,KAErEb,KAAKK,MAAQS,sBAAsBd,KAAKQ,KAAKO,KAAKf,MACrD,CAED,IAAAgB,CAAKC,GACD,OAAKjB,KAAKG,OAAOe,KAEVD,EAAKE,SAAWF,EAAKG,MAAQpB,KAAKL,QAAU0B,KAAKC,IAAID,KAAKE,IAAIvB,KAAKJ,aAAcI,KAAKG,OAAOe,KAAO,GAAI,GAFjF,CAGjC,CAEO,QAAAM,CAASC,EAAcC,EAAiBC,GAC5C,IAAI3B,KAAKE,OAET,IAAK,IAAIW,EAAI,EAAGA,EAAIb,KAAKG,OAAOe,KAAML,IAAK,CACvC,MAAMD,EAAQZ,KAAKG,OAAOO,MAAMG,GAC5Be,EAAQF,EAAKb,GAEbc,EAAOR,UACPU,EAAMF,EAAQ,CAAEG,UAAW,aAE3B,IAAIC,EAAUC,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAAAN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,IACxBD,EAAMmC,QAAQU,aAKfH,GAAW1C,EAAM8C,QAErBzC,EAAKiB,KAAKtB,EAAO,CACbQ,MAAOA,EAAQC,KAAKE,IAAIV,EAAGb,KAAKJ,eAAiBI,KAAKL,QAAU,EAAIsB,EAAKE,SAAWnB,KAAKG,OAAOe,KAAO,GAAKG,KAAKsC,IAAI3D,KAAKL,SAC1HmC,YACAyB,UACAC,WAGJ3C,KAbIb,KAAKG,OAAOyD,OAAOhD,EAAMmC,QAepC,CAED,KAAAc,CAAMjC,GACF,IAAK,MAAMhB,KAASZ,KAAKG,OAAOO,MAAOE,EAAMiD,MAAMjC,GAEnD5B,KAAKE,OAAS0B,CACjB,CAED,KAAAkC,GACI,IAAK,MAAMlD,KAASZ,KAAKG,OAAOO,MAAOE,EAAMkD,MAAMC,QACtD"}
1
+ {"version":3,"file":"timeline.js","sources":["../../src/core/timeline.ts"],"sourcesContent":[null],"names":["Timeline","constructor","stagger","staggerLimit","deform","cachable","mountClips","this","index","paused","tracks","IndexedMap","frame","linked","mounted","step","cancelAnimationFrame","stack","forEach","track","i","requestAnimationFrame","bind","time","clip","size","duration","delay","Math","max","min","receiver","prop","link","config","value","merge","composite","Clip","play","apply","correct","length","isLink","subscribe","push","unsubscribe","unlink","transition","from","options","insert","element","HTMLElement","SVGElement","has","Track","set","add","immediate","reverse","commit","isConnected","clear","abs","delete","pause","cache","update"],"mappings":"yIAcc,MAAOA,EAcjB,WAAAC,EAAYC,QAAEA,EAAU,GAAGC,aAAEA,EAAe,GAAEC,OAAEA,GAAS,EAAIC,SAAEA,EAAQC,WAAEA,IAZzEC,KAAKC,MAAW,EAKhBD,KAAME,QAAY,EAClBF,KAAAG,OAAqC,IAAIC,EACzCJ,KAAKK,MAAW,EAChBL,KAAMM,OAAmB,GACzBN,KAAOO,SAAY,EAUfP,KAAKL,QAAUA,EACfK,KAAKJ,aAAeA,EAAe,EACnCI,KAAKH,OAASA,EACdG,KAAKF,SAAWA,EAChBE,KAAKD,WAAa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this.playing=0,this.active=[],this.queue=[],this.paused=!1,this.scale=[1,1],this.corrected={borderRadius:"",boxShadow:""},this.element=e,this.deform=s,this.cache=new t(e,i)}push(t){t.onfinish=this.next.bind(this),this.playing&&"none"===t.composite?(this.queue.push(t),t.animation.pause()):(this.active.push(t),"none"===t.composite&&this.playing++,this.paused&&t.animation.pause())}next(){this.cache.update(),--this.playing>0||(this.active=this.queue.length?this.queue.splice(0,1):[],this.playing=this.active.length,this.pause(!1))}clear(t){this.active.forEach((e=>{e.onfinish=null;try{t?e.commit||"combine"===e.composite||e.animation.cancel():e.animation.finish()}catch(t){e.animation.cancel()}})),t||(this.active=[],this.queue=[],this.playing=0),this.deform||(this.element.style.borderRadius="",this.element.style.boxShadow="",this.corrected.borderRadius=this.cache.data.borderRadius=this.cache.computed.borderRadius,this.corrected.boxShadow=this.cache.data.boxShadow=this.cache.computed.boxShadow,this.scale=[1,1])}pause(t){for(const e of this.active)e.animation[t?"pause":"play"]();this.paused=t}step(t){for(const e of this.active)e.step(t);!this.paused&&this.active.length&&this.correct()}transition(t,e){this.clear(!0);const s=this.cache.difference(null==t?void 0:t.cache.data,e);this.cache.update(),null==t||t.clear(),null==t||t.cache.update(),s.forEach((t=>t.play(this,{commit:!1})))}apply(t,s){const i="strokeLength"===t;this.element.style[i?"strokeDashoffset":t]=i?e(s):s}decomposeScale(){const[t,e]=this.cache.computed.scale.split(" ");let s=Math.max(parseFloat(t)||1,1e-5);/%$/.test(t)&&(s/=100);let i=e?Math.max(parseFloat(e)||1,1e-5):s;return/%$/.test(e)&&(i/=100),[s,i]}correct(){if(this.deform)return;const t=this.cache.computed,e=t.borderRadius.split(/\s*\/\s*/);e.length<2&&(e[1]=e[0]);const s=t.boxShadow.split(/(?<=px),\s?/),[i,a]=s[0].split(/(?<=\))\s/),o=t.borderRadius!==this.corrected.borderRadius?[1,1]:this.scale,h=t.boxShadow!==this.corrected.boxShadow?[1,1]:this.scale,[c,r]=this.scale=this.decomposeScale();if(this.element.style.borderRadius=e.map(((t,e)=>t.split(" ").map((t=>{var s;return parseFloat(t)*o[e]/this.scale[e]+((null===(s=t.match(/[^\d\.]+$/))||void 0===s?void 0:s[0])||"px")})).join(" "))).join("/"),this.corrected.borderRadius=t.borderRadius,a){const e=a.split(" ").map(parseFloat),s=+(c<r),o=s?r:c,l=Math.max(...h),n=new Array(3).fill([e[0]*h[0]/c,e[1]*h[1]/r,e[2]*l/o,e[3]*l/o]);n[1][0]-=s?1/c:0,n[1][1]-=s?0:1/r,n[2][0]+=s?1/c:0,n[2][1]+=s?0:1/r,this.element.style.boxShadow=n.map((t=>`${i} ${t.map((t=>`${t}px`)).join(" ")}`)).join(", "),this.corrected.boxShadow=t.boxShadow}for(let t=0;t<this.element.children.length;t++){const e=this.element.children[t],s=e.offsetLeft,i=e.offsetTop,a=e.offsetWidth,o=e.offsetHeight,[h,l]=getComputedStyle(e).translate.split(" ").map(parseFloat);e.style.transform=`translate(${-h||0}px, ${-l||0}px) scale(${1/c}, ${1/r}) translate(${s*(1-c)+a/2*(1-c)+(h||0)}px, ${i*(1-r)+o/2*(1-r)+(l||0)}px)`}}}export{s as default};
1
+ import{StyleCache as t}from"./cache.js";import{lengthToOffset as e,limitSmallestQuantity as s}from"./utils.js";class i{constructor(e,s,i){this.playing=0,this.active=[],this.queue=[],this.paused=!1,this.scale=[1,1],this.corrected={borderRadius:"",boxShadow:""},this.element=e,this.deform=s,this.cache=new t(e,i)}push(t){t.onfinish=this.next.bind(this),this.playing&&"none"===t.composite?(this.queue.push(t),t.animation.pause()):(this.active.push(t),"none"===t.composite&&this.playing++,this.paused&&t.animation.pause())}next(){this.cache.update(),--this.playing>0||(this.active=this.queue.length?this.queue.splice(0,1):[],this.playing=this.active.length,this.pause(!1),this.playing||this.correct())}clear(t){this.active.forEach((e=>{e.onfinish=null;try{t?e.commit||"combine"===e.composite||e.animation.cancel():e.animation.finish()}catch(t){e.animation.cancel()}})),t||(this.active=[],this.queue=[],this.playing=0),this.deform||(this.element.style.borderRadius="",this.element.style.boxShadow="",this.corrected.borderRadius=this.cache.data.borderRadius=this.cache.computed.borderRadius,this.corrected.boxShadow=this.cache.data.boxShadow=this.cache.computed.boxShadow,this.scale=[1,1])}pause(t){for(const e of this.active)e.animation[t?"pause":"play"]();this.paused=t}step(t){for(const e of this.active)e.step(t);!this.paused&&this.active.length&&this.correct()}transition(t,e){this.clear(!0);const s=this.cache.difference(t?.cache.data,e);this.cache.update(),t?.clear(),t?.cache.update(),s.forEach((t=>t.play(this,{commit:!1})))}apply(t,s){const i="strokeLength"===t;this.element.style[i?"strokeDashoffset":t]=i?e(s):s}decomposeScale(){const[t,e]=this.cache.computed.scale.split(" ");let i=parseFloat(t),a=e?parseFloat(e):i;return isNaN(i)&&(i=1),isNaN(a)&&(a=1),/%$/.test(t)&&(i/=100),/%$/.test(e)&&(a/=100),[s(i,1e-4),s(a,1e-4)]}correct(){if(this.deform)return;const t=this.cache.computed,e=t.borderRadius.split(/\s*\/\s*/);e.length<2&&(e[1]=e[0]);const s=t.boxShadow.split(/(?<=px),\s?/),[i,a]=s[0].split(/(?<=\))\s/),o=t.borderRadius!==this.corrected.borderRadius?[1,1]:this.scale,h=t.boxShadow!==this.corrected.boxShadow?[1,1]:this.scale,[c,r]=this.scale=this.decomposeScale();if(this.element.style.borderRadius=e.map(((t,e)=>t.split(" ").map((t=>parseFloat(t)*o[e]/this.scale[e]+(t.match(/[^\d\.]+$/)?.[0]||"px"))).join(" "))).join("/"),this.corrected.borderRadius=t.borderRadius,a){const e=a.split(" ").map(parseFloat),s=+(c<r),o=s?r:c,n=Math.max(...h),l=new Array(3).fill([e[0]*h[0]/c,e[1]*h[1]/r,e[2]*n/o,e[3]*n/o]);l[1][0]-=s?1/c:0,l[1][1]-=s?0:1/r,l[2][0]+=s?1/c:0,l[2][1]+=s?0:1/r,this.element.style.boxShadow=l.map((t=>`${i} ${t.map((t=>`${t}px`)).join(" ")}`)).join(", "),this.corrected.boxShadow=t.boxShadow}for(let t=0;t<this.element.children.length;t++){const e=this.element.children[t],s=e.offsetLeft,i=e.offsetTop,a=e.offsetWidth,o=e.offsetHeight,[h,n]=getComputedStyle(e).translate.split(" ").map(parseFloat);e.style.transform=`translate(${-h||0}px, ${-n||0}px) scale(${1/c}, ${1/r}) translate(${s*(1-c)+a/2*(1-c)+(h||0)}px, ${i*(1-r)+o/2*(1-r)+(n||0)}px)`}}}export{i as default};
2
2
  //# sourceMappingURL=track.js.map