@internetarchive/collection-browser 0.1.6 → 0.1.7-alpha-1

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 (75) hide show
  1. package/dist/src/assets/img/icons/restricted.d.ts +1 -0
  2. package/dist/src/assets/img/icons/restricted.js +29 -0
  3. package/dist/src/assets/img/icons/restricted.js.map +1 -0
  4. package/dist/src/tiles/item-image.d.ts +9 -4
  5. package/dist/src/tiles/item-image.js +102 -27
  6. package/dist/src/tiles/item-image.js.map +1 -1
  7. package/dist/src/tiles/list/tile-list-compact.js +54 -59
  8. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  9. package/dist/src/tiles/list/tile-list.js +25 -22
  10. package/dist/src/tiles/list/tile-list.js.map +1 -1
  11. package/package.json +2 -2
  12. package/src/assets/img/icons/restricted.ts +29 -0
  13. package/src/tiles/item-image.ts +107 -29
  14. package/src/tiles/list/tile-list-compact.ts +45 -50
  15. package/src/tiles/list/tile-list.ts +22 -21
  16. package/dist/src/assets/img/icons/mediatype/livemusic.d.ts +0 -1
  17. package/dist/src/assets/img/icons/mediatype/livemusic.js +0 -7
  18. package/dist/src/assets/img/icons/mediatype/livemusic.js.map +0 -1
  19. package/dist/src/assets/img/icons/mediatype/photos.d.ts +0 -1
  20. package/dist/src/assets/img/icons/mediatype/photos.js +0 -7
  21. package/dist/src/assets/img/icons/mediatype/photos.js.map +0 -1
  22. package/dist/src/helpers.d.ts +0 -1
  23. package/dist/src/helpers.js +0 -20
  24. package/dist/src/helpers.js.map +0 -1
  25. package/dist/src/mediatype/mediatype-color.d.ts +0 -3
  26. package/dist/src/mediatype/mediatype-color.js +0 -15
  27. package/dist/src/mediatype/mediatype-color.js.map +0 -1
  28. package/dist/src/mediatype/mediatype-display.d.ts +0 -3
  29. package/dist/src/mediatype/mediatype-display.js +0 -86
  30. package/dist/src/mediatype/mediatype-display.js.map +0 -1
  31. package/dist/src/mediatype/mediatype-icon.d.ts +0 -10
  32. package/dist/src/mediatype/mediatype-icon.js +0 -105
  33. package/dist/src/mediatype/mediatype-icon.js.map +0 -1
  34. package/dist/src/mediatype/mediatype-text.d.ts +0 -3
  35. package/dist/src/mediatype/mediatype-text.js +0 -17
  36. package/dist/src/mediatype/mediatype-text.js.map +0 -1
  37. package/dist/src/mediatype/mediatypeConfig.d.ts +0 -3
  38. package/dist/src/mediatype/mediatypeConfig.js +0 -86
  39. package/dist/src/mediatype/mediatypeConfig.js.map +0 -1
  40. package/dist/src/mediatype-icon.d.ts +0 -9
  41. package/dist/src/mediatype-icon.js +0 -78
  42. package/dist/src/mediatype-icon.js.map +0 -1
  43. package/dist/src/sort-filter-bar/img/grid.d.ts +0 -1
  44. package/dist/src/sort-filter-bar/img/grid.js +0 -5
  45. package/dist/src/sort-filter-bar/img/grid.js.map +0 -1
  46. package/dist/src/tiles/list/tile-list-detail.d.ts +0 -7
  47. package/dist/src/tiles/list/tile-list-detail.js +0 -28
  48. package/dist/src/tiles/list/tile-list-detail.js.map +0 -1
  49. package/dist/src/tiles/loading-tile.d.ts +0 -5
  50. package/dist/src/tiles/loading-tile.js +0 -32
  51. package/dist/src/tiles/loading-tile.js.map +0 -1
  52. package/dist/src/utils/format-string.d.ts +0 -2
  53. package/dist/src/utils/format-string.js +0 -7
  54. package/dist/src/utils/format-string.js.map +0 -1
  55. package/dist/src/waveform-thumbnail.d.ts +0 -7
  56. package/dist/src/waveform-thumbnail.js +0 -106
  57. package/dist/src/waveform-thumbnail.js.map +0 -1
  58. package/dist/src/waveform-view.d.ts +0 -0
  59. package/dist/src/waveform-view.js +0 -2
  60. package/dist/src/waveform-view.js.map +0 -1
  61. package/dist/src/your-webcomponent.d.ts +0 -8
  62. package/dist/src/your-webcomponent.js +0 -38
  63. package/dist/src/your-webcomponent.js.map +0 -1
  64. package/dist/test/mediatype-icon.test.d.ts +0 -0
  65. package/dist/test/mediatype-icon.test.js +0 -3
  66. package/dist/test/mediatype-icon.test.js.map +0 -1
  67. package/dist/test/mediatypeConfig.test.d.ts +0 -1
  68. package/dist/test/mediatypeConfig.test.js +0 -17
  69. package/dist/test/mediatypeConfig.test.js.map +0 -1
  70. package/dist/test/utils/format-string.test.d.ts +0 -1
  71. package/dist/test/utils/format-string.test.js +0 -17
  72. package/dist/test/utils/format-string.test.js.map +0 -1
  73. package/dist/test/your-webcomponent.test.d.ts +0 -1
  74. package/dist/test/your-webcomponent.test.js +0 -23
  75. package/dist/test/your-webcomponent.test.js.map +0 -1
@@ -1 +0,0 @@
1
- export declare const gridIcon: import("lit-html").TemplateResult<2>;
@@ -1,5 +0,0 @@
1
- import { svg } from 'lit';
2
- export const gridIcon = svg `
3
- <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="m45 13h-45v60h45zm55 0h-45v32h45zm0 42h-45v32h45z"/></svg>
4
- `;
5
- //# sourceMappingURL=grid.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"grid.js","sourceRoot":"","sources":["../../../../src/sort-filter-bar/img/grid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAA;;CAE1B,CAAC","sourcesContent":["import { svg } from 'lit';\n\nexport const gridIcon = svg`\n<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m45 13h-45v60h45zm55 0h-45v32h45zm0 42h-45v32h45z\"/></svg>\n`;\n"]}
@@ -1,7 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import { TileModel } from '../../models';
3
- export declare class TileListDetail extends LitElement {
4
- model?: TileModel;
5
- render(): import("lit-html").TemplateResult<1>;
6
- static get styles(): import("lit").CSSResult;
7
- }
@@ -1,28 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { css, html, LitElement } from 'lit';
3
- import { customElement, property } from 'lit/decorators.js';
4
- let TileListDetail = class TileListDetail extends LitElement {
5
- render() {
6
- var _a, _b, _c, _d;
7
- return html `
8
- <h1>${(_a = this.model) === null || _a === void 0 ? void 0 : _a.title}</h1>
9
- <h2>${(_c = (_b = this.model) === null || _b === void 0 ? void 0 : _b.datePublished) === null || _c === void 0 ? void 0 : _c.toDateString()}</h2>
10
- <p>${(_d = this.model) === null || _d === void 0 ? void 0 : _d.description}</p>
11
- `;
12
- }
13
- static get styles() {
14
- return css `
15
- h1 {
16
- margin-top: 0;
17
- }
18
- `;
19
- }
20
- };
21
- __decorate([
22
- property({ type: Object })
23
- ], TileListDetail.prototype, "model", void 0);
24
- TileListDetail = __decorate([
25
- customElement('tile-list-detail')
26
- ], TileListDetail);
27
- export { TileListDetail };
28
- //# sourceMappingURL=tile-list-detail.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tile-list-detail.js","sourceRoot":"","sources":["../../../../src/tiles/list/tile-list-detail.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI5D,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,UAAU;IAG5C,MAAM;;QACJ,OAAO,IAAI,CAAA;YACH,MAAA,IAAI,CAAC,KAAK,0CAAE,KAAK;YACjB,MAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,aAAa,0CAAE,YAAY,EAAE;WAC1C,MAAA,IAAI,CAAC,KAAK,0CAAE,WAAW;KAC7B,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;KAIT,CAAC;IACJ,CAAC;CACF,CAAA;AAjB6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAmB;AADnC,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAkB1B;SAlBY,cAAc","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { TileModel } from '../../models';\n\n@customElement('tile-list-detail')\nexport class TileListDetail extends LitElement {\n @property({ type: Object }) model?: TileModel;\n\n render() {\n return html`\n <h1>${this.model?.title}</h1>\n <h2>${this.model?.datePublished?.toDateString()}</h2>\n <p>${this.model?.description}</p>\n `;\n }\n\n static get styles() {\n return css`\n h1 {\n margin-top: 0;\n }\n `;\n }\n}\n"]}
@@ -1,5 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export declare class LoadingTile extends LitElement {
3
- render(): import("lit-html").TemplateResult<1>;
4
- static get styles(): import("lit").CSSResult;
5
- }
@@ -1,32 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { css, html, LitElement } from 'lit';
3
- import { customElement } from 'lit/decorators.js';
4
- let LoadingTile = class LoadingTile extends LitElement {
5
- render() {
6
- return html ` <div id="container"></div> `;
7
- }
8
- static get styles() {
9
- return css `
10
- :host {
11
- display: block;
12
- height: 100%;
13
- }
14
-
15
- #container {
16
- background: linear-gradient(
17
- to right,
18
- rgba(25, 69, 154, 0.1),
19
- rgb(105, 161, 234, 0.2)
20
- );
21
- background-size: 100% 100%;
22
- display: block;
23
- height: 100%;
24
- }
25
- `;
26
- }
27
- };
28
- LoadingTile = __decorate([
29
- customElement('loading-tile')
30
- ], LoadingTile);
31
- export { LoadingTile };
32
- //# sourceMappingURL=loading-tile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loading-tile.js","sourceRoot":"","sources":["../../../src/tiles/loading-tile.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,IAAa,WAAW,GAAxB,MAAa,WAAY,SAAQ,UAAU;IACzC,MAAM;QACJ,OAAO,IAAI,CAAA,8BAA8B,CAAC;IAC5C,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;KAgBT,CAAC;IACJ,CAAC;CACF,CAAA;AAxBY,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAwBvB;SAxBY,WAAW","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\n@customElement('loading-tile')\nexport class LoadingTile extends LitElement {\n render() {\n return html` <div id=\"container\"></div> `;\n }\n\n static get styles() {\n return css`\n :host {\n display: block;\n height: 100%;\n }\n\n #container {\n background: linear-gradient(\n to right,\n rgba(25, 69, 154, 0.1),\n rgb(105, 161, 234, 0.2)\n );\n background-size: 100% 100%;\n display: block;\n height: 100%;\n }\n `;\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- export declare function strHasSpace(str: string): boolean;
2
- export declare function isStrOneLiner(str: string): boolean;
@@ -1,7 +0,0 @@
1
- export function strHasSpace(str) {
2
- return /\s/.test(str);
3
- }
4
- export function isStrOneLiner(str) {
5
- return !strHasSpace(str) && str.length >= 24;
6
- }
7
- //# sourceMappingURL=format-string.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format-string.js","sourceRoot":"","sources":["../../../src/utils/format-string.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC;AAC/C,CAAC","sourcesContent":["export function strHasSpace(str: string): boolean {\n return /\\s/.test(str);\n}\n\nexport function isStrOneLiner(str: string): boolean {\n return !strHasSpace(str) && str.length >= 24;\n}\n"]}
@@ -1,7 +0,0 @@
1
- import { CSSResultGroup, LitElement } from 'lit';
2
- export declare class WaveformThumbnail extends LitElement {
3
- baseNavigationUrl?: string;
4
- identifier?: string;
5
- render(): import("lit-html").TemplateResult<1>;
6
- static get styles(): CSSResultGroup;
7
- }
@@ -1,106 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { css, html, LitElement } from 'lit';
3
- import { customElement, property } from 'lit/decorators.js';
4
- let WaveformThumbnail = class WaveformThumbnail extends LitElement {
5
- render() {
6
- const imgSrcUrl = `${this.baseNavigationUrl}/services/img/${this.identifier}`;
7
- const randomGradient = `grad${Math.floor(Math.random() * (6 - 1) + 1)}`;
8
- return html `
9
- <div class="box" id=${randomGradient}>
10
- <div
11
- class="item-image"
12
- style="background-image:url(${imgSrcUrl})"
13
- ></div>
14
- </div>
15
- `;
16
- }
17
- static get styles() {
18
- return css `
19
- .box {
20
- width: 16rem;
21
- height: 16rem;
22
- overflow: hidden;
23
- position: relative;
24
- box-shadow: 1px 1px 2px 0px;
25
- display: flex;
26
- }
27
-
28
- .item-image {
29
- width: 16rem;
30
- height: 16rem;
31
- object-fit: cover;
32
- background-repeat: no-repeat;
33
- background-position: center center;
34
- position: relative;
35
- -webkit-appearance: none;
36
- overflow: visible;
37
- mix-blend-mode: screen;
38
- }
39
-
40
- #grad1 {
41
- background: linear-gradient(
42
- hsl(300, 80%, 55%),
43
- hsl(330, 80%, 33%) 35%,
44
- hsl(330, 80%, 22%) 70%,
45
- hsl(0, 0%, 0%)
46
- );
47
- }
48
-
49
- #grad2 {
50
- background: linear-gradient(
51
- hsl(200, 80%, 55%),
52
- hsl(230, 80%, 33%) 35%,
53
- hsl(230, 80%, 22%) 70%,
54
- hsl(0, 0%, 0%)
55
- );
56
- }
57
-
58
- #grad3 {
59
- background: linear-gradient(
60
- hsl(160, 80%, 55%),
61
- hsl(190, 80%, 33%) 35%,
62
- hsl(190, 80%, 22%) 70%,
63
- hsl(0, 0%, 0%)
64
- );
65
- }
66
-
67
- #grad4 {
68
- background: linear-gradient(
69
- hsl(250, 80%, 55%),
70
- hsl(280, 80%, 33%) 35%,
71
- hsl(280, 80%, 22%) 70%,
72
- hsl(0, 0%, 0%)
73
- );
74
- }
75
-
76
- #grad5 {
77
- background: linear-gradient(
78
- hsl(280, 80%, 55%),
79
- hsl(310, 80%, 33%) 35%,
80
- hsl(310, 80%, 22%) 70%,
81
- hsl(0, 0%, 0%)
82
- );
83
- }
84
-
85
- #grad6 {
86
- background: linear-gradient(
87
- hsl(340, 80%, 55%),
88
- hsl(0, 80%, 33%) 35%,
89
- hsl(0, 80%, 22%) 70%,
90
- hsl(0, 0%, 0%)
91
- );
92
- }
93
- `;
94
- }
95
- };
96
- __decorate([
97
- property({ type: String })
98
- ], WaveformThumbnail.prototype, "baseNavigationUrl", void 0);
99
- __decorate([
100
- property({ type: String })
101
- ], WaveformThumbnail.prototype, "identifier", void 0);
102
- WaveformThumbnail = __decorate([
103
- customElement('waveform-thumbnail')
104
- ], WaveformThumbnail);
105
- export { WaveformThumbnail };
106
- //# sourceMappingURL=waveform-thumbnail.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"waveform-thumbnail.js","sourceRoot":"","sources":["../../src/waveform-thumbnail.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAkB,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG5D,IAAa,iBAAiB,GAA9B,MAAa,iBAAkB,SAAQ,UAAU;IAK/C,MAAM;QACJ,MAAM,SAAS,GAAG,GAAG,IAAI,CAAC,iBAAiB,iBAAiB,IAAI,CAAC,UAAU,EAAE,CAAC;QAC9E,MAAM,cAAc,GAAG,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QAExE,OAAO,IAAI,CAAA;4BACa,cAAc;;;wCAGF,SAAS;;;KAG5C,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2ET,CAAC;IACJ,CAAC;CACF,CAAA;AAhG6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4DAA4B;AAE3B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAqB;AAHrC,iBAAiB;IAD7B,aAAa,CAAC,oBAAoB,CAAC;GACvB,iBAAiB,CAiG7B;SAjGY,iBAAiB","sourcesContent":["import { css, CSSResultGroup, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\n@customElement('waveform-thumbnail')\nexport class WaveformThumbnail extends LitElement {\n @property({ type: String }) baseNavigationUrl?: string;\n\n @property({ type: String }) identifier?: string;\n\n render() {\n const imgSrcUrl = `${this.baseNavigationUrl}/services/img/${this.identifier}`;\n const randomGradient = `grad${Math.floor(Math.random() * (6 - 1) + 1)}`;\n\n return html`\n <div class=\"box\" id=${randomGradient}>\n <div\n class=\"item-image\"\n style=\"background-image:url(${imgSrcUrl})\"\n ></div>\n </div>\n `;\n }\n\n static get styles(): CSSResultGroup {\n return css`\n .box {\n width: 16rem;\n height: 16rem;\n overflow: hidden;\n position: relative;\n box-shadow: 1px 1px 2px 0px;\n display: flex;\n }\n\n .item-image {\n width: 16rem;\n height: 16rem;\n object-fit: cover;\n background-repeat: no-repeat;\n background-position: center center;\n position: relative;\n -webkit-appearance: none;\n overflow: visible;\n mix-blend-mode: screen;\n }\n\n #grad1 {\n background: linear-gradient(\n hsl(300, 80%, 55%),\n hsl(330, 80%, 33%) 35%,\n hsl(330, 80%, 22%) 70%,\n hsl(0, 0%, 0%)\n );\n }\n\n #grad2 {\n background: linear-gradient(\n hsl(200, 80%, 55%),\n hsl(230, 80%, 33%) 35%,\n hsl(230, 80%, 22%) 70%,\n hsl(0, 0%, 0%)\n );\n }\n\n #grad3 {\n background: linear-gradient(\n hsl(160, 80%, 55%),\n hsl(190, 80%, 33%) 35%,\n hsl(190, 80%, 22%) 70%,\n hsl(0, 0%, 0%)\n );\n }\n\n #grad4 {\n background: linear-gradient(\n hsl(250, 80%, 55%),\n hsl(280, 80%, 33%) 35%,\n hsl(280, 80%, 22%) 70%,\n hsl(0, 0%, 0%)\n );\n }\n\n #grad5 {\n background: linear-gradient(\n hsl(280, 80%, 55%),\n hsl(310, 80%, 33%) 35%,\n hsl(310, 80%, 22%) 70%,\n hsl(0, 0%, 0%)\n );\n }\n\n #grad6 {\n background: linear-gradient(\n hsl(340, 80%, 55%),\n hsl(0, 80%, 33%) 35%,\n hsl(0, 80%, 22%) 70%,\n hsl(0, 0%, 0%)\n );\n }\n `;\n }\n}\n"]}
File without changes
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=waveform-view.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"waveform-view.js","sourceRoot":"","sources":["../../src/waveform-view.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -1,8 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export declare class YourWebComponent extends LitElement {
3
- title: string;
4
- counter: number;
5
- private increment;
6
- render(): import("lit-html").TemplateResult<1>;
7
- static styles: import("lit").CSSResult;
8
- }
@@ -1,38 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { html, css, LitElement } from 'lit';
3
- import { property, customElement } from 'lit/decorators.js';
4
- let YourWebComponent = class YourWebComponent extends LitElement {
5
- constructor() {
6
- super(...arguments);
7
- this.title = 'Hey there';
8
- this.counter = 5;
9
- }
10
- increment() {
11
- this.counter += 1;
12
- }
13
- render() {
14
- return html `
15
- <h2>${this.title}, Number: ${this.counter}!</h2>
16
- <button @click=${this.increment}>increment</button>
17
- <slot name="my-slot"> </slot>
18
- `;
19
- }
20
- };
21
- YourWebComponent.styles = css `
22
- :host {
23
- display: block;
24
- padding: 25px;
25
- color: var(--your-webcomponent-text-color, #000);
26
- }
27
- `;
28
- __decorate([
29
- property({ type: String })
30
- ], YourWebComponent.prototype, "title", void 0);
31
- __decorate([
32
- property({ type: Number })
33
- ], YourWebComponent.prototype, "counter", void 0);
34
- YourWebComponent = __decorate([
35
- customElement('your-webcomponent')
36
- ], YourWebComponent);
37
- export { YourWebComponent };
38
- //# sourceMappingURL=your-webcomponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"your-webcomponent.js","sourceRoot":"","sources":["../../src/your-webcomponent.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG5D,IAAa,gBAAgB,GAA7B,MAAa,gBAAiB,SAAQ,UAAU;IAAhD;;QAC8B,UAAK,GAAG,WAAW,CAAC;QAEpB,YAAO,GAAG,CAAC,CAAC;IAqB1C,CAAC;IAnBS,SAAS;QACf,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;YACH,IAAI,CAAC,KAAK,aAAa,IAAI,CAAC,OAAO;uBACxB,IAAI,CAAC,SAAS;;KAEhC,CAAC;IACJ,CAAC;CASF,CAAA;AAPQ,uBAAM,GAAG,GAAG,CAAA;;;;;;GAMlB,CAAC;AAtB0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAqB;AAEpB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAa;AAH7B,gBAAgB;IAD5B,aAAa,CAAC,mBAAmB,CAAC;GACtB,gBAAgB,CAwB5B;SAxBY,gBAAgB","sourcesContent":["import { html, css, LitElement } from 'lit';\nimport { property, customElement } from 'lit/decorators.js';\n\n@customElement('your-webcomponent')\nexport class YourWebComponent extends LitElement {\n @property({ type: String }) title = 'Hey there';\n\n @property({ type: Number }) counter = 5;\n\n private increment() {\n this.counter += 1;\n }\n\n render() {\n return html`\n <h2>${this.title}, Number: ${this.counter}!</h2>\n <button @click=${this.increment}>increment</button>\n <slot name=\"my-slot\"> </slot>\n `;\n }\n\n static styles = css`\n :host {\n display: block;\n padding: 25px;\n color: var(--your-webcomponent-text-color, #000);\n }\n `;\n}\n"]}
File without changes
@@ -1,3 +0,0 @@
1
- "use strict";
2
- describe('MediatypeIcon', () => { });
3
- //# sourceMappingURL=mediatype-icon.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mediatype-icon.test.js","sourceRoot":"","sources":["../../test/mediatype-icon.test.ts"],"names":[],"mappings":";AAAA,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC","sourcesContent":["describe('MediatypeIcon', () => {});\n"]}
@@ -1 +0,0 @@
1
- export {};
@@ -1,17 +0,0 @@
1
- import { expect } from '@open-wc/testing';
2
- import { mediatypeConfig } from '../src/mediatype/mediatypeConfig';
3
- describe('mediatypeConfig', () => {
4
- it('returns undefined', () => {
5
- expect(mediatypeConfig['']).to.equal(undefined);
6
- expect(mediatypeConfig.test).to.equal(undefined);
7
- expect(mediatypeConfig.media).to.equal(undefined);
8
- expect(mediatypeConfig.testing).to.equal(undefined);
9
- });
10
- it('returns audio', () => {
11
- expect(mediatypeConfig.audio).to.exist;
12
- expect(mediatypeConfig.audio.color).to.exist;
13
- expect(mediatypeConfig.audio.icon).to.exist;
14
- expect(mediatypeConfig.audio.text).to.exist;
15
- });
16
- });
17
- //# sourceMappingURL=mediatypeConfig.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mediatypeConfig.test.js","sourceRoot":"","sources":["../../test/mediatypeConfig.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAChD,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAClD,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE,GAAG,EAAE;QACvB,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QACvC,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAC7C,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAC5C,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect } from '@open-wc/testing';\nimport { mediatypeConfig } from '../src/mediatype/mediatypeConfig';\n\ndescribe('mediatypeConfig', () => {\n it('returns undefined', () => {\n expect(mediatypeConfig['']).to.equal(undefined);\n expect(mediatypeConfig.test).to.equal(undefined);\n expect(mediatypeConfig.media).to.equal(undefined);\n expect(mediatypeConfig.testing).to.equal(undefined);\n });\n\n it('returns audio', () => {\n expect(mediatypeConfig.audio).to.exist;\n expect(mediatypeConfig.audio.color).to.exist;\n expect(mediatypeConfig.audio.icon).to.exist;\n expect(mediatypeConfig.audio.text).to.exist;\n });\n});\n"]}
@@ -1 +0,0 @@
1
- export {};
@@ -1,17 +0,0 @@
1
- import { expect } from '@open-wc/testing';
2
- import { isStrOneLiner } from '../../src/utils/format-string';
3
- const testShortTextNoSpaces = 'Loremipsumdolorsitamet';
4
- const testLongText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua';
5
- const testLongOnelineText = 'Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua';
6
- describe('isStrOneLiner', () => {
7
- it('returns true if string has no spaces and have long text', () => {
8
- expect(isStrOneLiner(testLongOnelineText)).to.equal(true);
9
- });
10
- it('returns false if string has no spaces but text length not more than 24', () => {
11
- expect(isStrOneLiner(testShortTextNoSpaces)).to.equal(false);
12
- });
13
- it('returns false if string has spaces', () => {
14
- expect(isStrOneLiner(testLongText)).to.equal(false);
15
- });
16
- });
17
- //# sourceMappingURL=format-string.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format-string.test.js","sourceRoot":"","sources":["../../../test/utils/format-string.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AACvD,MAAM,YAAY,GAChB,4HAA4H,CAAC;AAC/H,MAAM,mBAAmB,GACvB,0GAA0G,CAAC;AAE7G,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wEAAwE,EAAE,GAAG,EAAE;QAChF,MAAM,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect } from '@open-wc/testing';\nimport { isStrOneLiner } from '../../src/utils/format-string';\n\nconst testShortTextNoSpaces = 'Loremipsumdolorsitamet';\nconst testLongText =\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua';\nconst testLongOnelineText =\n 'Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua';\n\ndescribe('isStrOneLiner', () => {\n it('returns true if string has no spaces and have long text', () => {\n expect(isStrOneLiner(testLongOnelineText)).to.equal(true);\n });\n\n it('returns false if string has no spaces but text length not more than 24', () => {\n expect(isStrOneLiner(testShortTextNoSpaces)).to.equal(false);\n });\n\n it('returns false if string has spaces', () => {\n expect(isStrOneLiner(testLongText)).to.equal(false);\n });\n});\n"]}
@@ -1 +0,0 @@
1
- import '../src/your-webcomponent';
@@ -1,23 +0,0 @@
1
- import { html, fixture, expect } from '@open-wc/testing';
2
- import '../src/your-webcomponent';
3
- describe('YourWebComponent', () => {
4
- it('has a default title "Hey there" and counter 5', async () => {
5
- const el = await fixture(html `<your-webcomponent></your-webcomponent>`);
6
- expect(el.title).to.equal('Hey there');
7
- expect(el.counter).to.equal(5);
8
- });
9
- it('increases the counter on button click', async () => {
10
- const el = await fixture(html `<your-webcomponent></your-webcomponent>`);
11
- el.shadowRoot.querySelector('button').click();
12
- expect(el.counter).to.equal(6);
13
- });
14
- it('can override the title via attribute', async () => {
15
- const el = await fixture(html `<your-webcomponent title="attribute title"></your-webcomponent>`);
16
- expect(el.title).to.equal('attribute title');
17
- });
18
- it('passes the a11y audit', async () => {
19
- const el = await fixture(html `<your-webcomponent></your-webcomponent>`);
20
- await expect(el).shadowDom.to.be.accessible();
21
- });
22
- });
23
- //# sourceMappingURL=your-webcomponent.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"your-webcomponent.test.js","sourceRoot":"","sources":["../../test/your-webcomponent.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGzD,OAAO,0BAA0B,CAAC;AAElC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,+CAA+C,EAAE,KAAK,IAAI,EAAE;QAC7D,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA,yCAAyC,CAC9C,CAAC;QAEF,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACvC,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;QACrD,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA,yCAAyC,CAC9C,CAAC;QACF,EAAE,CAAC,UAAW,CAAC,aAAa,CAAC,QAAQ,CAAE,CAAC,KAAK,EAAE,CAAC;QAEhD,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;QACpD,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA,iEAAiE,CACtE,CAAC;QAEF,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;QACrC,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA,yCAAyC,CAC9C,CAAC;QAEF,MAAM,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { html, fixture, expect } from '@open-wc/testing';\n\nimport type { YourWebComponent } from '../src/your-webcomponent';\nimport '../src/your-webcomponent';\n\ndescribe('YourWebComponent', () => {\n it('has a default title \"Hey there\" and counter 5', async () => {\n const el = await fixture<YourWebComponent>(\n html`<your-webcomponent></your-webcomponent>`\n );\n\n expect(el.title).to.equal('Hey there');\n expect(el.counter).to.equal(5);\n });\n\n it('increases the counter on button click', async () => {\n const el = await fixture<YourWebComponent>(\n html`<your-webcomponent></your-webcomponent>`\n );\n el.shadowRoot!.querySelector('button')!.click();\n\n expect(el.counter).to.equal(6);\n });\n\n it('can override the title via attribute', async () => {\n const el = await fixture<YourWebComponent>(\n html`<your-webcomponent title=\"attribute title\"></your-webcomponent>`\n );\n\n expect(el.title).to.equal('attribute title');\n });\n\n it('passes the a11y audit', async () => {\n const el = await fixture<YourWebComponent>(\n html`<your-webcomponent></your-webcomponent>`\n );\n\n await expect(el).shadowDom.to.be.accessible();\n });\n});\n"]}