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 CHANGED
@@ -35,6 +35,7 @@ Add the theme to your slides' frontmatter:
35
35
  ```yaml
36
36
  ---
37
37
  theme: kotlin
38
+ transition: view-transition
38
39
  ---
39
40
 
40
41
  # Your Presentation Title
@@ -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 * 0.8,
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 * 0.8,
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
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  theme: ./
3
+ transition: view-transition
3
4
  ---
4
5
 
5
6
  # Kodee Magic Move Demo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slidev-theme-kotlin",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "slidev-theme",
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 {