Releases: google/playground-elements
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-size
CSS custom property now behaves as
documented, and defaults to14px
. -
The
--playground-floating-controls-color
CSS custom property now behaves as
documented. -
Fix missing
.js
extension from import inbuild.js
that 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.ts
files and "Could not resolve
module specifier" console errors when using import maps.
Changed
-
BREAKING
playground-base-url
is now resolved relative to the
import.meta.url
of the module containing the definition of
<playground-project>
, instead of relative todocument.location.href
as
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: ?1
heading 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-family
of the tab-bar using a
::part(tab-bar)
selector.
v0.10.1
v0.10.0
Added
-
Adds
--playground-code-padding
and--playground-code-line-padding
for
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
.js
files 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.js
file is served as it
compiles.
v0.9.4
v0.9.3
v0.9.2
Changed
- Playground now executes code on the unpkg.com origin by default, meaning user
code execution is now sandboxed by default. The sandbox URL can still be
changed with thesandboxBaseUrl
property orsandbox-base-url
attribute,
though it is highly advisable to always use a separate and unprivileged
origin.
v0.9.1
v0.9.0
Changed
-
Focusing the editor using the Tab key no longer activates edit mode
immediately. This prevents the Tab key from being trapped, which was an
accessibility problem for keyboard users.Instead, when the editor is focused, users can now press Enter to begin
editing, and Escape to stop editing. A prompt is displayed with these
instructions when focused. Focusing the editor with a mouse click continues to
activate edit mode immediately, as before. -
The editor now uses the CodeMirror
contenteditable
input style, which has
much better screen reader support. -
Line numbers are now annotated with
aria-hidden
so that they are not voiced
by screen readers. -
Increased default
line-height
fromnormal
to1.4em
. -
Added a default
padding-left
of1em
. -
Increased width of cursor from
1px
to2px
. -
Increased default tab
font-size
from0.75rem
to0.8em
; -
Increased default
--playground-bar-height
from35px
to `40px. -
--playground-cursor-color
now defaults to the value of
--playground-code-default-color
. -
--playground-code-gutter-background
now defaults to the value of
--playground-code-background
. -
--playground-code-gutter-margin-right
default changed from1px solid #ddd
tonone
. -
--playground-code-linenumber-color
default changed from#999
to#767676
.
Added
-
Added
playground-styles.css
andplayground-styles.js
which can be imported
to apply Playground styles to server-side rendered code. -
Added
dialog
CSS shadow part tocode-editor
,file-editor
, andide
for
styling modal dialogs that appear over the editor (currently just used for the
keyboard help that shows when the editor is focused using the keyboard). -
Added CSS custom properties:
--playground-code-line-height
:line-height
of code in the editor.--playground-tab-bar-font-size
:font-size
of tabs in the file picker tab
bar.--playground-tab-bar-active-color
: Textcolor
of active file-picker tab.--playground-tab-bar-indicator-color
:color
of the active tab indicator
line (usetransparent
to hide).--playground-tab-bar-active-background
:background
of the active file-picker tab.
-
Added
aria-label
attribute to reload, new file, and file context menu
buttons. -
Added
title
attribute to preview<iframe>
element. -
Added
aria-label
to the preview loading indicator, and set
aria-hidden=true
when the preview is not loading.
v0.8.0
Added
- TypeScript type errors are now displayed inline. Previously, only syntax
errors were displayed. Type errors may take slightly longer to appear than
syntax errors, because they require fetching.d.ts
files and running a more
expensive compiler pass.
Changed
- [BREAKING] Removed
--playground-error-border
property, and updated
inline error style from a dashed border to a red squiggle.