Releases: willybrauner/compose
Releases · willybrauner/compose
v0.17.1
Remove Stack
Compose is only component managment, not "routing" & page transitions anymore.
Rewrite example
Add example with a "Stack like" managed with @wbe/low-router & @wbe/interpol
Changes in Component
$rootbecomerootComponentconstructor has changed:
constructor(root: HTMLElement, options: Partial<ComponentOptions<P>> = {})
interface ComponentOptions<P> {
name: string
props: P
}static attrNameis renamepublic readonly name. Name is nowoptions.name ?? this.root?.classList?.[0]find()can accept "_element"mountedcan return a function called when component is unmounted.
Stack
- Stack component as been removed because his role remains out of subject of this repo. An example still available in
examples/basic.
Manage repo
- build with tsup
v0.15.2
v0.15.1
v0.15.0
v0.14.0
features
- Add
keepPageNumberDuringTransitionsStack option (#44)
class App extends Stack {
// empty the wrapper container if request is made during a page transition
keepPageNumberDuringTransitions = 0
// will keep one page div in wrapper if request is made during a page transition
keepPageNumberDuringTransitions = 1
}v0.13.0
v0.11.3
v0.11.2
v0.11.0
breaking change
- implement history library for Stack extended class #32
The Stack extended class constructor change:
$root: App root element (witch takes data-component="App" attribute)history: History mode can be BROWSER, HASH, MEMORY.props: Props key/values object.
{
$root: HTMLElement
history: BrowserHistory | HashHistory | MemoryHistory
props?: Props
}index.ts:
import { App } from "./App"
import { createBrowserHistory } from "history"
const app = new App({
$root: document.querySelector(".App"),
history: createBrowserHistory(),
props: { foo: "bar" },
})