@internetarchive/collection-browser 0.2.12 → 0.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export { CollectionBrowser } from './src/collection-browser';
2
2
  export { SortFilterBar } from './src/sort-filter-bar/sort-filter-bar';
3
+ export {} from './src/models';
3
4
  export { CollectionBrowserLoadingTile } from './src/tiles/collection-browser-loading-tile';
4
5
  export { CollectionTile } from './src/tiles/grid/collection-tile';
5
6
  export { AccountTile } from './src/tiles/grid/account-tile';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "The Internet Archive Collection Browser.",
4
4
  "license": "AGPL-3.0-only",
5
5
  "author": "Internet Archive",
6
- "version": "0.2.12",
6
+ "version": "0.2.13",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.js",
9
9
  "scripts": {
@@ -17,7 +17,8 @@
17
17
  "test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
18
18
  "deploy": "yarn run deploy:run -e $(git branch --show-current)",
19
19
  "deploy:run": "yarn run prepare:ghpages && touch ghpages/.nojekyll && yarn run deploy:gh",
20
- "deploy:gh": "gh-pages -t -d ghpages -m \"Build for $(git log --pretty=format:\"%h %an %ai %s\" -n1) [skip ci]\""
20
+ "deploy:gh": "gh-pages -t -d ghpages -m \"Build for $(git log --pretty=format:\"%h %an %ai %s\" -n1) [skip ci]\"",
21
+ "typecheck": "yarn tsc --noEmit"
21
22
  },
22
23
  "types": "dist/index.d.ts",
23
24
  "dependencies": {
@@ -21,7 +21,7 @@ import type {
21
21
  SortDirection,
22
22
  SortParam,
23
23
  } from '@internetarchive/search-service';
24
- import {
24
+ import type {
25
25
  SharedResizeObserverInterface,
26
26
  SharedResizeObserverResizeHandlerInterface,
27
27
  } from '@internetarchive/shared-resize-observer';
@@ -49,7 +49,7 @@ import {
49
49
  } from './restoration-state-handler';
50
50
  import chevronIcon from './assets/img/icons/chevron';
51
51
  import { LanguageCodeHandler } from './language-code-handler/language-code-handler';
52
- import { PlaceholderType } from './empty-placeholder';
52
+ import type { PlaceholderType } from './empty-placeholder';
53
53
  import './empty-placeholder';
54
54
 
55
55
  @customElement('collection-browser')
@@ -9,11 +9,11 @@ import {
9
9
  } from 'lit';
10
10
  import { customElement, property, state } from 'lit/decorators.js';
11
11
  import { repeat } from 'lit/directives/repeat.js';
12
- import { Aggregation, Bucket } from '@internetarchive/search-service';
12
+ import type { Aggregation, Bucket } from '@internetarchive/search-service';
13
13
  import '@internetarchive/histogram-date-range';
14
14
  import '@internetarchive/feature-feedback';
15
15
  import '@internetarchive/collection-name-cache';
16
- import { CollectionNameCacheInterface } from '@internetarchive/collection-name-cache';
16
+ import type { CollectionNameCacheInterface } from '@internetarchive/collection-name-cache';
17
17
  import eyeIcon from './assets/img/icons/eye';
18
18
  import eyeClosedIcon from './assets/img/icons/eye-closed';
19
19
  import chevronIcon from './assets/img/icons/chevron';
@@ -24,7 +24,7 @@ import {
24
24
  FacetBucket,
25
25
  defaultSelectedFacets,
26
26
  } from './models';
27
- import { LanguageCodeHandlerInterface } from './language-code-handler/language-code-handler';
27
+ import type { LanguageCodeHandlerInterface } from './language-code-handler/language-code-handler';
28
28
 
29
29
  const facetDisplayOrder: FacetOption[] = [
30
30
  'mediatype',
@@ -1,4 +1,4 @@
1
- import { SortDirection, SortParam } from '@internetarchive/search-service';
1
+ import type { SortDirection, SortParam } from '@internetarchive/search-service';
2
2
  import { getCookie, setCookie } from 'typescript-cookie';
3
3
  import {
4
4
  MetadataFieldToSortField,
@@ -7,7 +7,7 @@ import {
7
7
  TemplateResult,
8
8
  } from 'lit';
9
9
  import { customElement, property, query, state } from 'lit/decorators.js';
10
- import {
10
+ import type {
11
11
  SharedResizeObserverInterface,
12
12
  SharedResizeObserverResizeHandlerInterface,
13
13
  } from '@internetarchive/shared-resize-observer';
@@ -1,6 +1,6 @@
1
1
  import { css, html, LitElement } from 'lit';
2
2
  import { customElement, property } from 'lit/decorators.js';
3
- import { TileModel } from '../../models';
3
+ import type { TileModel } from '../../models';
4
4
 
5
5
  import './tile-stats';
6
6
 
@@ -2,7 +2,7 @@ import { msg } from '@lit/localize';
2
2
  import { css, CSSResultGroup, html, LitElement } from 'lit';
3
3
  import { customElement, property } from 'lit/decorators.js';
4
4
  import { collectionIcon } from '../../assets/img/icons/mediatype/collection';
5
- import { TileModel } from '../../models';
5
+ import type { TileModel } from '../../models';
6
6
 
7
7
  @customElement('collection-tile')
8
8
  export class CollectionTile extends LitElement {
@@ -2,10 +2,10 @@
2
2
  import { css, CSSResultGroup, html, LitElement, nothing } from 'lit';
3
3
  import { customElement, property } from 'lit/decorators.js';
4
4
  import { ifDefined } from 'lit/directives/if-defined.js';
5
- import { SortParam } from '@internetarchive/search-service';
5
+ import type { SortParam } from '@internetarchive/search-service';
6
6
 
7
7
  import { formatDate } from '../../utils/format-date';
8
- import { TileModel } from '../../models';
8
+ import type { TileModel } from '../../models';
9
9
 
10
10
  import '../image-block';
11
11
  import '../item-image';
@@ -2,7 +2,7 @@ import { css, CSSResultGroup, html, LitElement, nothing } from 'lit';
2
2
  import { customElement, property } from 'lit/decorators.js';
3
3
  import { ClassInfo, classMap } from 'lit/directives/class-map.js';
4
4
 
5
- import { TileModel } from '../models';
5
+ import type { TileModel } from '../models';
6
6
 
7
7
  import './overlay/icon-overlay';
8
8
  import './overlay/text-overlay';
@@ -2,7 +2,7 @@ import { css, CSSResultGroup, html, LitElement } from 'lit';
2
2
  import { customElement, property, query, state } from 'lit/decorators.js';
3
3
  import { ClassInfo, classMap } from 'lit/directives/class-map.js';
4
4
 
5
- import { TileModel } from '../models';
5
+ import type { TileModel } from '../models';
6
6
 
7
7
  import {
8
8
  baseItemImageStyles,
@@ -1,8 +1,8 @@
1
1
  import { css, html, LitElement } from 'lit';
2
2
  import { customElement, property } from 'lit/decorators.js';
3
- import { SortParam } from '@internetarchive/search-service';
3
+ import type { SortParam } from '@internetarchive/search-service';
4
4
  import { dateLabel } from './date-label';
5
- import { TileModel } from '../../models';
5
+ import type { TileModel } from '../../models';
6
6
 
7
7
  @customElement('tile-list-compact-header')
8
8
  export class TileListCompactHeader extends LitElement {
@@ -1,9 +1,9 @@
1
1
  import { css, html, LitElement } from 'lit';
2
2
  import { customElement, property } from 'lit/decorators.js';
3
- import { SortParam } from '@internetarchive/search-service';
4
3
  import DOMPurify from 'dompurify';
4
+ import type { SortParam } from '@internetarchive/search-service';
5
+ import type { TileModel } from '../../models';
5
6
 
6
- import { TileModel } from '../../models';
7
7
  import { formatCount, NumberFormat } from '../../utils/format-count';
8
8
  import { formatDate, DateFormat } from '../../utils/format-date';
9
9
  import { accountLabel } from './account-label';
@@ -10,14 +10,14 @@ import { ifDefined } from 'lit/directives/if-defined.js';
10
10
  import { join } from 'lit/directives/join.js';
11
11
  import { map } from 'lit/directives/map.js';
12
12
  import { customElement, property, state } from 'lit/decorators.js';
13
-
14
- import { CollectionNameCacheInterface } from '@internetarchive/collection-name-cache';
15
- import { SortParam } from '@internetarchive/search-service';
16
13
  import DOMPurify from 'dompurify';
17
14
 
15
+ import type { CollectionNameCacheInterface } from '@internetarchive/collection-name-cache';
16
+ import type { SortParam } from '@internetarchive/search-service';
17
+ import type { TileModel } from '../../models';
18
+
18
19
  import { dateLabel } from './date-label';
19
20
  import { accountLabel } from './account-label';
20
- import { TileModel } from '../../models';
21
21
  import { formatCount, NumberFormat } from '../../utils/format-count';
22
22
  import { formatDate, DateFormat } from '../../utils/format-date';
23
23
 
@@ -1,12 +1,12 @@
1
1
  import { css, html, LitElement, nothing, PropertyValues } from 'lit';
2
2
  import { customElement, property, query } from 'lit/decorators.js';
3
3
  import { ifDefined } from 'lit/directives/if-defined.js';
4
- import {
4
+ import type {
5
5
  SharedResizeObserverInterface,
6
6
  SharedResizeObserverResizeHandlerInterface,
7
7
  } from '@internetarchive/shared-resize-observer';
8
8
  import type { CollectionNameCacheInterface } from '@internetarchive/collection-name-cache';
9
- import { SortParam } from '@internetarchive/search-service';
9
+ import type { SortParam } from '@internetarchive/search-service';
10
10
  import type { TileDisplayMode, TileModel } from '../models';
11
11
  import './grid/collection-tile';
12
12
  import './grid/item-tile';
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable import/no-duplicates */
2
2
  import { expect, fixture } from '@open-wc/testing';
3
3
  import { html } from 'lit';
4
- import { CollectionBrowser } from '../src/collection-browser';
4
+ import type { CollectionBrowser } from '../src/collection-browser';
5
5
  import '../src/collection-browser';
6
6
  import { MockSearchService } from './mocks/mock-search-service';
7
7
  import { MockCollectionNameCache } from './mocks/mock-collection-name-cache';
@@ -1,9 +1,10 @@
1
1
  /* eslint-disable import/no-duplicates */
2
2
  import { expect, fixture } from '@open-wc/testing';
3
3
  import { html } from 'lit';
4
- import { EmptyPlaceholder } from '../src/empty-placeholder';
5
4
  import '../src/empty-placeholder';
6
5
 
6
+ import type { EmptyPlaceholder } from '../src/empty-placeholder';
7
+
7
8
  describe('Empty Placeholder', () => {
8
9
  it('should render with empty-query placeholder', async () => {
9
10
  const el = await fixture<EmptyPlaceholder>(
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable import/no-duplicates */
2
2
  import { expect, fixture } from '@open-wc/testing';
3
3
  import { html } from 'lit';
4
- import { IconOverlay } from '../src/tiles/overlay/icon-overlay';
4
+ import type { IconOverlay } from '../src/tiles/overlay/icon-overlay';
5
5
 
6
6
  import '../src/tiles/overlay/icon-overlay';
7
7
 
@@ -2,8 +2,8 @@
2
2
  import { expect, fixture } from '@open-wc/testing';
3
3
  import { html } from 'lit';
4
4
 
5
- import { TileModel } from '../src/models';
6
- import { ItemImage } from '../src/tiles/item-image';
5
+ import type { TileModel } from '../src/models';
6
+ import type { ItemImage } from '../src/tiles/item-image';
7
7
 
8
8
  import '../src/tiles/item-image';
9
9
 
@@ -1,4 +1,4 @@
1
- import { CollectionNameCacheInterface } from '@internetarchive/collection-name-cache';
1
+ import type { CollectionNameCacheInterface } from '@internetarchive/collection-name-cache';
2
2
 
3
3
  export class MockCollectionNameCache implements CollectionNameCacheInterface {
4
4
  collectionNamesRequested: string[] = [];
@@ -1,4 +1,4 @@
1
- import { Result } from '@internetarchive/result-type';
1
+ import type { Result } from '@internetarchive/result-type';
2
2
  import {
3
3
  Metadata,
4
4
  SearchResponse,
@@ -1,5 +1,5 @@
1
- import { Result } from '@internetarchive/result-type';
2
- import {
1
+ import type { Result } from '@internetarchive/result-type';
2
+ import type {
3
3
  MetadataResponse,
4
4
  SearchParams,
5
5
  SearchResponse,
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable import/no-duplicates */
2
2
  import { expect, fixture } from '@open-wc/testing';
3
3
  import { html } from 'lit';
4
- import { TextOverlay } from '../src/tiles/overlay/text-overlay';
4
+ import type { TextOverlay } from '../src/tiles/overlay/text-overlay';
5
5
 
6
6
  import '../src/tiles/overlay/text-overlay';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable import/no-duplicates */
2
2
  import { expect, fixture } from '@open-wc/testing';
3
3
  import { html } from 'lit';
4
- import { TileStats } from '../src/tiles/grid/tile-stats';
4
+ import type { TileStats } from '../src/tiles/grid/tile-stats';
5
5
 
6
6
  import '../src/tiles/grid/tile-stats';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable import/no-duplicates */
2
2
  import { expect, fixture } from '@open-wc/testing';
3
3
  import { html } from 'lit';
4
- import { ItemTile } from '../../../src/tiles/grid/item-tile';
4
+ import type { ItemTile } from '../../../src/tiles/grid/item-tile';
5
5
 
6
6
  import '../../../src/tiles/grid/item-tile';
7
7
 
package/tsconfig.json CHANGED
@@ -14,7 +14,8 @@
14
14
  "sourceMap": true,
15
15
  "inlineSources": true,
16
16
  "rootDir": "./",
17
- "declaration": true
17
+ "declaration": true,
18
+ "importsNotUsedAsValues": "error"
18
19
  },
19
20
  "include": ["src", "test", "index.ts"],
20
21
  }