@hyperframes/parsers 0.7.63 → 0.7.65
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/composition.js +15 -3
- package/dist/composition.js.map +1 -1
- package/dist/compositionContract.js +15 -3
- package/dist/compositionContract.js.map +1 -1
- package/dist/gsapParser.js +7 -1
- package/dist/gsapParser.js.map +1 -1
- package/dist/gsapParserExports.js.map +1 -1
- package/dist/gsapWriterAcorn.d.ts +19 -1
- package/dist/gsapWriterAcorn.js +123 -1
- package/dist/gsapWriterAcorn.js.map +1 -1
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2356,14 +2356,26 @@ function resolveStart(expression, rawStart, options, diagnostics) {
|
|
|
2356
2356
|
}
|
|
2357
2357
|
return Math.max(0, referencedEnd + expression.offset);
|
|
2358
2358
|
}
|
|
2359
|
+
var DERIVED_END_EQUALITY_EPSILON_SECONDS = 1e-9;
|
|
2360
|
+
function derivedEndsAreConsistent(parsedEnd, canonicalEnd) {
|
|
2361
|
+
return Math.abs(parsedEnd - canonicalEnd) <= DERIVED_END_EQUALITY_EPSILON_SECONDS;
|
|
2362
|
+
}
|
|
2359
2363
|
function diagnoseDerivedEnd(rawEnd, canonicalEnd, diagnostics) {
|
|
2360
|
-
pushDiagnostic(diagnostics, "deprecated-end", COMPOSITION_ATTRIBUTES.derivedEnd, rawEnd);
|
|
2361
2364
|
const parsedEnd = parseNumeric(rawEnd);
|
|
2362
2365
|
if (parsedEnd == null) {
|
|
2366
|
+
pushDiagnostic(diagnostics, "deprecated-end", COMPOSITION_ATTRIBUTES.derivedEnd, rawEnd);
|
|
2363
2367
|
pushDiagnostic(diagnostics, "invalid-end", COMPOSITION_ATTRIBUTES.derivedEnd, rawEnd);
|
|
2364
|
-
|
|
2365
|
-
|
|
2368
|
+
return;
|
|
2369
|
+
}
|
|
2370
|
+
if (canonicalEnd == null) {
|
|
2371
|
+
pushDiagnostic(diagnostics, "deprecated-end", COMPOSITION_ATTRIBUTES.derivedEnd, rawEnd);
|
|
2372
|
+
return;
|
|
2373
|
+
}
|
|
2374
|
+
if (derivedEndsAreConsistent(parsedEnd, canonicalEnd)) {
|
|
2375
|
+
return;
|
|
2366
2376
|
}
|
|
2377
|
+
pushDiagnostic(diagnostics, "deprecated-end", COMPOSITION_ATTRIBUTES.derivedEnd, rawEnd);
|
|
2378
|
+
pushDiagnostic(diagnostics, "conflicting-end", COMPOSITION_ATTRIBUTES.derivedEnd, rawEnd);
|
|
2367
2379
|
}
|
|
2368
2380
|
function readCanonicalDuration(rawDuration, start, diagnostics) {
|
|
2369
2381
|
const duration = parseNumeric(rawDuration);
|