Commit Graph
50 Commits
Author SHA1 Message Date
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
77c2932b8d fix(media-store): replace tsup with rollup for consistent build tooling
- Remove tsup configuration and dependencies
- Add rollup configuration matching other packages in monorepo
- Use 'rollup -c && tsc --project tsconfig.build.json' build pattern
- Add tsconfig.build.json for declaration-only builds
- Install required rollup plugins (@rollup/plugin-typescript, node-resolve, commonjs)

This eliminates the need for manual dist file modifications by using the same
proven build approach as HTML/React packages. TypeScript now automatically
generates all .d.ts files in proper directory structure.

Fixes the fundamental build system inconsistency where media-store used different
tooling than the rest of the monorepo.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 07:59:56 -07:00
d8809c5abe fix(media-store): resolve TypeScript declaration generation build issues
- Switch from pure tsup to hybrid tsup + tsc approach for declaration generation
- Update build script to use 'tsup && tsc --emitDeclarationOnly'
- Disable tsup's DTS generation to avoid conflicts with TypeScript composite projects
- Ensure all component state definitions have proper .d.ts files generated
- Fix build pipeline that was requiring manual dist file modifications

This resolves the fundamental build system issue where TypeScript declarations
weren't being properly generated, eliminating the need for manual dist file edits.

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

Co-Authored-By: Claude <noreply@anthropic.com>
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
dad2fea986 refactor(html): update VolumeRange to use handleEvent pattern for consistency
Update HTML VolumeRange component to use the same generic handleEvent pattern
as PlayButton and MuteButton components for architectural consistency.

Changes:
- Replace specific handleInput() method with generic handleEvent(event: Event)
- Use event.type checking pattern consistent with other components
- Pass 'this' as EventListener instead of bound method reference
- Maintain exact same functionality while improving code consistency

This ensures all HTML media components follow the same event handling
pattern, making the codebase more maintainable and predictable.

🤖 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
1e12f66f16 feat(core): implement temporal state management for time-based media controls
Add temporal state mediator with currentTime, duration, and seekable properties
ported from media-chrome architecture. Includes proper input validation,
media event bindings, and seek request handling.

- Add temporal.ts state mediator with time-based functionality
- Update StateMediator type to include temporal properties
- Integrate temporal module into default media store
- Export temporal module from package index

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:50:03 -07:00
370762f500 feat(examples): configure separate default ports for React and HTML demos
- Set React demo to use port 5173 (Vite's default)
- Set HTML demo to use port 5174 to avoid conflicts
- Enable strictPort: false to allow automatic fallback to next available port
- Allow simultaneous development of both React and HTML demos
- Maintain existing development workflow while preventing port conflicts

This enables developers to run `npm run dev:react` and `npm run dev:html`
concurrently without manual port management.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:29:12 -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
7842a36658 refactor(react,html): implement hook-style component architecture for MuteButton
- Create shared state definitions for MuteButton in both React and HTML packages
- Refactor React MuteButton to use centralized state definition
- Refactor HTML MuteButton to use centralized state definition
- Replace useState/useEffect pattern with useMemo for better performance
- Consolidate state logic for better maintainability 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
882019f458 refactor(react,html): implement hook-style component architecture for MuteButton
React changes:
- Add muteButtonStateDef with keys, stateTransform, and requestMethods
- Refactor useMuteButtonState to use shallowEqual optimization
- Migrate from useMediaDispatch to useMediaStore pattern
- Create request methods factory for consistent state management
- Improve type safety and performance with optimized state selection

HTML changes:
- Rename MediaMuteButton class to MuteButtonBase for consistency
- Restructure event handling logic to match PlayButton pattern
- Add TODO comment for React vs. W.C. data-* attribute discrepancies
- Update component factory usage to use renamed base class

This completes the migration to hook-style architecture that can be
shared between HTML and React implementations, matching the PlayButton pattern.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:15:40 -07:00
115f181548 style(react-demo): clean up code formatting and video source organization
- Improve code formatting with consistent indentation
- Organize video source options with clearer commenting
- Remove trailing whitespace

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:15:40 -07:00
ad69b451e6 refactor(react): implement hook-style component architecture for PlayButton
- Add playButtonStateDef with keys, stateTransform, and requestMethods
- Refactor usePlayButtonState to use shallowEqual optimization
- Migrate from useMediaDispatch to useMediaStore pattern
- Create request methods factory for consistent state management
- Improve type safety and performance with optimized state selection

This continues the gradual migration to hook-style architecture that can be
shared between HTML and React implementations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:15:40 -07:00
8e75d62f62 feat(react-media-store): add shallowEqual utility for optimized state comparisons
- Add shallowEqual function with array-specific optimizations to MediaProvider
- Export refEquality function for external use
- Export shallowEqual from package index for consumers

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:15:40 -07:00
ad7aa79b61 refactor: standardize state property names across core, HTML, and React packages
Remove 'media' prefix from state mediator properties (mediaPaused -> paused, mediaMuted -> muted, etc.) and action types (mediaplayrequest -> playrequest) for cleaner, more consistent API across all platform implementations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:15:40 -07:00
Christian PillsburyandChristian Pillsbury 74dea64ddd refactor(html): implement hook-style component architecture for PlayButton and MuteButton (gradual migration to more shareable with React). 2025-09-08 17:15:40 -07:00
c54945fd58 WIP: refactor(html): implement hook-style component architecture for PlayButton and MuteButton
- Create generic toConnectedHTMLComponent factory with hooks pattern
- Implement usePlayButtonState/Props/Events hooks for state, attributes, and event handling
- Implement useMuteButtonState/Props/Events hooks for mute functionality
- Replace old connected/ components with new hook-style architecture
- Fix button interactivity by using MediaPlayButton/MediaMuteButton base classes
- Maintain backward compatibility through connected-with-defaults/ registration
- Components now mirror React hooks architecture with separated concerns

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:15:40 -07:00
38215df70b refactor(react): create shared component factory for reusable architecture
- Extract toConnectedComponent into shared utility with full TypeScript generics
- Create src/utils/component-factory.tsx with generic types:
  - StateHookFn, PropsHookFn, RenderFn for type safety
  - Generic toConnectedComponent factory function
  - ConnectedComponent type helper for inference
- Update PlayButton and MuteButton to use shared factory
- Remove duplicate toConnectedComponent implementations
- Add proper JSDoc documentation for the component factory pattern
- Fix TypeScript indexing issues with Record<string, any> typing
- Maintains full type safety while eliminating code duplication

This follows Adobe React Spectrum and Base UI architectural patterns for
maximum reusability and extensibility across components.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:15:40 -07:00
26998a1217 fix(react): implement proper HTML boolean data attributes for components
- Refactor PlayButton and MuteButton to use standard boolean attribute behavior
- Boolean data attributes now follow HTML conventions:
  - Present with empty string ("") when true
  - Completely absent when false
- Revert CSS to clean selectors that work with boolean attribute presence/absence
- Fixes PlayButton icon display issue where data-paused="false" was still present
- Ensures semantic consistency with native HTML boolean attributes
- Improves CSS maintainability with simpler attribute selectors

Before: data-paused="true"|"false" (always present)
After: data-paused="" (present) or absent (not in DOM)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:15:40 -07:00
910b999359 refactor(react): implement hooks-based PlayButton architecture
- Consolidate three PlayButton variants into single composable component
- Implement Adobe React Spectrum inspired hooks pattern:
  - usePlayButtonState: manages paused state and play/pause actions
  - usePlayButtonProps: handles accessibility and data attributes
  - renderPlayButton: pure render function with semantic markup
- Add Base UI inspired component factory with render prop support
- Remove connected/, ui/, and connected-with-defaults/ PlayButton variants
- Update MediaSkinDefault to use consolidated PlayButton component
- Provide full TypeScript support and accessibility features
- Follow separation of concerns with testable, reusable hooks

This architecture enables component customization while preserving behavior
consistency and follows modern React design patterns.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:15:40 -07:00
Christian PillsburyandChristian Pillsbury cfdbc4c552 refactor(react): Continue with component hooks rearchitecture. 2025-09-08 17:15:40 -07:00
Christian PillsburyandChristian Pillsbury ba8797cd21 refactor(react): consolidate MuteButton components into unified implementation
- Merge three separate MuteButton variants into single composable component
- Move from connected-with-defaults/MuteButton.tsx to components/MuteButton.tsx
- Remove connected/ and ui/ MuteButton variants to reduce code duplication
- Update MediaSkinDefault to use consolidated MuteButton component
- Implement composable pattern with hooks for state, props, and rendering
- Add temporary @ts-ignore for type compatibility during refactoring
2025-09-08 17:15:40 -07:00
3fd26eb654 fix(media-store): resolve TypeScript error in dispatch method
- Add proper type predicate to filter for FacadeProp objects
- Use type assertion for setter calls to handle generic state objects
- Improve type safety by replacing 'any' types with proper interfaces
- Fix TS2345 error: "Argument of type 'number | boolean' is not assignable to parameter of type 'never'"
- Maintain runtime flexibility while preserving compile-time type checking

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-19 08:41:08 -07:00
4662dbcbb1 fix(media): use explicit exports to resolve React package TypeScript errors
- Change from `export *` to explicit type/value exports in @vjs-10/media
- Resolves missing `createMediaStateOwner` export in React components
- Fixes TS2305 errors in React Video components that import from @vjs-10/media
- Ensures proper TypeScript declaration generation for downstream packages

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-19 08:41:08 -07:00
Christian PillsburyandChristian Pillsbury 87105db6be fix: Clean up more typescript errors. 2025-08-19 08:41:08 -07:00
3cffb4d59a fix: refactor private fields to public with underscore convention
Resolves TypeScript TS4094 error "Property may not be private or protected"
in exported anonymous classes created by factory functions.

Changes:
- #mediaStore → _mediaStore (public with underscore convention)
- #mediaSlot → _mediaSlot (public with underscore convention)
- #handleMediaSlotChange → _handleMediaSlotChange (public with underscore)

The underscore prefix indicates internal/private usage by convention
while avoiding TypeScript restrictions on anonymous class exports.

Affected files:
- media-mute-button.ts: 5 field references updated
- media-play-button.ts: 5 field references updated
- media-container.ts: 10 field references updated

All HTML packages now build successfully without TS4094 errors.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-19 08:41:08 -07:00
e5f23ed2bb fix: resolve @open-wc/context-protocol module resolution issues
- Update TypeScript moduleResolution from "node" to "bundler" in base config
- Remove 5 @ts-ignore directives for context-protocol import resolution
- All HTML packages now import @open-wc/context-protocol without type errors
- Builds and type checking continue to work correctly
- Eliminates need for type suppression comments in critical components

Files affected:
- tsconfig.base.json: Updated module resolution strategy
- html-media-elements/src/media-provider.ts: Removed @ts-ignore
- html/src/media-provider.ts: Removed @ts-ignore
- html/src/media-container.ts: Removed @ts-ignore
- html/src/components/connected/media-play-button.ts: Removed @ts-ignore
- html/src/components/connected/media-mute-button.ts: Removed @ts-ignore

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-19 08:41:08 -07:00
7154b1e446 fix: resolve package dependency and TypeScript export issues
- Add missing dependency @vjs-10/playback-engine to @vjs-10/media package
- Add missing dependency @vjs-10/media to @vjs-10/react package
- Fix @vjs-10/playback-engine exports to use explicit type/value exports
- Resolves "Module has no exported member 'IBasePlaybackEngine'" errors
- All packages now build successfully and pass typecheck

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-19 08:41:08 -07:00
Christian PillsburyandGitHub 5b53faf84a Merge pull request #2 from muxinc/feat/shared-svg-icons
feat/shared svg icons
2025-08-13 14:27:47 -07:00
Christian PillsburyandClaude 6fcb18f1d2 feat(react-icons): implement SVGR-powered auto-generation with full styling support
Replace manually-coded React icon components with SVGR-generated ones from shared SVG assets.
This establishes a maintainable, single-source-of-truth system for icons across the monorepo.

## Key Changes

###  SVGR Integration
- Add @svgr/cli with custom configuration for React component generation
- Generate components from packages/core/icons/assets/ SVG files
- Implement custom templates with generation warnings and JSDoc @generated tags
- Replace manual src/icons/ with auto-generated src/generated-icons/

### 🎨 Complete Styling Support
- Add fill="currentColor" to all SVG source files in core package
- Configure replaceAttrValues to transform currentColor → {color} in React components
- Restore full color prop functionality (fill={color} on path elements)
- Maintain backwards compatibility with existing IconProps interface

### 📚 Developer Experience
- Add comprehensive README.md with usage examples and development workflow
- Include clear "DO NOT EDIT" warnings in all generated files
- Add .gitignore to exclude generated files from version control
- Provide detailed generation instructions and architecture explanation

### 🏗️ Build System Integration
- Update package.json scripts: npm run generate creates React components
- Integrate generation into build pipeline (npm run build runs generate first)
- Add SVGR dependencies: @svgr/cli, plugins, and babel-plugin-add-jsx-attribute
- Maintain existing rollup + TypeScript build chain

## Technical Implementation

- **Source**: SVG files in packages/core/icons/assets/ (single source of truth)
- **Generator**: SVGR v8 with custom TypeScript React templates
- **Output**: Auto-generated components in src/generated-icons/ with full JSDoc
- **Styling**: fill={color} props + currentColor inheritance for dynamic theming
- **Types**: Preserved IconProps interface with SVGAttributes<SVGElement> + color prop

## Verification

 Playwright testing confirms icons render correctly with proper colors
 All 5 icons (Play, Pause, VolumeHigh, VolumeLow, VolumeOff) generate successfully
 Color prop functionality verified (fill attribute updates dynamically)
 Build system integration working across full monorepo
 Backwards compatibility maintained with existing components

This implementation provides automatic React component generation while maintaining
full feature parity with the original manually-coded icons.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 14:26:00 -07:00
Christian PillsburyandClaude e0be58e094 feat(icons): implement shared SVG icon system across packages
- Create centralized SVG files in core icons package assets directory
- Add rollup-plugin-string to core icons for SVG file processing
- Export SVG_ICONS object from core package for cross-package sharing
- Refactor html-icons to import SVG strings from @vjs-10/icons
- Remove hardcoded SVG strings in favor of shared definitions
- Add TypeScript declarations for SVG imports

This establishes a foundation for sharing more code across the monorepo
while maintaining proper package boundaries and build system integration.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 14:06:51 -07:00
69670e8d71 fix(typescript): resolve declaration file generation for rollup packages (#1)
- Override composite project settings in tsconfig.build.json files
- Add "composite": false and "incremental": false to enable declaration emit
- Fix VS Code TypeScript errors for imports from @vjs-10/* packages
- Ensure proper .d.ts generation for all rollup-migrated packages

Resolves TypeScript import resolution issues like:
Module '"@vjs-10/react-icons"' has no exported member 'VolumeOffIcon'

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-13 13:47:36 -07:00
Christian PillsburyandClaude a5499b1931 feat(workspace): implement Turbo for build optimization and caching
- Add turbo.json with task pipeline configuration and dependency graph
- Update root package.json scripts to use Turbo commands for all tasks
- Add packageManager field required by Turbo
- Configure proper task dependencies (typecheck/dev depend on build)
- Enable intelligent caching for dramatic build performance improvements
- Add dev script filters for targeted example development

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 12:51:31 -07:00
Christian PillsburyandClaude b5dd496a9d refactor: migrate key packages from tsup to rollup for build consistency
Migrate icon packages and main platform packages to rollup while maintaining
tsup for simpler core packages:

Packages migrated to rollup:
- packages/core/icons - Core SVG icon definitions
- packages/html/html-icons - HTML-specific icon components
- packages/html/html - Main HTML package
- packages/react/react-icons - React icon components

Packages remaining on tsup:
- Core packages (media, media-store, playback-engine) - Simple TypeScript builds
- Helper packages (*-media-elements, *-media-store) - Working fine with tsup
- React Native packages - Per exclusion request

Benefits:
- Consistent build tooling across icon and platform packages
- Better asset handling capability for future SVG/CSS requirements
- Maintained simplicity for packages that don't need advanced features
- All packages build successfully with proper CommonJS/ESM outputs

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 12:42:55 -07:00
Christian PillsburyandClaude bc8adaa508 feat(react): enable automatic CSS injection for MediaSkinDefault component
- Configure rollup to inject CSS directly into JavaScript bundles instead of extracting to separate files
- Remove CSS export from package.json as styles are now auto-included
- Update react-demo to remove manual CSS import requirement
- Enable seamless component usage: import { MediaSkinDefault } from '@vjs-10/react' now automatically includes styles

This provides the expected developer experience for React component libraries where
importing a component automatically brings its required styles without manual CSS imports.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 12:28:29 -07:00
Christian PillsburyandClaude dce4f5cdaf refactor(react): replace tsup with rollup for proper CSS modules support
- Replace tsup build system with rollup + postcss for better CSS modules handling
- Add rollup.config.js with proper CSS modules configuration
- Add TypeScript build config (tsconfig.build.json) for declarations
- Add CSS modules type definitions (src/types.d.ts)
- Update react-demo to import CSS file alongside components
- Fix CSS injection issue where styles weren't being applied in development

The new build system properly processes CSS modules and generates hashed class names
while ensuring styles are correctly applied when importing MediaSkinDefault.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 12:23:56 -07:00
Christian PillsburyandClaude 191143b312 fix(workspace): correct build:libs command to use explicit package names
Replace glob patterns with explicit workspace package names in build:libs
script. npm workspace commands don't support glob patterns directly in
--workspace flags, causing build failures.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 11:31:48 -07:00
Christian PillsburyandClaude 19c85fc2f8 feat: migrate examples from prototype and add CSS modules support
- Migrate HTML and React demo applications from prototype to examples/ directory
- Add examples to workspace configuration with selective build support
- Update workspace scripts for library-only builds (build:libs) and example dev servers
- Fix React MediaProvider context conflicts by consolidating exports
- Add esbuild-css-modules-plugin for CSS modules support in React package
- Configure tsup for flattened output structure with CSS processing
- Update package exports and imports for new @vjs-10/* scoped packages

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 15:51:40 -07:00
Christian PillsburyandClaude 7403cc7281 feat: migrate entire monorepo from tsc to tsup for production builds
- Add tsup as build tool across all 15 packages for fast, optimized library building
- Generate dual CommonJS (.js) and ESM (.mjs) formats with proper package.json exports
- Add automatic TypeScript declaration files (.d.ts/.d.mts) for both formats
- Configure external dependencies to prevent bundling bloat in library packages
- Fix import paths to use proper package imports instead of relative paths
- Add source maps and clean build outputs optimized for library distribution
- Achieve 10-100x faster build performance compared to pure TypeScript compilation
- Support JSX/TSX compilation for React packages with CSS handling
- Maintain compatibility with existing TypeScript project references and monorepo structure

All packages now produce production-ready distributions compatible with both legacy and modern JavaScript environments.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 14:23:10 -07:00
Christian PillsburyandClaude 34e35f399b refactor: convert React Native packages to stubs and fix remaining build issues
- Convert @vjs-10/react-native packages to placeholder stubs for future implementation
- Move Video.tsx from @vjs-10/react-media-elements to @vjs-10/react package
- Fix React JSX compilation errors by changing jsx config from react-jsx to react
- Add React imports to all TSX files to resolve UMD global errors
- Remove React Native specific dependencies from package.json files
- Refactor @vjs-10/react-media-elements to export VideoElement/AudioElement with placeholders
- All packages now build successfully with monorepo architecture intact

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 13:45:08 -07:00
Christian PillsburyandClaude 374db7afc0 fix: resolve TypeScript build errors across packages
- Fix core packages: @vjs-10/media-store export conflicts, @vjs-10/media interface compatibility
- Fix HTML packages: Add @ts-ignore for @open-wc/context-protocol module resolution and custom element constructor compatibility
- Fix React packages: Update imports to use monorepo packages, fix state type issues
- Add @ts-ignore comments for acceptable workarounds per user guidance
- Core architecture now compiles successfully with remaining placeholder package errors

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 13:26:42 -07:00
Christian PillsburyandClaude 4b472ec49c feat(monorepo): migrate prototype code to organized package structure
Migrate all prototype code from vjs10-prototype repository into the
monorepo structure following established dependency hierarchy and
package organization patterns.

Core packages migrated:
- @vjs-10/media-store: Complete media store with nanostores integration
- @vjs-10/playback-engine: HLS.js playback engine implementation
- @vjs-10/media: Core media state owner and interfaces

HTML packages migrated:
- @vjs-10/html-icons: Web component icons with proper base classes
- @vjs-10/html-media-elements: Context provider integration
- @vjs-10/html: Main HTML UI components, skins, and utilities

React packages migrated:
- @vjs-10/react-icons: React icon components
- @vjs-10/react-media-elements: Video component with state integration
- @vjs-10/react-media-store: MediaProvider and React hooks
- @vjs-10/react: Main React UI components and skins

Changes made:
- Updated all imports to use monorepo package names (@vjs-10/*)
- Distributed dependencies to specific packages that use them
- Preserved all prototype functionality and component structure
- Created proper index files for all packages
- Fixed workspace protocol usage for npm compatibility

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 13:17:46 -07:00
Christian Pillsbury fc5a0e46fd fix(workspace): convert pnpm workspace protocol to npm workspace syntax
Replace 'workspace:*' with '*' in all package.json dependencies to fix
  npm workspace compatibility. This resolves EUNSUPPORTEDPROTOCOL errors
  when running npm install.

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

  Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 11:06:35 -07:00
Christian PillsburyandClaude c6836ab85e fix(config): remove duplicate noImplicitReturns key in tsconfig.base.json
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 10:51:00 -07:00
Christian PillsburyandClaude 4b0d84e9c8 feat: initialize Video.js 10 monorepo with core architecture
- Set up monorepo structure with core, HTML, React, and React Native packages
- Add TypeScript configuration with project references
- Create foundational packages: media-store, playback-engine, media, icons
- Implement platform-specific packages for HTML, React, and React Native
- Add comprehensive documentation and development tooling
- Include CLAUDE.md with development guidelines and conventional commits

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 10:41:46 -07:00