@ssgoi/vue 7.4.0-beta.3 → 7.4.1
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/README.md +1 -1
- package/dist/context.cjs +1 -1
- package/dist/context.d.ts +12 -2
- package/dist/context.js +27 -9
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/package.json +23 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @ssgoi/vue
|
|
2
2
|
|
|
3
|
-
Vue and Nuxt
|
|
3
|
+
Native app-like page transitions for Vue and Nuxt. Make a web app, PWA or WebView app (Capacitor, Tauri, Ionic) feel like a native app without replacing your router.
|
|
4
4
|
|
|
5
5
|
[](https://ssgoi.dev)
|
|
6
6
|
|
package/dist/context.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),i=Symbol("ssgoi-context"),u=e=>{t.provide(i,e)},c=()=>{const e=t.inject(i);if(!e)throw new Error("useSsgoi must be used within Ssgoi component");return e},a=()=>{const e=t.inject(i);if(!e)throw new Error("useSsgoiTransition must be used within Ssgoi component");const o=t.shallowRef(e.value.getTransitionState());let s;return t.watch(e,n=>{s?.(),o.value=n.getTransitionState(),s=n.subscribe(r=>{o.value=r})},{immediate:!0}),t.onScopeDispose(()=>s?.()),t.shallowReadonly(o)};exports.provideSsgoi=u;exports.useSsgoi=c;exports.useSsgoiTransition=a;
|
package/dist/context.d.ts
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import { ComputedRef } from 'vue';
|
|
2
|
-
import { SsgoiContext } from './types';
|
|
1
|
+
import { ComputedRef, ShallowRef } from 'vue';
|
|
2
|
+
import { SsgoiContext, SsgoiTransitionState } from './types';
|
|
3
3
|
type SsgoiContextRef = ComputedRef<SsgoiContext>;
|
|
4
4
|
export declare const provideSsgoi: (context: SsgoiContextRef) => void;
|
|
5
5
|
export declare const useSsgoi: () => SsgoiContextRef;
|
|
6
|
+
/**
|
|
7
|
+
* Ref of the provider's transition lifecycle: whether a page transition is
|
|
8
|
+
* preparing or playing, and which routes it joins.
|
|
9
|
+
*
|
|
10
|
+
* Use it to defer work that would fight the animation, such as a programmatic
|
|
11
|
+
* scroll on the arriving page, until the status returns to `"idle"`.
|
|
12
|
+
*
|
|
13
|
+
* Must be called in `setup()`, under `<Ssgoi>`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useSsgoiTransition: () => Readonly<ShallowRef<SsgoiTransitionState>>;
|
|
6
16
|
export {};
|
package/dist/context.js
CHANGED
|
@@ -1,13 +1,31 @@
|
|
|
1
|
-
import { provide as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
},
|
|
5
|
-
const
|
|
6
|
-
if (!
|
|
1
|
+
import { provide as c, inject as i, shallowRef as u, watch as a, onScopeDispose as S, shallowReadonly as g } from "vue";
|
|
2
|
+
const s = Symbol("ssgoi-context"), m = (t) => {
|
|
3
|
+
c(s, t);
|
|
4
|
+
}, w = () => {
|
|
5
|
+
const t = i(s);
|
|
6
|
+
if (!t)
|
|
7
7
|
throw new Error("useSsgoi must be used within Ssgoi component");
|
|
8
|
-
return
|
|
8
|
+
return t;
|
|
9
|
+
}, p = () => {
|
|
10
|
+
const t = i(s);
|
|
11
|
+
if (!t)
|
|
12
|
+
throw new Error("useSsgoiTransition must be used within Ssgoi component");
|
|
13
|
+
const o = u(
|
|
14
|
+
t.value.getTransitionState()
|
|
15
|
+
);
|
|
16
|
+
let e;
|
|
17
|
+
return a(
|
|
18
|
+
t,
|
|
19
|
+
(n) => {
|
|
20
|
+
e?.(), o.value = n.getTransitionState(), e = n.subscribe((r) => {
|
|
21
|
+
o.value = r;
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
{ immediate: !0 }
|
|
25
|
+
), S(() => e?.()), g(o);
|
|
9
26
|
};
|
|
10
27
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
28
|
+
m as provideSsgoi,
|
|
29
|
+
w as useSsgoi,
|
|
30
|
+
p as useSsgoiTransition
|
|
13
31
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@ssgoi/core/types"),o=require("./ssgoi.vue.cjs"),s=require("./ssgoi-transition.vue.cjs"),r=require("@ssgoi/core");exports.Ssgoi=o.default;exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@ssgoi/core/types"),o=require("./ssgoi.vue.cjs"),s=require("./context.cjs"),i=require("./ssgoi-transition.vue.cjs"),r=require("@ssgoi/core");exports.Ssgoi=o.default;exports.useSsgoiTransition=s.useSsgoiTransition;exports.SsgoiTransition=i.default;Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});Object.keys(r).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './types';
|
|
2
2
|
export { default as Ssgoi } from './ssgoi.vue';
|
|
3
|
+
export { useSsgoiTransition } from './context';
|
|
3
4
|
/** @deprecated Set `data-ssgoi-transition` directly on an element inside `<Ssgoi>` instead. */
|
|
4
5
|
export { default as SsgoiTransition } from './ssgoi-transition.vue';
|
|
5
6
|
export * from '@ssgoi/core';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from "@ssgoi/core/types";
|
|
2
2
|
import { default as e } from "./ssgoi.vue.js";
|
|
3
|
+
import { useSsgoiTransition as f } from "./context.js";
|
|
3
4
|
import { default as a } from "./ssgoi-transition.vue.js";
|
|
4
5
|
export * from "@ssgoi/core";
|
|
5
6
|
export {
|
|
6
7
|
e as Ssgoi,
|
|
7
|
-
a as SsgoiTransition
|
|
8
|
+
a as SsgoiTransition,
|
|
9
|
+
f as useSsgoiTransition
|
|
8
10
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssgoi/vue",
|
|
3
|
-
"version": "7.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.4.1",
|
|
4
|
+
"description": "Native app-like page transitions for Vue and Nuxt. Make a web app, PWA or WebView app feel native.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@ssgoi/core": "^7.4.
|
|
48
|
+
"@ssgoi/core": "^7.4.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"vue": "^3.5.0",
|
|
@@ -71,10 +71,28 @@
|
|
|
71
71
|
},
|
|
72
72
|
"keywords": [
|
|
73
73
|
"vue",
|
|
74
|
+
"vue-router",
|
|
75
|
+
"nuxt",
|
|
74
76
|
"page-transition",
|
|
77
|
+
"page-transitions",
|
|
78
|
+
"route-transition",
|
|
79
|
+
"navigation-animation",
|
|
80
|
+
"native-app",
|
|
81
|
+
"app-like",
|
|
82
|
+
"mobile-web",
|
|
83
|
+
"webview",
|
|
84
|
+
"pwa",
|
|
85
|
+
"capacitor",
|
|
86
|
+
"react-native-webview",
|
|
87
|
+
"hybrid-app",
|
|
88
|
+
"view-transitions",
|
|
89
|
+
"view-transition-api-alternative",
|
|
90
|
+
"shared-element-transition",
|
|
91
|
+
"hero-transition",
|
|
92
|
+
"spring-physics",
|
|
93
|
+
"web-animations",
|
|
75
94
|
"animation",
|
|
76
|
-
"ssgoi"
|
|
77
|
-
"spring-physics"
|
|
95
|
+
"ssgoi"
|
|
78
96
|
],
|
|
79
97
|
"author": "MeurSyphus <tmdeoans@snu.ac.kr>",
|
|
80
98
|
"license": "MIT",
|