Skip to content

Commit 88a3a2d

Browse files
sampottsmihar-22
authored andcommitted
feat(react): initial skin scaffolding
1 parent 7b41930 commit 88a3a2d

File tree

29 files changed

+357
-16
lines changed

29 files changed

+357
-16
lines changed

packages/react/package.json

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,30 @@
1616
"types": "./dist/dev/index.d.ts",
1717
"development": "./dist/dev/index.js",
1818
"default": "./dist/default/index.js"
19+
},
20+
"./*.css": "./dist/default/presets/*.css",
21+
"./audio": {
22+
"types": "./dist/dev/presets/audio/index.d.ts",
23+
"development": "./dist/dev/presets/audio/index.js",
24+
"default": "./dist/default/presets/audio/index.js"
25+
},
26+
"./background": {
27+
"types": "./dist/dev/presets/background/index.d.ts",
28+
"development": "./dist/dev/presets/background/index.js",
29+
"default": "./dist/default/presets/background/index.js"
30+
},
31+
"./video": {
32+
"types": "./dist/dev/presets/video/index.d.ts",
33+
"development": "./dist/dev/presets/video/index.js",
34+
"default": "./dist/default/presets/video/index.js"
1935
}
2036
},
2137
"scripts": {
22-
"build": "tsdown",
23-
"build:watch": "tsdown --watch ./src --no-clean",
24-
"dev": "pnpm run build:watch",
38+
"build": "tsdown && pnpm css:copy",
39+
"build:watch": "concurrently 'tsdown --watch ./src --no-clean' 'pnpm css:watch'",
40+
"css:copy": "rsync -a --include='*/' --include='*.css' --exclude='*' src/presets/ dist/default/presets/",
41+
"css:watch": "chokidar 'src/presets/**/*.css' --initial -c 'pnpm run css:copy'",
42+
"dev": "pnpm build:watch",
2543
"test": "vitest run",
2644
"test:watch": "vitest",
2745
"clean": "rm -rf dist types"
@@ -37,6 +55,8 @@
3755
"devDependencies": {
3856
"@testing-library/react": "^16.3.0",
3957
"@types/react": "^19.2.7",
58+
"chokidar-cli": "^3.0.0",
59+
"concurrently": "^9.2.1",
4060
"jsdom": "^26.1.0",
4161
"react": "^19.2.1",
4262
"react-dom": "^19.2.1",

packages/react/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ export { createSelector, shallowEqual } from '@videojs/store';
99
export { useSelector, useStore } from '@videojs/store/react';
1010

1111
// Media primitives
12-
export { Audio, type AudioProps } from './media/audio';
13-
export { Video, type VideoProps } from './media/video';
1412
export {
1513
Container,
1614
type ContainerProps,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export { Audio, type AudioProps } from '@/media/audio';
2+
export * from './minimal-skin';
3+
export * from './skin';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.media-minimal-skin {
2+
color: var(--media-color, red);
3+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { BaseSkinProps } from '../types';
2+
3+
export type MinimalAudioSkinProps = BaseSkinProps;
4+
5+
export function MinimalAudioSkin(props: MinimalAudioSkinProps) {
6+
const { children } = props;
7+
return <div>{children}</div>;
8+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.media-skin {
2+
color: var(--media-color, red);
3+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { BaseSkinProps } from '../types';
2+
3+
export type AudioSkinProps = BaseSkinProps;
4+
5+
export function AudioSkin(props: AudioSkinProps) {
6+
const { children } = props;
7+
return <div>{children}</div>;
8+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './skin';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.media-skin {
2+
color: var(--media-color, red);
3+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { BaseSkinProps } from '../types';
2+
3+
export type BackgroundVideoSkinProps = BaseSkinProps;
4+
5+
export function BackgroundVideoSkin(props: BackgroundVideoSkinProps) {
6+
const { children } = props;
7+
return <div>{children}</div>;
8+
}

0 commit comments

Comments
 (0)