Jails

Elegant and Minimalistic Javascript Application Library

MIT License

Downloads
433
Stars
180
Committers
5

Bot releases are hidden (Show)

Jails - v5.8.2 - Patch Update

Published by Javiani 26 days ago

Change Log

  • Fixing innerHTML feature. It was broken for elements outside body tree. Like html, head etc. The alternative has also improve performance for this kind of operation.
Jails - v5.8.1 - Patch Update

Published by Javiani 27 days ago

Change Log

  • Improving / Fixing child rendering on parent updates. On previous version, parent updates used to force children updates and that causes some bugs on certain cenarios. Now, just like versions that used to use morphdom, the tree updates stops on children components.
Jails - v5.8.0 - Minor Update Latest Release

Published by Javiani 5 months ago

Change Log

We prioritize consistency over performance

The most recent updates aimed to enhance performance, but we encountered inconsistencies with HTML updates during testing. To ensure greater consistency and predictability, a significant change was implemented, replacing morphdom with idiomorph.

There are other well known libraries that already made that change:

We are indeed using idiomorph and we'll include it officially as part of Turbo 8. We started with morphdom, but eventually switched to idiomorph as we found it way more suitable. It just worked great with all the tests we threw at it, while morphdom was incredibly picky about "ids" to match nodes. Also, we noticed it's at least as fast.

-- Jorge Marubia / 37Signals

That helps on decision making about changing the core of the library which is the dom diff engine.

Jails - v5.7.1 - Patch Update

Published by Javiani 6 months ago

Change Log

Reverting previous release : Performance Improvement

The latest update focused on optimizing memory usage. However, as Jails is designed to function with or without templates, a bug has been identified when users interact directly with the DOM. Therefore, I am rolling forward the current build. Prioritizing correctness over performance remains our primary concern.

The performance optimization was not discarted but it requires more deep research.

Jails - v5.7.0 - Minor Update

Published by Javiani 6 months ago

Change Log

Performance Improvement

Making Templates smaller by removing child component html content from parent component template by creating "holes" inside the parent component template string.

Since parent component doesn't update child components html, it doesn't need to have child html data saved in memory.

This improvement is very welcome especially for pages that contains application component in the most top level hierarchy.

Jails - v5.6.1 - Patch Update

Published by Javiani 7 months ago

Change Log

The change is related to the previous update.
It was added the behavior in main to wait until template is fully rendered when using export template interface.

Jails - v5.6.0 - Patch Update

Published by Javiani 7 months ago

Change Log

Adding template interface in component module. It will replace the current HTMLElement template html.
It will unlock a way to set a html dynamically.

sync:

export const template = () => '<h1>Hello World</h1>'

async:

export const template = async () => '<h1>Hello World</h1>'
Jails - v5.5.4 + v5.5.5 - Patch Update

Published by Javiani 10 months ago

Change Log

  • Fixing error when calling jails.start without registering any component. 5.5.4
  • Assigning default empty object to the optional dependencies helper to avoid raising unnecessary exceptions.
Jails - v5.5.3 - Patch Update

Published by Javiani 10 months ago

Change Log

  • Updating innerHTML interface to accept a DOMElement target.
Jails - v5.5.2 - Patch Update

Published by Javiani 11 months ago

Change Log

  • Defensive code for cases where user tries to register the same component twice.
  • Fixing type definition for .start method, for cases where user wants to call it sending a optional target.
Jails - v5.5.1 - Patch Update

Published by Javiani 11 months ago

Change Log

  • Fixing another edge case when using shared template variables among child components. Making it more robust.
Jails - v5.5.0 - Minor Update

Published by Javiani 11 months ago

Change Log

✓ Stabilizing template system shared variable through child components.
✓ Adding new feature innerHTML that will make possible to update a component with html string instead of an object, using dom diffing for performance. Useful for server-side oriented UI, like htmx.

Use case:

export const myComponent ({ main, on, innerHTML }) { 
    
    main( _ => { 
        on('click', 'button', updateUI)
    })
    
    const updateUI = () => {
       fetch('my-service/ui/user-ui-updated')
           .then( response => response.text() )
           .then( html => innerHTML( html ) )
    }
}
Jails - v5.4.0 - Minor Update

Published by Javiani about 1 year ago

Change Log

  • Fixing Html Encoding Inconsistences in some Edge Cases.
  • Exporting html interface to work with Template Strings and get benefit of html tagged functions syntax highlighting on code editors.
    Ex.
import { html } from 'jails-js'

export const Template = (data) => {
   return html`<h1>My title</h1>`
}

Jails - v5.3.0 - Minor Update

Published by Javiani about 1 year ago

Change Log

  • Improving performance scanning on page load.
  • Changing main to a new pattern, deprecating functions list, using void function instead. ( Simplicity )
Jails - v5.2.0 - Minor Update

Published by Javiani about 1 year ago

Change Log

  • Exposing pub/sub interface in Jails Api
  • Improving html-model strategy.
  • Adding target option to jails.start
  • Fixing types on types.d.ts
  • Changing webpack to vite bundler
Jails - v5.1.6 - Patch Update

Published by Javiani about 1 year ago

Change Log

  • Reverting the encoding removal, it was necessary for some edge cases.
  • Trimmed classes to avoid multiple empty spaces in html-class directive.
Jails - v5.1.5 - Patch Update

Published by Javiani about 1 year ago

Change Log

  • Replacing the intermediate internal template system tag delimiters to avoid collisions with other languages inside component innerHtml source code.
  • With the above change, it was removed intermediate template encoding step.
Jails - v5.1.4 - Patch Update

Published by Javiani about 1 year ago

Change Log

  • Bugfix - Falsy values where not being shown on html- properties.
    Ex. html-value="counter" - It was not working for cases when counter is 0.
Jails - v5.1.3 - Patch Update

Published by Javiani about 1 year ago

Change Log

  • Fixed: html-model was not working for some scenarios.
  • Fixed: $index special variable was not being created on object iterations.
Jails - v5.1.2 - Patch Update

Published by Javiani about 1 year ago

Change Log

  • Improving template evaluation for single quotes on html template