Skip to content

Releases: willybrauner/compose

v0.17.1

Choose a tag to compare

@willybrauner willybrauner released this 03 Dec 22:22

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

Choose a tag to compare

@willybrauner willybrauner released this 31 Mar 19:20
  • feat: improve addAll method type (#47)
  • feat: generate uniqueID (#48)

v0.15.1

Choose a tag to compare

@willybrauner willybrauner released this 13 Mar 16:35

Fix

  • fix comeFrom playIn arg (#46)

v0.15.0

Choose a tag to compare

@willybrauner willybrauner released this 02 Mar 10:33

Feature

  • Add Stack $clickedLink property (#45)

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

v0.14.0

Choose a tag to compare

@willybrauner willybrauner released this 27 Feb 16:04

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

Choose a tag to compare

@willybrauner willybrauner released this 27 Feb 09:39

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

Choose a tag to compare

@willybrauner willybrauner released this 15 Nov 09:07

Feature

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

v0.11.2

Choose a tag to compare

@willybrauner willybrauner released this 12 Nov 11:25

fix

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

v0.11.0

Choose a tag to compare

@willybrauner willybrauner released this 31 Oct 11:18

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

Choose a tag to compare

@willybrauner willybrauner released this 30 Oct 23:20

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