- doc comments to
router
's functions. exports
field to package.json.
- type of variables parameter in
translate
function. - Building of framework: now it is published as set of ES modules (earlier it was one ES module).
@fluss/core
from dependencies.Object.freeze
method from code.
@fluss/web
from dependencies.
router.reload
function can be prevented from reloading page asrouter.to
function does.
- typos in doc comment of inner
navigate
function.
prefix
property fromrouter
global configuration.
Router
class is transformed into namespacerouter
.container
property ofRoute
object cannot be type ofundefined
. Though while adding routes torouter
this property is optional.- Signature of
router.add
function:router.add(...routes)
.
- Abstract
WebComponent
class for creating custom components. data-ignored
boolean attribute for marking elements, that must not be checked for structure difference.- Rerendering template of custom element on changing attributes.
- Ability to update properties of html element and related attributes (by example
value
inHTMLInputElement
) via attribute-like syntax. - Ability to prevent navigation to route in
before
route hook.
html
function returns now onlystring
value.Route.view
method returns now onlystring
value.- Event listeners and values of boolean attributes (prepended by
?
) must not be surrounded by'
or"
now. - Add - symbol between
data-event-id
prefix and event number. - Rename basePrefix of
Router
configuration property to prefix and baseContainer to container. Router.current
returns Readonly now.I18n.languagesTags
is of ReadonlyArray now.- Convert
I18n
class toi18n
namespace. - Allow declaring multiple hooks of the same type in one element.
- Make
parameters
property ofRoute
object obligatory. defineWebComponent
has only two parameters: custom element's name and class (WebComponent
) that describe its behavior.
- Invoking update hooks on changing library attributes:
data-hook-id
attributes anddata-event-id
attributes. - Make types of parameters that can be passed to
html
function stricter. - Updating elements that have no children.
- Assinging same value (if value is object) and same literal to state will not cause rerendering.
- Deleting absent property from state does not throw an error and does not cause rerendering.
- Fetch stylesheets on new route with proper route's path.
- CommonJS bundle.
Component
class.State
interface, now parent type of state isobject
.registerCss
function andConfig
class.
- Web components now must be registered by
defineWebComponent
function. Defining custom elements in template is no longer supported.
- Invoking hook on element that contains comment node if last one was changed.
- Defining base prefix for paths.
configure
method toRouter
.
- Implement new path to RegExp functionality, so
Route
's path can now be only type ofstring
. - Move docs to https://yevhenkap.github.io/ site.
container
getter and setter fromRouter
.rendered
hook (as it became the same asmounted
).
- Hook's invocation flow. Now they will be called after DOM is constructed, due to fix rerendering bug.
- Diffing attributes algorithm: in some circumstances missing attributes was not added to nodes.
- Removing old event listeners from elements and attaching new ones.
rendered
hook was invoked on every changes made to html.
before
andafter
route hooks are invoked on reloading page now.
mounted
,rendered
,updated
andremoved
hooks to template.
after
andbefore
methods ofRoute
object can be syncronous now.beforeBuild
andafterBuild
methods ofComponent
object can be syncronous now.template
method ofComponent
object can return plain string now.
- Replacing text node by element node and vice versa.
- Library now exports
translate
function as alias toI18n.translate
.
- Popstate event listener throws an error when navigating to any link, that does not set state object.
- Replacing nodes without children (
img
,input
etc) if they do not have any changes.
- Update text nodes only if there is difference.
- Updating text nodes, if they have element nodes as siblings.
- Instance of
Component
now handled properly as child inArray
.
- Bump packages.
registerCss
funtion now returns function, that allow unregister css.
index.d.ts
file now does not contain module declaration.
reload
method ofRouter
returns now Promise.setLanguage
method ofI18n
returns now Promise.
- Remove
customElement
from TS's declaration file. - Add ability to add spaces between separators in custom element declaration.
render
method - Unhandled Promise rejection error.
Config
class withcssRootFolder
property.
- Add inner methods for creatings DOM elements.
- Rewrite styles.mjs in functional way.
- TypeScript definition file.
- Improve inner structure of
I18n
class.
- Improve inner structure of code.
- Changing bundler from
gulp
torollup
. - Add CommonJS version of framework.
customElement
function from exports.
view
inRoute
can now returnPromise<string>
also.
- Creating custom element directly from
html
template.
- Using
customElement
directly. In next version this function will not be exported from library.
before
andafter
hooks to routes.
- Breaking changes!: remove ability to load styles is
Component
's constructor. - Add
styles
method toComponent
class. - Sort imports on name length.
- Use
Reflect
increateState
function. - Change
lang
attribute in<html>
onI18n.setLanguage
method.
- Remove unnecessary and buggy
isBrowser
andisServer
.
- Add
registerCss()
function. - Change mechanism of style loading. Breaking changes!:
Component
's constructor accepts now object with css's value of type string or string[]. Values must be names of css files with or without extension.
- Add
customElement()
function. - Remove duplicate of TrustedTypes definition.
- Remove unnesessary attribute regexp.
- Make
Router.to
andRouter.reload
asyncrounous. - Write tests for
Router
.
- Make
Router.current
non void parameter. - Remove replacing
window.history.state
on reloading current window (state did not change so it is unnesessary action).
- Add property
Router.container
and makecontainer
property in route object optional.
- Write more tests.
- Add more type checking of type of variable that passed to
html()
function. - Update README.
- Add type checking for translated value in
I18n.translate()
. - Small changes in
Router
class (new routes store).
This version fix bug with class properies in 0.8.1 version!
- Make
Router.current
as getter. - Add
I18n.currentLanguage
getter. - Handle error when current language is unset.
- Handle error when path passed to
I18n.translate
points tonull
,undefined
andArray
. - Update typing and README.
- To
Router.current
field is added property parameters that contains path parameters if there will be ones. - Update README.
- Fix bug with
Component
inhtml()
function - it did not executebeforeBuild()
andafterBuild()
methods. - Make
html
,template()
,beforeBuild()
andafterBuild()
asyncronous. This is not breaking change - code from 0.7.5 will work without changes. - Update README.
- Add ability to pass styles as object to style attribute.
- Fix typos in README.
- Fix checking of the type of variable that are used by elements diffing.
- Remove exessive code from
Router.back()
andRouter.forward()
methods. - Add ability to navigate through browser's back and forward buttons.
- Add options optional parameter to
Router.to()
method.
- Fix diffing DOM when child of element is textContent. Now if it still the same - textContnent of old element is not replaced.
- Add support for
trustedTypes
. - Simplify internal
render()
function.
- Add possibility to pass variables to
I18n.translate()
method. - Update README.
- Add trap for
delete
operator to state. - Update README.
- Update devDependencies.
- Completely rewrite template part of framework. Now instead of separate functions
(
a(...)
,div(...)
) templates are created as template literals (html function). - Update README.
- Fix
back()
andforward()
methods ofRouter
class. - Update typings.
- Rewrite node classes to plain functions (
new A(...)
toa(...)
and so on.). - Replace
I18n.getLanguagesTags(): string[]
method withI18n.languagesTags: string[]
getter. - Update typings.
- Update README.
- Add
I18n.getLanguagesTags(): string[]
method.
- Fix typo in
flow-typed/edelweiss.js
- Make all methods and properties of
Router
andI18n
classes static. - Add
Router.add(routes: Route | Route[])
method. - Add
I18n.add(languages: Languages, initial?: string)
method. - Remove
onChange
function from state object. NowcreateState
returns plain state object. - Remove
render
function from export. UseRouter
instead. - Improve README.
- Add
I18n
class that repersents localization functionality. - Add log when container does not exist on the page in
render
. - Add I18n section to README.
- Minify distributed code.
- Add build system
gulp
.
- Make possible to reload current page without returning to home page. Or open specific route from address bar.
- Add errors in
State
if some needed properties are missing or used do not fully.
- Fix typos in README.
- Change signatures of all classes that inherits from
ENode
(exceptCustom
). Now they stricter limit its options. - Make 6 separate headings classes.
- Change asyncronous functions to syncronous in
Component
,render
and inENode
. - Implement rendering based on difference of old DOM and new DOM.
- Cnhange signature of
onChange
function ofcreateState
. - Write more info to README.
- Add CHANGELOG.
- Fix bug with rendering nested elements.
- Add some documentation.
- Creates all main components of framework.