Skip to content
This repository was archived by the owner on Oct 21, 2026. It is now read-only.

refactor(react,html)!: make every stable type importable from the framework packages - #3082

Merged
decepulis merged 26 commits into
claude/keen-mccarthy-7ams8m-pagesfrom
claude/keen-mccarthy-7ams8m-exports
Oct 1, 2026
Merged

decepulis merged 26 commits into
claude/keen-mccarthy-7ams8m-pagesfrom
claude/keen-mccarthy-7ams8m-exports

Conversation

@decepulis

@decepulis decepulis commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Part 5 of the API stability stack: #3073 → #3063 → #3066 → #3067 → this PR → #3068 → #3083.

Summary

The checker in #3063 makes stability transitive: a type named in a stable export's public signature is stable too, including through protected members, local helpers and mixin _base constants. It also requires every stable export to be importable from @videojs/react, @videojs/html, @videojs/store or an extension package. Before this PR, 320 stable exports could only be imported from @videojs/core, @videojs/media, @videojs/utils or an adapter package. After it, none are left.

Maintainer decisions this follows:

  • The *Core classes stay internal.
  • Component-API types and base media types are exported from the framework packages.
  • Adapter types used in media props are re-exported from the matching media entry.

Apart from exporting MediaError as a value, all changes are type-only.

  • Component APIs typed without core classes: React props and part namespaces name core's standalone XState/XProps types instead of XCore.State/XCore.Props.
    // before
    interface PlayButtonProps extends UIComponentProps<'button', PlayButtonCore.State>, PlayButtonCore.Props {}
    // after
    interface PlayButtonProps extends UIComponentProps<'button', PlayButtonState>, CorePlayButtonProps {}
    PlayButton.State and PlayButton.Props still work. The React context values for dialog, menu, popover and tooltip keep a core member; they aren't documented, and chore: tag undocumented public exports @internal and enforce it in CI #3068 tags them @internal. The thumbnail context isn't exported.
  • HTML base classes are generic over state, not the Core class: see the breaking changes below. Their abstract core stays protected and is typed with MediaButtonComponent/MediaUIComponent, which @videojs/html now re-exports as types along with UIComponent, so a subclass can name what it implements.
  • Helper types no longer leak:
    • Constructor is written out in place.
    • Simplify and UnionToIntersection are replaced by a local MergedConfig type.
    • The adapter event and query helpers move into html-media-adapter.ts, their only user.
    • Skins declare static styles: CSSStyleSheet | string instead of ShadowStyle.
    • hls-background-video declares its lifecycle callbacks locally instead of using utils' CustomElement.
  • Written-out union types: MediaStreamType, MediaReadyStateValue, PlaybackType and SourceType are literal unions instead of lookups into constants. PlaybackType and SourceType still accept any string. The constants themselves are still exported from their packages.
  • Members tagged @internal:
    • MenuContextValue.core, TooltipOptions.group, and DialogElementBaseOptions.core/.stateAttrMap
    • LiveButtonElement.core, and InputIndicatorElement's transition and container: element internals whose types would otherwise become stable through protected members
  • Adapter types are re-exported (type-only) from each @videojs/{react,html}/media/* entry: YouTube, Cloudflare, Spotify, TikTok, Twitch, Vimeo, Wistia, DASH, Shaka, hls.js, native HLS and Mux. That includes the adapter classes the media elements extend (HlsJsAdapter, DashAdapter, MuxVideoAdapter, …) and the Mux MuxAdapterAPI, MuxContentData and MuxPosterFitMode types. The adapters' engine getters stay stable, because the migration guides point to engine as the way to reach the playback engine; that makes the YouTube, Cloudflare and Spotify engine typings stable too.
  • Component and media types are re-exported (type-only) from the @videojs/html and @videojs/react roots:
    • core *State/*Props/option types, including the feat(core): add deriveCustomStatus to display custom actions #3064 deriveCustomStatus types (DeriveCustomStatus, StatusDetails, InputActionEvent, InputActionSource, MediaSnapshot, BuiltInIndicatorStatus)
    • i18n Text types
    • @videojs/media state, capability, event and track types, including EngineAdapter, the video-track and audio-rendition contracts, and WithMediaTracks
    • SliderInput (React only, for useSlider's computeState)
    • React skips names its own components already use: the core *Props it extends under the same name, i18n Text, and media's Video. Those are importable from @videojs/html, which the maintainer agreed to.
  • MediaError is a value export of both roots, next to the isMedia*Capable guards, so instanceof MediaError and new MediaError() work.
  • Merged with main: the 'use client' directives fix(react): declare client boundaries per module #3079 added to each React module are kept, and the root index.ts has none.

Checker result on this branch: 0 exports that can't be imported. Tag changes are applied in #3068.

Preview pages

I compared every guide and reference page in this PR's preview with #3067's. The only rendered change is the playbackType and type props now showing | (string & {}):

Breaking changes

MediaButtonElement and MediaUIElement (@videojs/html) are now generic over state types rather than a Core class. The maintainer accepted this for RC.

// before
class PlayButtonElement extends MediaButtonElement<PlayButtonCore> {}
// after
class PlayButtonElement extends MediaButtonElement<PlayButtonState, MediaPlaybackState> {}

Third-party elements that extend MediaButtonElement or MediaUIElement with a Core type argument need the new parameters: the component's state type and the player state it reads. A subclass that omits them still compiles, but gets the ButtonState and object defaults. Nothing changes at runtime.

EventType, EventListenerFor and QueriedElement are removed from @videojs/utils/dom. Utils is internal, and nothing in the repo used them outside html-media-adapter.ts.

Testing

  • pnpm build:packages, pnpm typecheck, pnpm lint, pnpm check:workspace
  • Package tests: react 605 (including the client-boundaries test), html 479, media 154, hlsjs-video 238
  • pnpm -F site check:api-stability: 0 exports that can't be imported

🤖 Generated with Claude Code

https://claude.ai/code/session_01WLkDiofiR86hzNgRopBotH


Note

Medium Risk
Wide type-surface and breaking generic changes on HTML base classes; runtime behavior is unchanged except MediaError re-export, but consumers extending MediaButtonElement must update type parameters.

Overview
Makes every stable type importable from @videojs/react and @videojs/html (plus media adapter entry points), satisfying the API stability checker from the earlier stack PRs. Apart from exporting MediaError as a value, changes are type-only.

The framework package roots gain large type-only re-exports of core component *State/*Props/option types, i18n types, and @videojs/media contracts. Each define/media/* and React media/* entry re-exports adapter types (e.g. HlsJsAdapter, YouTubeSource) from the underlying adapter packages.

Component APIs stop referencing *Core classes in public signatures. React and HTML elements use standalone types like PlayButtonState and CorePlayButtonProps instead of PlayButtonCore.State / PlayButtonCore.Props. HTML MediaButtonElement and MediaUIElement are now generic over component state and media state (breaking for subclasses that passed a Core class). Several framework-only members are marked @internal.

Supporting type refactors: MergedConfig replaces Simplify/UnionToIntersection for union player config; MediaStreamType, MediaReadyStateValue, and hls.js PlaybackType/SourceType become explicit literal unions (still allowing arbitrary strings where noted); DOM helper types QueriedElement/EventType/EventListenerFor move into html-media-adapter.ts and are dropped from @videojs/utils/dom; skin elements annotate static styles explicitly.

Reviewed by Cursor Bugbot for commit e65a3c7. Bugbot is set up for automated code reviews on this repo. Configure here.

- Name core's standalone state and props types (`PlayButtonState`,
  `PlayButtonProps` imported as `CorePlayButtonProps`, …) in React props
  interfaces, part namespaces, contexts, and HTML elements instead of
  `*Core.State` / `*Core.Props`, so no public signature names a `*Core`
  class. `Menu.Root` and the popover/tooltip elements spell out the
  `Omit<…, 'boundary'>` aliases core keeps private.
- Parameterize `MediaButtonElement` and `MediaUIElement` by component
  state and media state instead of the core class; the core-typed `core`
  member stays protected. Button elements now extend
  `MediaButtonElement<PlayButtonState, MediaPlaybackState>` and so on.
- Re-export core's `TimeSliderChapterState` from React rather than
  aliasing it.
- Mark `MenuContextValue.core` and `TooltipOptions.group` `@internal`:
  both carry a core instance only framework parts supply or read.

Type-only: no runtime behaviour changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WLkDiofiR86hzNgRopBotH
- Spell out `PlayerElementConstructor`'s constructor type instead of
  `Constructor` from `@videojs/utils/types`.
- Merge feature configs in `UnionPlayerConfig` and
  `UnionPlayerHtmlConfig` with a local `MergedConfig` helper instead of
  `Simplify<UnionToIntersection<…>>`.
- Move `EventType`, `EventListenerFor`, and `QueriedElement` from
  `@videojs/utils/dom` into the HTML media adapter, their only user, as
  local types.
- Annotate the preset skins' `static styles` as `CSSStyleSheet | string`
  rather than inferring `ShadowStyle`.
- Type `StatusIndicatorState.status` as `IndicatorStatus | null` instead
  of deriving it from `deriveStatus`, which resolves to the same type.

Type-only: no runtime behaviour changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WLkDiofiR86hzNgRopBotH
Each `@videojs/react/media/<name>` and `@videojs/html/media/<name>` entry
now re-exports, type-only, the adapter types its media's props name:
the adapter props, source and engine config types, and, for embeds whose
event props type `currentTarget` as the adapter, the adapter class and
its player API types. Mux entries re-export the Mux source and adapter
props types for their engine flavor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WLkDiofiR86hzNgRopBotH
Re-export, type-only, the core and media types that stable components,
elements, selectors, and predicates name, so each can be imported from
`@videojs/react` or `@videojs/html`:

- component state, props, option, and enum types from `@videojs/core`
  (`PlayButtonState`, `SliderState`, `PopoverSide`, `TransitionStatus`,
  …) and `TextParams`, `TranslationKey`, `TranslationOptions` from
  `@videojs/core/i18n`;
- media state, capability, event, and track types from `@videojs/media`
  (`MediaPlaybackState`, `MediaVolumeCapability`, `MediaTextTrack`,
  `CommonMedia`, `MediaResolution`, …).

`@videojs/html` exports the full set. `@videojs/react` leaves out the
names its own components already use: the core `*Props` it extends under
the same name (`PlayButtonProps`, `GestureProps`, `ThumbnailImageProps`,
…), `SliderPreviewProps` (`Slider.PreviewProps`), the `Text` type (the
`Text` component), and media's `Video` interface (the `Video` component
of `@videojs/react/video`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WLkDiofiR86hzNgRopBotH
@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
v10-sandbox Ready Ready Preview Oct 1, 2026 9:16pm UTC

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
@videojs/cdn

pnpm add https://pkg.pr.new/@videojs/cdn@3082

@videojs/cli

pnpm add https://pkg.pr.new/@videojs/cli@3082

@videojs/core

pnpm add https://pkg.pr.new/@videojs/core@3082

@videojs/element

pnpm add https://pkg.pr.new/@videojs/element@3082

@videojs/html

pnpm add https://pkg.pr.new/@videojs/html@3082

@videojs/media

pnpm add https://pkg.pr.new/@videojs/media@3082

@videojs/react

pnpm add https://pkg.pr.new/@videojs/react@3082

@videojs/spf

pnpm add https://pkg.pr.new/@videojs/spf@3082

@videojs/store

pnpm add https://pkg.pr.new/@videojs/store@3082

@videojs/utils

pnpm add https://pkg.pr.new/@videojs/utils@3082

@videojs/cloudflare-video

pnpm add https://pkg.pr.new/@videojs/cloudflare-video@3082

@videojs/dash-video

pnpm add https://pkg.pr.new/@videojs/dash-video@3082

@videojs/hlsjs-video

pnpm add https://pkg.pr.new/@videojs/hlsjs-video@3082

@videojs/mux-audio

pnpm add https://pkg.pr.new/@videojs/mux-audio@3082

@videojs/mux-video

pnpm add https://pkg.pr.new/@videojs/mux-video@3082

@videojs/native-hls-video

pnpm add https://pkg.pr.new/@videojs/native-hls-video@3082

@videojs/shaka-video

pnpm add https://pkg.pr.new/@videojs/shaka-video@3082

@videojs/spotify-audio

pnpm add https://pkg.pr.new/@videojs/spotify-audio@3082

@videojs/tiktok-video

pnpm add https://pkg.pr.new/@videojs/tiktok-video@3082

@videojs/twitch-video

pnpm add https://pkg.pr.new/@videojs/twitch-video@3082

@videojs/vimeo-video

pnpm add https://pkg.pr.new/@videojs/vimeo-video@3082

@videojs/wistia-video

pnpm add https://pkg.pr.new/@videojs/wistia-video@3082

@videojs/youtube-video

pnpm add https://pkg.pr.new/@videojs/youtube-video@3082

@videojs/google-cast

pnpm add https://pkg.pr.new/@videojs/google-cast@3082

@videojs/mux-data

pnpm add https://pkg.pr.new/@videojs/mux-data@3082

commit: 2f9a72c

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

🎨 @videojs/html — 27 small size changes
Path Base initial PR initial Initial diff Lazy diff
/video/compat-skin 62.40 kB 62.38 kB -28 B (-0.0%) 0 B
/video/neutral-skin 63.28 kB 63.35 kB +72 B (+0.1%) 0 B
/video/skin 62.92 kB 62.96 kB +45 B (+0.1%) 0 B
/audio/compat-skin 53.92 kB 53.99 kB +79 B (+0.1%) 0 B
/audio/neutral-skin 47.06 kB 47.08 kB +24 B (+0.0%) 0 B
/audio/skin 46.78 kB 46.80 kB +20 B (+0.0%) 0 B
/live-video/compat-skin 53.70 kB 53.71 kB +4 B (+0.0%) 0 B
/live-video/neutral-skin 50.90 kB 50.96 kB +62 B (+0.1%) 0 B
/live-video/skin 50.90 kB 50.87 kB -28 B (-0.1%) 0 B
/live-audio/compat-skin 40.87 kB 40.92 kB +54 B (+0.1%) 0 B
/live-audio/neutral-skin 36.28 kB 36.30 kB +21 B (+0.1%) 0 B
/live-audio/skin 36.21 kB 36.20 kB -16 B (-0.0%) 0 B
/ui/airplay-button 11.57 kB 11.57 kB -2 B (-0.0%) 0 B
/ui/captions-button 11.83 kB 11.80 kB -28 B (-0.2%) 0 B
/ui/cast-button 11.56 kB 11.54 kB -20 B (-0.2%) 0 B
/ui/fullscreen-button 11.57 kB 11.55 kB -21 B (-0.2%) 0 B
/ui/mute-button 11.59 kB 11.58 kB -14 B (-0.1%) 0 B
/ui/pip-button 11.54 kB 11.53 kB -16 B (-0.1%) 0 B
/ui/play-button 11.53 kB 11.51 kB -29 B (-0.2%) 0 B
/ui/playback-rate-button 11.63 kB 11.62 kB -5 B (-0.0%) 0 B
/ui/seek-button 11.58 kB 11.55 kB -27 B (-0.2%) 0 B
/video (default) 65.26 kB 65.17 kB -92 B (-0.1%) 0 B
/video (default + hls) 67.12 kB 67.02 kB -98 B (-0.1%) 0 B
/video (neutral) 65.75 kB 65.64 kB -110 B (-0.2%) 0 B
/video (neutral + hls) 67.52 kB 67.39 kB -130 B (-0.2%) 0 B
/audio (default) 49.09 kB 49.10 kB +8 B (+0.0%) 0 B
/audio (neutral) 49.45 kB 49.41 kB -40 B (-0.1%) 0 B
Presets (7)
Entry Initial Lazy
/video (default) 65.17 kB 56.03 kB
/video (default + hls) 67.02 kB 56.03 kB
/video (neutral) 65.64 kB 56.03 kB
/video (neutral + hls) 67.39 kB 56.03 kB
/audio (default) 49.10 kB 56.03 kB
/audio (neutral) 49.41 kB 56.03 kB
/background 12.76 kB 56.03 kB
Media (18)
Entry Initial
/media/mux-video 3.03 kB
/media/mux-audio 2.71 kB
/media/background-video 1.17 kB
/media/cloudflare-video 2.91 kB
/media/dash-video 2.63 kB
/media/hls-audio 23.54 kB
/media/hls-background-video 17.56 kB
/media/hls-video 33.95 kB
/media/hlsjs-video 2.64 kB
/media/mux-background-video 17.58 kB
/media/native-hls-video 7.54 kB
/media/shaka-video 2.64 kB
/media/spotify-audio 3.03 kB
/media/tiktok-video 3.14 kB
/media/twitch-video 2.94 kB
/media/vimeo-video 2.92 kB
/media/wistia-video 615 B
/media/youtube-video 2.91 kB
Players (5)
Entry Initial Lazy
/video/player 10.85 kB 56.03 kB
/audio/player 7.05 kB 56.03 kB
/background/player 5.34 kB 56.03 kB
/live-video/player 10.23 kB 56.03 kB
/live-audio/player 7.06 kB 56.03 kB
Skins (41)
Entry Type Initial Lazy
/video/compat-skin.css css 7.48 kB —
/video/neutral-skin.css css 8.33 kB —
/video/skin.css css 8.05 kB —
/video/compat-skin js 62.38 kB 56.03 kB
/video/compat-skin2 js 7.45 kB —
/video/neutral-skin js 63.35 kB 56.03 kB
/video/neutral-skin2 js 8.32 kB —
/video/skin js 62.96 kB 56.03 kB
/video/skin2 js 8.02 kB —
/audio/compat-skin.css css 6.13 kB —
/audio/neutral-skin.css css 6.07 kB —
/audio/skin.css css 5.80 kB —
/audio/compat-skin js 53.99 kB 56.03 kB
/audio/compat-skin2 js 6.13 kB —
/audio/neutral-skin js 47.08 kB 56.03 kB
/audio/neutral-skin2 js 6.05 kB —
/audio/skin js 46.80 kB 56.03 kB
/audio/skin2 js 5.78 kB —
/background/skin.css css 141 B —
/background/skin js 10.18 kB 56.03 kB
/background/skin2 js 159 B —
/live-video/compat-skin.css css 6.92 kB —
/live-video/neutral-skin.css css 6.82 kB —
/live-video/skin.css css 6.72 kB —
/live-video/compat-skin js 53.71 kB 56.03 kB
/live-video/compat-skin2 js 6.91 kB —
/live-video/neutral-skin js 50.96 kB 56.03 kB
/live-video/neutral-skin2 js 6.82 kB —
/live-video/skin js 50.87 kB 56.03 kB
/live-video/skin2 js 6.72 kB —
/live-audio/compat-skin.css css 5.63 kB —
/live-audio/neutral-skin.css css 4.77 kB —
/live-audio/skin.css css 4.67 kB —
/live-audio/compat-skin js 40.92 kB 56.03 kB
/live-audio/compat-skin2 js 5.64 kB —
/live-audio/neutral-skin js 36.30 kB 56.03 kB
/live-audio/neutral-skin2 js 4.77 kB —
/live-audio/skin js 36.20 kB 56.03 kB
/live-audio/skin2 js 4.66 kB —
/global.css css 239 B —
/shadow.css css 78 B —
UI Components (62)
Entry Initial Lazy
/ui/airplay-button 11.57 kB 56.03 kB
/ui/alert-dialog 8.99 kB 56.03 kB
/ui/audio-track-radio-group 11.68 kB 56.03 kB
/ui/buffering-indicator 8.91 kB 56.03 kB
/ui/captions-button 11.80 kB 56.03 kB
/ui/captions-radio-group 11.73 kB 56.03 kB
/ui/cast-button 11.54 kB 56.03 kB
/ui/container 9.79 kB 56.03 kB
/ui/controls 9.10 kB 56.03 kB
/ui/controls-backdrop 1.69 kB 56.03 kB
/ui/controls-content 1.67 kB 56.03 kB
/ui/dialog 8.92 kB 56.03 kB
/ui/dialog-backdrop 1.70 kB 56.03 kB
/ui/dialog-close 2.06 kB 56.03 kB
/ui/dialog-description 1.69 kB 56.03 kB
/ui/dialog-popup 1.90 kB 56.03 kB
/ui/dialog-title 1.69 kB 56.03 kB
/ui/error-dialog 12.69 kB 56.03 kB
/ui/fullscreen-button 11.55 kB 56.03 kB
/ui/gesture 10.01 kB 56.03 kB
/ui/hotkey 10.40 kB 56.03 kB
/ui/live-button 10.09 kB 56.03 kB
/ui/menu 19.25 kB 56.03 kB
/ui/menu-checkbox-item 1.97 kB 56.03 kB
/ui/menu-content 7.65 kB 56.03 kB
/ui/menu-group 2.09 kB 56.03 kB
/ui/menu-group-label 1.64 kB —
/ui/menu-item 2.29 kB 56.03 kB
/ui/menu-item-indicator 1.38 kB 56.03 kB
/ui/menu-radio-group 3.03 kB 56.03 kB
/ui/menu-radio-item 2.14 kB 56.03 kB
/ui/menu-separator 1.30 kB 56.03 kB
/ui/mute-button 11.58 kB 56.03 kB
/ui/pip-button 11.53 kB 56.03 kB
/ui/play-button 11.51 kB 56.03 kB
/ui/playback-rate-button 11.62 kB 56.03 kB
/ui/playback-rate-radio-group 11.69 kB 56.03 kB
/ui/popover 8.77 kB 56.03 kB
/ui/poster 9.21 kB 56.03 kB
/ui/quality-radio-group 12.18 kB 56.03 kB
/ui/seek-button 11.55 kB 56.03 kB
/ui/seek-indicator 13.39 kB 56.03 kB
/ui/seek-indicator-value 1.10 kB —
/ui/slider 11.94 kB 56.03 kB
/ui/slider-preview 2.01 kB 56.03 kB
/ui/status-announcer 10.94 kB 56.03 kB
/ui/status-indicator 13.34 kB 56.03 kB
/ui/status-indicator-value 1.10 kB —
/ui/thumbnail 10.64 kB 56.03 kB
/ui/time 11.36 kB 56.03 kB
/ui/time-slider 13.44 kB 56.03 kB
/ui/time-slider-chapter-title 9.10 kB 56.03 kB
/ui/time-slider-chapters 9.92 kB 56.03 kB
/ui/title 8.48 kB 56.03 kB
/ui/tooltip 10.15 kB 56.03 kB
/ui/tooltip-label 1.21 kB —
/ui/tooltip-shortcut 1.18 kB —
/ui/volume-indicator 13.31 kB 56.03 kB
/ui/volume-indicator-fill 1.11 kB —
/ui/volume-indicator-value 1.10 kB —
/ui/volume-popover 15.21 kB 56.03 kB
/ui/volume-slider 12.65 kB 56.03 kB
⚛️ @videojs/react — no changes
Presets (7)
Entry Initial Lazy
/video (default) 58.75 kB 56.03 kB
/video (default + hls) 59.36 kB 56.03 kB
/video (neutral) 58.80 kB 56.03 kB
/video (neutral + hls) 59.38 kB 56.03 kB
/audio (default) 45.78 kB 56.03 kB
/audio (neutral) 45.67 kB 56.03 kB
/background 921 B 56.03 kB
Media (22)
Entry Initial
/media/mux-video/hls-js 1.47 kB
/media/mux-video/spf 1.47 kB
/media/mux-audio/hls-js 1.15 kB
/media/mux-audio/spf 1.14 kB
/media/background-video 532 B
/media/cloudflare-video 1.88 kB
/media/dash-video 1.13 kB
/media/hls-audio 22.20 kB
/media/hls-background-video 17.60 kB
/media/hls-video 32.64 kB
/media/hlsjs-video 1.13 kB
/media/mux-audio 1.13 kB
/media/mux-background-video 17.63 kB
/media/mux-video 1.46 kB
/media/native-hls-video 6.19 kB
/media/shaka-video 1.13 kB
/media/spotify-audio 1.94 kB
/media/tiktok-video 1.88 kB
/media/twitch-video 1.89 kB
/media/vimeo-video 1.85 kB
/media/wistia-video 1.42 kB
/media/youtube-video 1.86 kB
Extensions (2)
Entry Initial
/extensions/google-cast 613 B
/extensions/mux-data 665 B
Players (5)
Entry Initial Lazy
/video/player 8.68 kB 56.03 kB
/audio/player 4.90 kB 56.03 kB
/background/player 3.16 kB 56.03 kB
/live-video/player 8.07 kB 56.03 kB
/live-audio/player 4.91 kB 56.03 kB
Skins (26)
Entry Type Initial Lazy
/video/compat-skin.css css 7.35 kB —
/video/neutral-skin.css css 8.16 kB —
/video/skin.css css 7.86 kB —
/video/compat-skin js 59.66 kB 56.03 kB
/video/neutral-skin js 58.66 kB 56.03 kB
/video/skin js 58.72 kB 56.03 kB
/audio/compat-skin.css css 5.97 kB —
/audio/neutral-skin.css css 5.89 kB —
/audio/skin.css css 5.60 kB —
/audio/compat-skin js 50.66 kB 56.03 kB
/audio/neutral-skin js 45.57 kB 56.03 kB
/audio/skin js 45.58 kB 56.03 kB
/background/skin.css css 97 B —
/background/skin js 516 B —
/live-video/compat-skin.css css 6.81 kB —
/live-video/neutral-skin.css css 6.65 kB —
/live-video/skin.css css 6.55 kB —
/live-video/compat-skin js 55.54 kB 56.03 kB
/live-video/neutral-skin js 48.55 kB 56.03 kB
/live-video/skin js 48.59 kB 56.03 kB
/live-audio/compat-skin.css css 5.48 kB —
/live-audio/neutral-skin.css css 4.58 kB —
/live-audio/skin.css css 4.47 kB —
/live-audio/compat-skin js 41.85 kB 56.03 kB
/live-audio/neutral-skin js 33.86 kB 56.03 kB
/live-audio/skin js 33.86 kB 56.03 kB
UI Components (39)
Entry Initial Lazy
/ui/airplay-button 11.28 kB 56.03 kB
/ui/alert-dialog 5.21 kB 56.03 kB
/ui/audio-track 8.40 kB 56.03 kB
/ui/audio-track-radio-group 10.74 kB 56.03 kB
/ui/buffering-indicator 8.45 kB 56.03 kB
/ui/captions-button 11.26 kB 56.03 kB
/ui/captions-radio-group 10.81 kB 56.03 kB
/ui/cast-button 11.27 kB 56.03 kB
/ui/controls 8.34 kB 56.03 kB
/ui/dialog 5.20 kB 56.03 kB
/ui/error-dialog 12.66 kB 56.03 kB
/ui/fullscreen-button 11.24 kB 56.03 kB
/ui/gesture 8.61 kB 56.03 kB
/ui/hotkey 9.03 kB 56.03 kB
/ui/live-button 9.58 kB 56.03 kB
/ui/menu 22.05 kB 56.03 kB
/ui/mute-button 11.28 kB 56.03 kB
/ui/pip-button 11.24 kB 56.03 kB
/ui/play-button 11.20 kB 56.03 kB
/ui/playback-rate 8.45 kB 56.03 kB
/ui/playback-rate-button 11.20 kB 56.03 kB
/ui/playback-rate-radio-group 10.81 kB 56.03 kB
/ui/popover 9.12 kB 56.03 kB
/ui/poster 8.65 kB 56.03 kB
/ui/quality 8.82 kB 56.03 kB
/ui/quality-radio-group 11.15 kB 56.03 kB
/ui/seek-button 11.24 kB 56.03 kB
/ui/seek-indicator 13.12 kB 56.03 kB
/ui/slider 14.43 kB 56.03 kB
/ui/status-announcer 10.86 kB 56.03 kB
/ui/status-indicator 13.40 kB 56.03 kB
/ui/thumbnail 9.82 kB 56.03 kB
/ui/time 10.66 kB 56.03 kB
/ui/time-slider 16.18 kB 56.03 kB
/ui/title 7.93 kB 56.03 kB
/ui/tooltip 9.98 kB 56.03 kB
/ui/volume-indicator 13.43 kB 56.03 kB
/ui/volume-popover 15.58 kB 56.03 kB
/ui/volume-slider 13.02 kB 56.03 kB
🧩 @videojs/core — no changes
Entries (76)
Entry Initial Lazy
. 13.48 kB —
/dom 23.92 kB 56.03 kB
/vjsc 1.90 kB —
/i18n 3.21 kB 56.03 kB
/i18n/locales/all 33.91 kB —
/i18n/locales/ar 1.16 kB —
/i18n/locales/az 1.08 kB —
/i18n/locales/bg 1.29 kB —
/i18n/locales/bn 1.25 kB —
/i18n/locales/bs 1.02 kB —
/i18n/locales/ca 1.04 kB —
/i18n/locales/cs 1.10 kB —
/i18n/locales/cy 1.02 kB —
/i18n/locales/da 984 B —
/i18n/locales/de 1.06 kB —
/i18n/locales/el 1.42 kB —
/i18n/locales/en 801 B —
/i18n/locales/es 999 B —
/i18n/locales/et 1.02 kB —
/i18n/locales/eu 1.04 kB —
/i18n/locales/fa 1.21 kB —
/i18n/locales/fi 1.05 kB —
/i18n/locales/fr 1.01 kB —
/i18n/locales/gd 1.09 kB —
/i18n/locales/gl 1017 B —
/i18n/locales/he 1.10 kB —
/i18n/locales/hi 1.25 kB —
/i18n/locales/hr 1.05 kB —
/i18n/locales/hu 1.10 kB —
/i18n/locales/id 953 B —
/i18n/locales/it 1.01 kB —
/i18n/locales/ja 1.16 kB —
/i18n/locales/ko 1.08 kB —
/i18n/locales/lt 1.04 kB —
/i18n/locales/lv 1.09 kB —
/i18n/locales/mr 1.23 kB —
/i18n/locales/nb 990 B —
/i18n/locales/ne 1.23 kB —
/i18n/locales/nl 1.01 kB —
/i18n/locales/nn 983 B —
/i18n/locales/oc 1.05 kB —
/i18n/locales/pl 1.11 kB —
/i18n/locales/pt 1.02 kB —
/i18n/locales/pt-BR 1.02 kB —
/i18n/locales/pt-PT 1.02 kB —
/i18n/locales/ro 1.04 kB —
/i18n/locales/ru 1.36 kB —
/i18n/locales/sk 1.10 kB —
/i18n/locales/sl 1.04 kB —
/i18n/locales/sr 1.05 kB —
/i18n/locales/sv 1.01 kB —
/i18n/locales/te 1.29 kB —
/i18n/locales/th 1.20 kB —
/i18n/locales/tr 1.00 kB —
/i18n/locales/uk 1.37 kB —
/i18n/locales/vi 1.10 kB —
/i18n/locales/zh 1.01 kB —
/i18n/locales/zh-CN 1.01 kB —
/i18n/locales/zh-TW 1.02 kB —
/i18n/text/airplay 101 B —
/i18n/text/buttons 137 B —
/i18n/text/captions 93 B —
/i18n/text/cast 114 B —
/i18n/text/common 90 B —
/i18n/text/container 75 B —
/i18n/text/errors 285 B —
/i18n/text/fullscreen 98 B —
/i18n/text/live 126 B —
/i18n/text/menu 249 B —
/i18n/text/pip 101 B —
/i18n/text/playback 80 B —
/i18n/text/seek 105 B —
/i18n/text/slider 65 B —
/i18n/text/status 222 B —
/i18n/text/time 322 B —
/i18n/text/volume 133 B —
🏷️ @videojs/element — no changes
Entries (2)
Entry Initial
. 1.05 kB
/context 1.15 kB
📦 @videojs/store — no changes
Entries (3)
Entry Initial
. 1.85 kB
/html 703 B
/react 511 B
🔧 @videojs/utils — no changes
Entries (13)
Entry Initial
/array 271 B
/dom 5.25 kB
/events 320 B
/function 414 B
/i18n 249 B
/jwt 176 B
/object 535 B
/predicate 297 B
/percent 281 B
/string 239 B
/style 212 B
/time 1018 B
/number 199 B
📦 @videojs/cdn — no changes
📦 @videojs/cloudflare-video — no changes
📦 @videojs/dash-video — no changes
📦 @videojs/google-cast — no changes
📦 @videojs/hlsjs-video — no changes
📦 @videojs/media — no changes
Entries (3)
Entry Initial
. 3.22 kB
/dom 4.00 kB
/media-tracks 2.05 kB
📦 @videojs/mux — no changes
📦 @videojs/mux-audio — no changes
Entries (2)
Entry Initial
. 136.01 kB
/spf 22.76 kB
📦 @videojs/mux-data — no changes
📦 @videojs/mux-video — no changes
Entries (2)
Entry Initial
. 135.92 kB
/spf 32.99 kB
📦 @videojs/native-hls-video — no changes
📦 @videojs/shaka-video — no changes
📦 @videojs/spf — no changes
Entries (7)
Entry Initial
. 4.56 kB
/dom 7.85 kB
/hls 28.40 kB
/media-tracks 507 B
/hls-background-video 16.60 kB
/hls-audio 21.28 kB
/hls-video 31.73 kB
📦 @videojs/spotify-audio — no changes
📦 @videojs/tiktok-video — no changes
📦 @videojs/twitch-video — no changes
📦 @videojs/other — 1 small size change
Path Base initial PR initial Initial diff Lazy diff
video.js 74.33 kB 74.29 kB -41 B (-0.1%) 0 B
Entries (3)
Entry Initial Lazy
video.js 74.29 kB 56.03 kB
video.js/package.json 608 B —
video.js/errors 1.03 kB —
📦 @videojs/vimeo-video — no changes
📦 @videojs/wistia-video — no changes
Entries (2)
Entry Initial
. 1.91 kB
/helpers 1.76 kB
📦 @videojs/youtube-video — no changes

ℹ️ How to interpret

Each entry is independently bundled, minified, and brotli-compressed. Initial size includes its static import graph; lazy dynamic chunks are reported separately.

Entries are not additive because their dependency graphs overlap. Preset rows represent realistic combined bundles.

Changes of 300 B or less across initial, lazy, and total size are collapsed, not discarded.

Run pnpm size locally to check current initial sizes.

@decepulis decepulis changed the title refactor(react,html): make every stable type importable from the framework packages refactor(react,html)!: make every stable type importable from the framework packages Sep 30, 2026
…arthy-7ams8m-exports

# Conflicts:
#	packages/core/src/core/ui/status-indicator/core.ts
#	packages/html/src/ui/status-indicator/element.ts
#	packages/react/src/index.ts
#	packages/react/src/ui/airplay-button/component.tsx
#	packages/react/src/ui/audio-track-radio-group/component.tsx
#	packages/react/src/ui/audio-track/use-audio-track-options.ts
#	packages/react/src/ui/buffering-indicator/component.tsx
#	packages/react/src/ui/captions-button/component.tsx
#	packages/react/src/ui/captions-radio-group/component.tsx
#	packages/react/src/ui/captions-radio-group/use-captions-options.ts
#	packages/react/src/ui/cast-button/component.tsx
#	packages/react/src/ui/controls/backdrop.tsx
#	packages/react/src/ui/controls/content.tsx
#	packages/react/src/ui/controls/group.tsx
#	packages/react/src/ui/controls/root.tsx
#	packages/react/src/ui/dialog/backdrop.tsx
#	packages/react/src/ui/dialog/close.tsx
#	packages/react/src/ui/dialog/context.tsx
#	packages/react/src/ui/dialog/description.tsx
#	packages/react/src/ui/dialog/popup.tsx
#	packages/react/src/ui/dialog/title.tsx
#	packages/react/src/ui/dialog/trigger.tsx
#	packages/react/src/ui/error-dialog/close.tsx
#	packages/react/src/ui/error-dialog/description.tsx
#	packages/react/src/ui/error-dialog/title.tsx
#	packages/react/src/ui/fullscreen-button/component.tsx
#	packages/react/src/ui/live-button/component.tsx
#	packages/react/src/ui/menu/root.tsx
#	packages/react/src/ui/mute-button/component.tsx
#	packages/react/src/ui/pip-button/component.tsx
#	packages/react/src/ui/play-button/component.tsx
#	packages/react/src/ui/playback-rate-button/component.tsx
#	packages/react/src/ui/playback-rate-radio-group/component.tsx
#	packages/react/src/ui/popover/context.tsx
#	packages/react/src/ui/poster/image.tsx
#	packages/react/src/ui/poster/root.tsx
#	packages/react/src/ui/quality-radio-group/component.tsx
#	packages/react/src/ui/quality/use-quality-options.ts
#	packages/react/src/ui/seek-button/component.tsx
#	packages/react/src/ui/seek-indicator/context.tsx
#	packages/react/src/ui/seek-indicator/root.tsx
#	packages/react/src/ui/seek-indicator/value.tsx
#	packages/react/src/ui/slider/root.tsx
#	packages/react/src/ui/slider/thumbnail/root.tsx
#	packages/react/src/ui/status-announcer/component.tsx
#	packages/react/src/ui/status-indicator/context.tsx
#	packages/react/src/ui/status-indicator/root.tsx
#	packages/react/src/ui/status-indicator/value.tsx
#	packages/react/src/ui/thumbnail/context.tsx
#	packages/react/src/ui/thumbnail/image.tsx
#	packages/react/src/ui/thumbnail/root.tsx
#	packages/react/src/ui/time-slider/root.tsx
#	packages/react/src/ui/time/value.tsx
#	packages/react/src/ui/tooltip/context.tsx
#	packages/react/src/ui/volume-indicator/context.tsx
#	packages/react/src/ui/volume-indicator/fill.tsx
#	packages/react/src/ui/volume-indicator/root.tsx
#	packages/react/src/ui/volume-indicator/value.tsx
#	packages/react/src/ui/volume-popover/context.tsx
#	packages/react/src/ui/volume-popover/root.tsx
#	packages/react/src/ui/volume-slider/root.tsx
… types

MediaStreamType, MediaReadyStateValue, PlaybackType, and SourceType are now
literal unions instead of lookups into the MediaStreamTypes, MediaReadyState,
PlaybackTypes, and ContentTypes constants, so the framework packages no longer
re-export those constants as types that can't be used as values. PlaybackType
and SourceType keep accepting any string.

BREAKING CHANGE: `ContentTypes`, `PlaybackTypes`, `MediaReadyState`, and
`MediaStreamTypes` are no longer re-exported (type-only) from `@videojs/react`,
`@videojs/html`, or their hlsjs-video media entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WLkDiofiR86hzNgRopBotH
…t types

Every type a stable export reaches, including through mixin bases and local
helpers, is now importable from @videojs/react or @videojs/html: the adapter
classes and Mux adapter types from each /media/* entry, the media track and
engine adapter contracts and WithMediaTracks from the roots, and SliderInput
from @videojs/react. The #3064 status indicator types are re-exported from both
roots. DialogElementBaseOptions.core and .stateAttrMap are @internal, and
hls-background-video declares its lifecycle callbacks locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WLkDiofiR86hzNgRopBotH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WLkDiofiR86hzNgRopBotH
@netlify

netlify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit e65a3c7
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/6abecd0a2b2e530008b2491f
😎 Deploy Preview https://deploy-preview-3082--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vjs-registry ready!

Name Link
🔨 Latest commit e65a3c7
🔍 Latest deploy log https://app.netlify.com/projects/vjs-registry/deploys/6abecd0ad257920008de7672
😎 Deploy Preview https://deploy-preview-3082--vjs-registry.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@decepulis decepulis left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agent review (part of the stack review; see #3063 for method). pnpm typecheck passes at the top of the stack, every added root/entry export is export type, MergedConfig is structurally the same as Simplify<UnionToIntersection<…>>, the written-out unions match the constants they replaced, all nine MediaButtonElement subclasses pass matching <State, MediaState> args, 'use client' is present per module and absent from the barrels, and the @videojs/utils/dom removals have no remaining users.

One inline 🔴 (MediaError exported type-only although it's a class). Two things that follow from the #3063 heuristic comments rather than from this diff:

  • The root re-exports of core's ButtonOptions, DialogOptions, GestureOptions, HotkeyOptions, MenuOptions, PopoverOptions, TooltipOptions (and PopupGroup*, TransitionApi, TransitionElement that they drag in) exist only because the checker's companion heuristic marked them stable. Once that's fixed on #3063 these should come back out and be tagged @internal in #3068, since rahim's answer 6 keeps the create* controllers internal.
  • 🟣 Decision for rahim: the adapters' undocumented get engine() getters make the hand-written third-party typings stable and re-exported from the /media/* entries: YouTubePlayerApi, CloudflareStreamPlayerApi, SpotifyControllerApi / SpotifyPlaybackUpdateEvent. The media pages document source.engine.* options, not the engine getter. Tagging the getter @internal (the checker honours member tags) would keep them out of the stable set; keeping them means committing to those typings.

Description nits (no code change): the "removed type-only re-exports of ContentTypes/PlaybackTypes/MediaReadyState/MediaStreamTypes" bullet doesn't match the diff (no re-export of those names is removed; only the alias bodies changed and the constants are still exported from their packages), and StatusIndicatorState.status: IndicatorStatus | null is pre-existing. The real breaking changes are the MediaButtonElement/MediaUIElement generics and the three @videojs/utils/dom removals. Optional: MuxSourceBase.playback/poster/storyboard are typed with MuxPlaybackParams/MuxPosterParams/MuxStoryboardParams, which no package exports, so users can't name them from a framework entry; rahim accepted private helper types (G), but these look like contracts people will want to spell.


Generated by Claude Code

Comment thread packages/react/src/index.ts Resolved

Copy link
Copy Markdown
Collaborator Author

Resolving the 🟣 item in my review above: the adapter engine getters making YouTubePlayerApi, CloudflareStreamPlayerApi, SpotifyControllerApi and SpotifyPlaybackUpdateEvent stable and re-exported is accepted as-is. No change needed for it; the MediaError 🔴 and the *Options root re-exports (pending the #3063 heuristic fix) still stand.


Generated by Claude Code

…arthy-7ams8m-exports

# Conflicts:
#	packages/html/src/presets/audio/minimal-skin.ts
#	packages/html/src/presets/live-audio/minimal-skin.ts
#	packages/html/src/presets/live-video/minimal-skin.ts
#	packages/html/src/presets/video/minimal-skin.ts
…arthy-7ams8m-exports

# Conflicts:
#	packages/react/src/ui/seek-indicator/root.tsx
@decepulis
decepulis merged commit 53e5ce9 into main Oct 1, 2026
14 of 16 checks passed
@decepulis
decepulis deleted the claude/keen-mccarthy-7ams8m-exports branch October 1, 2026 21:17

This branch was successfully deployed

1 active deployment
Preview — e65a3c74 Deployed Oct 1, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants