@hyperframes/parsers 0.8.81 → 0.8.82
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/dist/compositionDuration.d.ts +2 -1
- package/dist/compositionDuration.js +2 -0
- package/dist/compositionDuration.js.map +1 -1
- package/dist/gsapParser.js +4 -1
- package/dist/gsapParser.js.map +1 -1
- package/dist/gsapParserExports.js.map +1 -1
- package/dist/gsapWriterAcorn.js +3 -2
- package/dist/gsapWriterAcorn.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +26 -23
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/gsapWriterAcorn.js
CHANGED
|
@@ -1435,14 +1435,15 @@ function isTimelineRooted(node, timelineVar, script) {
|
|
|
1435
1435
|
return false;
|
|
1436
1436
|
}
|
|
1437
1437
|
function findInsertionPoint(parsed) {
|
|
1438
|
+
const tlDecl = findTimelineDeclarationStatement(parsed.ast, parsed.timelineVar);
|
|
1438
1439
|
const lastLocated = parsed.located[parsed.located.length - 1];
|
|
1439
1440
|
if (lastLocated) {
|
|
1440
1441
|
const lastCall = lastLocated.call;
|
|
1441
1442
|
const exprStmt = findEnclosingExpressionStatement(lastCall.ancestors);
|
|
1442
|
-
|
|
1443
|
+
const lastCallEnd = exprStmt?.end ?? lastCall.node.end;
|
|
1444
|
+
return Math.max(lastCallEnd, tlDecl?.end ?? 0);
|
|
1443
1445
|
}
|
|
1444
1446
|
if (!parsed.hasTimeline) return null;
|
|
1445
|
-
const tlDecl = findTimelineDeclarationStatement(parsed.ast, parsed.timelineVar);
|
|
1446
1447
|
return tlDecl?.end ?? parsed.ast.end;
|
|
1447
1448
|
}
|
|
1448
1449
|
function findGlobalSetInsertionPoint(parsed, script) {
|