Skip to content

Releases: jacob-8/kitbook

v1.0.0-beta.31

27 Apr 16:12
Compare
Choose a tag to compare

   🚀 Features

  • Made viewer draggable and tools now opens in popup window if document-picture-in-picture not supported. Kitbook will add a new tools route to its folder for this.

   🐞 Bug Fixes

  • Use viewer in iframes (we for sure want it working in Stackblitz, maybe we want it in Kitbook's own iframes - have not turned that on yet)  -  by jacob-8 (b62cb)

edit-props-in-viewer

    View changes on GitHub

v1.0.0-beta.29

25 Apr 07:37
Compare
Choose a tag to compare

   🚀 Features

  • Pass mockedPageData into Kitbook's root layout.js to add properties to the $page.data used in non-page components.  -  by jacob-8 (99787)
    View changes on GitHub

v1.0.0-beta.28

24 Apr 06:06
Compare
Choose a tag to compare

   🐞 Bug Fixes

  • Go back to server.ws instead of Vite's newer server.hot to continue support for older projects  -  by jacob-8 (6e965)
    View changes on GitHub

v1.0.0-beta.27

24 Apr 05:13
Compare
Choose a tag to compare

   🐞 Bug Fixes

  • Move codemirror packages into dependencies  -  by jacob-8 (229ce)
    View changes on GitHub

v1.0.0-beta.26

23 Apr 15:47
Compare
Choose a tag to compare

   🚀 Features and🚨 Breaking Changes

  • simplify variant and composition apis by @jacob-8 in #36

For variants, what used to be:

import type { Variant, Viewports } from 'kitbook'
import type Component from './Foo.svelte'

export const viewports: Viewports[] = [
  { width: 500, height: 200 }
]

export const variants: Variant<Component>[] = [
  {
    name: 'First',
    props: {
      foo: 'a',
    }
  },
  {
    name: 'Second',
    description: 'This is the second variant.',
    props: {
      foo: 'b',
    },
  },
]

Is now:

import type { Variant, VariantMeta } from 'kitbook'
import type Component from './Foo.svelte'

export const shared_meta: VariantMeta = {
  viewports: [
    { width: 500, height: 200 }
  ]
}

export const First: Variant<Component> = {
  foo: 'a',
}

export const Second: Variant<Component> = {
  foo: 'b',
  _meta: {
    description: 'This is the second variant.',
  },
}

As you are able, update to the new api which only exports the optional shared_meta property plus the variants themselves. Kitbook will still accept the deprecated variants array api, but the types will throw errors. As you are transitioning, for the moment you can just find-replace all the Variant types to be DeprecatedVariant.

A quick tip to upgrade is to delete your variants.ts file and then create a new one using Kitbook's Add Variant button. Then use VS Code's version control to paste from your old file into the new. Alternatively, you can ask an LLM to help you. I've added a one-shot prompt to help out with that.

Compositions also still work with the old api, but moving forward config should be defined in this manner to get intellisense and prepare for removal of the deprecation in a future version:

<script context="module" lang="ts">
  import { defineComposition } from 'kitbook'

  export const config = defineComposition({
    viewports: [{ height: 50 }],
  })
</script>

Full Changelog: v1.0.0-beta.24...v1.0.0-beta.26

v1.0.0-beta.24

26 Mar 00:40
Compare
Choose a tag to compare

   🚀 Features

  • Easily add composition inline in markdown  -  by jacob-8 (61830)
  • Show shikied code for compositions  -  by jacob-8 (77707)
    View changes on GitHub

v1.0.0-beta.23

07 Mar 02:20
Compare
Choose a tag to compare

   🚀 Features

   🐞 Bug Fixes

  • Dark and composition changes no longer break variants  -  by @jacob-8 (68179)
    View changes on GitHub

v1.0.0-beta.22

02 Mar 10:50
Compare
Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v1.0.0-beta.21

02 Mar 10:18
Compare
Choose a tag to compare
v1.0.0-beta.21 Pre-release
Pre-release

   🚀 Features

  • Add option to render composition only on client or only on server  -  by @jacob-8 (52ea7)
    View changes on GitHub

v1.0.0-beta.20

23 Feb 01:51
Compare
Choose a tag to compare

No significant changes

    View changes on GitHub