Changelog
17.0.0
Nominal types Nominal<string,"Bobril">
.
IBobrilStyleDef
is now not plain string but nominal type.
sprite
without color creates another nominal type ColorlessSprite
. spriteWithColor
now takes only ColorlessSprite
type making it compile time type safe, function for evaluation could be also passed.
New method svg
allows to embed svg in JS source and then use it as ColorlessSprite
. It is not expected to directly use svg
method but instead sprite
and bobril-build will load svg from disk and change that call to this method.
New method svgWithColor
allows to resize previously defined svg or recolor multiple colors not just gray
for which you can still use spriteWithColor
.
When you need to use jQuery selectors with Bobril and you already have nice key
in VDom to use with bbseeker
, you can now enable automatic publishing of keys to classNames by b.setKeysInClassNames(true); b.ignoreShouldChange();
without need to change your application.
Changelog
15.2.0
Fix of small problem in router.
ctxClass now have to inherit from BobrilCtx and call its super constructor. But adding disposables in such constructor works again.
components without ctxClass have their ctx instance of BobrilCtx instead of plain object.
Changelog
15.1.0
Router URLs now does not have last slash when optional parameter is not defined.
Component now inherit from BobrilCtx which save some bytes from bundle.
Changelog
15.0.0
Breaking change - string styles are not anymore supported { tag: 'div', style: 'color: red' }
use objects instead.
Subtle breaking change/optimization - when tsx components render returns Fragment then it is inlined in vdom.
Cleaned up repository from old non npm version. Port old tests.
New dynamic styles feature allowing very efficient update of element inline styles and classes.
<div
style={() => {
let s = b.useState(0);
s((s() + 1) % 101);
return { opacity: s() * 0.01 };
}}
>
Pulsing
</div>
Tsx components can skip component update by returning constant b.skipRender
.
function SkipHello(data: { input: string }) {
if (data.input == "skip") return b.skipRender;
return <Hello input={data.input}></Hello>;
}
Key down up events have key
property (same meaning as KeyboardEvent.key
) and is normalized on IE11 and Firefox.
New polyfills for IE11: new Set(array)
, new Map(array)
Router injectParams
function is exported.