Commit Graph
74 Commits
Author SHA1 Message Date
Christian PillsburyandGitHub 9c5b29a15b chore: consistent formatting (#47) 2025-10-09 12:18:31 -07:00
Wesley LuytenandGitHub 9c6eaef2aa feat: rename range to slider (#46) 2025-10-09 13:05:56 -05:00
Sam PottsandGitHub 3a0767c340 fix: design tweaks to toasted skin, lint rule tweaks (#44) 2025-10-09 10:21:18 +11:00
Wesley LuytenandGitHub 5cb93a14a7 fix: enable eslint & run eslint:fix (#43) 2025-10-08 17:52:02 -05:00
Wesley LuytenandGitHub 39e862a487 feat: add transition status to React tooltip (#42) 2025-10-08 16:26:06 -05:00
Wesley LuytenandGitHub d2a0b27272 feat: add HTML tooltip component (#40) 2025-10-07 16:22:05 -05:00
Wesley Luyten 49d0b03d89 fix: tooltip and popover portal
use id instead of ref for a more uniform api
across all components
2025-10-07 13:03:48 -05:00
Wesley LuytenandGitHub c4a3f1b2f6 feat: add React tooltip component (#35) 2025-10-07 12:31:26 -05:00
Sam PottsandGitHub cfac2fb18a chore: copy update to trigger a deploy (#39) 2025-10-07 16:27:02 +11:00
Sam PottsandGitHub 4ffaa58634 feat(ui): styling fixes for toasted skin (#38) 2025-10-06 13:16:49 +11:00
Sam PottsandGitHub bdd2f36e13 feat(ui): add toasted skin 2025-10-04 19:26:02 +10:00
Wesley Luyten 0a42bfe86d fix: React version mismatch, add forward refs 2025-10-02 15:03:39 -05:00
Wesley LuytenandGitHub f775a3daf7 feat: add popover React component (#33) 2025-10-02 11:03:44 -05:00
Wesley LuytenandGitHub 5e3cb8ad81 feat: add range orientation to react components (#30) 2025-09-26 17:57:21 -05:00
687b7655b0 feat: add core range, time and volume range (#23)
* feat: add poc for core time range class

* fix: use object keys instead of strings
for minification

* Update packages/react/react/src/components/TimeRange.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: cleanup and add time range core to html

* fix: add range core component, implement volume

* Update packages/core/core/src/utils/state.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/core/core/src/components/range.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-26 14:10:40 -05:00
Sam Potts 1ef66c9461 fix(ui): revert style testing change 2025-09-26 11:49:46 +10:00
Sam Potts 0afa9b7187 fix: skin exports/imports 2025-09-26 11:38:26 +10:00
Sam Potts f8fbe61c38 refactor: remove container radius from the skin 2025-09-26 11:38:26 +10:00
Wesley LuytenandGitHub a3f9630bd1 fix: seek jump back to current time (#22) 2025-09-23 15:26:45 -05:00
Wesley LuytenandGitHub aefe890fee feat: add volume range compound component (#19) 2025-09-23 11:07:47 -05:00
RahimandGitHub e3dcb6aba7 chore: gitignore cleanup (#21) 2025-09-23 23:32:00 +10:00
RahimandGitHub 6ad5340b40 chore: new builds & types using tsdown (#20) 2025-09-23 23:12:19 +10:00
Rahim 68666d0901 done 2025-09-23 00:57:47 +10:00
Rahim d2b2dd4868 done 2025-09-22 23:39:30 +10:00
Sam Potts d3221ec211 feat(ui): minor style tweaks 2025-09-22 09:30:10 +10:00
Sam Potts 9950945008 feat(ui): port over default skin 2025-09-21 13:37:14 +10:00
Wesley LuytenandGitHub 017ecdbff9 feat: add compound html timerange component (#14)
* fix: add context logic to component factory

* feat: add compound time range html component
2025-09-18 17:58:53 -05:00
Wesley LuytenandGitHub 71a8dafd74 feat: make time range compound component (#10)
* feat: make time range compound component

* fix: add root ctx, use skin styles

* fix: improve time range

* fix: move more logic to root component

* fix: renaming

* fix: dragging and add memo to context value

* fix: improve time range styles
2025-09-15 11:27:40 -05:00
597e79d7fc fix(time-display): clean up time utilities and simplify components
- Remove deprecated formatDuration function from time utils
- Simplify HTML current time display by removing template generation
- Use direct shadow DOM text content updates for better performance
- Remove unused imports from React current time display component
- Enable show-remaining by default in HTML skin
- Ensure consistent negative time formatting across platforms

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 15:59:15 -07:00
ab07a8a9a2 feat: add showRemaining functionality to current time display
Adds support for displaying remaining time (countdown) instead of elapsed time:

**HTML Component:**
- Add `show-remaining` attribute support with observedAttributes
- Implement attributeChangedCallback for reactive updates
- Display remaining time as `-{duration - currentTime}` when attribute present
- Maintain backward compatibility with default current time display

**React Component:**
- Add `showRemaining` prop with proper TypeScript typing
- Calculate and display remaining time in render function
- Destructure prop to avoid passing to DOM element
- Consistent `-{remaining}` format matching HTML component

**Usage:**
- HTML: `<media-current-time-display show-remaining></media-current-time-display>`
- React: `<CurrentTimeDisplay showRemaining />`

Both implementations include documentation comments and maintain
consistent behavior across platforms.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 15:59:15 -07:00
5aeeb6dde6 style: add visual styling to time display components
Adds consistent styling to duration and current time display components
across both HTML and React platforms:
- Semi-transparent dark background matching other UI components
- Monospace font for better time alignment
- Proper padding, borders, and text alignment
- Consistent color scheme with existing control bar elements

Both HTML and React skins now display time values with proper visual
styling that integrates seamlessly with the control bar design.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 15:59:15 -07:00
0746d400af refactor: rename formatDuration to formatDisplayTime
Renames the time formatting utility to be more generic since it's used for
both duration and currentTime display:
- Add formatDisplayTime as the primary function name
- Update all component references to use formatDisplayTime
- Keep formatDuration as deprecated alias for backward compatibility
- More semantic naming that reflects actual usage across components

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 15:59:15 -07:00
5bd0a154db feat: implement current time display components
Adds current time display functionality across HTML and React platforms:
- Core state definition for current time with duration support
- HTML component with shadow DOM and span rendering
- React component following hook-style architecture
- Integration into both HTML and React default skins
- Proper exports and component registration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 15:59:15 -07:00
6db4c3c4b8 refactor: move time formatting logic to platform components
Move time formatting responsibility from core component state definition
to platform-specific components for better separation of concerns:

- Core state definition now only provides raw duration value
- HTML component calls formatDuration() in _update() method
- React component calls formatDuration() in render function
- Maintains same functionality with cleaner architecture

This approach gives platforms more control over formatting and reduces
the responsibility of the core state abstraction.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 15:59:15 -07:00
2ed219158d feat(skins): integrate duration display into default skins
Add duration display components to both HTML and React default skins:
- HTML: Add media-duration-display element to control bar
- React: Add DurationDisplay component to MediaSkinDefault

Duration display appears between time range and mute button controls,
providing users with total media duration information in the default
player interface.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 15:59:15 -07:00
c5b659f449 feat(react): implement duration display component
Add React duration display component using VJS-10 hook-style patterns:
- Native React component using media store hooks
- Uses duration display state definition from media-store
- Minimal implementation rendering single span element
- Follows toConnectedComponent pattern for consistency

Component renders formatted duration (e.g., "4:32") without styling or
ARIA attributes, providing a clean foundation for duration display.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 15:59:15 -07:00
d0d487601e fix(icons): add currentColor fill to fullscreen icons for proper theming
The fullscreen enter/exit SVG icons were missing fill="currentColor"
attributes, causing them to render as black/invisible against dark
button backgrounds. This fix ensures proper theming support.

Also integrates fullscreen button into React default skin with
MediaContainer wrapper for complete out-of-the-box functionality.

- Fix fullscreen-enter.svg and fullscreen-exit.svg with currentColor fill
- Add MediaContainer wrapper to React MediaSkinDefault
- Add FullscreenButton to React control bar with proper icon states
- Add CSS for fullscreen button icon state management

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 08:06:08 -07:00
23e3876630 feat(react): add MediaContainer component for fullscreen functionality
Add MediaContainer component that provides fullscreen container registration
for React applications. Includes useMediaContainerRef hook for manual
element registration and MediaContainer wrapper component for convenience.

- Add MediaContainer.tsx with useMediaContainerRef hook and component
- Export MediaContainer and useMediaContainerRef from React package
- Clean up React demo to remove testing modifications

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 08:06:08 -07:00
7d819dfcd9 feat(react): add fullscreen button component
Implement React fullscreen button with native React patterns:
- useFullscreenButtonState hook for media store integration
- useFullscreenButtonProps hook for element attribute management
- renderFullscreenButton function for button rendering
- Connected component via toConnectedComponent factory
- Explicit enter/exit methods matching HTML implementation
- Proper accessibility and data attributes

Provides consistent fullscreen functionality across HTML and React
platforms using shared state definition from media-store.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 08:06:08 -07:00
2e99ba79ae refactor(media-store): add container state owner and rename event types
- Add container state owner to StateOwners type for fullscreen support
- Rename mediaelementchangerequest to mediastateownerchangerequest
- Add containerstateownerchangerequest event handling
- Refactor updateStateOwners to support multiple state owners
- Update all usage locations across HTML and React packages
- Validated with Playwright testing on both demo applications

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 08:06:08 -07:00
Christian PillsburyandChristian Pillsbury 517bb30678 chore: remove range css from skins for now. 2025-09-09 07:59:56 -07:00
Christian PillsburyandChristian Pillsbury bef0d42631 chore: Add todo code comments. 2025-09-09 07:59:56 -07:00
Christian PillsburyandChristian Pillsbury d239f416bd chore: Add todo code comments. 2025-09-09 07:59:56 -07:00
3540993534 chore: remove debug console.log statements and fix TypeScript declarations
- Remove console.log statements from temporal state mediator duration getter
- Remove console.log statements from React TimeRange onChange handler
- Fix TypeScript declaration file import paths (remove .ts extensions)
- Ensure all component state definitions have proper declaration files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 07:59:56 -07:00
c29fd2c2c1 feat(media-store,html,react): implement TimeRange component with hook-style architecture
- Add timeRangeStateDefinition in core media-store package for currentTime/duration state
- Create HTML TimeRange component using handleEvent pattern and <input type="range">
- Create React TimeRange component using render function pattern
- Update HTML and React skins to include TimeRange in control bars with proper styling
- TimeRange handles seek requests and displays current playback position
- Follow established architectural patterns from PlayButton/MuteButton/VolumeRange components

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 07:59:56 -07:00
75c6cb6bc3 refactor(react): restructure VolumeRange to use render function pattern
Refactor VolumeRange component to follow the same architectural pattern as
PlayButton and MuteButton components for consistency and maintainability.

Changes:
- Split component into useVolumeRangeState, useVolumeRangeProps, renderVolumeRange
- Use toConnectedComponent factory for consistent component creation
- Separate state management, props transformation, and rendering concerns
- Add proper TypeScript exports for all hooks and types
- Maintain existing functionality while improving code organization

This ensures architectural consistency across all React media components
and makes the codebase easier to maintain and extend.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 07:59:56 -07:00
2282f4799b feat(core,html,react): implement VolumeRange component with integrated state management
Add volume range slider component following established hook-style architecture.
Includes state synchronization improvements between volume and mute controls.

Core changes:
- Add volumeRangeStateDefinition with volume, muted, volumeLevel state
- Enhance audible state mediator with volume/mute coordination logic
- Export VolumeRange state definition from media-store

HTML component:
- Create media-volume-range web component using hook architecture
- Add native range input with accessibility attributes
- Integrate into default skin with styled slider

React component:
- Create VolumeRange component using useMediaSelector for state reactivity
- Fix state subscription to properly update slider thumb position
- Add CSS module styling matching HTML implementation

Bug fixes:
- Fix React VolumeRange thumb position updates with proper state subscription
- Improve mute button logic to use volumeLevel instead of muted state
- Add volume/mute state coordination (unmute sets volume, volume > 0 unmutes)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 07:59:56 -07:00
a1de5ebae3 refactor(react): consolidate Video component into single module
- Merge connected, connected-with-defaults, and media-elements Video components
- Create unified Video.tsx in main components directory alongside PlayButton/MuteButton
- Preserve all existing functionality: media store connection, custom components, defaults
- Maintain backwards compatibility with both Video and MediaElementVideo exports
- Remove duplicate component directories and reduce architectural complexity
- Simplify component structure while keeping TypeScript types and 'use client' directive

This consolidation reduces the Video component from 3 separate files across 3 directories
to a single, comprehensive module that's easier to understand and maintain.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:23:37 -07:00
e1d326ffaf refactor(core,react,html): migrate component state definitions to core media-store
- Move PlayButton and MuteButton state definitions from React/HTML packages to core media-store
- Create component-state-definitions directory in @vjs-10/media-store
- Update exports in media-store to include new state definitions
- Update all React and HTML components to import from @vjs-10/media-store
- Remove duplicate state definition files from React and HTML packages
- Establish single source of truth for component state logic in core package
- Fix TypeScript declaration generation for proper module resolution

This migration follows the monorepo architecture where core packages provide
foundation logic and platform packages consume it, eliminating code duplication
and ensuring consistent behavior across implementations.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:15:40 -07:00
14caea24d3 refactor(react,html): update PlayButton to use centralized state definitions
- Update React PlayButton to import from state-definitions/play-button
- Update HTML PlayButton to import from state-definitions/play-button
- Maintain consistency with MuteButton refactor pattern

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:15:40 -07:00