This project adheres to Semantic Versioning.
- Added back in the old map diff algorithm #192
- Improved TS JSX definitions thanks @DrSensor and @heyheyhello 💛
- Do less work when reading a computed() #141 thanks @heyheyhello 💛
- Remove seemingly unneeded code - 0.27.11-beta.0 #143
- Improved TS definitions thanks @heyheyhello and @bree 💛
- Fixed an issue with hydrating components with children.
- Fix template tags for event handlers fix #130
- Removed
sinuous/map/mini
module.
- Permit observables as values in style objects in Typescript + JSX #123 thanks @lynlevenick 💛
- Fix typings in api.s and npm package. Revert JSX's d.ts rename #119
- Removed
sinuous/memo
module. This is available as a standalone module at luwes/memo.
- Typescript definition changes and explaining Sinuous internals #114 thanks @heyheyhello 💛
- Update babel-plugin-htm to 3.0.0 and simplify upstream diff #110 thanks @heyheyhello
- Improve typings in observable, computed, and map #111 thanks @heyheyhello 💛
- Fixed hydrate empty child bug 0d66864
- Fixed hydrate conditional root element for real
- Fixed JSX observable types #105.
- Add lighter but equaly fast
map
. #102 Minimal Todo app is just 2.2kB instead of 2.62kB 🏌️♂️ - Fix hydrate conditional root element w/ children 81cb57c
- Fixed nested fragment issue #88.
- Fixed sample argument issue when
fn
would be an observable.
- Removed explicit cleanup of dom element listeners 0791cf9
- Added observable
on
function #82.
- Added call context to partial attributes
- Fixed hydrate element w/ children bug
- Fixed hydrate regression
- Fixed a treeshake issue #76.
- Fixed data propName scope issue.
- Removed support for IE9 and IE10.
- Use of
Array.from()
in the library (requires a polyfill in IE11) If you need IE11 support it's almost implied you'll need anArray.from()
polyfill. It's used enough in Sinuous to replace the hacky[].slice.call(arrayLike)
. - Golf down bytes in hydrate going from
1.07kB
to989B
⛳️
- Added support for hydrating conditional root elements.
- Fixed sourcemaps by adding
rollup-plugin-sourcemaps
.
- Added insert into empty node support for
hydrate
.
- Fixed nested transactions #66
- Fixed minify bug `._propName
- Fixed observable types #65
- Fixed false positive for clone flag in template.
- Added auto-import pragma option to
sinuous/babel-plugin-htm
. For example:
plugins: [
[
'sinuous/babel-plugin-htm',
{
import: 'sinuous',
},
],
[
'sinuous/babel-plugin-htm',
{
pragma: 'hs',
tag: 'svg',
import: 'sinuous',
},
'svg',
],
];
- Renamed
html
andsvg
todhtml
anddsvg
insinuous/hydrate
.
- Added
sinuous/render
module for top down render functions.
- Fixed an issue where the clearing of a DOM node that was previously pulled out or moved in the DOM cleared siblings before the content.
- Fixed memoizing by adding support for Arrays and DOM nodes to be serialized.
- Fixed
memo
issue.
- Added
sinuous/memo
module.
- Fixed some issues with the new
data
module.
- Added
sinuous/data
module #53 - Improved
sinuous/template
, accepts objects and functions as data.
- Fixed hydrate root props handling.
- Hydrate components support.
- Added element context to accessor calls in
property
andinsert
api.
- Fixed CSS selector escaping in
hydrate
.
- Added types for
context()
and internalapi
methods. - Added tag name selecting in
hydrate
, for example:
hydrate(html` <body onclick="${blur}"></body> `);
- Added type declarations #52
- Added special bundle to display bundle size of Sinuous w/ observable included.
- Use Sinuous api instead of template hooks and golf some bytes 🏌️♂️
- Golf down some bytes in
map
(-68 B) ⛳️
- Fixed memory leak in observable #51
- Add
S
alias for theall
package which is meant to include in your webpage with a script tag.
- Added
all
package for easy use with a script tag.
- Fixed
hydrate
content function that returns a stringable.
- Added implicit root selector to
hydrate
.
- Added sourcemaps to all bundles
- Fixed a minifying error caused by a Terser bug.
See
scripts/rollup/config.js
- Added partial attribute support #40
- Added better support for adjacent text nodes in
hydrate
.
- Fixed babel-plugin-htm
TypeError: Cannot read property '0' of null
.
- Made
property
api accept plain objects.
- Changed map mini import to be
import { map } from 'sinuous/map/mini'
instead ofimport { mini } from 'sinuous/map'
. - Re-named variables in
map
and golfed down the bundle from 1.45kB to 1.19kB, also by removing the fast path for swap backward and swap forward.
- Added basic
hydrate
feature #36 - Disable
observable
cleaning by default inmap
for repeatedtemplate
's.
- Prevented running duplicate nested computations.
- Marked removed children computations as fresh so they skip running.
- Fixed a
transaction
bug which prevent nullish values from being set. - Improved performance by using
Set
for the subscribers #20
- Added
import { computed } from 'sinuous/observable'
whichS
is now an alias for.
- Fixed template scope key actions bug. Impacted performance and incorrect rendering. Visible in JS Framework Benchmark.
- Added
import { mini } from 'sinuous/map'
. It's only 570 bytes heiiii! #32
- Breaking changes
import map from 'sinuous/map'
toimport { map } from 'sinuous/map'
- Fixed same key observe tags in template fix #5
- Added transaction method #21
- Added web ES modules support #27
- Fixed bundling issue
- Fixed Verify
map
disposers index #23 by usingMap
again
- Added HTM's support for HTML comments
- Added out of the box support down to IE9
- Fixed naming issue for umd and iife bundles
- Add observable duplicate edges check
- Replace Map w/ array for
map
disposers
- Upgraded
sinuous/htm
andsinuous/babel-plugin-htm
to latest version.
- Added support for plain array inserts again w/ no size increase.
- Make
map
return a DocumentFragment. - Optimized and re-used code for full replace in
map
.
- Added SVG support.
- Removed plain array inserts. Fragments can be used for this aka
html`
<h1>Title</h1>
<p>Some text</p>
`;
- Prioritized string and numeric values for
insert
.
- Removed array to node support in
insert
. Save some bytes.
- Fixed mixed exports It's not recommended to have a default AND named exports
- Removed multi expressions
- Added minified browser version
.min.js
.
- Removed shorthand tag parser from hyperscript.
- Removed specialized attribute
ref
. No need w/ Sinuous since it returns plain elements. - Removed unneeded api on
h
tag.
- Optimized rollup/terser config for smaller bundle.
- Added
sinuous/htm
andsinuous/babel-plugin-htm
supporting fragments. - Added easy import
import { html } from 'sinuous';
- Removed specialized attribute
bindings
. - Removed specialized Capture syntax.
- Used Sinuous's normalizeArray in
map
, save bytes.
- Removed
classList
property handler, this can be done with a function. - Removed specialized
events
property, HTM supports spread props. - Removed initial execution of non observable event handlers so there is now no need for the extra closure. Fixes #3
- Removed Date, RegExp coercion This can be done in the view.
- Removed
named: true
in rollup config to fixdefault
import.
- Optimized template insert action w/ Text.data
- Changed .mjs to .esm.js to fix submodule issue
- Removed support for the legacy
observable
library It has some limitations:- Not possible to store a function because passing a function as argument of the observable setter acts as the
subscribe
function. Because of this every observable has its ownsubscribe
function. - Needs extra cleanup logic
- Not possible to store a function because passing a function as argument of the observable setter acts as the
- First release