Skip to content

Releases: 11ty/webc

WebC v0.11.3: WebC inside Declarative Shadow DOM

06 Apr 20:48
Compare
Choose a tag to compare
  • Allows WebC content inside Declarative Shadow DOM templates #117
    • Adds webc:nobundle feature to opt-out nodes (and children) from bundling.
    • webc:nobundle is implied on Declarative Shadow DOM templates.
  • Bug fix for custom transforms as slottable content #118
  • Adds a few more tests to the suite for webc:for from @sombriks in #161

Milestone: https://github.com/11ty/webc/milestone/21?closed=1
Full Changelog: v0.11.2...v0.11.3

WebC v0.11.2: Fixes for slottable content

04 Apr 16:52
Compare
Choose a tag to compare
  • Fixed: Slottable content was accessing the wrong component definition for global data access and webc:setup scripts #152 #154

Milestone: https://github.com/11ty/webc/milestone/20?closed=1
Full Changelog: v0.11.1...v0.11.2

WebC v0.11.1: Quick fix for data access on slotted content

31 Mar 17:29
Compare
Choose a tag to compare

Regression quick fix:

  • Slotted content (in a top level component) should have access to global data without using $data, fixes #152

Full Changelog: v0.11.0...v0.11.1
Milestone: https://github.com/11ty/webc/milestone/19?closed=1

WebC v0.11.0: Child Components accessing Global Data

31 Mar 14:51
Compare
Choose a tag to compare

Milestone: https://github.com/11ty/webc/milestone/18?closed=1
Full Changelog: v0.10.1...v0.11.0

⚠️ BREAKING ⚠️ This will affect your component code if you relied on global data from inside of component definitions.

Child components will now need to access global data through a top level $data variable instead of as top level variables. This is important to prevent global data leaking into component data and affecting component logic.

This will not affect pages or top-level WebC components (in Eleventy world, these are *.webc files as Eleventy layouts or in as pages in your input folder). This only affects child components (in Eleventy world, this means files in your components folder, e.g. _components/**/*.webc).

Sorry to have to make this breaking change, but it’s an important one.

Other fixes in this release:

  • Fix for webc:scoped with @keyframes and percentages. #145
  • Fix bug with webc:setup feeding Arrays into webc:for #150

v0.10.1: New built-in `webc.*` helpers

29 Mar 20:19
Compare
Choose a tag to compare
  • Adds webc.escapeText function
  • Adds webc.escapeAttribute function
  • Adds webc.filterPublicAttributes function

Docs for the above: https://www.11ty.dev/docs/languages/webc/#extra-data-for-javascript-render-functions

Milestone: https://github.com/11ty/webc/milestone/17?closed=1
Full Changelog: v0.10.0...v0.10.1

WebC v0.10.0: Declarative Loops and Flow Control

24 Mar 22:24
Compare
Choose a tag to compare

Integrations

Milestone: https://github.com/11ty/webc/issues?q=is%3Aclosed+milestone%3A%22WebC+v0.10.0%22
Full Changelog: v0.9.3...v0.10.0

WebC v0.9.3: 65% Faster

15 Mar 21:43
Compare
Choose a tag to compare

What's Changed

  • Added a WebC component cache
  • Shamefully large performance wins via changes to Node vm.createContext

A special thanks to @marvinhagemeister’s Node profiling recommendation!

How fast is it?

From a large sample WebC project:

Before, using WebC v0.9.2:
> Wrote 2621 files in 21.17 seconds (8.1ms each, v2.0.0)

After, using WebC v0.9.3:
> Wrote 2621 files in 7.24 seconds (2.8ms each, v2.0.0)

From 8.1ms per template to 2.8ms per template!

Integrations

Full Changelog: v0.9.2...v0.9.3

WebC v0.9.2

07 Mar 17:26
Compare
Choose a tag to compare
  • Fixes bug with webc:bucket hoisting (adding to a non-default bucket and then the default bucket should remove code from the non-default bucket)
  • Fixes bug with CSS/JS bundle ordering based on component graph. Code should render in order from leaf components to page, where page CSS/JS is rendered last (e.g. this test case 57f0f11)

Full Changelog: v0.9.1...v0.9.2

WebC v0.9.1

02 Mar 23:09
Compare
Choose a tag to compare
  • Adds support for webc:bucket on any tag and it will cascade to all child content (with automatic hoisting when necessary) #122
  • Adds support for webc:bucket to be dynamic (e.g. :webc:bucket="myJavaScriptData") #120
  • Adds support for globs when passing an Array to WebC.getComponentsMap() #123
  • Adds npm: aliasing support to WebC.getComponentsMap() #123

Full Changelog: v0.9.0...v0.9.1
Milestone: https://github.com/11ty/webc/milestone/14?closed=1

WebC v0.9.0

23 Feb 17:30
Compare
Choose a tag to compare

Features

Fixes

  • More Node.js global support in webc:type="js" #116, #99, #100
  • Fix bug with component rendering mode with leading whitespace on page #115
  • Fix for missing helpers in JavaScript Render Functions (webc:type="js" and webc:type="render")

Full Milestone: https://github.com/11ty/webc/milestone/13?closed=1
Full Changelog: v0.8.0...v0.9.0