Skip to content

Releases: google/playground-elements

v0.11.1

10 Aug 00:05
Compare
Choose a tag to compare

Added

  • Added MIME-type detection for the following project file extensions: gif,
    ico, jpeg, jpg, mid, midi, mp3, png, svg, weba, webm,
    webp.

v0.11.0

28 Jul 20:29
13e6bf9
Compare
Choose a tag to compare

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 to 14px.

  • The --playground-floating-controls-color CSS custom property now behaves as
    documented.

  • Fix missing .js extension from import in build.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 to document.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

14 Jul 23:11
ea5758c
Compare
Choose a tag to compare

Changed

  • Bumped MWC dependency versions.

v0.10.0

01 Jul 16:24
0756433
Compare
Choose a tag to compare

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

18 May 20:57
98dda80
Compare
Choose a tag to compare

Fixed

  • Fixed timeouts when using the default unpkg.com service worker origin,
    caused by comlink versions being out-of-sync between local components and
    remote service worker.

Added

  • Added readonly property to <playground-file-editor>.

v0.9.3

05 May 20:53
Compare
Choose a tag to compare

Changed

  • Error tooltips now follow --playground-code-font-family.
  • Optimized the UX for fast compile and display by switching to a leading edge
    debouncer and eliminating the minimum display time for the loading bar.

v0.9.2

26 Apr 16:26
Compare
Choose a tag to compare

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 the sandboxBaseUrl property or sandbox-base-url attribute,
    though it is highly advisable to always use a separate and unprivileged
    origin.

v0.9.1

20 Apr 04:59
645e4ac
Compare
Choose a tag to compare

Changed

  • Tab key now inserts 2 spaces instead of a tab character.

Fixed

  • Fixed missing vertical scrollbars.
  • Fixed transparent region between horizontal and vertical scrollbars.

v0.9.0

13 Apr 22:58
Compare
Choose a tag to compare

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 from normal to 1.4em.

  • Added a default padding-left of 1em.

  • Increased width of cursor from 1px to 2px.

  • Increased default tab font-size from 0.75rem to 0.8em;

  • Increased default --playground-bar-height from 35px 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 from 1px solid #ddd to none.

  • --playground-code-linenumber-color default changed from #999 to #767676.

Added

  • Added playground-styles.css and playground-styles.js which can be imported
    to apply Playground styles to server-side rendered code.

  • Added dialog CSS shadow part to code-editor, file-editor, and ide 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: Text color of active file-picker tab.
    • --playground-tab-bar-indicator-color: color of the active tab indicator
      line (use transparent 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

02 Apr 21:48
Compare
Choose a tag to compare

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.