Releases: 11ty/is-land
is-land v5.0.0-beta.5
- Fixes bug with node restoration order when renaming (should be inner -> outer for renames, outer -> inner for original names) causing multiple connectedCallbacks fired on custom elements.
- Breaking: changes
Island.addFallback
callback function parameters (note: most folks aren’t using this). Now:(node, prefix)
and returns a function to be executed when the island is ready.
is-land v5.0.0-beta.4
- Better patterns for static
Island.define()
andcustomElements.define
for using a different tag name (rather than<is-land>
).Island.define(tagName)
API is removed. #32
Full Changelog: v5.0.0-beta.1...v5.0.0-beta.4
is-land v5.0.0-beta.3
- Broadens browser support (thank you @vanarok in #21) and adds (cut the mustard-style) feature test:
- v5.0.0 supports Chrome 71, Firefox 65, Safari 12.1 (slightly modified from v5.0.0-beta.2)
- v4.0.0 supports Chrome 88, Firefox 78, Safari 14
- Fixes #1 allowing folks to rename the custom element tag name.
- Changes manual definition use case to use
?nodefine
query param per https://www.zachleat.com/web/nodefine/ - Simplified demo at https://github.com/11ty/is-land/blob/v5.0.0-beta.3/demo/demo-rename.html
v5.0.0 Milestone: https://github.com/11ty/is-land/milestone/2?closed=1
Full Changelog: v5.0.0-beta.2...v5.0.0-beta.3
is-land v4.0.1
- This release has no production code change impact — it only corrects extra unnecessary build artifacts that were included with the published package (1.28 MB -> 20 KB)
- Adds npm package publishing provenance
Full Changelog: v4.0.0...v4.0.1
is-land v5.0.0-beta.2
- Brotli compressed file size stats: v4.0.0 at
1.61 kB
to v5.0.0 at1.79 kB
- Very large performance gains when using
on:idle
,on:media
, oron:load
conditions. - Fixes bugs with complex Nested is-lands
- Use passive event listeners with
on:interaction
to improve scrolling performance (fixes Lighthouse warning) #20 - Breaking Change affects
<is-land autoinit>
: Removesautoinit
attribute and theis-land-autoinit.js
file. Switch to use framework initialization types (viaIsland.addInitType()
) instead. - Adds
import
attribute support to core plugin (was previously inis-land-autoinit.js
) - Register your own framework initialization types using
Island.addInitType()
and islands must match the appropriate name in the<is-land type>
attribute — examples provided foralpine
,petite-vue
(see below),vue
,vue-ssr
,preact
,preact-ssr
,svelte
, orsvelte-ssr
(Web Components andlit
are supported out of the box).- Notably when using
type
andimport
(e.g.<is-land type import>
)import
attribute targets are not loaded automatically for you:<is-land import="">
:import()
is performed for you<is-land import="" type="">
: you’re responsible forimport()
in your initialization function.
- Notably when using
- Adds
Island.addFallback
API to improve control of fallback content. Example provided for Alpine.js islands (Demo) (without separate<template>
markup) for easier-to-control progressively-enhanced fallback content. - Support renaming
on:
attribute prefix #16 - Adds
dist/is-land.min.js
minimized JS to published code. - Clarify framework support instructions by @dave-kennedy in #28
- Adding SolidJS web component examples #3 by @jake-danton in #24
- Swaps to use Import Maps on Lit, Svelte, and Solid demos to skip bundling on libraries that use bare specifiers on imports.
- Adds GitHub to npm release provenance
Sample Island.addInitType
usage for petite-vue
:
// This code only needs to be added once globally
Island.addInitType("petite-vue", async (node) => {
// Load the library, mount the target node
const { createApp } = await import("https://unpkg.com/petite-vue@0.4.1/dist/petite-vue.es.js");
createApp().mount(node);
});
New Contributors:
Milestone: https://github.com/11ty/is-land/milestone/2?closed=1
Full Changelog: v4.0.0...v5.0.0-beta.2
is-land v5.0.0-beta.1
Skip this one! Both v5.0.0-beta.2 and v5.0.0-beta.3 are now available.
is-land v4.0.0
- Reduces compressed file size by 7% by moving the server framework
autoinit
code into a separate file to streamline the core file for Web Components use.- Breaking change: If you use the
petite-vue
,vue
,svelte
,svelte-ssr
, orpreact
examples, make sure to include or importis-land-autoinit.js
in addition to the coreis-land.js
file.
- Breaking change: If you use the
- Fixes
el.wait is not a function
bug with nested islands and fallback web components.
Full Changelog: v3.0.2...v4.0.0
is-land v3.0.2
- Support new
shadowrootmode="open"
attribute for Declarative Shadow DOM moving forward. Previous methodshadowroot="open"
will continue to work moving forward. Demo of Declarative Shadow DOM with<is-land>
- Adds new WebC component. Use
<is-land webc:import="npm:@11ty/is-land">
to import the component from npm. Read more aboutwebc:import
. - Same Brotli compressed file size as the previous release: 1.73 kB
Full Changelog: v3.0.1...v3.0.2
is-land v3.0.1
- Adds more descriptive export for imports using JavaScript API
- Without bundler:
import { Island } from "./is-land.js";
- With bunder:
import { Island } from "@11ty/is-land";
- Without bundler:
- Previous method still works fine:
- Without bundler:
import "./is-land.js";
- With bunder:
import "@11ty/is-land";
- Without bundler:
Full Changelog: v3.0.0...v3.0.1
is-land v3.0.0
-
Adds support for Declarative Shadow DOM
<template shadowroot="open">
#13 Thank you @e111077!- Example demo
- Learn more at web.dev: Declarative Shadow DOM
- Notably, this does include a tiny (4 lines of code) polyfill for browsers that do not support Declarative Shadow DOM (Firefox and Safari at time of writing).
-
Support community standard
defer-hydration
attribute on custom elements to skip custom element rename step #14 Thank you @dgp1130!defer-hydration
signals to component code that they should skip initialization. They must implement aattributeChangedCallback
to trigger initialization whendefer-hydration
is removed byis-land
(when the island hydrates). You can see a component sample usingdefer-hydration
.
-
<is-land>
without loading conditions (on:
attributes) skip custom element rename step #15 -
Full milestone: https://github.com/11ty/is-land/milestone/1?closed=1
-
Full changelog: v2.0.3...v3.0.0