Releases: google/playground-elements
v0.14.2
v0.14.1
v0.14.0
v0.13.0
Changed
-
Node package exports
are now supported when resolving dependency modules.The
module,import, anddevelopment
conditions
are enabled.Note this change should not theoretically be BREAKING, but this release is
versioned with a major increment because there a risk of breakage in practice
due to misconfiguredpackage.jsonfiles, differences betweenprodand
devmodes, etc.
Added
- Added
modifiedproperty to<playground-project>and<playground-ide>
which indicates whether the user has modified, added, or removed any project
files. Resets whenever a new project is loaded.
v0.12.1
v0.12.0
Fixed
-
Fixes duplicate module errors by canonicalizing all import specifiers. Import
specifiers are now canonicalized by version number and default module. This
applies both to local project files, and throughout the entire external
dependency tree. -
Import maps now apply to modules in external dependencies, not just to local
project files. -
The TypeScript compiler can now deal with multiple versions of the same
dependency. Previously, if the import graph included two versions of the same
package, only one arbitrary version of the types would be compiled. This
caused various errors and missing type issues.
Changed
-
If the project contains a
package.jsonfile, then its
dependencies
field will be used to determine the version of dependencies (just like how NPM
works locally). -
Dependencies are now served from the special
"<service-worker-scope>/node_modules/..."path, instead of directly from
https://unpkg.com/...?moduleURLs. Behind-the-scenes, dependencies are still
fetched from unpkg, but they are now themselves transformed to ensure correct
specifier canonicalization. -
BREAKING Due to large changes to the way dependencies are handled, there
is some risk of breakage due to subtle behavior changes that existing
configurations may be relying on. Therefore, this release is versioned with a
major increment.
v0.11.1
v0.11.0
Fixed
-
Playgrounds now ensure that the service worker they are connected to have a
matching version. Fixes issues relating to playgrounds being broken for some
time after an upgrade. -
The
--playground-tab-bar-font-sizeCSS custom property now behaves as
documented, and defaults to14px. -
The
--playground-floating-controls-colorCSS custom property now behaves as
documented. -
Fix missing
.jsextension from import inbuild.jsthat may have broken
Webpack and other builds. -
The hover effect and touch area for tabs in the tab bar are no longer offset
by the height of the active tab indicator. -
Fix bug that caused failures to load
d.tsfiles and "Could not resolve
module specifier" console errors when using import maps.
Changed
-
BREAKING
playground-base-urlis now resolved relative to the
import.meta.urlof the module containing the definition of
<playground-project>, instead of relative todocument.location.hrefas
before. This means that.can now be used to refer to the local playground
installation directory. -
The service worker now sets the
Origin-Agent-Cluster: ?1heading on all
responses, to encourage browsers to allocate a separate process or thread for
Playground preview iframe under certain conditions. See the Process
isolation
section of the README for more details. -
It is now possible to change the
font-familyof the tab-bar using a
::part(tab-bar)selector.
v0.10.1
v0.10.0
Added
-
Adds
--playground-code-paddingand--playground-code-line-paddingfor
configuring code editor padding. -
Bare module specifiers are now transformed in dynamic
import()statements.
Changed
-
BREAKING The
src/directory is no longer published to NPM. -
BREAKING
.jsfiles are no longer compiled by TypeScript, so they cannot
contain types, decorators, or other TypeScript-specific syntax. -
Previews will now begin loading immediately, instead of waiting for
compilation to completely finish, and each.jsfile is served as it
compiles.