feat(modal): add cancellable shared runtime

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 23:24:37 +08:00
co-authored by Claude Fable 5
parent 0647c501ba
commit d79b063bf9
12 changed files with 999 additions and 392 deletions
+16 -3
View File
@@ -126,10 +126,14 @@ trait ScriptsPart1c {
'aksrt-core-comment-fixed' => 'comment-fixed-input.js',
'aksrt-core-comment-move' => 'comment-move-form.js',
// Shared zibll-parity list/modal engines (before pagination consumers).
'aksrt-core-ajax-list' => 'ajax-list.js',
'aksrt-core-ajax-list' => 'ajax-list.js',
'aksrt-core-modal-telemetry' => 'modal-telemetry.js',
'aksrt-core-remote-modal' => 'remote-modal.js',
'aksrt-core-pagination' => 'pagination.js',
'aksrt-core-request' => 'request.js',
'aksrt-core-modal-cache' => 'modal-cache.js',
'aksrt-core-modal-state' => 'modal-state.js',
'aksrt-core-modal-runtime' => 'modal-runtime.js',
'aksrt-core-remote-modal' => 'remote-modal.js',
'aksrt-core-pagination' => 'pagination.js',
'aksrt-core-archive' => 'archive.js',
'aksrt-core-footer-tabbar' => 'footer-tabbar.js',
'aksrt-core-misc' => 'misc.js',
@@ -142,6 +146,15 @@ trait ScriptsPart1c {
$deps = ['aksrt-rehydrate', 'aksrt-runtime'];
if ($handle === 'aksrt-core-slider') {
$deps = array_merge($deps, $needs_swiper ? ['aksrt-swiper'] : []);
} elseif ($handle === 'aksrt-core-modal-runtime') {
$deps = array_merge($deps, [
'aksrt-core-modal-telemetry',
'aksrt-core-request',
'aksrt-core-modal-cache',
'aksrt-core-modal-state',
]);
} elseif ($handle === 'aksrt-core-remote-modal') {
$deps[] = 'aksrt-core-modal-runtime';
}
wp_enqueue_script(
$handle,