slidev-theme-kotlin 0.13.2 → 0.14.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +38 -1
  2. package/README.md +396 -633
  3. package/assets/gutter/suspendCall@14x14.svg +6 -0
  4. package/assets/gutter/suspendCall@14x14_dark.svg +6 -0
  5. package/bin/present.mjs +296 -0
  6. package/components/DrawnAnnotation.vue +57 -9
  7. package/components/DrawnAnnotationEditorToolbar.vue +1 -1
  8. package/components/InlineCompilerError.vue +46 -15
  9. package/components/InlineValue.vue +3 -3
  10. package/components/MagicMoveBetween.vue +6 -4
  11. package/components/README.md +60 -2
  12. package/components/SmartCast.vue +3 -3
  13. package/components/SuspendGutter.vue +168 -0
  14. package/components/TypeHint.vue +3 -3
  15. package/components/Warning.vue +3 -3
  16. package/components/carried-layer.ts +29 -0
  17. package/components/code-highlight.ts +119 -5
  18. package/components/transition-ink.ts +27 -6
  19. package/docs/annotation-editor.png +0 -0
  20. package/docs/code-marks.md +76 -0
  21. package/docs/phone-remote.png +0 -0
  22. package/docs/presenting.md +122 -0
  23. package/docs/publishing.md +111 -0
  24. package/docs/snippets.md +84 -0
  25. package/global-top.vue +3 -8
  26. package/package.json +11 -4
  27. package/remote/RemoteControl.vue +278 -0
  28. package/remote/connection.ts +19 -0
  29. package/setup/code-imports.ts +3 -2
  30. package/setup/code-marks.ts +562 -0
  31. package/setup/kotlin-snippets.ts +4 -2
  32. package/setup/magic-move-between.ts +10 -2
  33. package/setup/main.ts +5 -1
  34. package/setup/remote-sync.ts +226 -0
  35. package/setup/routes.ts +21 -0
  36. package/setup/static-content.ts +39 -5
  37. package/setup/transformers.ts +16 -1
  38. package/styles/layout.css +17 -0
  39. package/assets/edit-3-svgrepo-com.svg +0 -5
  40. package/components/DrawnAnnotationEditorLauncher.vue +0 -59
package/CHANGELOG.md CHANGED
@@ -1,6 +1,43 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 0.14.1
4
+
5
+ ### Fixed
6
+
7
+ - Annotations on code that does not move no longer blink through a Magic Move step, across a cross-slide chain or inside a classic `md magic-move` block, with `transition: fade` and `transition: view-transition` alike. `SuspendGutter` icons stay beside their line instead of clearing for the whole move. `SmartCast` and `Warning` highlights and `TypeHint` inlays are repainted in the same frame Magic Move resets their token. `SmartCast`, `Warning`, and `InlineValue` messages stay on screen and follow their line. Across a chain, a message, an `InlineCompilerError` squiggle and message, and `DrawnAnnotation` ink that the neighbouring slide also has are handed over in the first frame of the move rather than after it, and are left out of the slide's fade; under `view-transition` they get their own layer above the code window's snapshot (`view-transition-class`, Chrome 125+ and Safari 18.2+). An annotation the neighbouring slide does not have still waits for the move and draws in afterwards.
8
+
9
+ ### Changed
10
+
11
+ - The README is rewritten for deck authors: a quick start, one section per feature with an example, one "Customising" section for the CSS variables, and a `themeConfig` reference table. The reference detail moved to `docs/code-marks.md`, `docs/snippets.md`, and `docs/publishing.md`, which ship with the package.
12
+ - The demo deck `slides.md` is a 19-slide tour, down from 63: one slide per feature, with code marks, `SuspendGutter`, the `ktor`, `arrow`, `jdbc`, and `r2dbc` icons, a slide that shows the visual annotation editor in use, and a closing slide for the snippets CLI, the handout, and analytics. The edge-case and per-prop slides moved to `slides.fixtures.md`, which `npm run visual:review` captures under `fixtures/` and `npm run lint` checks, and which is not published.
13
+
14
+ ### Removed
15
+
16
+ - The development-only **Edit annotations** launcher, the pencil button in the top-right corner of every slide with an annotation. **Alt+Shift+A** opens and closes the annotation editor as before.
17
+
18
+ ### Added
19
+
20
+ - `node scripts/transition-blink.mjs` records every Magic Move step of `scripts/transition-blink.fixture.md` frame by frame and reports each annotation that goes missing while its code stays put (`--transition fade|view-transition`, `--backward`, `--only <page>`, `--frames --strip 0,300,900` for a filmstrip in `.visual/transition-blink/`).
21
+ - A phone remote for presenting, moved in from the advanced-dsl-in-kotlin and functional-kotlin-services decks. `slidev-kotlin-present` serves a built deck on the local network, prints the display link plus a remote link with its QR code for every network address, and relays navigation from the phone to each open display. On a phone or tablet the `presenter` route shows the remote (upcoming slide or reveal, notes, tap right to advance, left to go back); a laptop keeps Slidev's presenter console. See `docs/presenting.md`. Compared with the decks' copies:
22
+ - Driving the deck needs a write secret that only leaves the server in the printed remote link (`?k=`). The session endpoint and the served `index.html` no longer carry it, a page without it only watches, and a rotated secret (`--new-secret`) expires old links. The secret is kept in `node_modules/.cache/slidev-kotlin-present/secret` so a restarted server keeps the phone connected.
23
+ - Scanning the code joins the talk at its current slide instead of sending the display back to slide 1, and a display ignores a slide number past the end of the deck.
24
+ - The remote keeps the phone awake from the first tap (NoSleep: the Wake Lock API where the page is a secure context, a silent looping video on `http://<lan address>`).
25
+ - Stepping back onto a slide with reveals lands on its last click after a reload too, and the display shows that final state at once rather than replaying the reveals.
26
+ - Works with `--router-mode hash` and a `--base` other than `/`; the server reads the base from the build.
27
+ - The server reads `index.html` per request, so a rebuild needs a reload and not a restart; answers byte-range requests and more media types; reports a port in use in one line; requests from the remote time out after four seconds instead of hanging.
28
+ - The remote is themed with `--remote-control-*` custom properties, has dark values, and turns off double-tap zoom, selection and the tap highlight.
29
+ - The demo deck has a "Your phone is the clicker" slide, the README a "Presenting from your phone" section, and `docs/presenting.md` the status line, the options, and who can read what.
30
+ - `npm run test:remote` drives a built deck through the server in separate Chromium contexts (`--dist <dir>` tests another deck's build).
31
+
32
+
33
+ ## 0.14.0
34
+
35
+ ### Added
36
+
37
+ - Code marks: a trailing `// [!kind …]` comment inside a Kotlin fence asks for an IDE decoration on that line — `[!smartcast result]`, `[!this Routing]`, `[!context ResourceScope]`, `[!error insertUser No context argument found]`, `[!warning …]`, `[!type …]`, `[!value …]`, and `[!suspend]` for `SuspendGutter`. The markdown transformer strips the comment and wraps the fence in the matching component with `:line` and `:occurrence` computed from the comment's position, so a mark moves with its line through a Magic Move chain and the author no longer counts lines, nests wrappers, or escapes quotes. `parseFenceInfo` strips the marks too (`ParsedFence.marks`), so the Kotlin snippet CLI, cross-slide Magic Move steps, and the handout never see them; a fence with an `[!error …]` mark stays out of the generated sources like a wrapped one, and the handout prints each mark as the note its component would leave. A `console` or `sql` fence attached directly under the marked fence is enclosed by the same wrapper. See "Code marks" in the README.
38
+ - `SuspendGutter`, moved in from the functional-kotlin-services deck: `<SuspendGutter :lines="[2, 3]">` around one fence draws IntelliJ's suspend-call gutter icon beside each listed one-based source line, outside the code window's left border, following Magic Move steps and the light or dark scheme. `--suspend-gutter-size` and `--suspend-gutter-gap` place the icon; the handout drops the wrapper. `[!suspend]` marks are the way to write it from inside the fence.
39
+
40
+ ## 0.13.2
4
41
 
5
42
  ### Added
6
43