Releases: google/playground-elements
v0.6.3
Added
-
Added optional
hiddenproperty/attribute which prevents a file from being
displayed in the tab bar. -
Added support for JSON files with syntax highlighting.
-
Added
extendsproperty to JSON config file, an optional URL of another JSON
config file to extend from. Useful for setting side-wide defaults.
Fixed
-
Fixed bug where editor did not immediately switch to newly created files.
-
Fixed bug where
labelwas ignored in tab bar.
v0.6.2
Added
- Added
contentandcontentTypeas optional properties of the JSON manifest.
Changed
- License headers shortened to concise SPDX style.
Fixed
- Fixed infinite loop that could occur when switching between two files that
both contain code folding/hiding regions.
v0.6.1
Added
- Added
playground-hideandplayground-foldregion comments that hide and
fold regions of a file, while still compiling and serving them, to help users
focus on the relevant code. See
https://github.com/PolymerLabs/playground-elements#hiding--folding for
details.
v0.6.0
- [BREAKING] Leading whitespace that is common to all lines of slotted
<script>files will now be trimmed, along with empty leading/trailing lines.
To disable this behavior, add thepreserve-whitespaceattribute.
Added
- Added
--playground-floating-controls-colorto control the highlight color of
buttons and text inputs in floating add/remove/rename file controls. Defaults
tovar(--playground-highlight-color, #6200ee).
Fixed
-
Playground can now be imported from Skypack.
-
Fix bugs where
--playground-tab-bar-backgroundand
--playground-tab-bar-foreground-colordid not apply correctly.
v0.5.0
Changed
-
[BREAKING] When both
projectSrcandfilesare set, it is now the most
recently set property that wins. Previously,filesalways won. -
<playground-preview>now auto-reloads after 300ms, previously 500ms.
Added
<playground-project>now emits acompileStartandcompileDoneevent.
Removed
- [BREAKING]
<playground-project>no longer emits acontentChangedevent.
v0.4.3
Fixed
-
Do not add
?moduleparameter to import map URLs for bare module specifiers,
only to fallback unpkg.com URLs. -
Prevent
z-indexissues with CodeMirror scrollbars and other elements by
using a separate stacking context.
Changed
<playground-preview>now has a default label (calledlocation) of
"Result".
v0.4.2
Added
-
Import maps are now supported. This allows customizing the URL that a bare
module specifier resolves to, e.g. to a specific version, or to a different
CDN.Note that import maps currently only apply to the immediate imports of
project source files, not to external transitive dependencies.Also note
scopesare not yet supported, onlyimports.See https://github.com/WICG/import-maps and
https://wicg.github.io/import-maps/ for more information on import maps.Previously, all bare modules resolved to unpkg.com URLs at the latest version.
This continues to be the fallback behavior if no import map is provided, or no
entry in it matches.To specify an import map in a JSON project manifest, add an
importMap
property:{ "files": { "index.html": {}, "my-element.ts": {} }, "importMap": { "imports": { "lit-html": "https://unpkg.com/lit-html@next-major", "lit-html/": "https://unpkg.com/lit-html@next-major/" } } }To specify an import map inline, add a
<script type="sample/importmap">
slotted child:<playground-ide> <script type="sample/importmap"> { "imports": { "lit-html": "https://unpkg.com/lit-html@next-major", "lit-html/": "https://unpkg.com/lit-html@next-major/" } } </script> ... </playground-ide>
Fixed
- Bare module imports in
.jsfiles are now resolved in the same way as.ts
files.
v0.4.1
v0.4.0
Added
-
Added
editableFileSystemproperty (editable-file-systemattribute) to
<playground-ide>. Whentrue, the user will be able to create, delete, and
rename files in the virtual filesystem.- To create a new file: click the "+" icon button in the tab bar.
- To rename a file: click the three-dots menu button on its tab, and select
"Rename". - To delete a file: click the three-dots menu button on its tab, and select
"Delete".
-
Added
<playground-file-system-controls>element which displays popup
menus/dialogs for creating, deleting, and renaming files.
Changed
-
[BREAKING] The tab bar has been factored into a new standalone element
called<playground-tab-bar>. The<playground-file-editor>element no
longer integrates the tab bar, and thenoFilePickerproperty has been
removed. -
[BREAKING] The following CSS custom properties have been renamed:
--playground-file-picker-background->--playground-tab-bar-background--playground-file-picker-foreground->--playground-tab-bar-foreground
-
[BREAKING] The following CSS shadow parts have been renamed:
file-picker->tab-bar
v0.3.7
Added
-
Added
filesproperty to<playground-ide>and<playground-project>. Use
this property to directly get and set the array of project files (e.g. to
save/restore the project state).Note that directly setting
filesalways takes precedence over setting
projectSrc, and both take precedence over slotted children.
Changed
- It is no longer necessary to load the Material Icons font. The reload button
icon is now inlined SVG.
Fixed
- Fix caret placement issues with some dynamic layouts.