Skip to content

Commit

Permalink
Revert "classic -> daniel"
Browse files Browse the repository at this point in the history
This reverts commit 4df4c34.
  • Loading branch information
AdamJaggard committed Sep 22, 2023
1 parent d60e8ba commit 0881ee4
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
3 changes: 3 additions & 0 deletions packages/mux-player-react/src/themes/classic.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// @ts-ignore
import '@mux/mux-player/themes/classic';
export default 'classic';
3 changes: 0 additions & 3 deletions packages/mux-player-react/src/themes/daniel.ts

This file was deleted.

10 changes: 5 additions & 5 deletions packages/mux-player/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
"browser": "./dist/themes/minimal/index.mjs",
"default": "./dist/themes/minimal/index.cjs.js"
},
"./themes/daniel": {
"import": "./dist/themes/daniel/index.mjs",
"require": "./dist/themes/daniel/index.cjs.js",
"browser": "./dist/themes/daniel/index.mjs",
"default": "./dist/themes/daniel/index.cjs.js"
"./themes/classic": {
"import": "./dist/themes/classic/index.mjs",
"require": "./dist/themes/classic/index.cjs.js",
"browser": "./dist/themes/classic/index.mjs",
"default": "./dist/themes/classic/index.cjs.js"
},
"./themes/gerwig": {
"import": "./dist/themes/gerwig/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/mux-player/scripts/build-themes.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
import { build } from 'esbuild';

const themes = ['daniel', 'microvideo', 'minimal', 'gerwig'];
const themes = ['classic', 'microvideo', 'minimal', 'gerwig'];
const devMode = process.argv.includes('--dev');

const shared = {
Expand Down
4 changes: 2 additions & 2 deletions packages/mux-player/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import { getErrorLogs } from './errors';
import { toNumberOrUndefined, i18n, parseJwt, containsComposedNode, camelCase, kebabCase } from './utils';
import * as logger from './logger';
import type { MuxTemplateProps, ErrorEvent } from './types';
import './themes/daniel';
const DefaultThemeName = 'daniel';
import './themes/classic';
const DefaultThemeName = 'classic';

export { MediaError };
export type Tokens = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- prettier-ignore -->
<template id="media-theme-daniel">
<template id="media-theme-classic">
<style>
:host {
--_primary-color: var(--media-primary-color, white);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// @ts-ignore
import theme from './daniel.html';
import theme from './classic.html';
import { document, globalThis } from '../../polyfills';
import { MediaThemeElement } from 'media-chrome/dist/media-theme-element.js';

const template = document.createElement('template');
if ('innerHTML' in template) template.innerHTML = theme;

class MediaThemeDaniel extends MediaThemeElement {
class MediaThemeClassic extends MediaThemeElement {
static template = template.content?.children?.[0];
}

if (!globalThis.customElements.get('media-theme-daniel')) {
globalThis.customElements.define('media-theme-daniel', MediaThemeDaniel);
if (!globalThis.customElements.get('media-theme-classic')) {
globalThis.customElements.define('media-theme-classic', MediaThemeClassic);
}

export default MediaThemeDaniel;
export default MediaThemeClassic;

0 comments on commit 0881ee4

Please sign in to comment.