@internetarchive/radio-player 0.0.3 → 0.0.4-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 (93) hide show
  1. package/LICENSE +661 -661
  2. package/README.md +142 -142
  3. package/index.d.ts +15 -15
  4. package/index.js +28 -28
  5. package/lib/demo/full-text-search-service.d.ts +14 -14
  6. package/lib/demo/full-text-search-service.js +33 -33
  7. package/lib/demo/radio-player-controller.d.ts +41 -41
  8. package/lib/demo/radio-player-controller.js +199 -199
  9. package/lib/src/assets/img/left.d.ts +2 -2
  10. package/lib/src/assets/img/left.js +15 -15
  11. package/lib/src/assets/img/right.d.ts +2 -2
  12. package/lib/src/assets/img/right.js +15 -15
  13. package/lib/src/models/music-zone.d.ts +12 -12
  14. package/lib/src/models/music-zone.js +15 -15
  15. package/lib/src/models/radio-player-config.d.ts +26 -26
  16. package/lib/src/models/radio-player-config.js +27 -27
  17. package/lib/src/radio-player.d.ts +589 -589
  18. package/lib/src/radio-player.js +1338 -1338
  19. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-backend.d.ts +82 -82
  20. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-backend.js +107 -107
  21. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-response.d.ts +48 -48
  22. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-response.js +58 -58
  23. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-service-interface.d.ts +16 -16
  24. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-service-interface.js +1 -1
  25. package/lib/src/search-handler/search-backends/local-search-backend/local-search-backend.d.ts +27 -27
  26. package/lib/src/search-handler/search-backends/local-search-backend/local-search-backend.js +42 -42
  27. package/lib/src/search-handler/search-backends/search-backend-interface.d.ts +9 -9
  28. package/lib/src/search-handler/search-backends/search-backend-interface.js +1 -1
  29. package/lib/src/search-handler/search-handler-interface.d.ts +17 -17
  30. package/lib/src/search-handler/search-handler-interface.js +1 -1
  31. package/lib/src/search-handler/search-handler.d.ts +83 -83
  32. package/lib/src/search-handler/search-handler.js +177 -177
  33. package/lib/src/search-handler/search-helper.d.ts +12 -12
  34. package/lib/src/search-handler/search-helper.js +22 -22
  35. package/lib/src/search-handler/search-models.d.ts +45 -45
  36. package/lib/src/search-handler/search-models.js +49 -49
  37. package/lib/src/search-handler/transcript-index-interface.d.ts +38 -38
  38. package/lib/src/search-handler/transcript-index-interface.js +1 -1
  39. package/lib/src/search-handler/transcript-index.d.ts +53 -53
  40. package/lib/src/search-handler/transcript-index.js +80 -80
  41. package/lib/src/search-results-switcher.d.ts +58 -58
  42. package/lib/src/search-results-switcher.js +133 -133
  43. package/package.json +93 -93
  44. package/src/assets/img/left.ts +17 -17
  45. package/src/assets/img/right.ts +17 -17
  46. package/src/models/music-zone.ts +17 -17
  47. package/src/models/radio-player-config.ts +47 -47
  48. package/src/radio-player.ts +1402 -1402
  49. package/src/search-handler/search-backends/full-text-search-backend/full-text-search-backend.ts +140 -140
  50. package/src/search-handler/search-backends/full-text-search-backend/full-text-search-response.ts +110 -110
  51. package/src/search-handler/search-backends/full-text-search-backend/full-text-search-service-interface.ts +17 -17
  52. package/src/search-handler/search-backends/local-search-backend/local-search-backend.ts +50 -50
  53. package/src/search-handler/search-backends/search-backend-interface.ts +10 -10
  54. package/src/search-handler/search-handler-interface.ts +18 -18
  55. package/src/search-handler/search-handler.ts +217 -217
  56. package/src/search-handler/search-helper.ts +25 -25
  57. package/src/search-handler/search-models.ts +69 -69
  58. package/src/search-handler/transcript-index-interface.ts +42 -42
  59. package/src/search-handler/transcript-index.ts +93 -93
  60. package/src/search-results-switcher.ts +131 -131
  61. package/.eslintrc +0 -37
  62. package/.gitignore +0 -11
  63. package/.storybook/.babelrc +0 -15
  64. package/.storybook/addons.js +0 -7
  65. package/.storybook/config.js +0 -11
  66. package/.storybook/webpack.config.js +0 -5
  67. package/demo/full-text-search-service.ts +0 -32
  68. package/demo/index.html +0 -53
  69. package/demo/radio-player-controller.ts +0 -237
  70. package/karma.bs.config.js +0 -16
  71. package/karma.conf.js +0 -66
  72. package/package-lock.json +0 -51719
  73. package/stories/index.stories.js +0 -40
  74. package/stories/transcript.js +0 -683
  75. package/test/assets/arrow.mp3 +0 -0
  76. package/test/music-zone.test.js +0 -13
  77. package/test/promised-sleep.js +0 -3
  78. package/test/radio-player-config.test.js +0 -42
  79. package/test/radio-player.test.js +0 -1072
  80. package/test/sample_transcript.js +0 -1493
  81. package/test/search-handler/search-backends/full-text-sample-response-brackets.js +0 -60
  82. package/test/search-handler/search-backends/full-text-sample-response-em.js +0 -60
  83. package/test/search-handler/search-backends/full-text-search-backend.test.js +0 -74
  84. package/test/search-handler/search-backends/full-text-search-response.test.js +0 -14
  85. package/test/search-handler/search-backends/local-search-backend.test.js +0 -39
  86. package/test/search-handler/search-handler.test.js +0 -550
  87. package/test/search-handler/search-helper.test.js +0 -63
  88. package/test/search-handler/search-model.test.js +0 -56
  89. package/test/search-handler/transcript-index.test.js +0 -66
  90. package/test/search-results-switcher.test.js +0 -97
  91. package/tsconfig.build.json +0 -7
  92. package/tsconfig.json +0 -21
  93. package/yarn.lock +0 -14450
@@ -1,134 +1,134 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { LitElement, html, css, } from 'lit';
8
- import { customElement, property, } from 'lit/decorators.js';
9
- import leftImage from './assets/img/left';
10
- import rightImage from './assets/img/right';
11
- /**
12
- * A widget to switch between search results that looks like this:
13
- * < 3 / 7 >
14
- *
15
- * @export
16
- * @class SearchResultsSwitcher
17
- * @extends {LitElement}
18
- */
19
- let SearchResultsSwitcher = class SearchResultsSwitcher extends LitElement {
20
- constructor() {
21
- super(...arguments);
22
- this.numberOfResults = 0;
23
- this.currentResultIndex = 0;
24
- }
25
- /**
26
- * LitElement life cycle render method. Entrypoint for rendering the element.
27
- *
28
- * @returns {TemplateResult}
29
- * @memberof SearchResultsSwitcher
30
- */
31
- render() {
32
- return html `
33
- <div class="container">
34
- <button @click=${this.goToPreviousResult} id="previous-button">
35
- ${leftImage}
36
- </button>
37
- <span class="results-range">
38
- <span id="current-result">${this.currentResultIndex + 1}</span> /
39
- <span id="number-of-results">${this.numberOfResults}</span>
40
- </span>
41
- <button @click=${this.goToNextResult} id="next-button">
42
- ${rightImage}
43
- </button>
44
- </div>
45
- `;
46
- }
47
- /**
48
- * LitElement life cycle CSS for this element
49
- *
50
- * @readonly
51
- * @static
52
- * @type {CSSResult}
53
- * @memberof SearchResultsSwitcher
54
- */
55
- static get styles() {
56
- return css `
57
- .container {
58
- text-align: center;
59
- }
60
-
61
- button {
62
- background: none;
63
- border: 0;
64
- cursor: pointer;
65
- }
66
- `;
67
- }
68
- /**
69
- * LitElement lifecycle updated method
70
- *
71
- * @param {PropertyValues} changedProperties
72
- * @memberof SearchResultsSwitcher
73
- */
74
- updated(changedProperties) {
75
- // reset the index if we change the number of results
76
- if (changedProperties.has('numberOfResults')) {
77
- this.currentResultIndex = 0;
78
- }
79
- }
80
- /**
81
- * Called when user clicks on the previous result button.
82
- * Loops around to the last result when we reach the first.
83
- *
84
- * @memberof SearchResultsSwitcher
85
- */
86
- goToPreviousResult() {
87
- if (this.currentResultIndex < 1) {
88
- this.currentResultIndex = this.numberOfResults - 1;
89
- }
90
- else {
91
- this.currentResultIndex -= 1;
92
- }
93
- this.emitSearchResultIndexChangedEvent();
94
- }
95
- /**
96
- * Called when user clicks on the next result button.
97
- * Loops around to the first result when we reach the last.
98
- *
99
- * @memberof SearchResultsSwitcher
100
- */
101
- goToNextResult() {
102
- if (this.currentResultIndex === this.numberOfResults - 1) {
103
- this.currentResultIndex = 0;
104
- }
105
- else {
106
- this.currentResultIndex += 1;
107
- }
108
- this.emitSearchResultIndexChangedEvent();
109
- }
110
- /**
111
- * Emit an searchResultIndexChanged event that the index has been changed
112
- *
113
- * ie: `e.detail.searchResultIndex = 2`
114
- *
115
- * @memberof SearchResultsSwitcher
116
- */
117
- emitSearchResultIndexChangedEvent() {
118
- const event = new CustomEvent('searchResultIndexChanged', {
119
- detail: { searchResultIndex: this.currentResultIndex },
120
- });
121
- this.dispatchEvent(event);
122
- }
123
- };
124
- __decorate([
125
- property({ type: Number })
126
- ], SearchResultsSwitcher.prototype, "numberOfResults", void 0);
127
- __decorate([
128
- property({ type: Number })
129
- ], SearchResultsSwitcher.prototype, "currentResultIndex", void 0);
130
- SearchResultsSwitcher = __decorate([
131
- customElement('search-results-switcher')
132
- ], SearchResultsSwitcher);
133
- export default SearchResultsSwitcher;
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, css, } from 'lit';
8
+ import { customElement, property, } from 'lit/decorators.js';
9
+ import leftImage from './assets/img/left';
10
+ import rightImage from './assets/img/right';
11
+ /**
12
+ * A widget to switch between search results that looks like this:
13
+ * < 3 / 7 >
14
+ *
15
+ * @export
16
+ * @class SearchResultsSwitcher
17
+ * @extends {LitElement}
18
+ */
19
+ let SearchResultsSwitcher = class SearchResultsSwitcher extends LitElement {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.numberOfResults = 0;
23
+ this.currentResultIndex = 0;
24
+ }
25
+ /**
26
+ * LitElement life cycle render method. Entrypoint for rendering the element.
27
+ *
28
+ * @returns {TemplateResult}
29
+ * @memberof SearchResultsSwitcher
30
+ */
31
+ render() {
32
+ return html `
33
+ <div class="container">
34
+ <button @click=${this.goToPreviousResult} id="previous-button">
35
+ ${leftImage}
36
+ </button>
37
+ <span class="results-range">
38
+ <span id="current-result">${this.currentResultIndex + 1}</span> /
39
+ <span id="number-of-results">${this.numberOfResults}</span>
40
+ </span>
41
+ <button @click=${this.goToNextResult} id="next-button">
42
+ ${rightImage}
43
+ </button>
44
+ </div>
45
+ `;
46
+ }
47
+ /**
48
+ * LitElement life cycle CSS for this element
49
+ *
50
+ * @readonly
51
+ * @static
52
+ * @type {CSSResult}
53
+ * @memberof SearchResultsSwitcher
54
+ */
55
+ static get styles() {
56
+ return css `
57
+ .container {
58
+ text-align: center;
59
+ }
60
+
61
+ button {
62
+ background: none;
63
+ border: 0;
64
+ cursor: pointer;
65
+ }
66
+ `;
67
+ }
68
+ /**
69
+ * LitElement lifecycle updated method
70
+ *
71
+ * @param {PropertyValues} changedProperties
72
+ * @memberof SearchResultsSwitcher
73
+ */
74
+ updated(changedProperties) {
75
+ // reset the index if we change the number of results
76
+ if (changedProperties.has('numberOfResults')) {
77
+ this.currentResultIndex = 0;
78
+ }
79
+ }
80
+ /**
81
+ * Called when user clicks on the previous result button.
82
+ * Loops around to the last result when we reach the first.
83
+ *
84
+ * @memberof SearchResultsSwitcher
85
+ */
86
+ goToPreviousResult() {
87
+ if (this.currentResultIndex < 1) {
88
+ this.currentResultIndex = this.numberOfResults - 1;
89
+ }
90
+ else {
91
+ this.currentResultIndex -= 1;
92
+ }
93
+ this.emitSearchResultIndexChangedEvent();
94
+ }
95
+ /**
96
+ * Called when user clicks on the next result button.
97
+ * Loops around to the first result when we reach the last.
98
+ *
99
+ * @memberof SearchResultsSwitcher
100
+ */
101
+ goToNextResult() {
102
+ if (this.currentResultIndex === this.numberOfResults - 1) {
103
+ this.currentResultIndex = 0;
104
+ }
105
+ else {
106
+ this.currentResultIndex += 1;
107
+ }
108
+ this.emitSearchResultIndexChangedEvent();
109
+ }
110
+ /**
111
+ * Emit an searchResultIndexChanged event that the index has been changed
112
+ *
113
+ * ie: `e.detail.searchResultIndex = 2`
114
+ *
115
+ * @memberof SearchResultsSwitcher
116
+ */
117
+ emitSearchResultIndexChangedEvent() {
118
+ const event = new CustomEvent('searchResultIndexChanged', {
119
+ detail: { searchResultIndex: this.currentResultIndex },
120
+ });
121
+ this.dispatchEvent(event);
122
+ }
123
+ };
124
+ __decorate([
125
+ property({ type: Number })
126
+ ], SearchResultsSwitcher.prototype, "numberOfResults", void 0);
127
+ __decorate([
128
+ property({ type: Number })
129
+ ], SearchResultsSwitcher.prototype, "currentResultIndex", void 0);
130
+ SearchResultsSwitcher = __decorate([
131
+ customElement('search-results-switcher')
132
+ ], SearchResultsSwitcher);
133
+ export default SearchResultsSwitcher;
134
134
  //# sourceMappingURL=search-results-switcher.js.map
package/package.json CHANGED
@@ -1,93 +1,93 @@
1
- {
2
- "name": "@internetarchive/radio-player",
3
- "version": "0.0.3",
4
- "description": "A Radio Player LitElement.",
5
- "license": "AGPL-3.0-only",
6
- "main": "index.js",
7
- "module": "index.js",
8
- "types": "index.d.ts",
9
- "files": [
10
- "lib/**/*",
11
- "!lib/demo",
12
- "src/**/*",
13
- "index.d.ts",
14
- "index.js"
15
- ],
16
- "scripts": {
17
- "prepare": "yarn run build",
18
- "build": "tsc -p tsconfig.build.json",
19
- "start": "concurrently \"tsc --watch\" \"es-dev-server --app-index demo/index.html --node-resolve --open --watch --preserve-symlinks\"",
20
- "start:compatibility": "concurrently \"tsc --watch\" \"es-dev-server --app-index demo/index.html --node-resolve --open --watch --compatibility all --preserve-symlinks\"",
21
- "lint:eslint": "eslint --ext .ts . --ignore-path .gitignore",
22
- "format:eslint": "eslint --ext .ts . --fix --ignore-path .gitignore",
23
- "lint": "yarn run lint:eslint",
24
- "format": "yarn run format:eslint",
25
- "test": "yarn run build && yarn lint && karma start --coverage",
26
- "test:watch": "concurrently \"tsc --watch\" \"karma start --auto-watch=true --single-run=false\"",
27
- "test:update-snapshots": "karma start --update-snapshots",
28
- "test:prune-snapshots": "karma start --prune-snapshots",
29
- "test:compatibility": "karma start --compatibility all --coverage",
30
- "test:compatibility:watch": "karma start --compatibility all --auto-watch=true --single-run=false",
31
- "test:bs": "karma start karma.bs.config.js --compatibility all --coverage",
32
- "site:build": "yarn run storybook:build",
33
- "storybook": "start-storybook -p 9001",
34
- "storybook:build": "build-storybook -o _site -s storybook-static"
35
- },
36
- "dependencies": {
37
- "@internetarchive/audio-element": "^0.0.2",
38
- "@internetarchive/expandable-search-bar": "^0.0.2",
39
- "@internetarchive/ia-activity-indicator": "^0.0.3",
40
- "@internetarchive/playback-controls": "0.0.2",
41
- "@internetarchive/scrubber-bar": "^0.0.2",
42
- "@internetarchive/transcript-view": "^0.0.3",
43
- "@internetarchive/waveform-progress": "^0.0.2",
44
- "lit": "^2.2.7"
45
- },
46
- "devDependencies": {
47
- "@open-wc/eslint-config": "^7.0.0",
48
- "@open-wc/prettier-config": "^0.1.10",
49
- "@open-wc/testing": "^3.1.6",
50
- "@open-wc/testing-karma": "^3.0.0",
51
- "@open-wc/testing-karma-bs": "^1.0.0",
52
- "@types/form-data": "^2.5.0",
53
- "@typescript-eslint/eslint-plugin": "^5.30.0",
54
- "@typescript-eslint/parser": "^5.30.0",
55
- "concurrently": "^4.1.2",
56
- "es-dev-server": "^1.5.0",
57
- "eslint": "^8.18.0",
58
- "eslint-config-prettier": "^8.5.0",
59
- "eslint-plugin-import": "^2.26.0",
60
- "eslint-plugin-lit-a11y": "^2.2.0",
61
- "eslint-plugin-wc": "^1.3.2",
62
- "gulp": "^4.0.2",
63
- "husky": "^1.0.0",
64
- "karma": "^6.4.0",
65
- "karma-coverage": "^2.0.1",
66
- "lint-staged": "^8.0.0",
67
- "mocha": "^10.0.0",
68
- "polymer-cli": "^1.9.11",
69
- "typescript": "^4.7.4",
70
- "webpack-merge": "^4.1.5"
71
- },
72
- "eslintConfig": {
73
- "extends": [
74
- "@open-wc/eslint-config",
75
- "eslint-config-prettier"
76
- ]
77
- },
78
- "prettier": "@open-wc/prettier-config",
79
- "husky": {
80
- "hooks": {
81
- "pre-commit": "lint-staged"
82
- }
83
- },
84
- "publishConfig": {
85
- "access": "public"
86
- },
87
- "lint-staged": {
88
- "*.ts": [
89
- "eslint --fix",
90
- "git add"
91
- ]
92
- }
93
- }
1
+ {
2
+ "name": "@internetarchive/radio-player",
3
+ "version": "0.0.4-alpha.1",
4
+ "description": "A Radio Player LitElement.",
5
+ "license": "AGPL-3.0-only",
6
+ "main": "index.js",
7
+ "module": "index.js",
8
+ "types": "index.d.ts",
9
+ "files": [
10
+ "lib/**/*",
11
+ "!lib/demo",
12
+ "src/**/*",
13
+ "index.d.ts",
14
+ "index.js"
15
+ ],
16
+ "scripts": {
17
+ "prepare": "yarn run build",
18
+ "build": "tsc -p tsconfig.build.json",
19
+ "start": "concurrently \"tsc --watch\" \"es-dev-server --app-index demo/index.html --node-resolve --open --watch --preserve-symlinks\"",
20
+ "start:compatibility": "concurrently \"tsc --watch\" \"es-dev-server --app-index demo/index.html --node-resolve --open --watch --compatibility all --preserve-symlinks\"",
21
+ "lint:eslint": "eslint --ext .ts . --ignore-path .gitignore",
22
+ "format:eslint": "eslint --ext .ts . --fix --ignore-path .gitignore",
23
+ "lint": "yarn run lint:eslint",
24
+ "format": "yarn run format:eslint",
25
+ "test": "yarn run build && yarn lint && karma start --coverage",
26
+ "test:watch": "concurrently \"tsc --watch\" \"karma start --auto-watch=true --single-run=false\"",
27
+ "test:update-snapshots": "karma start --update-snapshots",
28
+ "test:prune-snapshots": "karma start --prune-snapshots",
29
+ "test:compatibility": "karma start --compatibility all --coverage",
30
+ "test:compatibility:watch": "karma start --compatibility all --auto-watch=true --single-run=false",
31
+ "test:bs": "karma start karma.bs.config.js --compatibility all --coverage",
32
+ "site:build": "yarn run storybook:build",
33
+ "storybook": "start-storybook -p 9001",
34
+ "storybook:build": "build-storybook -o _site -s storybook-static"
35
+ },
36
+ "dependencies": {
37
+ "@internetarchive/audio-element": "^0.0.2",
38
+ "@internetarchive/expandable-search-bar": "^0.0.2",
39
+ "@internetarchive/ia-activity-indicator": "^0.0.4",
40
+ "@internetarchive/playback-controls": "0.0.2",
41
+ "@internetarchive/scrubber-bar": "^0.0.2",
42
+ "@internetarchive/transcript-view": "^0.0.3",
43
+ "@internetarchive/waveform-progress": "^0.0.2",
44
+ "lit": "^2.2.7"
45
+ },
46
+ "devDependencies": {
47
+ "@open-wc/eslint-config": "^7.0.0",
48
+ "@open-wc/prettier-config": "^0.1.10",
49
+ "@open-wc/testing": "^3.1.6",
50
+ "@open-wc/testing-karma": "^3.0.0",
51
+ "@open-wc/testing-karma-bs": "^1.0.0",
52
+ "@types/form-data": "^2.5.0",
53
+ "@typescript-eslint/eslint-plugin": "^5.30.0",
54
+ "@typescript-eslint/parser": "^5.30.0",
55
+ "concurrently": "^4.1.2",
56
+ "es-dev-server": "^1.5.0",
57
+ "eslint": "^8.18.0",
58
+ "eslint-config-prettier": "^8.5.0",
59
+ "eslint-plugin-import": "^2.26.0",
60
+ "eslint-plugin-lit-a11y": "^2.2.0",
61
+ "eslint-plugin-wc": "^1.3.2",
62
+ "gulp": "^4.0.2",
63
+ "husky": "^1.0.0",
64
+ "karma": "^6.4.0",
65
+ "karma-coverage": "^2.0.1",
66
+ "lint-staged": "^8.0.0",
67
+ "mocha": "^10.0.0",
68
+ "polymer-cli": "^1.9.11",
69
+ "typescript": "^4.7.4",
70
+ "webpack-merge": "^4.1.5"
71
+ },
72
+ "eslintConfig": {
73
+ "extends": [
74
+ "@open-wc/eslint-config",
75
+ "eslint-config-prettier"
76
+ ]
77
+ },
78
+ "prettier": "@open-wc/prettier-config",
79
+ "husky": {
80
+ "hooks": {
81
+ "pre-commit": "lint-staged"
82
+ }
83
+ },
84
+ "publishConfig": {
85
+ "access": "public"
86
+ },
87
+ "lint-staged": {
88
+ "*.ts": [
89
+ "eslint --fix",
90
+ "git add"
91
+ ]
92
+ }
93
+ }
@@ -1,17 +1,17 @@
1
- import { html } from 'lit';
2
-
3
- const image = html`
4
- <svg height="13" viewBox="0 0 8 13" width="8" xmlns="http://www.w3.org/2000/svg">
5
- <path
6
- d="m-1.5 8.5 5-5 5 5"
7
- fill="none"
8
- stroke="#fff"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- stroke-width="2"
12
- transform="matrix(0 -1 1 0 -2 9.7)"
13
- />
14
- </svg>
15
- `;
16
-
17
- export default image;
1
+ import { html } from 'lit';
2
+
3
+ const image = html`
4
+ <svg height="13" viewBox="0 0 8 13" width="8" xmlns="http://www.w3.org/2000/svg">
5
+ <path
6
+ d="m-1.5 8.5 5-5 5 5"
7
+ fill="none"
8
+ stroke="#fff"
9
+ stroke-linecap="round"
10
+ stroke-linejoin="round"
11
+ stroke-width="2"
12
+ transform="matrix(0 -1 1 0 -2 9.7)"
13
+ />
14
+ </svg>
15
+ `;
16
+
17
+ export default image;
@@ -1,17 +1,17 @@
1
- import { html } from 'lit';
2
-
3
- const image = html`
4
- <svg height="13" viewBox="0 0 8 13" width="8" xmlns="http://www.w3.org/2000/svg">
5
- <path
6
- d="m-1.5 8.5 5-5 5 5"
7
- fill="none"
8
- stroke="#fff"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- stroke-width="2"
12
- transform="matrix(0 -1 -1 0 10 9.7)"
13
- />
14
- </svg>
15
- `;
16
-
17
- export default image;
1
+ import { html } from 'lit';
2
+
3
+ const image = html`
4
+ <svg height="13" viewBox="0 0 8 13" width="8" xmlns="http://www.w3.org/2000/svg">
5
+ <path
6
+ d="m-1.5 8.5 5-5 5 5"
7
+ fill="none"
8
+ stroke="#fff"
9
+ stroke-linecap="round"
10
+ stroke-linejoin="round"
11
+ stroke-width="2"
12
+ transform="matrix(0 -1 -1 0 10 9.7)"
13
+ />
14
+ </svg>
15
+ `;
16
+
17
+ export default image;
@@ -1,17 +1,17 @@
1
- /**
2
- * A data model for defining a zone of music, which is used
3
- * to skip over the zone if it is enabled.
4
- *
5
- * @export
6
- * @class MusicZone
7
- */
8
- export default class MusicZone {
9
- start = 0;
10
-
11
- end = 0;
12
-
13
- constructor(start: number, end: number) {
14
- this.start = start;
15
- this.end = end;
16
- }
17
- }
1
+ /**
2
+ * A data model for defining a zone of music, which is used
3
+ * to skip over the zone if it is enabled.
4
+ *
5
+ * @export
6
+ * @class MusicZone
7
+ */
8
+ export default class MusicZone {
9
+ start = 0;
10
+
11
+ end = 0;
12
+
13
+ constructor(start: number, end: number) {
14
+ this.start = start;
15
+ this.end = end;
16
+ }
17
+ }
@@ -1,47 +1,47 @@
1
- import { AudioSource } from '@internetarchive/audio-element';
2
-
3
- /**
4
- * A data model to configure the Radio Player.
5
- *
6
- * @export
7
- * @class RadioPlayerConfig
8
- */
9
- export default class RadioPlayerConfig {
10
- title: string;
11
-
12
- date: string;
13
-
14
- logoUrl: string;
15
-
16
- waveformUrl: string | undefined;
17
-
18
- audioSources: AudioSource[];
19
-
20
- quickSearches: string[] = [];
21
-
22
- /**
23
- * Creates an instance of RadioPlayerConfig.
24
- * @param {string} title
25
- * @param {string} date
26
- * @param {string} logoUrl
27
- * @param {string} waveformUrl
28
- * @param {AudioSource[]} audioSources
29
- * @param {string[]} [quickSearches=[]]
30
- * @memberof RadioPlayerConfig
31
- */
32
- constructor(
33
- title: string,
34
- date: string,
35
- logoUrl: string,
36
- waveformUrl: string | undefined,
37
- audioSources: AudioSource[],
38
- quickSearches: string[] = [],
39
- ) {
40
- this.title = title;
41
- this.date = date;
42
- this.logoUrl = logoUrl;
43
- this.waveformUrl = waveformUrl;
44
- this.audioSources = audioSources;
45
- this.quickSearches = quickSearches;
46
- }
47
- }
1
+ import { AudioSource } from '@internetarchive/audio-element';
2
+
3
+ /**
4
+ * A data model to configure the Radio Player.
5
+ *
6
+ * @export
7
+ * @class RadioPlayerConfig
8
+ */
9
+ export default class RadioPlayerConfig {
10
+ title: string;
11
+
12
+ date: string;
13
+
14
+ logoUrl: string;
15
+
16
+ waveformUrl: string | undefined;
17
+
18
+ audioSources: AudioSource[];
19
+
20
+ quickSearches: string[] = [];
21
+
22
+ /**
23
+ * Creates an instance of RadioPlayerConfig.
24
+ * @param {string} title
25
+ * @param {string} date
26
+ * @param {string} logoUrl
27
+ * @param {string} waveformUrl
28
+ * @param {AudioSource[]} audioSources
29
+ * @param {string[]} [quickSearches=[]]
30
+ * @memberof RadioPlayerConfig
31
+ */
32
+ constructor(
33
+ title: string,
34
+ date: string,
35
+ logoUrl: string,
36
+ waveformUrl: string | undefined,
37
+ audioSources: AudioSource[],
38
+ quickSearches: string[] = [],
39
+ ) {
40
+ this.title = title;
41
+ this.date = date;
42
+ this.logoUrl = logoUrl;
43
+ this.waveformUrl = waveformUrl;
44
+ this.audioSources = audioSources;
45
+ this.quickSearches = quickSearches;
46
+ }
47
+ }