Releases: zeixcom/ui-element
Releases · zeixcom/ui-element
v0.12.2
What's Changed
- Feature/mutation observer by @estherbrunner in #50
- docs: update docs for version 0.12.2 by @estherbrunner in #51
- chore(dependencies): update Cause & Effect to v0.13.2 for a signal propagation bugfix by @estherbrunner in #52
Full Changelog: v0.12.0...v0.12.2
v0.12.0
What's Changed
- Feature: switch to property accessors instead of Map interface by @estherbrunner in #49
Full Changelog: v0.11.0...v0.12.0
Version 0.11.0
Breaking Changes
- More consistent naming:
states
->init
as object ofStateInitializer
->SignalInitializer
- Export only previous
*WithFallback()
variants of attribute parsers to reduce surface API and confusion:asString()
,asInteger()
,asNumber()
,and asJSON()
New Features
- Update to Cause & Effect 0.12.4 to take advantage of new features (improved error und unset handling) and bugfixes
- Re-export whole API of Cause & Effect: new types
MaybeSignal
,ComputedCallbacks
,EffectCallbacks
and functionwatch()
- New bundled effects
dangerouslySetInnerHTML()
andinsertTemplate()
- Functions in effects are of new type
ValueProvider
, allowing to access index without having to re-wrap partially applied effect functions that broke type inference - Better error messages that include the instance of objects and type of primitive values
- Export functions to update a State as
StateUpdater
Bugfixes
- Fix bug for
RESET
with fallback value ofnull
: should also trigger delete in ofupdateElement()
Documentation and Tests
- New API reference generated by TypeDoc
- Live reloading while
docs:serve
is running - Update examples in tests and docs and README to use new API
- Update test cases to use
RESET
instead ofnull
, as Cause & Effect now enforces non-nullability - Add test cases for new bundled effects
What's Changed
- feat: add hot module reloading for documentation development by @fabianhaef in #45
- docs: update rating-stars example to use custom event by @estherbrunner in #46
- docs: add API reference generated by TypeDoc by @estherbrunner in #48
- feat: cleanup of API for version 1.0rc1 (0.11.0) using Cause & Effect 0.12.4, bugfixes, alignment of examples in docs and tests by @estherbrunner in #47
New Contributors
- @fabianhaef made their first contribution in #45
Full Changelog: v0.10.1...v0.11.0
Version 0.10.1
What's Changed
- docs: fix todo-count example by @estherbrunner in #42
- docs(data-flow): simplify todo-app by @estherbrunner in #43
- Feature/type inference by @estherbrunner in #44
Full Changelog: v0.10.0...v0.10.1
Version 0.10.0
What's Changed
- docs: update example on installation & setup page by @estherbrunner in #23
- docs: quick fixes for installation-setup.html by @estherbrunner in #24
- V0.8.5 docs by @estherbrunner in #25
- V0.8.5 docs by @estherbrunner in #26
- docs: tab-list and accordion-panel examples by @estherbrunner in #27
- docs: examples for inputs and code-block by @estherbrunner in #28
- docs: todo-app and lazy-load examples by @estherbrunner in #29
- test: refactor lazy-load example by @estherbrunner in #31
- Feature/docs by @estherbrunner in #32
- chore: update project name and location by @estherbrunner in #33
- Feature/docs by @estherbrunner in #34
- Feature/docs by @estherbrunner in #35
- Feature/docs revise introduction, installation & setup, core concepts and introduce markdown based SSG for docs by @estherbrunner in #36
- fix: broken links in docs menu by @estherbrunner in #37
- Feature/docs by @estherbrunner in #38
- docs: about & community page, CONTRIBUTING.md by @estherbrunner in #39
- Feature/refactor event handling by @estherbrunner in #40
- docs: new README by @estherbrunner in #41
Full Changelog: v0.8.5...v0.10.0
Version 0.8.5
What's Changed
Bugfixes
- fix
setStyle()
auto-effect - fix context signals not updating
Minor New Features
- better error handing in derived signals;
derive()
is now exported from main bundle as well - allow all auto-effects to revert to server-rendered state by setting signal to
undefined
- explicitly remove attribute or style property by setting signal to
null
- parse fallback value of string auto-effects (
setText()
, maybesetProperty()
,setAttribute()
, andsetStyle()
) according tostatic attributeMap
Documentation and Tests
- prepare full documentation (unfinished yet)
- add more tests for context and auto-effects
Full Changelog: v0.8.3...v0.8.5
Version 0.8.3
What's Changed
New Features
- Built-in auto-effects now accept anonymous functions for passing state (besides state keys)
- Map interface methods on UIElement now accept anything for keys (not just PropertyKey)
Breaking Changes
dispatch()
auto-effect has been renamed toemit()
as in common EventEmitter libraries
Other Changes
- Under the hood optimizations for context and functions connecting to the UI interface
- Use lastest API in test cases
- Pull Request: Feature/0.8.3 by @estherbrunner in #15
Full Changelog: v8.0.2...v0.8.3
v8.0.2
What's Changed
Bugfixes
- AttributeParser now expects unknown[] as return value to avoid issues with partially applied parser functions
- fixed bug in scheduler where updated state was skipped if another update was already scheduled for the same property
- slightly optimized scheduler by @estherbrunner in #14
Full Changelog: v0.8.1...v8.0.2
v0.8.1
What's Changed
- Feature/0.8.0 embrace functional programming for core by @estherbrunner in #12
- Bugfix/v8.0.1 by @estherbrunner in #13
New Features
- Scheduler that can deduplicate DOM Instructions on same element property in the same tick
- Chainable UI API for everything with elements (using arrays):
this.self
,this.first(selector)
andthis.all(selector)
pass(stateMap)
is now a partially applied function to connect to the chainable UI interfaceon(event, handler)
andoff(event, handler)
are now partially applied functions to connect to the chainable UI interface- Auto-Effects also connect to the chainable UI interface:
setText(state)
setProperty(key, state=key)
setAttribute(name, state=name)
toggleAttribute(name, state=name)
toggleClass(token, state=token)
setStyle(prop, state=prop)
dispatch(event, state=event)
- All attribute parser functions and functions to connect to the new chainable UI interface are now part of core
Breaking Changes to Core Features since v0.7.3
attributeMap
is now also static (likeobservedAttributes
,providedContexts
,consumedContexts
this.pass(element, stateMap)
is nowthis.[first|all](selector).map(pass(stateMap))
– connecting the the new chainable UI interface
Breaking Changes to Non-Core Features since 0.7.3
- All methods to connect to the new chainable UI interface were removed (and some renamed) from the old UI interface
- Function components
component(tag, componentProps, connected)
are no longer supported – use standard class-based web components instead
Full Changelog: 0.7.3...v0.8.1
0.7.3
What's Changed
- Feature/v0.7.3 by @estherbrunner in #11
- Bugfixes and tests for context provider and consumer
- Bugfixes and tests for attribute parser functions
- Better types
Breaking Changes since 0.7.2 to Core Feature
- Removed possibility to supply Array as
attributeMap
value; this means: attribute name is always also the key for states; as it is your custom element, name the attributes like you want your states to be named => this reduces complexity and possible confusion - Removed possibility to supply
contextMap
altogether; this means: context key is always also the key for states; derive other states from this for transformations with a new state key => this reduces complexity and increases consistency across components
Breaking Changes since 0.7.2 to Non-Core Features
component()
now takesUIComponentProps
as second argument, an object of:attributeMap
:UIAttributeMap
– what used to be the seconds argument in version 0.7.0 to 0.7.2consumedContexts
: array of context keys to be assigned tostatic consumedContexts
providedContexts
: array of context keys to be assigned tostatic providedContexts
Full Changelog: v0.7.2...0.7.3