Skip to content

Releases: google/playground-elements

v0.6.3

25 Mar 03:27

Choose a tag to compare

Added

  • Added optional hidden property/attribute which prevents a file from being
    displayed in the tab bar.

  • Added support for JSON files with syntax highlighting.

  • Added extends property 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 label was ignored in tab bar.

v0.6.2

03 Mar 03:08

Choose a tag to compare

Added

  • Added content and contentType as 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

02 Mar 05:14

Choose a tag to compare

Added

v0.6.0

19 Feb 21:35

Choose a tag to compare

  • [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 the preserve-whitespace attribute.

Added

  • Added --playground-floating-controls-color to control the highlight color of
    buttons and text inputs in floating add/remove/rename file controls. Defaults
    to var(--playground-highlight-color, #6200ee).

Fixed

  • Playground can now be imported from Skypack.

  • Fix bugs where --playground-tab-bar-background and
    --playground-tab-bar-foreground-color did not apply correctly.

v0.5.0

30 Jan 17:14

Choose a tag to compare

Changed

  • [BREAKING] When both projectSrc and files are set, it is now the most
    recently set
    property that wins. Previously, files always won.

  • <playground-preview> now auto-reloads after 300ms, previously 500ms.

Added

  • <playground-project> now emits a compileStart and compileDone event.

Removed

  • [BREAKING] <playground-project> no longer emits a contentChanged event.

v0.4.3

22 Jan 03:47

Choose a tag to compare

Fixed

  • Do not add ?module parameter to import map URLs for bare module specifiers,
    only to fallback unpkg.com URLs.

  • Prevent z-index issues with CodeMirror scrollbars and other elements by
    using a separate stacking context.

Changed

  • <playground-preview> now has a default label (called location) of
    "Result".

v0.4.2

21 Jan 17:45

Choose a tag to compare

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 scopes are not yet supported, only imports.

    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 .js files are now resolved in the same way as .ts
    files.

v0.4.1

15 Jan 21:41

Choose a tag to compare

Fixed

  • Fixed <playground-file-editor> not always displaying initial file.
  • Fixed editable-file-system attribute name (was editableFileSystem).
  • Fixed <playground-ide> not stretching <playground-file-editor> vertically.

v0.4.0

15 Jan 21:41

Choose a tag to compare

Added

  • Added editableFileSystem property (editable-file-system attribute) to
    <playground-ide>. When true, 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 the noFilePicker property 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

08 Jan 18:54
1f5bc96

Choose a tag to compare

Added

  • Added files property 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 files always 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.