slidev-theme-kotlin 0.0.7 → 0.0.8
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 -0
- package/components/Kodee.vue +9 -5
- package/example.md +1 -0
- package/package.json +1 -1
- package/styles/layout.css +6 -0
package/README.md
CHANGED
package/components/Kodee.vue
CHANGED
|
@@ -95,10 +95,13 @@ const positionStyles = computed(() => {
|
|
|
95
95
|
const motionConfig = computed(() => {
|
|
96
96
|
const baseScale = props.scale || 1
|
|
97
97
|
|
|
98
|
+
// Check if we're in a view transition (Kodee staying the same between slides)
|
|
99
|
+
const isViewTransitioning = typeof document !== 'undefined' && document.startViewTransition
|
|
100
|
+
|
|
98
101
|
return {
|
|
99
102
|
initial: {
|
|
100
|
-
opacity: 0,
|
|
101
|
-
scale: baseScale
|
|
103
|
+
opacity: isViewTransitioning ? 1 : 0,
|
|
104
|
+
scale: baseScale,
|
|
102
105
|
},
|
|
103
106
|
enter: {
|
|
104
107
|
opacity: 1,
|
|
@@ -108,13 +111,14 @@ const motionConfig = computed(() => {
|
|
|
108
111
|
stiffness: 100,
|
|
109
112
|
damping: 15,
|
|
110
113
|
mass: 1,
|
|
114
|
+
duration: isViewTransitioning ? 0 : undefined,
|
|
111
115
|
},
|
|
112
116
|
},
|
|
113
117
|
leave: {
|
|
114
|
-
opacity: 0,
|
|
115
|
-
scale: baseScale
|
|
118
|
+
opacity: isViewTransitioning ? 1 : 0,
|
|
119
|
+
scale: baseScale,
|
|
116
120
|
transition: {
|
|
117
|
-
duration: 300,
|
|
121
|
+
duration: isViewTransitioning ? 0 : 300,
|
|
118
122
|
},
|
|
119
123
|
},
|
|
120
124
|
}
|
package/example.md
CHANGED
package/package.json
CHANGED
package/styles/layout.css
CHANGED
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
::view-transition-new(kodee-mascot) {
|
|
14
14
|
animation-duration: 0.5s;
|
|
15
15
|
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
16
|
+
mix-blend-mode: normal;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
::view-transition-group(kodee-mascot) {
|
|
20
|
+
animation-duration: 0.5s;
|
|
21
|
+
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
16
22
|
}
|
|
17
23
|
|
|
18
24
|
.slidev-slide-content {
|