Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Releases: beforesemicolon/markup

Release 1.0.0

30 Nov 23:31

Choose a tag to compare


Markup finally V1 with a lot of simplification and improvements.

const [count, setCount] = state(0);

const incCount = () => setCount(prev => prev + 1);
const decCount = () => setCount(prev => prev - 1);

const temp = html`
<p>Count:${count}p>
<button type="button" onclick="${incCount}">+button>
<button type="button" onclick="${decCount}">-button>
`;

temp.render(document.body);

New Stuff

  • Now you create side effects for your state, and it supports a return value of any type for tracking and caching
  • Support for object attribute which allows for dynamic attribute setting
  • introduces onMove lifecycle for when the template is moved
  • introduces parentNode property
  • introduces the insertAfter method as a way to render the template
  • create docs website from .md files
  • introduces the @beforesemicolon/router

Improvements

  • auto detect state usage and automatically handle template
  • state only broadcasts when values change
  • state updates are batched
  • optimize render and DOM elements creation where needed
  • calling lifecycles multiple times will no longer keep all callback functions. only the last one will be used
  • improves performance and internal logic with cached templates, easy cleanups, badged state updates, and more
  • extend repeat to accept Set, Map, and object literals
  • update builder to use @bfs/builder
  • improve@bfs/WebComponent packages with new Markup
  • improves suspense to run with template rendering instead of on definition

Deprecated

  • deprecates helper and Helper. Now you can just create functions that use state inside and they will be reactive by default.
  • deprecates attr prefix and dotted attributes, e.g: class.active="...", style.primary="..." as now these can dynamically be set with injected function values
  • deprecates onDestroy. it can be provided as the return value of onMount method
  • changes event listeners options syntax from
    to
  • renamed nodes property to childNodes

What's Changed

Full Changelog: 0.15.0...1.0.0

Contributors

ECorreia45 and dependabot
Assets 3
Loading

0.18.0

20 Apr 17:15

Choose a tag to compare

What's Changed

  • restrict unmount for only mounted components
  • Removes the need to use the attr. prefix in more scenarios. Now attr. is only needed when you don't have piped conditions
  • fixes setting and removing empty class error
  • improve attr handling in general
  • Bump the npm_and_yarn group across 1 directories with 1 update by @dependabot in #12
  • Next by @ECorreia45 in #13
  • deprecate the "executable" concept for the "dynamic value" concept instead.
  • increase test coverage
  • reduce client bundle size
  • remove the cached nodes when unmounted. Un-mounting clears all and mounting set all up again
  • simplify internal logics

Fix bugs related to:

  • tracking templates when using deeply conditionally nested templates
  • rendered nodes, causing the template to have an inaccurate track of currently rendered nodes

Full Changelog: 0.15.0...0.18.0

Contributors

ECorreia45 and dependabot
Loading

Release 0.15.0

31 Dec 21:15
c16b038
This commit was created on GitHub.com and signed with GitHub's verified signature. The key has expired.
GPG key ID: 4AEE18F83AFDEB23
Expired
Verified
Learn about vigilant mode.

Choose a tag to compare

  • Further removes the need to specify the attr. prefix for conditional attributes
  • Fixes internal issues and improve attribute handling in general
Loading

Release 0.14.1

25 Dec 07:44
4a28a63
This commit was created on GitHub.com and signed with GitHub's verified signature. The key has expired.
GPG key ID: 4AEE18F83AFDEB23
Expired
Verified
Learn about vigilant mode.

Choose a tag to compare

New template lifycycles onMount, onDestroy, and updated onUpdate
Check Docs

What's Changed

New Contributors

Full Changelog: https://github.com/beforesemicolon/markup/commits/0.14.1

Contributors

ECorreia45 and dependabot
Loading