Skip to content

Releases: willybrauner/compose

v0.17.1

03 Dec 22:22

Choose a tag to compare

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

  • $root become root
  • Component constructor has changed:
  constructor(root: HTMLElement, options: Partial<ComponentOptions<P>> = {})
  
  interface ComponentOptions<P> {
  name: string
  props: P
}
  • static attrName is rename public readonly name. Name is now options.name ?? this.root?.classList?.[0]
  • find() can accept "_element"
  • mounted can 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

31 Mar 19:20

Choose a tag to compare

  • feat: improve addAll method type (#47)
  • feat: generate uniqueID (#48)

v0.15.1

13 Mar 16:35

Choose a tag to compare

Fix

  • fix comeFrom playIn arg (#46)

v0.15.0

02 Mar 10:33

Choose a tag to compare

Feature

  • Add Stack $clickedLink property (#45)

Useful to access the current clicked link inside beforeFetch() or pageTransitions() methods

v0.14.0

27 Feb 16:04

Choose a tag to compare

features

  • Add keepPageNumberDuringTransitions Stack 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

27 Feb 09:39

Choose a tag to compare

features

  • Add Stack page cache as option (#43)

Cache can be disabled from Stack extended class:

class App extends Stack {
  enableCache = false
}

v0.11.3

15 Nov 09:07

Choose a tag to compare

Feature

  • Start examples documentation in README #41
  • Add API documentation
  • Add Stack unit tests #38

v0.11.2

12 Nov 11:25

Choose a tag to compare

fix

  • unmount page after the play-out page promise is resolved #35

v0.11.0

31 Oct 11:18

Choose a tag to compare

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" },
})

v0.10.0

30 Oct 23:20

Choose a tag to compare

Breaking changes

#28

  • add() and addAll() are two different methods now
  • find() and findAll() are two different methods now

Improvements

  • Install pnpm for using examples as workspaces
  • Install codesandbox CI
  • Update documentation