Skip to content

Releases: KodeinKoders/CuP

1.0.0-beta-11

26 Jan 20:14
Compare
Choose a tag to compare

What's Changed

  • Fix Gradle failure caused by private execute() TaskAction by @LouisCAD in #9
  • kotlin 2.1.0 and compose 1.7.3
  • Upgrade Gradle wrapper

New Contributors

Full Changelog: v1.0.0-Beta-10...v1.0.0-beta-11

1.0.0-Beta-10

01 Oct 09:16
Compare
Choose a tag to compare
  • Detect when in Speaker Window with isInSpeakerWindow()

1.0.0-Beta-09

24 Sep 13:26
Compare
Choose a tag to compare
  • Kotlin 2.0.20
  • Compose 1.6.10

1.0.0-Beta-08

04 Jul 19:51
036012f
Compare
Choose a tag to compare

Breaking changes

  • Speaker notes are now forcibly in Markdown, so SpeakerNotesMD is now SpeakerNotes.

Features

  • Speaker notes can now differ per step (if you have very long slides).

Other

  • Enhanced Compose performance by enhancing stability (with KotlinX.Collection.Immutable).
  • Some plugin API enhancements.

1.0.0-Beta-07

25 Jun 11:18
Compare
Choose a tag to compare
1.0.0-Beta-07 Pre-release
Pre-release

This version brings no change to the presentation API.

UI Changes & fixes

  • Tools & overlays now have a light color theme to make it easier on the eye.
  • Laser tool is not active anymore in the overview

Changes to plugin API

  • Breaking change: The CupPlugin.overlay function now has a state: PresentationState parameter.
  • Added the CupAdditionalOverlay.inMenu constructor parameter & property to allow the overlay button to appear in an overflow menu.

1.0.0-Beta-06

06 Jun 11:26
Compare
Choose a tag to compare
1.0.0-Beta-06 Pre-release
Pre-release
  • Added a new landing page for unsupported browsers (that do not support WebAssembly or Wasm Garbage Collection). Now displays a nice message, instead of a cryptic error message.
  • Gradle plugin extensions now implement ExtensionAware.

1.0.0-Beta-05

05 Jun 10:59
Compare
Choose a tag to compare
1.0.0-Beta-05 Pre-release
Pre-release

Changes

Breaking changes

  • SlideSpecs are now constructed directly, instead of by copy in a lambda. See the migration guide.

Version updates

  • Kotlin 2.0.0.
  • Compose 1.6.10.

Migration Guide

Kotlin 2.0.0

You need to add the kotlin("plugin.compose") plugin to your projects. See the dedicated migration guide.

Note that presentations written with CuP 1.0.0-Beta-05 (or superior) must be compiled with at least Kotlin 2.0.0 and Compose 1.6.10.

In Slide: new way of defining SlideSpecs

If you changed the size of a particular slide, or its transitions, you would have changed its specs with:

// Correct up to 1.0.0-Beta-04
// Incorrect starting at 1.0.0-Beta-05

val mySlide by Slide(
    specs = {
        copy(
            size = SLIDE_SIZE_16_9,
            startTransitions = coolTransition
        )
    }
) { /*...*/ }

Using copy meant starting form the global "default" slide specs and overriding some of its values.
This mechanism is now done for you (with a merge function). The same code is now expressed much more concisely:

// Correct starting at 1.0.0-Beta-05

val mySlide by Slide(
    specs = SlideSpecs(
        size = SLIDE_SIZE_16_9,
        startTransitions = coolTransition
    )
) { /*...*/ }

Note that in this example we do not provide endTransitions, which will be merged down from the default presentation specs.

In Slides: new way of defining grouped slides inside transitions

CuP provides a way of applying specific transitions in a group of slides.
For example, this is how you would have all slides in a group use vertical transitions between them (note that this changes neither the startTransitions of the first slide nor the endTransitions of the last slide since this changes the transitions between the slides of the group):

// Correct up to 1.0.0-Beta-04
// Incorrect starting at 1.0.0-Beta-05

val modes = Slides(
    slide1, slide2, slide3,
    specs = {
        copyWithInsideTransitions(
            config = it,
            startTransitions = TransitionSet.moveVertical,
            endTransitions = TransitionSet.moveVertical
        )
    }
)

Due to changes in the way SlideSpecs are defined (explained in the next section), the copyWithInsideTransitions function is replaced by insideTransitionSpecs:

// Correct starting at 1.0.0-Beta-05

val modes = Slides(
    slide1, slide2, slide3,
    specs = {
        it.insideTransitions(
            startTransitions = TransitionSet.moveVertical,
            endTransitions = TransitionSet.moveVertical
        )
    }
)

Note that it is now the receiver, and no longer a parameter.

In Slides: new way of defining grouped slides SlideSpecs and user data

Slides allows you to group multiple slides, and apply specific SlideSpecs and user data to all slides in its group.
Here's how you would do that:

// Correct up to 1.0.0-Beta-04
// Incorrect starting at 1.0.0-Beta-05

val modes = Slides(
    slide1, slide2, slide3,

    // Make all slides in the group 16/9.
    specs = { copy(size = SLIDE_SIZE_16_9) },

    // Attach that data to all slides in the group.
    user = MySpecificDataElement("foo-bar")
)

We have implemented two changes:

  • SlideSpecs are now built directly and merged in each Slides.
  • user data is now built by slide, which allows you to configure it according to its Slides.Position.

This code is now expressed as such:

// Correct starting at 1.0.0-Beta-05

val modes = Slides(
    slide1, slide2, slide3,

    // Make all slides in the group 16/9.
    specs = { SlideSpecs(size = SLIDE_SIZE_16_9) },

    // Attach that data to all slides in the group.
    user = { MySpecificDataElement("foo-bar") }
)

In essence, both specs and user now have the same logic :

public class Slides(
    private val content: List<SlideGroup>,
    private val user: ((Slides.Position) -> DataMap)? = null,
    private val specs: ((Slides.Position) -> SlideSpecs)? = null
): SlideGroup

Note that you can merge SlideSpecs together with the plus operator.
This is how you would set inside transitions and slide size to slides in a group:

// Correct starting at 1.0.0-Beta-05

val modes = Slides(
    slide1, slide2, slide3,
    specs = {
        it.insideTransitionSpecs(
            startTransitions = TransitionSet.moveVertical,
            endTransitions = TransitionSet.moveVertical
        ) + SlideSpecs(
            size = SLIDE_SIZE_16_9
        )
    }
)

1.0.0-Beta-04

31 May 10:52
Compare
Choose a tag to compare
1.0.0-Beta-04 Pre-release
Pre-release
  • Kotlin 2.0.0
  • Compose 1.6.10

1.0.0-Beta-03

22 May 16:40
Compare
Choose a tag to compare
1.0.0-Beta-03 Pre-release
Pre-release
  • Kotlin 2.0.0-RC3
  • Compose 1.6.10-rc01
  • Better mac icon
  • Updated Highlight.js will all languages
  • Fixes SourceCode end of line disappearance when line is too long.

1.0.0-Beta-02

09 May 09:27
Compare
Choose a tag to compare
1.0.0-Beta-02 Pre-release
Pre-release

Breaking Change

  • The order of the optional parameters of the SourceCode function has changed (modifier is now the first optional parameter to align with Compose convention), which will break your code if you are passing positional (un-named) optional parameters to the SourceCode function.

Changes

  • #4: Move custom UI components into some widget artefacts. You now need to add the Gradle dependency implementation(cup.widgets.material) or implementation(cup.widgets.material3) to your project.

New features

  • #5: Source code update:
    • Deprecates the ensureStep function.
    • New SourceCode debug parameters which allows you to see your sections in your SourceCode (see documentation).

Fixes

  • #3: Remove skiko.js from index.html to avoid downloading skiko.wasm twice.