mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
chore(site): preset pipeline — scan source directories instead of barrel files (#1333)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
d8cd59e0fd
commit
7daec38b88
+2
@@ -11,3 +11,5 @@ import { volumeFeature } from './volume';
|
||||
export const videoFeatures = [playbackFeature, volumeFeature];
|
||||
|
||||
export const audioFeatures = [playbackFeature];
|
||||
|
||||
export const backgroundFeatures = [];
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "@videojs/html",
|
||||
"exports": {
|
||||
"./video": {
|
||||
"types": "./src/presets/video.ts",
|
||||
"default": "./src/presets/video.ts"
|
||||
},
|
||||
"./video/*": {
|
||||
"types": "./src/define/video/*.ts",
|
||||
"default": "./src/define/video/*.ts"
|
||||
},
|
||||
"./audio": {
|
||||
"types": "./src/presets/audio.ts",
|
||||
"default": "./src/presets/audio.ts"
|
||||
},
|
||||
"./audio/*": {
|
||||
"types": "./src/define/audio/*.ts",
|
||||
"default": "./src/define/audio/*.ts"
|
||||
},
|
||||
"./background": {
|
||||
"types": "./src/presets/background.ts",
|
||||
"default": "./src/presets/background.ts"
|
||||
},
|
||||
"./background/*": {
|
||||
"types": "./src/define/background/*.ts",
|
||||
"default": "./src/define/background/*.ts"
|
||||
}
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Mock HTML background player element.
|
||||
*
|
||||
* Exercises: player exclusion — has static tagName but class name
|
||||
* contains "Player", so it should NOT appear in skins or media elements.
|
||||
*/
|
||||
export class BackgroundVideoPlayerElement extends HTMLElement {
|
||||
static readonly tagName = 'background-video-player';
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Mock HTML background video skin element.
|
||||
*
|
||||
* Exercises: skin detection via *Skin*Element naming + static tagName.
|
||||
*/
|
||||
import { SkinElement } from '../skin-element';
|
||||
|
||||
export class BackgroundVideoSkinElement extends SkinElement {
|
||||
static readonly tagName = 'background-video-skin';
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Mock HTML background video re-export.
|
||||
*
|
||||
* Exercises: `export *` re-export that resolves to a file with static tagName.
|
||||
* Mirrors real define/background/video.ts which re-exports from
|
||||
* define/media/background-video.ts (the file that registers the custom element).
|
||||
*/
|
||||
export * from '../media/background-video';
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Mock HTML background preset.
|
||||
*
|
||||
* Exercises: intentionally incomplete barrel — only exports the feature bundle.
|
||||
* The skin and media element are NOT re-exported here, proving the pipeline
|
||||
* must scan the directory (define/background/) to find them.
|
||||
*/
|
||||
export { backgroundFeatures } from '../../../core/src/dom/store/features/presets';
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "@videojs/react",
|
||||
"exports": {
|
||||
"./video": {
|
||||
"types": "./src/presets/video/index.ts",
|
||||
"default": "./src/presets/video/index.ts"
|
||||
},
|
||||
"./video/*": {
|
||||
"types": "./src/presets/video/*.ts",
|
||||
"default": "./src/presets/video/*.ts"
|
||||
},
|
||||
"./audio": {
|
||||
"types": "./src/presets/audio/index.ts",
|
||||
"default": "./src/presets/audio/index.ts"
|
||||
},
|
||||
"./audio/*": {
|
||||
"types": "./src/presets/audio/*.ts",
|
||||
"default": "./src/presets/audio/*.ts"
|
||||
},
|
||||
"./background": {
|
||||
"types": "./src/presets/background/index.ts",
|
||||
"default": "./src/presets/background/index.ts"
|
||||
},
|
||||
"./background/*": {
|
||||
"types": "./src/presets/background/*.ts",
|
||||
"default": "./src/presets/background/*.ts"
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Mock React BackgroundVideo media component.
|
||||
*/
|
||||
export function BackgroundVideo(): void {}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Mock React background preset.
|
||||
*
|
||||
* Exercises: preset with no features, single skin, custom media element.
|
||||
*/
|
||||
export { backgroundFeatures } from '../../../../core/src/dom/store/features/presets';
|
||||
export { BackgroundVideo } from '../../media/background-video';
|
||||
export * from './skin';
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Mock React BackgroundVideoSkin component.
|
||||
*/
|
||||
export function BackgroundVideoSkin(): void {}
|
||||
Reference in New Issue
Block a user