@webqit/webflo 0.20.52 → 0.20.53
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/package.json
CHANGED
|
@@ -566,11 +566,11 @@ export class WebfloClient extends AppRuntime {
|
|
|
566
566
|
Observer.set(this.transition, 'rel', viewTransitionRel);
|
|
567
567
|
// Trigger transition
|
|
568
568
|
if (document.startViewTransition && this.withViewTransitions && !detail.hasUAVisualTransition) {
|
|
569
|
-
const synthesizeWhile = window.webqit?.realdom?.synthesizeWhile
|
|
569
|
+
const synthesizeWhile = /*window.webqit?.realdom?.synthesizeWhile ||*/ ((callback) => callback());
|
|
570
570
|
return new Promise(async (resolve) => {
|
|
571
571
|
await synthesizeWhile(async () => {
|
|
572
572
|
Observer.set(this.transition, 'phase', 'old');
|
|
573
|
-
const viewTransition = document.startViewTransition({ update: updateCallback,
|
|
573
|
+
const viewTransition = document.startViewTransition({ update: updateCallback, types: ['navigation', viewTransitionRel] });
|
|
574
574
|
try { await viewTransition.updateCallbackDone; } catch (e) { console.log(e); }
|
|
575
575
|
Observer.set(this.transition, 'phase', 'new');
|
|
576
576
|
try { await viewTransition.ready; } catch (e) { console.log(e); }
|
|
@@ -34,7 +34,7 @@ export class WebfloRootClientA extends WebfloClient {
|
|
|
34
34
|
#hmr;
|
|
35
35
|
|
|
36
36
|
get withViewTransitions() {
|
|
37
|
-
return document.querySelector('meta[name="webflo:viewtransitions"]')?.
|
|
37
|
+
return ['true', '1', 'yes'].includes(document.querySelector('meta[name="webflo:viewtransitions"]')?.content?.toLowerCase());
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
constructor(bootstrap, host) {
|
|
@@ -20,7 +20,7 @@ export class WebfloSubClient extends WebfloClient {
|
|
|
20
20
|
|
|
21
21
|
get viewport() { return this.#superRuntime.viewport; }
|
|
22
22
|
|
|
23
|
-
get withViewTransitions() { return this.host.
|
|
23
|
+
get withViewTransitions() { return ['true', '1', 'yes'].includes(this.host.getAttribute('viewtransitions')?.toLowerCase()); }
|
|
24
24
|
|
|
25
25
|
constructor(superRuntime, host) {
|
|
26
26
|
if (!(superRuntime instanceof WebfloClient)) {
|