slidev-theme-kotlin 0.0.9 → 0.10.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.0
4
+
5
+ ### Added
6
+
7
+ - Bundle `DrawnAnnotation`, a click-aware, Rough.js-powered annotation component for marking elements or exact code text with circles, underlines, boxes, and strike-throughs.
8
+ - Support leader lines, target marks, automatic non-overlapping labels, sequential nested reveals, temporary click ranges, and Magic Move-aware tracking.
9
+ - Add complete component documentation and interactive examples to the theme showcase.
10
+
11
+ ### Packaging
12
+
13
+ - Add `roughjs` as a runtime dependency required by `DrawnAnnotation`.
14
+
15
+ ## 0.0.10
16
+
17
+ ### Added
18
+
19
+ - Allow decks to enable Kodee once with `themeConfig.kodee`. A shared per-slide layer supports every layout: regular slides use a small bottom-right mascot, while cover and intro layouts use a large featured mascot.
20
+ - Support concise per-slide overrides such as `kodee: wink` and `kodee: false`, while retaining the full object configuration.
21
+ - Implement the documented `medium` Kodee size.
22
+ - Bundle `DrawnAnnotation`, a click-aware, Rough.js-powered annotation component for marking elements or exact code text with circles, underlines, boxes, and strike-throughs.
23
+ - Support leader lines, target marks, automatic non-overlapping labels, sequential nested reveals, temporary click ranges, and Magic Move-aware tracking.
24
+ - Add complete component documentation and interactive examples to the theme showcase.
25
+
26
+ ### Packaging
27
+
28
+ - Add `roughjs` as a runtime dependency required by `DrawnAnnotation`.
29
+
3
30
  ## 0.0.9
4
31
 
5
32
  ### Fixed
package/README.md CHANGED
@@ -12,6 +12,7 @@ This theme provides a professional presentation template tailored for Kotlin dev
12
12
  - **Multiple Layouts**: Pre-built layouts including default, cover, and intro
13
13
  - **Kotlin Branding**: Official Kotlin logos for both light and dark modes
14
14
  - **JetBrains Fonts**: Uses Inter for sans-serif and JetBrains Mono for code
15
+ - **Drawn annotations**: Click-aware, hand-drawn marks, labels, and connectors for elements and code
15
16
 
16
17
  ## Requirements
17
18
 
@@ -43,7 +44,25 @@ transition: view-transition
43
44
 
44
45
  ### Using Kodee Mascot
45
46
 
46
- Add Kodee to any slide by including the `kodee` configuration in the slide's frontmatter:
47
+ Enable Kodee once for the whole deck with `themeConfig`:
48
+
49
+ ```yaml
50
+ ---
51
+ theme: kotlin
52
+ themeConfig:
53
+ kodee: greeting
54
+ ---
55
+ ```
56
+
57
+ Kodee then uses layout-aware defaults: `small` in the bottom-right corner on regular slides, and `large`/`featured` on `cover` and `intro` slides. Override only the variant when a slide needs a different expression:
58
+
59
+ ```yaml
60
+ ---
61
+ kodee: wink
62
+ ---
63
+ ```
64
+
65
+ Use `kodee: false` to hide the mascot on one slide. The original object form remains available when you need complete control:
47
66
 
48
67
  ```yaml
49
68
  ---
@@ -52,8 +71,6 @@ kodee:
52
71
  size: large
53
72
  position: featured
54
73
  ---
55
-
56
- # Your Slide Content
57
74
  ```
58
75
 
59
76
  #### Kodee Configuration Options
@@ -72,13 +89,13 @@ kodee:
72
89
  - `tiny` - Tiny Kodee
73
90
 
74
91
  - **size**: Control Kodee's size
75
- - `small` - 200x200px (default)
76
- - `large` - 600x600px (500x500px for wave variant)
77
- - `medium` - TODO: Not yet implemented
92
+ - `small` - 200x200px (regular-layout default)
93
+ - `medium` - 320x320px
94
+ - `large` - 600x600px (500x500px for wave variant; cover/intro default)
78
95
 
79
96
  - **position**: Control Kodee's placement
80
- - `corner` - Bottom right corner (default)
81
- - `featured` - Prominently displayed on slide
97
+ - `corner` - Bottom right corner (regular-layout default)
98
+ - `featured` - Prominently displayed (cover/intro default)
82
99
  - `custom` - Use with `x` and `y` coordinates
83
100
 
84
101
  #### Custom Positioning
@@ -96,6 +113,42 @@ kodee:
96
113
  ---
97
114
  ```
98
115
 
116
+ ### Using DrawnAnnotation
117
+
118
+ `<DrawnAnnotation>` is auto-registered for every deck using the theme. It can mark an element with a selector or exact text inside a Shiki or Magic Move code block, then connect that mark to a label or another element.
119
+
120
+ ````md
121
+ <DrawnAnnotation type="circle" text="fun main" label="program entry point" :on="1">
122
+
123
+ ```kotlin
124
+ fun main() = println("Hello, Kotlin!")
125
+ ```
126
+
127
+ </DrawnAnnotation>
128
+ ````
129
+
130
+ The full prop reference, timing behavior, and troubleshooting guide are in [`components/README.md`](components/README.md). The bundled [`slides.md`](slides.md) includes working examples of code annotations, connectors, labels, sequential reveals, and Magic Move integration.
131
+
132
+ #### IntelliJ formatting
133
+
134
+ IntelliJ recognizes only the first YAML block in a Markdown file as frontmatter. To keep later Slidev frontmatter intact when using **Reformat Code**, enable formatter tags and stop formatting after the deck headmatter:
135
+
136
+ ```ini
137
+ # .editorconfig
138
+ [*.md]
139
+ ij_formatter_tags_enabled = true
140
+ ```
141
+
142
+ ```md
143
+ ---
144
+ theme: kotlin
145
+ ---
146
+
147
+ <!-- @formatter:off -->
148
+ ```
149
+
150
+ The theme's example deck includes this guard.
151
+
99
152
  ## Development
100
153
 
101
154
  ### Available Scripts
@@ -131,6 +184,7 @@ This will open the example presentation in your browser with hot-reload enabled.
131
184
  ├── components/ # Vue components
132
185
  │ ├── Kodee.vue # Main Kodee mascot component with animations
133
186
  │ └── KodeeWrapper.vue # Wrapper component for Kodee integration
187
+ ├── slide-bottom.vue # Per-slide Kodee layer shared by every layout
134
188
  ├── layouts/ # Slidev layout templates
135
189
  │ ├── cover.vue # Cover slide layout
136
190
  │ ├── default.vue # Default slide layout
@@ -204,6 +258,7 @@ layout: cover
204
258
 
205
259
  ### Runtime Dependencies
206
260
  - `@slidev/types` (^52.2.5) - Slidev type definitions
261
+ - `roughjs` (^4.6.6) - Hand-drawn SVG paths for `DrawnAnnotation`
207
262
 
208
263
  ### Development Dependencies
209
264
  - `@slidev/cli` (^52.2.5) - Slidev command-line interface