Skip to content

Releases: dgp1130/HydroActive

releases/0.1.2

13 May 06:04
Compare
Choose a tag to compare
releases/0.1.2 Pre-release
Pre-release

https://www.npmjs.com/package/hydroactive/v/0.1.1

Adds README to the published output so it displays on the NPM package page.

releases/0.1.1

03 Mar 07:51
Compare
Choose a tag to compare
releases/0.1.1 Pre-release
Pre-release

https://www.npmjs.com/package/hydroactive/v/0.1.1

This release adds improved hydration support and reworks the core DOM manipulation APIs to decouple utilities like comp.live into smaller, more composable pieces. ComponentRef is unchanged, but defineComponent now provides a second host parameter (an ElementAccessor of the host element) which serves as an entry point. See the README for a basic introduction into how live works under the new system.

There are a few new concepts which make this work:

  • Queryable - An interface which provides query and queryAll methods.
  • Dehydrated - A class which wraps a potentially dehydrated element and only lets you unwrap it by asserting that the element is hydrated or actually hydrating it yourself.
  • ElementAccessor - Wraps an element and provides convenient functions for reading and interacting with it.
  • AttrAccessor - Wraps an element and a specific attribute and provides convenient functions for reading and interacting with it.
  • live and bind - Work basically the same as before, but have been moved into standalone functions which accept an ElementAccessor as a parameter, rather than being methods on ComponentRef. Part of the goal here is to make signals tree shakable when not used.

The old APIs under ComponentRef are likely to be removed and heavily reduced. comp.live is basically obsoleted by the new live standalone function for instance. Some form of ComponentRef will likely still exist as a means of accessing ComponentRef.prototype.connected, but what form that takes long term is still TBD.

Subscribe for a future YouTube video discussing the changes in this release and the design decisions which went into hydration support.

releases/0.1.0

18 Feb 00:15
Compare
Choose a tag to compare
releases/0.1.0 Pre-release
Pre-release

https://www.npmjs.com/package/hydroactive/v/0.1.0

BREAKING CHANGES: Basically everything. This is effectively starting a rewrite of HydroActive. Most of the core developer experience is pretty similar, there's no major radical changes here. However this does not yet have feature parity with 0.0.5, so a number of APIs just don't exist yet.

See this new YouTube video for a breakdown of the project and an introduction to 0.1.0 features. The video does not contain a comprehensive list of all 0.1.0 HydroActive features, but future videos and content should continue to expand on it going forward. Release notes will also be more specific about individual changes in each incremental release.

releases/0.0.5

02 Dec 23:26
Compare
Choose a tag to compare
releases/0.0.5 Pre-release
Pre-release

https://www.npmjs.com/package/hydroactive/v/0.0.5

Changelog:

  • e79f9cf - Adds support for binding boolean values to attributes. If the boolean is true, the attribute is set to empty string, and if the boolean is false the attribute is removed.
  • a8d1bc5 - $.live and $.bind now accept Element references in addition to string queries.
  • cee36e7 - Adds $.scope. This allows chaining additional queries limited to descendents of the scoped selector.
  • b7d91dd - Disallows extra properties not supported by the component to be passed to hydrate.

v0.0.4

07 Jan 07:23
Compare
Choose a tag to compare
v0.0.4 Pre-release
Pre-release

https://www.npmjs.com/package/hydroactive/v/0.0.4

Changelog:

  • 519e458 - Deletes factory() and templating implementation, moving hydrate() out of /testing.js export as a replacement. Instead of using factory() to create a new instance of an element based on a template with a special attribute, prerender the component inside a template, clone that template, and then hydrate() it directly. See examples in 519e458.
  • 6244237 - Defines custom elements directly in component('my-tag-name', () => { /* ... */ }). A separate customElements.define() call is no longer necessary. This makes it impossible to hydrate a HydroActive component without defining its custom element first, which removes a foot-gun that leaked dehydrated elements into user-space.
  • 144dd0f - Renames $.hydrate() to $.read().
  • c5b6d7c - Adds new implementation of $.hydrate() (originally named $.hydrateElement() but subsequently renamed to $.hydrate() in 6842fb7). This is like $.read() and $.query(), except that it requires the target to be dehydrated, and triggers hydration immediately with the given props. This allows fine-grained orchestration of hydration timing.
  • 6cbaa08 - Updates $.query() and $.queryAll() to throw when they find a custom element. Use $.read() or $.hydrate() instead.
  • 6c85a54 - Removes type check restriction on $.query() and $.queryAll()'s selector. This was originally intended to catch accidental dehydrated queries of custom elements, but this is now asserted more thoroughly in 6cbaa08 and is obsoleted.

v0.0.3

06 Jan 07:07
Compare
Choose a tag to compare
v0.0.3 Pre-release
Pre-release

https://www.npmjs.com/package/hydroactive/v/0.0.3

Changelog:

You can now test HydroActive components in Mocha-compatible environments with the hit() function, a wrapper of it() which grabs a DOM component from the page and executes the test with it, then cleans up the element afterwards to provide improved test isolation.

The hydrate() function triggers hydration on the component and makes it interactive. See examples in d6e5f09 for how to use these functions for effective testing.

v0.0.2

22 Dec 20:08
Compare
Choose a tag to compare
v0.0.2 Pre-release
Pre-release

https://www.npmjs.com/package/hydroactive/v/0.0.2

Published changes:

  • d2f3ca8 - Removes unobserved(). Unobserved reads of signal accessors are now always allowed. I didn't like how unobserved() worked because it meant that any external async operations needed to put unobserved() between every await, which is too tricky to be worth it.
  • ac43358 - Makes it a type-error to use $.query() on a custom element. Custom elements should use $.hydrate() instead.
  • 5f61a38 - Fixes factory type to allow no parameters if no props are required.
  • 7feb80b - Adds $.props to provide signal accessors to component properties.

Changes to examples:

  • 0e2fa92 - Adds templating example to demonstrate hydrating multiple instances of a component from a single prerendered template. This technically landed before 0.0.0, but after the original YouTube video was recorded, so it hasn't really been mentioned yet which is why I included it here.
  • b0930c5 - Adds spawn-counter example to more specifically demonstrate spawning multiple instances of a component from a single prerendered template.
  • fb76859 - Adds props-counter example to demonstrate passing JS "props" to elements hydrated from a template.
  • a53589c - Refactors original templating example to demonstrate detached usage of factory-created components.
  • eb06e0f - Adds repeated-counter example to demonstrate reusing a single template multiple times with host attributes.

Full Changelog: releases/0.0.1...releases/0.0.2

v0.0.1

22 Dec 19:57
Compare
Choose a tag to compare
v0.0.1 Pre-release
Pre-release

https://www.npmjs.com/package/hydroactive/v/0.0.1

Changelog:

  • Adds README to published NPM package.

v0.0.0

22 Dec 19:56
Compare
Choose a tag to compare
v0.0.0 Pre-release
Pre-release

https://www.npmjs.com/package/hydroactive/v/0.0.0

Initial release. Import from hydroactive for the functional API. import from hydroactive/class.js for the class-based API.

While there isn't much documentation about the features or API, you can check out the YouTube video announcement which walks through a number of examples and demonstrates package features.

https://www.youtube.com/watch?v=zL0TzFY6aj0