Sprites.Media.Library

The all-media library browser: the live table of every saved item across the media types, with a media-type filter above and the pager below. It mirrors Sprites.Media.Sprite.Browser, but spans all media, and reuses that browser's generic row parts over the shared envelope fields every media stores.

Sprites.Media.Library

Sprites.Media.Library.Browser Void

Sprites.Media.Library.Browser(hostId)

The all-media library page: the live table of the user's saved items across every media type, with the media-type filter above and the pager below. It mounts into the host element as a column, reads the store, and stays live as items are saved here or in another tab, showing a spinner until the first read lands. Each row shows its media and links into that media's editor; paging runs client side over the full filtered list. It shares Sprites.Media.Sprite's page size and pager. One call builds the whole page.

InputTypeDescription
hostIdStringThe id of the element to mount the browser into.

Returns nothing.

Sprites.Media.Library.Browser('ex-media-library-browser');
The whole library page from one call, live against your saved media.

Sprites.Media.Library.Medias Array

Sprites.Media.Library.Medias

The media types the filter dropdown offers, each a [value, label] pair. The value is the media key the store holds; the label is the nav's name for it.

Returns an array of [value, label] pairs.

const count = Sprites.Media.Library.Medias.length;
Sprites.Ui.Dom.Text('media types = ', count);
The seven media types the filter offers.

Sprites.Media.Library.Paths Object

Sprites.Media.Library.Paths

The URL path segment for a media key, where a key differs from its folder. Keys left out use their own name as the path. A pure value helper of a plain string.

Returns an object mapping a media key to its path segment.

const path = Sprites.Media.Library.Paths.threed;
Sprites.Ui.Dom.Text('threed path = ', path);
The threed key maps to the 3d folder.