Conversation
Add CSS custom properties extraction to the API docs builder and
create reference pages for three new components.
Builder improvements:
- CSS vars extraction from {Name}CSSVars exports
- Non-local re-export filtering for domain variants
- Core-instantiation primary part detection
- Single-part fallback when filtering leaves only Root
- Framework-divergent parts (platforms.react/html)
Core restructuring:
- Move TimeSlider/VolumeSlider to own directories
- Create per-component CSS vars and data-attrs files
- Export usePopoverContext directly (not as a part)
Rendering:
- CSS custom properties table in ComponentReference
- FrameworkCase wrapping for multi-part blocks
- Framework-filtered TOC headings
Reference pages:
- TimeSlider: single-part, seek slider with buffer
- VolumeSlider: single-part, volume control
- Popover: multi-part with React-only parts
Closes #469, closes #470
Closes #682, closes #683, closes #684
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
📦 Bundle Size Report
Total: 53.79 kB · +42 B · +0.1% Entry BreakdownSubpath sizes are the additional bytes on top of the root entry point, measured by bundling root + subpath together and subtracting the root-only size.
|
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
. |
4.28 kB | 4.28 kB | +6 B | +0.1% | 🔺 |
./dom |
6.01 kB | 6.03 kB | +20 B | +0.3% | 🔺 |
| total | 10.28 kB | 10.31 kB | +26 B | +0.2% |
@videojs/element
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
. |
817 B | 817 B | 0 B | 0% | ✅ |
./context |
823 B | 823 B | 0 B | 0% | ✅ |
| total | 1.60 kB | 1.60 kB | 0 B | 0% |
@videojs/html
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
. |
15.20 kB | 15.18 kB | -16 B | -0.1% | 🔽 |
./video |
1.06 kB | 1.08 kB | +23 B | +2.1% | 🔺 |
./audio |
1.06 kB | 1.06 kB | +5 B | +0.5% | 🔺 |
./background |
1.05 kB | 1.07 kB | +24 B | +2.2% | 🔺 |
| total | 18.36 kB | 18.39 kB | +36 B | +0.2% |
@videojs/icons
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
./react |
2.27 kB | 2.27 kB | 0 B | 0% | ✅ |
./html |
1.52 kB | 1.52 kB | 0 B | 0% | ✅ |
| total | 3.79 kB | 3.79 kB | 0 B | 0% |
@videojs/store
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
. |
1.29 kB | 1.29 kB | 0 B | 0% | ✅ |
./html |
468 B | 468 B | 0 B | 0% | ✅ |
./react |
204 B | 204 B | 0 B | 0% | ✅ |
| total | 1.95 kB | 1.95 kB | 0 B | 0% |
@videojs/utils
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
./array |
104 B | 104 B | 0 B | 0% | ✅ |
./dom |
928 B | 928 B | 0 B | 0% | ✅ |
./events |
227 B | 227 B | 0 B | 0% | ✅ |
./function |
261 B | 261 B | 0 B | 0% | ✅ |
./object |
119 B | 119 B | 0 B | 0% | ✅ |
./predicate |
265 B | 265 B | 0 B | 0% | ✅ |
./string |
148 B | 148 B | 0 B | 0% | ✅ |
./style |
185 B | 185 B | 0 B | 0% | ✅ |
./time |
478 B | 478 B | 0 B | 0% | ✅ |
./number |
158 B | 158 B | 0 B | 0% | ✅ |
| total | 2.81 kB | 2.81 kB | 0 B | 0% |
ℹ️ How to interpret
Sizes are minified + brotli, measured with esbuild.
Package totals are computed as root size + marginal subpath costs.
Subpath marginal cost = (root + subpath bundled together) − root alone.
| Icon | Meaning |
|---|---|
| ✅ | No change |
| 🔺 | Increased ≤ 10% |
| 🔴 | Increased > 10% |
| 🔽 | Decreased |
| 🆕 | New (no baseline) |
Run pnpm size locally to check current sizes.
…emos The API docs builder now resolves re-exported parts back to their origin component to extract HTML element files, React JSDoc descriptions, and shared data attributes. Sub-parts that use stateAttrMap get the parent component's data attributes. Non-primary parts also get custom React-specific props extracted from their Props interface. Demos are improved with working popover HTML markup, mute button in volume slider examples, corrected CSS var usage (percentage-based --media-slider-fill), and new WithParts demos for time-slider and volume-slider showing sub-component composition.
Merged
decepulis
added a commit
that referenced
this pull request
Mar 3, 2026
- Remove unused BasicUsage demos for time-slider and volume-slider - Strip leading `--` from CSS var names in CSSVarRow ids - Fix dead anchor links in MDX styling sections - Add comments on usesDataAttrs heuristic and type stripping Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #469, closes #470, closes #682, closes #683, closes #684
Summary
Add CSS custom properties extraction to the API docs builder, create reference pages for TimeSlider, VolumeSlider, and Popover, and fix builder issues blocking generation of these three components. Adds framework-divergent part rendering (React-only parts hidden in HTML docs), re-export resolution for shared sub-parts, sub-part data attribute inheritance, and sub-part React props extraction.
Changes
API docs builder (
site/scripts/api-docs-builder/){Name}CSSVarsexports with JSDoc descriptionsstateAttrMapinherit the parent component's data attributesPropsinterfaceApiCSSVarsTableandCSSVarRowAstro components for rendering CSS custom properties tablescomponentReferenceModelupdated with CSS vars support and expanded testsCore (
packages/core/)core/ui/with per-component CSS vars and data-attrs filestime-slider-css-vars.tsandvolume-slider-css-vars.tsexportsReact (
packages/react/)usePopoverContextexported directly fromreact/index.tsinstead of as a component partReference pages
Demos
--media-slider-fillCSS var usage (percentage-based)Design doc & skill docs
internal/design/site/api-docs-builder.mdupdated with re-export resolution, sub-part data attribute inheritance, sub-part props extraction, and corrected intro paragraphbuilder-conventions.mdandmdx-structure.mdupdated with CSS vars and sub-part conventionsSite config
docs.config.tsupdated with new reference page entriesFuture work
anchor-nameto trigger elementImplementation details
Re-export resolution: When
index.parts.tsre-exports parts from another component (source path doesn't start with./), the builder resolves the re-export back to its origin, parses the origin'sindex.parts.ts, matches each re-exported name to the original local export, then derives the kebab segment and HTML element file from the origin component.Sub-part data attributes: A
usesDataAttrs()helper checks if a React file referencesstateAttrMap. When it does, the sub-part inherits the parent component's data attributes in the generated reference.Sub-part props extraction:
extractSubPartProps()walks syntactic own members of{localName}Propsinterfaces (excluding inheritedUIComponentPropsmembers andchildren) to extract custom React-specific props for non-primary parts.Testing
pnpm -F @videojs/core buildpassespnpm -F @videojs/core testpasses (7 pre-existing slider failures)pnpm -F @videojs/react buildpassespnpm -F site api-docsgenerates all 15 component JSONs correctlypnpm -F site test— all 368 tests pass