build all

Refactor utility functions for improved readability and consistency

- Updated compatibility.js to use consistent line endings and formatting.
- Refactored component.js for better readability and structure, including consistent use of arrow functions and binding.
- Simplified dom.js functions with consistent formatting and improved readability.
- Enhanced emitter.js with consistent formatting and arrow function usage.
- Streamlined error.js for improved readability and consistency.
- Refactored file.js to use consistent formatting and improved readability.
- Improved format.js functions for better readability and consistency.
- Updated index.js to maintain consistent export formatting.
- Refactored property.js for improved readability and consistency.
- Enhanced subtitle.js with consistent formatting and improved readability.
- Refactored time.js for better readability and consistent formatting.

fix: update lint script to target only source files for consistency

Revert "fix: restore export statements for various plugins and update type definitions for better clarity"

This reverts commit b5e969d81ec765cd8a34b06e6ef4f232ef25087f.

fix: restore export statements for various plugins and update type definitions for better clarity

Refactor type definitions to use interfaces instead of type aliases for better extensibility and clarity across i18n, icons, option, player, quality, setting, subtitle, template, and utils modules.
This commit is contained in:
Harvey Zack committed 2025-08-03 13:17:33 +08:00
1 parent 532dd67cfd
commit 35ad9883af
447 files changed
+18248 -17946

No files matched your search

+65 -65
View File
@@ -1,69 +1,69 @@
import { def, getIcon } from '../utils';
import loading from 'bundle-text:./loading.svg';
import state from 'bundle-text:./state.svg';
import check from 'bundle-text:./check.svg';
import play from 'bundle-text:./play.svg';
import pause from 'bundle-text:./pause.svg';
import volume from 'bundle-text:./volume.svg';
import volumeClose from 'bundle-text:./volume-close.svg';
import screenshot from 'bundle-text:./screenshot.svg';
import setting from 'bundle-text:./setting.svg';
import arrowLeft from 'bundle-text:./arrow-left.svg';
import arrowRight from 'bundle-text:./arrow-right.svg';
import playbackRate from 'bundle-text:./playback-rate.svg';
import aspectRatio from 'bundle-text:./aspect-ratio.svg';
import config from 'bundle-text:./config.svg';
import pip from 'bundle-text:./pip.svg';
import lock from 'bundle-text:./lock.svg';
import unlock from 'bundle-text:./unlock.svg';
import fullscreenOff from 'bundle-text:./fullscreen-off.svg';
import fullscreenOn from 'bundle-text:./fullscreen-on.svg';
import fullscreenWebOff from 'bundle-text:./fullscreen-web-off.svg';
import fullscreenWebOn from 'bundle-text:./fullscreen-web-on.svg';
import switchOn from 'bundle-text:./switch-on.svg';
import switchOff from 'bundle-text:./switch-off.svg';
import flip from 'bundle-text:./flip.svg';
import error from 'bundle-text:./error.svg';
import close from 'bundle-text:./close.svg';
import airplay from 'bundle-text:./airplay.svg';
import airplay from 'bundle-text:./airplay.svg'
import arrowLeft from 'bundle-text:./arrow-left.svg'
import arrowRight from 'bundle-text:./arrow-right.svg'
import aspectRatio from 'bundle-text:./aspect-ratio.svg'
import check from 'bundle-text:./check.svg'
import close from 'bundle-text:./close.svg'
import config from 'bundle-text:./config.svg'
import error from 'bundle-text:./error.svg'
import flip from 'bundle-text:./flip.svg'
import fullscreenOff from 'bundle-text:./fullscreen-off.svg'
import fullscreenOn from 'bundle-text:./fullscreen-on.svg'
import fullscreenWebOff from 'bundle-text:./fullscreen-web-off.svg'
import fullscreenWebOn from 'bundle-text:./fullscreen-web-on.svg'
import loading from 'bundle-text:./loading.svg'
import lock from 'bundle-text:./lock.svg'
import pause from 'bundle-text:./pause.svg'
import pip from 'bundle-text:./pip.svg'
import play from 'bundle-text:./play.svg'
import playbackRate from 'bundle-text:./playback-rate.svg'
import screenshot from 'bundle-text:./screenshot.svg'
import setting from 'bundle-text:./setting.svg'
import state from 'bundle-text:./state.svg'
import switchOff from 'bundle-text:./switch-off.svg'
import switchOn from 'bundle-text:./switch-on.svg'
import unlock from 'bundle-text:./unlock.svg'
import volumeClose from 'bundle-text:./volume-close.svg'
import volume from 'bundle-text:./volume.svg'
import { def, getIcon } from '../utils'
export default class Icons {
constructor(art) {
const icons = {
loading,
state,
play,
pause,
check,
volume,
volumeClose,
screenshot,
setting,
pip,
arrowLeft,
arrowRight,
playbackRate,
aspectRatio,
config,
lock,
flip,
unlock,
fullscreenOff,
fullscreenOn,
fullscreenWebOff,
fullscreenWebOn,
switchOn,
switchOff,
error,
close,
airplay,
...art.option.icons,
};
for (const key in icons) {
def(this, key, {
get: () => getIcon(key, icons[key]),
});
}
constructor(art) {
const icons = {
loading,
state,
play,
pause,
check,
volume,
volumeClose,
screenshot,
setting,
pip,
arrowLeft,
arrowRight,
playbackRate,
aspectRatio,
config,
lock,
flip,
unlock,
fullscreenOff,
fullscreenOn,
fullscreenWebOff,
fullscreenWebOn,
switchOn,
switchOff,
error,
close,
airplay,
...art.option.icons,
}
for (const key in icons) {
def(this, key, {
get: () => getIcon(key, icons[key]),
})
}
}
}