Vanjs Org Van Versions Save

🍦 VanJS: World's smallest reactive UI framework. Incredibly Powerful, Insanely Small - Everyone can build a useful UI app in an hour.

1.2.1

8 months ago

A minor release with changes to van.d.ts to improve VanJS's type system:

  • The binding function for state-derived child nodes is now taking the type ((dom?: Node) => ValidChildDomValue) | ((dom?: Element) => Element).
  • Specialize the return types of tag functions for more known tag names. Specifically, 1.2.1 added specialized return types for tags of HTMLElement type.

See the release announcement: https://github.com/vanjs-org/van/discussions/120

1.2.0

8 months ago
  • New API van.hydrate that allows us to hydrate a SSR component into a CSR component with added reactivity while preserving all the server-side states. Sample usage:
van.hydrate(document.getElementById("basic-counter")!, dom => Counter({
  van,
  id: dom.id,
  init: Number(dom.getAttribute("data-counter")),
}))
  • Change van-{VERSION}.debug.js to allow string values in on... properties of tag functions, if the properties are used to set HTML attributes (via setAttribute) of the DOM element. This is crucial for cross-platform UI components to specify event handlers, as for SSR, only string-valued on... event handlers can be visible in the rendered HTML strings. You can refer to https://vanjs.org/ssr#on-properties for a detailed explanation.
  • Fix some type definitions in van.d.ts:
    • For state-valued child nodes, restrict the types of val property to Primitive | null | undefined (DOM-node-valued states are not allowed anymore). This is because DOM-node-valued states have problematic behavior and should be generally avoided, see https://vanjs.org/advanced#why-not-dom-valued-states for more information.
    • For state-derived child nodes, the binding function should be of type (dom: Node | undefined) => ValidChildDomValue (changed from (dom: Node) => ValidChildDomValue), as it needs to handle to case where the dom parameter is undefined (when the binding function is invoked for the first time).
    • Simplify the type definition of Props with built-in type Record.

See the release announcement: https://github.com/vanjs-org/van/discussions/114

1.1.3

9 months ago

1.1.3 is a minor release. Here are the changes:

  • Simplify van.d.ts by using TypeScript built-in types
  • Unify the style in van.debug.js

There is no change in the implementation of van.js file.

Version 1.1.1 and 1.1.2 are skipped as the published NPM packages have some minor issues in van.d.ts file.

See the release announcement: https://github.com/vanjs-org/van/discussions/81#discussioncomment-6849913

1.1.0

9 months ago

The garbage collection mechanism in VanJS was revamped in 1.1.0. In this overhaul, we improved the GC handling for derived states and side effects registered inside DOM binding functions to avoid some unnecessary constraints while defining derived states and side effects.

See the release announcement: https://github.com/vanjs-org/van/discussions/81

1.0.2

9 months ago

1.0.2 is a minor release. This release contains an optimization to avoid the duplicate execution of Object.getPrototypeOf in tag functions.

This optimization increases the bundle size slightly: the size of .min.js is 1630 bytes (4 more bytes compared to 1.0.1); and the size of .min.js.gz is 928 bytes (2 more bytes compared to 1.0.1).

See the release announcement: https://github.com/vanjs-org/van/discussions/72#discussioncomment-6718307

1.0.1

9 months ago

This is a minor release. In this release, we renamed a parameter to keep the style consistent in source file van.js. There was no change in the actual implementation.

Thanks @Tolluset for the contribution!

See the release announcement: https://github.com/vanjs-org/van/discussions/72#discussioncomment-6652959

1.0.0

10 months ago

A major milestone with the commitment of API stability and forward compatibility for future releases.

What's new?

See the release announcement: https://github.com/vanjs-org/van/discussions/72

0.12.4

10 months ago

Van-DML-0.1.0

10 months ago

0.12.3

11 months ago

As of 0.12.3, null is not supported as prop values in tag functions. Thus this release updates van.d.ts file to keep it consistent.

Supporting null as prop values in tag functions is a planned feature in 1.0.0 release. Thus the restriction will be removed in 1.0.0 release.

See the release announcement: https://github.com/vanjs-org/van/discussions/53#discussioncomment-6223903