@internetarchive/audio-element
Advanced tools
Comparing version 0.0.2-alpha.1 to 0.0.2
@@ -1,2 +0,2 @@ | ||
import { LitElement, TemplateResult, PropertyValues } from 'lit-element'; | ||
import { LitElement, TemplateResult, PropertyValues } from 'lit'; | ||
import AudioSource from './models/audio-source'; | ||
@@ -8,5 +8,4 @@ export default class AudioElement extends LitElement { | ||
sources: AudioSource[]; | ||
preload: 'auto' | 'metadata' | 'none'; | ||
readonly duration: number; | ||
readonly currentTime: number; | ||
get duration(): number; | ||
get currentTime(): number; | ||
load(): void; | ||
@@ -18,3 +17,3 @@ play(): void; | ||
render(): TemplateResult; | ||
readonly audioElement: HTMLAudioElement | null; | ||
get audioElement(): HTMLAudioElement | null; | ||
updated(changedProperties: PropertyValues): void; | ||
@@ -21,0 +20,0 @@ private handleDurationChange; |
@@ -7,3 +7,5 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
}; | ||
import { LitElement, html, customElement, property, } from 'lit-element'; | ||
/* eslint-disable operator-assignment */ | ||
import { LitElement, html } from 'lit'; | ||
import { customElement, property } from 'lit/decorators.js'; | ||
let AudioElement = class AudioElement extends LitElement { | ||
@@ -16,3 +18,2 @@ constructor() { | ||
this.sources = []; | ||
this.preload = 'auto'; | ||
} | ||
@@ -66,3 +67,2 @@ get duration() { | ||
<audio | ||
.preload=${this.preload} | ||
@timeupdate=${this.handleTimeChange} | ||
@@ -141,5 +141,2 @@ @durationchange=${this.handleDurationChange} | ||
], AudioElement.prototype, "sources", void 0); | ||
__decorate([ | ||
property({ type: String }) | ||
], AudioElement.prototype, "preload", void 0); | ||
AudioElement = __decorate([ | ||
@@ -146,0 +143,0 @@ customElement('audio-element') |
{ | ||
"name": "@internetarchive/audio-element", | ||
"version": "0.0.2-alpha.1", | ||
"version": "0.0.2", | ||
"description": "An Audio Element that wraps the HTML audio tag.", | ||
@@ -18,3 +18,5 @@ "license": "AGPL-3.0-only", | ||
"build": "tsc -p tsconfig.build.json", | ||
"start": "concurrently \"tsc --watch\" \"es-dev-server --app-index demo/index.html --node-resolve --open --watch\"", | ||
"watch": "tsc --watch", | ||
"start": "concurrently \"npm run watch\" \"npm run devserver\"", | ||
"devserver": "es-dev-server --app-index demo/index.html --node-resolve --open --watch", | ||
"start:compatibility": "concurrently \"tsc --watch\" \"es-dev-server --app-index demo/index.html --node-resolve --open --watch --compatibility all\"", | ||
@@ -25,3 +27,3 @@ "lint:eslint": "eslint --ext .ts . --ignore-path .gitignore", | ||
"format:prettier": "prettier \"**/*.ts\" --write --ignore-path .gitignore", | ||
"lint": "npm run lint:eslint && npm run lint:prettier", | ||
"lint": "eslint -c .eslintrc --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore", | ||
"format": "npm run format:eslint && npm run format:prettier", | ||
@@ -34,52 +36,45 @@ "test": "npm run build && karma start --coverage", | ||
"test:compatibility:watch": "karma start --compatibility all --auto-watch=true --single-run=false", | ||
"test:bs": "karma start karma.bs.config.js --compatibility all --coverage", | ||
"site:build": "npm run storybook:build", | ||
"storybook": "start-storybook -p 9001", | ||
"storybook:build": "build-storybook -o _site -s storybook-static" | ||
"test:bs": "karma start karma.bs.config.js --compatibility all --coverage" | ||
}, | ||
"dependencies": { | ||
"lit-element": "^2.2.1", | ||
"lit-html": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@open-wc/demoing-storybook": "^0.3.0", | ||
"@open-wc/eslint-config": "^1.0.0", | ||
"dependencies": { | ||
"lit": "^2.2.7" | ||
}, | ||
"devDependencies": { | ||
"@open-wc/eslint-config": "^7.0.0", | ||
"@open-wc/prettier-config": "^0.1.10", | ||
"@open-wc/testing": "^2.0.0", | ||
"@open-wc/testing": "^3.1.6", | ||
"@open-wc/testing-karma": "^3.0.0", | ||
"@open-wc/testing-karma-bs": "^1.0.0", | ||
"@storybook/react": "^5.1.11", | ||
"@types/form-data": "^2.5.0", | ||
"@types/storybook__react": "^4.0.2", | ||
"@typescript-eslint/eslint-plugin": "^2.3.0", | ||
"@typescript-eslint/parser": "^2.2.0", | ||
"@typescript-eslint/eslint-plugin": "^5.30.0", | ||
"@typescript-eslint/parser": "^5.30.0", | ||
"concurrently": "^4.1.2", | ||
"es-dev-server": "^1.5.0", | ||
"eslint": "^6.1.0", | ||
"eslint": "^8.18.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-lit-a11y": "^2.2.0", | ||
"eslint-plugin-wc": "^1.3.2", | ||
"gulp": "^4.0.2", | ||
"husky": "^1.0.0", | ||
"karma": "^6.4.0", | ||
"karma-coverage": "^2.0.1", | ||
"lint-staged": "^8.0.0", | ||
"mocha": "^10.0.0", | ||
"polymer-cli": "^1.9.11", | ||
"typescript": "^3.6.2", | ||
"typescript": "^4.7.4", | ||
"webpack-merge": "^4.1.5" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"@open-wc/eslint-config", | ||
"eslint-config-prettier" | ||
] | ||
}, | ||
"prettier": "@open-wc/prettier-config", | ||
"husky": { | ||
}, | ||
"prettier": "@open-wc/prettier-config", | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"publishConfig": { | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"lint-staged": { | ||
}, | ||
"lint-staged": { | ||
"src/**/*.ts": [ | ||
"eslint --fix", | ||
"eslint -c .eslintrc --fix", | ||
"prettier --write", | ||
@@ -86,0 +81,0 @@ "git add" |
@@ -1,9 +0,4 @@ | ||
import { | ||
LitElement, | ||
html, | ||
customElement, | ||
property, | ||
TemplateResult, | ||
PropertyValues, | ||
} from 'lit-element'; | ||
/* eslint-disable operator-assignment */ | ||
import { LitElement, html, TemplateResult, PropertyValues } from 'lit'; | ||
import { customElement, property } from 'lit/decorators.js'; | ||
import AudioSource from './models/audio-source'; | ||
@@ -21,4 +16,2 @@ | ||
@property({ type: String }) preload: 'auto' | 'metadata' | 'none' = 'auto'; | ||
get duration(): number { | ||
@@ -74,3 +67,2 @@ /* istanbul ignore next */ | ||
<audio | ||
.preload=${this.preload} | ||
@timeupdate=${this.handleTimeChange} | ||
@@ -77,0 +69,0 @@ @durationchange=${this.handleDurationChange} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
52641
24
303
+ Addedlit@^2.2.7
+ Added@lit-labs/ssr-dom-shim@1.2.1(transitive)
+ Added@lit/reactive-element@1.6.3(transitive)
+ Added@types/trusted-types@2.0.7(transitive)
+ Addedlit@2.8.0(transitive)
+ Addedlit-element@3.3.3(transitive)
+ Addedlit-html@2.8.0(transitive)
- Removedlit-element@^2.2.1
- Removedlit-html@^1.0.0
- Removedlit-element@2.5.1(transitive)
- Removedlit-html@1.4.1(transitive)