Releases: jacob-8/kitbook
v1.0.0-beta.31
🚀 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)
View changes on GitHub
v1.0.0-beta.29
🚀 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
🐞 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
v1.0.0-beta.26
🚀 Features and🚨 Breaking Changes
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
🚀 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
v1.0.0-beta.22
v1.0.0-beta.21
🚀 Features
View changes on GitHub
v1.0.0-beta.20
No significant changes