@internetarchive/ia-item-navigator
v2.1.3
Published
Internet Archive's Item Navigator, visually explore an item's contents.
Downloads
772
Maintainers
Keywords
Readme
Internet Archive Item Navigator - theater menu manager
<ia-item-navigator> is a custom web component that makes an item's details theater.
The Item Navigator helps instantiate all of the components one needs to create an item theater:
- side menu
- menu shortcuts
- fullscreen management
- receives/creates a shared resize observer
- receives/shares a
<modal-manager> - slots for custom theater & header loads
The Item Navigator's primary responsibility is to display the side menus, shortcuts, and the theater in browser window immersion "fullscreen".
The main slot is shown by default. If item has no theater, add viewAvailable = false property to show placeholder.
Usage
Generic:
const iaItem = <MetadataResponse>;
<ia-item-navigator .item=${iaItem}></ia-item-navigator>Local Demo with web-dev-server
npm run startTo run a local development server that serves the basic demo located in demo/index.html
Testing with Web Test Runner
To run the suite of Web Test Runner tests, run
npm run testTo run the tests in watch mode (for <abbr title="test driven development">TDD</abbr>, for example), run
npm run test:watchLinting with ESLint, Prettier, and Types
To scan the project for linting errors, run
npm run lintYou can lint with ESLint and Prettier individually as well
npm run lint:eslintnpm run lint:prettierTo automatically fix many linting errors, run
npm run formatYou can format using ESLint and Prettier individually as well
npm run format:eslintnpm run format:prettier