release: bump version to 0.51.0

This commit is contained in:
rayd1o
2026-05-11 09:49:08 +08:00
parent 455b8360d0
commit 1cb51b1172
52 changed files with 4440 additions and 279 deletions

View File

@@ -115,6 +115,7 @@ export class PresentationController {
const { request } = this.active;
const connector = this.getConnectorInstance(request);
if (!connector || request.connector?.enabled !== true) return false;
if (!animate && connector.isAnimating?.()) return true;
const path = this.getConnectorPath(request);
if (!path) {
connector.hide?.();
@@ -150,17 +151,18 @@ export class PresentationController {
return false;
}
const animateOnReveal = request.connector?.animateOnReveal === true;
const connectorReady =
request.connector?.enabled === true
request.connector?.enabled === true && !animateOnReveal
? await this.waitForConnector(request, context)
: false;
: request.connector?.enabled === true;
if (!isCurrentContext(context) || this.active?.request !== request) {
this.dismiss("interrupted");
return false;
}
if (connectorReady) {
if (connectorReady && !animateOnReveal) {
const drawMs = Number(request.connector?.drawMs) || DEFAULT_CONNECTOR_DRAW_MS;
const drawCompleted = await waitForContext(context, drawMs);
if (!drawCompleted || this.active?.request !== request) {
@@ -176,7 +178,17 @@ export class PresentationController {
return false;
}
this.update({ animate: !connectorReady });
const finalConnectorAnimated = this.update({
animate: animateOnReveal || !connectorReady,
});
if (animateOnReveal && finalConnectorAnimated) {
const drawMs = Number(request.connector?.drawMs) || DEFAULT_CONNECTOR_DRAW_MS;
const drawCompleted = await waitForContext(context, drawMs);
if (!drawCompleted || this.active?.request !== request) {
this.dismiss("interrupted");
return false;
}
}
this.scheduleLifetime(request);
return true;
}