@internetarchive/collection-browser 0.1.7 → 0.1.8

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.
Files changed (103) hide show
  1. package/demo/app-root.ts +20 -0
  2. package/dist/{src/waveform-view.d.ts → .nojekyll} +0 -0
  3. package/dist/app-root.js +816 -0
  4. package/dist/demo/app-root.d.ts +2 -0
  5. package/dist/demo/app-root.js +22 -0
  6. package/dist/demo/app-root.js.map +1 -1
  7. package/dist/index.html +23 -0
  8. package/dist/src/assets/img/icons/restricted.d.ts +1 -0
  9. package/dist/src/assets/img/icons/restricted.js +29 -0
  10. package/dist/src/assets/img/icons/restricted.js.map +1 -0
  11. package/dist/src/collection-browser.d.ts +5 -0
  12. package/dist/src/collection-browser.js +51 -20
  13. package/dist/src/collection-browser.js.map +1 -1
  14. package/dist/src/models.d.ts +2 -0
  15. package/dist/src/models.js.map +1 -1
  16. package/dist/src/styles/index.d.ts +8 -0
  17. package/dist/src/styles/index.js +101 -0
  18. package/dist/src/styles/index.js.map +1 -0
  19. package/dist/src/tiles/grid/account-tile.js +14 -1
  20. package/dist/src/tiles/grid/account-tile.js.map +1 -1
  21. package/dist/src/tiles/image/item-image.d.ts +18 -0
  22. package/dist/src/tiles/image/item-image.js +210 -0
  23. package/dist/src/tiles/image/item-image.js.map +1 -0
  24. package/dist/src/tiles/image/waveform-image.d.ts +16 -0
  25. package/dist/src/tiles/image/waveform-image.js +168 -0
  26. package/dist/src/tiles/image/waveform-image.js.map +1 -0
  27. package/dist/src/tiles/item-image.d.ts +7 -5
  28. package/dist/src/tiles/item-image.js +86 -23
  29. package/dist/src/tiles/item-image.js.map +1 -1
  30. package/dist/src/tiles/item-tile-image.d.ts +15 -0
  31. package/dist/src/tiles/item-tile-image.js +68 -0
  32. package/dist/src/tiles/item-tile-image.js.map +1 -0
  33. package/dist/src/tiles/list/tile-list-compact.js +54 -59
  34. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  35. package/dist/src/tiles/list/tile-list.js +25 -22
  36. package/dist/src/tiles/list/tile-list.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/assets/img/icons/restricted.ts +29 -0
  39. package/src/collection-browser.ts +29 -0
  40. package/src/models.ts +2 -0
  41. package/src/tiles/grid/account-tile.ts +14 -1
  42. package/src/tiles/item-image.ts +90 -31
  43. package/src/tiles/list/tile-list-compact.ts +45 -50
  44. package/src/tiles/list/tile-list.ts +22 -21
  45. package/dist/src/assets/img/icons/mediatype/livemusic.d.ts +0 -1
  46. package/dist/src/assets/img/icons/mediatype/livemusic.js +0 -7
  47. package/dist/src/assets/img/icons/mediatype/livemusic.js.map +0 -1
  48. package/dist/src/assets/img/icons/mediatype/photos.d.ts +0 -1
  49. package/dist/src/assets/img/icons/mediatype/photos.js +0 -7
  50. package/dist/src/assets/img/icons/mediatype/photos.js.map +0 -1
  51. package/dist/src/helpers.d.ts +0 -1
  52. package/dist/src/helpers.js +0 -20
  53. package/dist/src/helpers.js.map +0 -1
  54. package/dist/src/mediatype/mediatype-color.d.ts +0 -3
  55. package/dist/src/mediatype/mediatype-color.js +0 -15
  56. package/dist/src/mediatype/mediatype-color.js.map +0 -1
  57. package/dist/src/mediatype/mediatype-display.d.ts +0 -3
  58. package/dist/src/mediatype/mediatype-display.js +0 -86
  59. package/dist/src/mediatype/mediatype-display.js.map +0 -1
  60. package/dist/src/mediatype/mediatype-icon.d.ts +0 -10
  61. package/dist/src/mediatype/mediatype-icon.js +0 -105
  62. package/dist/src/mediatype/mediatype-icon.js.map +0 -1
  63. package/dist/src/mediatype/mediatype-text.d.ts +0 -3
  64. package/dist/src/mediatype/mediatype-text.js +0 -17
  65. package/dist/src/mediatype/mediatype-text.js.map +0 -1
  66. package/dist/src/mediatype/mediatypeConfig.d.ts +0 -3
  67. package/dist/src/mediatype/mediatypeConfig.js +0 -86
  68. package/dist/src/mediatype/mediatypeConfig.js.map +0 -1
  69. package/dist/src/mediatype-icon.d.ts +0 -9
  70. package/dist/src/mediatype-icon.js +0 -78
  71. package/dist/src/mediatype-icon.js.map +0 -1
  72. package/dist/src/sort-filter-bar/img/grid.d.ts +0 -1
  73. package/dist/src/sort-filter-bar/img/grid.js +0 -5
  74. package/dist/src/sort-filter-bar/img/grid.js.map +0 -1
  75. package/dist/src/tiles/list/tile-list-detail.d.ts +0 -7
  76. package/dist/src/tiles/list/tile-list-detail.js +0 -28
  77. package/dist/src/tiles/list/tile-list-detail.js.map +0 -1
  78. package/dist/src/tiles/loading-tile.d.ts +0 -5
  79. package/dist/src/tiles/loading-tile.js +0 -32
  80. package/dist/src/tiles/loading-tile.js.map +0 -1
  81. package/dist/src/utils/format-string.d.ts +0 -2
  82. package/dist/src/utils/format-string.js +0 -7
  83. package/dist/src/utils/format-string.js.map +0 -1
  84. package/dist/src/waveform-thumbnail.d.ts +0 -7
  85. package/dist/src/waveform-thumbnail.js +0 -106
  86. package/dist/src/waveform-thumbnail.js.map +0 -1
  87. package/dist/src/waveform-view.js +0 -2
  88. package/dist/src/waveform-view.js.map +0 -1
  89. package/dist/src/your-webcomponent.d.ts +0 -8
  90. package/dist/src/your-webcomponent.js +0 -38
  91. package/dist/src/your-webcomponent.js.map +0 -1
  92. package/dist/test/mediatype-icon.test.d.ts +0 -0
  93. package/dist/test/mediatype-icon.test.js +0 -3
  94. package/dist/test/mediatype-icon.test.js.map +0 -1
  95. package/dist/test/mediatypeConfig.test.d.ts +0 -1
  96. package/dist/test/mediatypeConfig.test.js +0 -17
  97. package/dist/test/mediatypeConfig.test.js.map +0 -1
  98. package/dist/test/utils/format-string.test.d.ts +0 -1
  99. package/dist/test/utils/format-string.test.js +0 -17
  100. package/dist/test/utils/format-string.test.js.map +0 -1
  101. package/dist/test/your-webcomponent.test.d.ts +0 -1
  102. package/dist/test/your-webcomponent.test.js +0 -23
  103. package/dist/test/your-webcomponent.test.js.map +0 -1
@@ -111,6 +111,13 @@ export class CollectionBrowser
111
111
 
112
112
  @property({ type: Number }) mobileBreakpoint = 600;
113
113
 
114
+ @property({ type: Boolean }) loggedIn = false;
115
+
116
+ /**
117
+ * If item management UI active
118
+ */
119
+ @property({ type: Boolean }) isManageView = false;
120
+
114
121
  /**
115
122
  * The page that the consumer wants to load.
116
123
  */
@@ -984,6 +991,26 @@ export class CollectionBrowser
984
991
  const tiles: TileModel[] = [];
985
992
  docs?.forEach(doc => {
986
993
  if (!doc.identifier) return;
994
+
995
+ let loginRequired = false;
996
+ let contentWarning = false;
997
+ // Check if item and item in "modifying" collection, setting above flags
998
+ if (
999
+ doc.collections_raw?.values.length &&
1000
+ doc.mediatype?.value !== 'collection'
1001
+ ) {
1002
+ for (const collection of doc.collections_raw?.values) {
1003
+ if (collection === 'loggedin') {
1004
+ loginRequired = true;
1005
+ if (contentWarning) break;
1006
+ }
1007
+ if (collection === 'no-preview') {
1008
+ contentWarning = true;
1009
+ if (loginRequired) break;
1010
+ }
1011
+ }
1012
+ }
1013
+
987
1014
  tiles.push({
988
1015
  averageRating: doc.avg_rating?.value,
989
1016
  collections: doc.collections_raw?.values ?? [],
@@ -1009,6 +1036,8 @@ export class CollectionBrowser
1009
1036
  ),
1010
1037
  volume: doc.volume?.value,
1011
1038
  viewCount: doc.downloads?.value ?? 0,
1039
+ loginRequired,
1040
+ contentWarning,
1012
1041
  });
1013
1042
  });
1014
1043
  datasource[pageNumber] = tiles;
package/src/models.ts CHANGED
@@ -23,6 +23,8 @@ export interface TileModel {
23
23
  title: string;
24
24
  viewCount: number;
25
25
  volume?: string;
26
+ loginRequired: boolean;
27
+ contentWarning: boolean;
26
28
  }
27
29
 
28
30
  export type CollectionDisplayMode = 'grid' | 'list-compact' | 'list-detail';
@@ -17,7 +17,7 @@ export class AccountTile extends LitElement {
17
17
  <div class="inner-holder">
18
18
  <div id="header-holder">
19
19
  <div id="title-holder">
20
- <h1>${this.model?.identifier}</h1>
20
+ <h1 class="truncated">${this.model?.identifier}</h1>
21
21
  </div>
22
22
  <div id="avatar-holder">
23
23
  <div
@@ -132,6 +132,19 @@ export class AccountTile extends LitElement {
132
132
  width: 25px;
133
133
  }
134
134
 
135
+ .truncated {
136
+ flex: 1;
137
+ min-width: 0; /* Important for long words! */
138
+ -webkit-line-clamp: 2;
139
+ text-overflow: ellipsis;
140
+ overflow: hidden;
141
+ display: -webkit-box;
142
+ -webkit-box-orient: vertical;
143
+ word-wrap: break-word;
144
+ line-height: 2rem;
145
+ text-align: center;
146
+ }
147
+
135
148
  .stat-icon {
136
149
  height: 10px;
137
150
  width: 10px;
@@ -1,14 +1,7 @@
1
- import {
2
- css,
3
- CSSResultGroup,
4
- html,
5
- nothing,
6
- PropertyValues,
7
- LitElement,
8
- } from 'lit';
1
+ import { css, CSSResultGroup, html, nothing, LitElement } from 'lit';
9
2
  import { customElement, property, query, state } from 'lit/decorators.js';
10
3
  import { ifDefined } from 'lit/directives/if-defined.js';
11
-
4
+ import { restrictedIcon } from '../assets/img/icons/restricted';
12
5
  import { TileModel } from '../models';
13
6
 
14
7
  @customElement('item-image')
@@ -19,30 +12,18 @@ export class ItemImage extends LitElement {
19
12
 
20
13
  @property({ type: Boolean }) isListTile = false;
21
14
 
22
- @state() private isDeemphasize: boolean = false;
15
+ @property({ type: Boolean }) isCompactTile = false;
23
16
 
24
- @state() private isWaveform: boolean = false;
17
+ @state() private isWaveform = false;
25
18
 
26
19
  @query('.item-image') private itemImageWaveform!: HTMLImageElement;
27
20
 
28
- protected updated(changed: PropertyValues): void {
29
- if (changed.has('model')) {
30
- this.setDeemphsize();
31
- }
32
- }
33
-
34
- private setDeemphsize() {
35
- this.isDeemphasize =
36
- this.model?.collections.includes('deemphasize') ?? false;
37
- }
38
-
39
21
  render() {
40
22
  return html`
41
23
  <div class=${ifDefined(this.imageBoxClass)}>
42
24
  ${this.model?.mediatype === 'audio'
43
25
  ? this.waveformTemplate
44
- : this.backgroundImageTemplate}
45
- ${this.tileActionTemplate}
26
+ : this.itemImageTemplate}
46
27
  </div>
47
28
  `;
48
29
  }
@@ -52,12 +33,29 @@ export class ItemImage extends LitElement {
52
33
  }
53
34
 
54
35
  // Templates
55
- private get backgroundImageTemplate() {
36
+ private get itemImageTemplate() {
37
+ return html`
38
+ ${this.isListTile ? this.listImageTemplate : this.tileImageTemplate}
39
+ `;
40
+ }
41
+
42
+ private get tileImageTemplate() {
56
43
  return html`
57
44
  <div
58
45
  class=${this.imageClass}
59
46
  style="background-image:url(${this.imageSrc})"
60
47
  ></div>
48
+ ${this.tileActionTemplate}
49
+ `;
50
+ }
51
+
52
+ private get listImageTemplate() {
53
+ if (!this.model) {
54
+ return nothing;
55
+ }
56
+ return html`
57
+ <img src="${this.imageSrc}" alt="" class="${this.listImageClass}" />
58
+ ${this.restrictedIconTemplate}
61
59
  `;
62
60
  }
63
61
 
@@ -67,15 +65,22 @@ export class ItemImage extends LitElement {
67
65
  <img
68
66
  class=${this.itemImageWaveformClass}
69
67
  src="${this.imageSrc}"
70
- alt="${ifDefined(this.model?.identifier)}"
68
+ alt="${ifDefined(this.model?.title)}"
71
69
  @load=${this.onLoadItemImageCheck}
72
70
  />
73
71
  </div>
74
72
  `;
75
73
  }
76
74
 
75
+ private get restrictedIconTemplate() {
76
+ if (!this.model?.contentWarning) {
77
+ return nothing;
78
+ }
79
+ return html` ${restrictedIcon} `;
80
+ }
81
+
77
82
  private get tileActionTemplate() {
78
- if (!this.isDeemphasize) {
83
+ if (!this.model?.contentWarning) {
79
84
  return nothing;
80
85
  }
81
86
  return html`
@@ -94,11 +99,27 @@ export class ItemImage extends LitElement {
94
99
 
95
100
  // Classes
96
101
  private get imageClass() {
97
- return `item-image ${this.isDeemphasize ? 'deemphasize' : 'default'}`;
102
+ return `item-image ${
103
+ this.model?.contentWarning ? 'deemphasize' : 'default'
104
+ }`;
105
+ }
106
+
107
+ private get listImageClass() {
108
+ return `list-image ${this.model?.mediatype}${
109
+ this.isCompactTile ? ' compact' : ''
110
+ }`;
98
111
  }
99
112
 
100
113
  private get imageBoxClass() {
101
- return this.isDeemphasize ? 'item-image-box' : undefined;
114
+ if (this.isListTile) {
115
+ return `list-image-box${
116
+ this.model?.contentWarning ? ' deemphasize' : ''
117
+ }`;
118
+ }
119
+ if (this.model?.contentWarning) {
120
+ return 'item-image-box';
121
+ }
122
+ return undefined;
102
123
  }
103
124
 
104
125
  private get boxWaveformClass() {
@@ -145,6 +166,37 @@ export class ItemImage extends LitElement {
145
166
  overflow: visible;
146
167
  }
147
168
 
169
+ .list-image-box.deemphasize {
170
+ border: 1px solid #767676;
171
+ }
172
+
173
+ .list-image-box {
174
+ width: 100%;
175
+ height: 100%;
176
+ overflow: hidden;
177
+ box-sizing: border-box;
178
+ display: flex;
179
+ position: relative;
180
+ }
181
+
182
+ .list-image {
183
+ width: 100%;
184
+ height: 100%;
185
+ overflow: hidden;
186
+ }
187
+
188
+ img.list-image {
189
+ overflow: hidden;
190
+ object-fit: contain;
191
+ border-radius: var(--border-radius, 0);
192
+ -webkit-border-radius: var(--border-radius, 0);
193
+ -moz-border-radius: var(--border-radius, 0);
194
+ }
195
+
196
+ img.list-image.compact {
197
+ object-fit: cover;
198
+ }
199
+
148
200
  .waveform {
149
201
  mix-blend-mode: screen;
150
202
  }
@@ -154,12 +206,19 @@ export class ItemImage extends LitElement {
154
206
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.8));
155
207
  }
156
208
 
157
- .deemphasize {
158
- background-size: cover;
209
+ .deemphasize .list-image,
210
+ .deemphasize.item-image {
211
+ background-size: contain;
159
212
  filter: blur(15px);
160
213
  z-index: 1;
161
214
  }
162
215
 
216
+ .deemphasize svg {
217
+ padding: 25%;
218
+ z-index: 2;
219
+ position: absolute;
220
+ }
221
+
163
222
  .tile-action {
164
223
  border: 1px solid currentColor;
165
224
  border-radius: 1px;
@@ -28,7 +28,9 @@ export class TileListCompact extends LitElement {
28
28
  render() {
29
29
  return html`
30
30
  <div id="list-line" class="${this.classSize}">
31
- <div id="thumb">${this.imageTemplate}</div>
31
+ <div id="thumb" class="${ifDefined(this.model?.mediatype)}">
32
+ ${this.imageTemplate}
33
+ </div>
32
34
  <div id="title">${DOMPurify.sanitize(this.model?.title ?? '')}</div>
33
35
  <div id="creator">
34
36
  ${this.model?.mediatype === 'account'
@@ -63,11 +65,15 @@ export class TileListCompact extends LitElement {
63
65
  if (!this.model?.identifier) {
64
66
  return nothing;
65
67
  }
66
- return html` <img
67
- src="${this.baseImageUrl}/services/img/${this.model.identifier}"
68
- alt="${this.model.identifier}"
69
- class="${this.model?.mediatype}"
70
- />`;
68
+ return html`
69
+ <item-image
70
+ .model=${this.model}
71
+ .baseImageUrl=${this.baseImageUrl}
72
+ .isListTile=${true}
73
+ .isCompactTile=${true}
74
+ >
75
+ </item-image>
76
+ `;
71
77
  }
72
78
 
73
79
  /*
@@ -120,43 +126,58 @@ export class TileListCompact extends LitElement {
120
126
  font-size: 14px;
121
127
  }
122
128
 
123
- /* fields */
129
+ #list-line {
130
+ display: grid;
131
+ column-gap: 10px;
132
+ border-top: 1px solid #ddd;
133
+ align-items: center;
134
+ line-height: 20px;
135
+ }
124
136
 
125
- #thumb {
126
- padding-left: 6px;
137
+ #list-line.mobile {
138
+ grid-template-columns: 36px 3fr 2fr 62px 19px;
139
+ }
140
+
141
+ #list-line.desktop {
142
+ grid-template-columns: 51px 3fr 2fr 100px 20px 60px;
143
+ }
144
+
145
+ #list-line:hover #title {
146
+ text-decoration: underline;
127
147
  }
128
148
 
129
- #thumb img {
149
+ /* fields */
150
+ #thumb {
130
151
  object-fit: cover;
131
152
  display: block;
132
153
  }
133
154
 
134
- .mobile #thumb img {
155
+ .mobile #thumb {
135
156
  width: 30px;
136
157
  height: 30px;
158
+ padding-top: 2px;
159
+ padding-bottom: 2px;
160
+ padding-left: 4px;
137
161
  }
138
162
 
139
- .desktop #thumb img {
163
+ .desktop #thumb {
140
164
  width: 45px;
141
165
  height: 45px;
166
+ padding-top: 5px;
167
+ padding-bottom: 5px;
168
+ padding-left: 6px;
142
169
  }
143
170
 
144
- #thumb img.collection {
145
- border-radius: 8px;
146
- -webkit-border-radius: 8px;
147
- -moz-border-radius: 8px;
171
+ #thumb.collection {
172
+ --border-radius: 8px;
148
173
  }
149
174
 
150
- .mobile #thumb img.account {
151
- border-radius: 15px;
152
- -webkit-border-radius: 15px;
153
- -moz-border-radius: 15px;
175
+ .mobile #thumb.account {
176
+ --border-radius: 15px;
154
177
  }
155
178
 
156
- .desktop #thumb img.account {
157
- border-radius: 22.5px;
158
- -webkit-border-radius: 22.5px;
159
- -moz-border-radius: 22.5px;
179
+ .desktop #thumb.account {
180
+ --border-radius: 22.5px;
160
181
  }
161
182
 
162
183
  #title {
@@ -189,32 +210,6 @@ export class TileListCompact extends LitElement {
189
210
  --iconHeight: 20px;
190
211
  --iconWidth: 20px;
191
212
  }
192
-
193
- /* list-line */
194
-
195
- #list-line {
196
- display: grid;
197
- column-gap: 10px;
198
- border-top: 1px solid #ddd;
199
- align-items: center;
200
- line-height: 20px;
201
- }
202
-
203
- #list-line.mobile {
204
- grid-template-columns: 36px 3fr 2fr 62px 19px;
205
- padding-top: 2px;
206
- padding-bottom: 2px;
207
- }
208
-
209
- #list-line.desktop {
210
- grid-template-columns: 51px 3fr 2fr 100px 20px 60px;
211
- padding-top: 5px;
212
- padding-bottom: 5px;
213
- }
214
-
215
- #list-line:hover #title {
216
- text-decoration: underline;
217
- }
218
213
  `;
219
214
  }
220
215
  }
@@ -87,7 +87,9 @@ export class TileList extends LitElement {
87
87
  return html`
88
88
  <div id="list-line-top">
89
89
  <div id="list-line-left">
90
- <div id="thumb">${this.imgTemplate}</div>
90
+ <div id="thumb" class="${ifDefined(this.model?.mediatype)}">
91
+ ${this.imgTemplate}
92
+ </div>
91
93
  </div>
92
94
  <div id="list-line-right">
93
95
  <div id="title-line">
@@ -103,7 +105,9 @@ export class TileList extends LitElement {
103
105
  private get desktopTemplate() {
104
106
  return html`
105
107
  <div id="list-line-left">
106
- <div id="thumb">${this.imgTemplate}</div>
108
+ <div id="thumb" class="${ifDefined(this.model?.mediatype)}">
109
+ ${this.imgTemplate}
110
+ </div>
107
111
  </div>
108
112
  <div id="list-line-right">
109
113
  <div id="title-line">
@@ -134,11 +138,14 @@ export class TileList extends LitElement {
134
138
  if (!this.model?.identifier) {
135
139
  return nothing;
136
140
  }
137
- return html` <img
138
- src="${this.baseImageUrl}/services/img/${this.model.identifier}"
139
- alt="${this.model.identifier}"
140
- class=${this.model?.mediatype}
141
- />`;
141
+ return html`
142
+ <item-image
143
+ .model=${this.model}
144
+ .baseImageUrl=${this.baseImageUrl}
145
+ .isListTile=${true}
146
+ >
147
+ </item-image>
148
+ `;
142
149
  }
143
150
 
144
151
  private get iconRightTemplate() {
@@ -412,32 +419,26 @@ export class TileList extends LitElement {
412
419
  display: block;
413
420
  }
414
421
 
415
- .mobile #thumb img {
422
+ .mobile #thumb {
416
423
  width: 90px;
417
424
  height: 90px;
418
425
  }
419
426
 
420
- .desktop #thumb img {
427
+ .desktop #thumb {
421
428
  width: 100px;
422
429
  height: 100px;
423
430
  }
424
431
 
425
- #thumb img.collection {
426
- border-radius: 8px;
427
- -webkit-border-radius: 8px;
428
- -moz-border-radius: 8px;
432
+ #thumb.collection {
433
+ --border-radius: 8px;
429
434
  }
430
435
 
431
- .mobile #thumb img.account {
432
- border-radius: 45px;
433
- -webkit-border-radius: 45px;
434
- -moz-border-radius: 45px;
436
+ .mobile #thumb.account {
437
+ --border-radius: 45px;
435
438
  }
436
439
 
437
- .desktop #thumb img.account {
438
- border-radius: 50px;
439
- -webkit-border-radius: 50px;
440
- -moz-border-radius: 50px;
440
+ .desktop #thumb.account {
441
+ --border-radius: 50px;
441
442
  }
442
443
 
443
444
  #icon-right {
@@ -1 +0,0 @@
1
- export declare const livemusicIcon: import("lit-html").TemplateResult<2>;
@@ -1,7 +0,0 @@
1
- import { svg } from 'lit';
2
- export const livemusicIcon = svg `
3
- <svg viewBox="0 0 300 300" xmlns="http://www.w3.org/2000/svg">
4
- <path d="m136.125893 117.288073c14.41013-4.850562 27.83316-2.109766 39.480173 7.796632 10.335962 8.792594 14.330094 20.428621 14.288498 33.809481-.091795 25.476855-.015572 50.965113-.049872 76.441968-.003811 2.805419-.034301 5.648851-.457344 8.401051-3.376719 21.854139-21.133078 36.299386-43.127486 35.204588-20.210769-1.003564-37.307792-18.132586-37.799436-38.393946-.346818-14.513672-.060979-29.057755-.301084-43.586633 0-12.597776-.06479-25.191751.034301-37.789527.0343-3.656928.16007-7.401288.903253-10.963182 3.18997-15.36138 12.272049-25.963431 27.028997-30.920432zm69.082871-95.288073v20.8201628h-42.6892v27.2482979s2.61448.5740085 3.574902.8363038c23.797103 6.5155667 41.073252 15.8669636 55.262332 37.0824705 8.594246 12.852468 11.643202 31.380398 11.643202 46.760785v15.304359h-20.889162c0-5.538611.099091-10.750305-.038112-15.961998-.099091-3.896415-.167692-7.857454-.842274-11.689246-5.328051-30.262793-30.775402-49.8170956-57.026916-51.5315184-29.311903-1.9120945-57.1907972 18.1858064-64.1500399 46.8520184-1.6657464 6.843753-1.7799637 13.736569-1.7780383 20.63947l.0023262 1.88283c.0030489 1.883022.0050308 3.76653-.0231721 5.649734-.0228671 1.364696 0 2.72559 0 4.052272h-20.5918884c-5.5529117-51.542923 24.3078039-93.7420516 70.1221835-99.8660762v-27.3889489h-42.6205979v-20.6909159z" fill="gray" fill-rule="evenodd" transform="matrix(1 0 0 -1 0 301)"/>
5
- </svg>
6
- `;
7
- //# sourceMappingURL=livemusic.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"livemusic.js","sourceRoot":"","sources":["../../../../../../src/assets/img/icons/mediatype/livemusic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;CAI/B,CAAC","sourcesContent":["import { svg } from 'lit';\n\nexport const livemusicIcon = svg`\n<svg viewBox=\"0 0 300 300\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m136.125893 117.288073c14.41013-4.850562 27.83316-2.109766 39.480173 7.796632 10.335962 8.792594 14.330094 20.428621 14.288498 33.809481-.091795 25.476855-.015572 50.965113-.049872 76.441968-.003811 2.805419-.034301 5.648851-.457344 8.401051-3.376719 21.854139-21.133078 36.299386-43.127486 35.204588-20.210769-1.003564-37.307792-18.132586-37.799436-38.393946-.346818-14.513672-.060979-29.057755-.301084-43.586633 0-12.597776-.06479-25.191751.034301-37.789527.0343-3.656928.16007-7.401288.903253-10.963182 3.18997-15.36138 12.272049-25.963431 27.028997-30.920432zm69.082871-95.288073v20.8201628h-42.6892v27.2482979s2.61448.5740085 3.574902.8363038c23.797103 6.5155667 41.073252 15.8669636 55.262332 37.0824705 8.594246 12.852468 11.643202 31.380398 11.643202 46.760785v15.304359h-20.889162c0-5.538611.099091-10.750305-.038112-15.961998-.099091-3.896415-.167692-7.857454-.842274-11.689246-5.328051-30.262793-30.775402-49.8170956-57.026916-51.5315184-29.311903-1.9120945-57.1907972 18.1858064-64.1500399 46.8520184-1.6657464 6.843753-1.7799637 13.736569-1.7780383 20.63947l.0023262 1.88283c.0030489 1.883022.0050308 3.76653-.0231721 5.649734-.0228671 1.364696 0 2.72559 0 4.052272h-20.5918884c-5.5529117-51.542923 24.3078039-93.7420516 70.1221835-99.8660762v-27.3889489h-42.6205979v-20.6909159z\" fill=\"gray\" fill-rule=\"evenodd\" transform=\"matrix(1 0 0 -1 0 301)\"/>\n</svg>\n`;\n"]}
@@ -1 +0,0 @@
1
- export declare const photosIcon: import("lit-html").TemplateResult<2>;
@@ -1,7 +0,0 @@
1
- import { svg } from 'lit';
2
- export const photosIcon = svg `
3
- <svg viewBox="0 0 300 300" xmlns="http://www.w3.org/2000/svg">
4
- <path d="m43.0952612 181.159979c2.1744514 0 21.7161099 3.336499 21.7161099 3.336499v21.030628l-44.8113711-6.289709c4.5382599-51.29161 9.6729948-105.5332879 14.6089046-156.237397 66.1329874 6.484496 144.5110704 16.1138469 211.0385514 22.4035567-.987813 6.4876377-1.581132 21.8160564-1.972471 28.3005524-4.939065-.5906421-15.599873 0-20.535783-.5906421v-9.0418506c-56.065498-5.3032118-112.326666-12.180422-168.3953197-17.6847035 0 0-7.7005244 74.2858081-11.6486211 114.7730661zm31.7867547-81.562016h205.1179841v158.402037h-205.1179841zm18.9514955 140.126691h167.8051566v-64.461671l-21.122791 35.963191-28.428821-67.408598-24.2819 28.891194-66.530637-54.634392h-27.4410076zm64.5550106-40.487257c0-11.394994-9.082832-20.436845-20.731453-20.436845-11.250971 0-20.923965 9.041851-20.923965 20.436845 0 11.203349 9.672994 20.439986 20.923965 20.439986 11.648621 0 20.731453-9.236637 20.731453-20.439986z" fill="gray" transform="matrix(1 0 0 -1 0 301)"/>
5
- </svg>
6
- `;
7
- //# sourceMappingURL=photos.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"photos.js","sourceRoot":"","sources":["../../../../../../src/assets/img/icons/mediatype/photos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;CAI5B,CAAC","sourcesContent":["import { svg } from 'lit';\n\nexport const photosIcon = svg`\n<svg viewBox=\"0 0 300 300\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m43.0952612 181.159979c2.1744514 0 21.7161099 3.336499 21.7161099 3.336499v21.030628l-44.8113711-6.289709c4.5382599-51.29161 9.6729948-105.5332879 14.6089046-156.237397 66.1329874 6.484496 144.5110704 16.1138469 211.0385514 22.4035567-.987813 6.4876377-1.581132 21.8160564-1.972471 28.3005524-4.939065-.5906421-15.599873 0-20.535783-.5906421v-9.0418506c-56.065498-5.3032118-112.326666-12.180422-168.3953197-17.6847035 0 0-7.7005244 74.2858081-11.6486211 114.7730661zm31.7867547-81.562016h205.1179841v158.402037h-205.1179841zm18.9514955 140.126691h167.8051566v-64.461671l-21.122791 35.963191-28.428821-67.408598-24.2819 28.891194-66.530637-54.634392h-27.4410076zm64.5550106-40.487257c0-11.394994-9.082832-20.436845-20.731453-20.436845-11.250971 0-20.923965 9.041851-20.923965 20.436845 0 11.203349 9.672994 20.439986 20.923965 20.439986 11.648621 0 20.731453-9.236637 20.731453-20.439986z\" fill=\"gray\" transform=\"matrix(1 0 0 -1 0 301)\"/>\n</svg>\n`;\n"]}
@@ -1 +0,0 @@
1
- export declare const nFormatter: (num: any, digits: number) => string;
@@ -1,20 +0,0 @@
1
- export const nFormatter = (num, digits) => {
2
- const lookup = [
3
- { value: 1, symbol: '' },
4
- { value: 1e3, symbol: 'K' },
5
- { value: 1e6, symbol: 'M' },
6
- { value: 1e9, symbol: 'B' },
7
- { value: 1e12, symbol: 'T' },
8
- { value: 1e15, symbol: 'P' },
9
- { value: 1e18, symbol: 'E' },
10
- ];
11
- const rx = /\.0+$|(\.[0-9]*[1-9])0+$/;
12
- const item = lookup
13
- .slice()
14
- .reverse()
15
- .find(i => num >= i.value);
16
- return item
17
- ? (num / item.value).toFixed(digits).replace(rx, '$1') + item.symbol
18
- : '0';
19
- };
20
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAQ,EAAE,MAAc,EAAE,EAAE;IACrD,MAAM,MAAM,GAAG;QACb,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;QACxB,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QAC3B,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QAC3B,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QAC3B,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE;QAC5B,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE;QAC5B,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE;KAC7B,CAAC;IACF,MAAM,EAAE,GAAG,0BAA0B,CAAC;IACtC,MAAM,IAAI,GAAG,MAAM;SAChB,KAAK,EAAE;SACP,OAAO,EAAE;SACT,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;IAC7B,OAAO,IAAI;QACT,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM;QACpE,CAAC,CAAC,GAAG,CAAC;AACV,CAAC,CAAC","sourcesContent":["export const nFormatter = (num: any, digits: number) => {\n const lookup = [\n { value: 1, symbol: '' },\n { value: 1e3, symbol: 'K' },\n { value: 1e6, symbol: 'M' },\n { value: 1e9, symbol: 'B' },\n { value: 1e12, symbol: 'T' },\n { value: 1e15, symbol: 'P' },\n { value: 1e18, symbol: 'E' },\n ];\n const rx = /\\.0+$|(\\.[0-9]*[1-9])0+$/;\n const item = lookup\n .slice()\n .reverse()\n .find(i => num >= i.value);\n return item\n ? (num / item.value).toFixed(digits).replace(rx, '$1') + item.symbol\n : '0';\n};\n"]}
@@ -1,3 +0,0 @@
1
- export declare const mediatypeColor: {
2
- [key: string]: string;
3
- };
@@ -1,15 +0,0 @@
1
- export const mediatypeColor = {
2
- account: '#000000',
3
- audio: '#8fdaef',
4
- data: '#333333',
5
- etree: '#3871c1',
6
- film: '#bf1b2c',
7
- image: '#62c4a9',
8
- movies: '#bf1b2c',
9
- software: '#80cc28',
10
- texts: '#f9a72b',
11
- tv: '#f25d54',
12
- video: '#bf1b2c',
13
- web: '#fddd10',
14
- };
15
- //# sourceMappingURL=mediatype-color.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mediatype-color.js","sourceRoot":"","sources":["../../../src/mediatype/mediatype-color.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAA8B;IACvD,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,SAAS;IAChB,EAAE,EAAE,SAAS;IACb,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,SAAS;CACf,CAAC","sourcesContent":["export const mediatypeColor: { [key: string]: string } = {\n account: '#000000',\n audio: '#8fdaef',\n data: '#333333',\n etree: '#3871c1',\n film: '#bf1b2c',\n image: '#62c4a9',\n movies: '#bf1b2c',\n software: '#80cc28',\n texts: '#f9a72b',\n tv: '#f25d54',\n video: '#bf1b2c',\n web: '#fddd10',\n};\n"]}
@@ -1,3 +0,0 @@
1
- export declare const mediatypeData: {
2
- [key: string]: any;
3
- };