@aigamo/nostalgic-diva 1.15.2 → 1.15.3-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/components/AudioPlayer.d.ts +2 -2
  2. package/dist/components/DailymotionPlayer.d.ts +2 -2
  3. package/dist/components/NiconicoPlayer.d.ts +2 -2
  4. package/dist/components/NostalgicDiva.d.ts +1 -1
  5. package/dist/components/PlayerContainer.d.ts +2 -2
  6. package/dist/components/SoundCloudPlayer.d.ts +2 -2
  7. package/dist/components/TwitchPlayer.d.ts +2 -2
  8. package/dist/components/VimeoPlayer.d.ts +2 -2
  9. package/dist/components/YouTubePlayer.d.ts +2 -2
  10. package/dist/controllers/AudioPlayerController.d.ts +1 -1
  11. package/dist/controllers/DailymotionPlayerController.d.ts +1 -1
  12. package/dist/controllers/NiconicoPlayerController.d.ts +1 -1
  13. package/dist/controllers/NullPlayerController.d.ts +1 -1
  14. package/dist/controllers/PlayerController.d.ts +2 -2
  15. package/dist/controllers/PlayerControllerImpl.d.ts +2 -2
  16. package/dist/controllers/SoundCloudPlayerController.d.ts +1 -1
  17. package/dist/controllers/TwitchPlayerController.d.ts +1 -1
  18. package/dist/controllers/VimeoPlayerController.d.ts +1 -1
  19. package/dist/controllers/YouTubePlayerController.d.ts +1 -1
  20. package/dist/controllers/ensureScriptLoaded.d.ts +1 -1
  21. package/dist/services/AudioVideoService.d.ts +1 -1
  22. package/dist/services/DailymotionVideoService.d.ts +1 -1
  23. package/dist/services/NiconicoVideoService.d.ts +1 -1
  24. package/dist/services/SoundCloudVideoService.d.ts +1 -1
  25. package/dist/services/TwitchVideoService.d.ts +1 -1
  26. package/dist/services/VimeoVideoService.d.ts +1 -1
  27. package/dist/services/YouTubeVideoService.d.ts +1 -1
  28. package/dist/services/findVideoService.d.ts +7 -7
  29. package/package.json +82 -77
@@ -1,4 +1,4 @@
1
- import { PlayerProps } from '../components/PlayerContainer';
2
- import React, { ReactElement } from 'react';
1
+ import { PlayerProps } from './PlayerContainer';
2
+ import { default as React, ReactElement } from 'react';
3
3
  declare const AudioPlayer: React.MemoExoticComponent<({ ...props }: PlayerProps) => ReactElement>;
4
4
  export default AudioPlayer;
@@ -1,4 +1,4 @@
1
- import { PlayerProps } from '../components/PlayerContainer';
2
- import React, { ReactElement } from 'react';
1
+ import { PlayerProps } from './PlayerContainer';
2
+ import { default as React, ReactElement } from 'react';
3
3
  declare const DailymotionPlayer: React.MemoExoticComponent<({ options, ...props }: PlayerProps) => ReactElement>;
4
4
  export default DailymotionPlayer;
@@ -1,4 +1,4 @@
1
- import { PlayerProps } from '../components/PlayerContainer';
2
- import React, { ReactElement } from 'react';
1
+ import { PlayerProps } from './PlayerContainer';
2
+ import { default as React, ReactElement } from 'react';
3
3
  declare const NiconicoPlayer: React.MemoExoticComponent<({ ...props }: PlayerProps) => ReactElement>;
4
4
  export default NiconicoPlayer;
@@ -1,5 +1,5 @@
1
1
  import { IPlayerController, PlayerOptions } from '../controllers/PlayerController';
2
- import React, { ReactElement } from 'react';
2
+ import { default as React, ReactElement } from 'react';
3
3
  export interface NostalgicDivaProps {
4
4
  src: string;
5
5
  options?: PlayerOptions;
@@ -1,7 +1,7 @@
1
1
  import { ILogger } from '../controllers/Logger';
2
2
  import { IPlayerController, PlayerOptions, PlayerType } from '../controllers/PlayerController';
3
3
  import { PlayerControllerImpl } from '../controllers/PlayerControllerImpl';
4
- import React, { MutableRefObject, ReactElement, ReactNode } from 'react';
4
+ import { MutableRefObject, ReactElement, ReactNode } from 'react';
5
5
  export interface PlayerProps {
6
6
  logger: ILogger;
7
7
  type: PlayerType;
@@ -15,5 +15,5 @@ interface PlayerContainerProps<TElement extends HTMLElement, TPlayer extends obj
15
15
  controllerFactory: new (logger: ILogger, player: TPlayer, options: PlayerOptions | undefined) => TController;
16
16
  children: (elementRef: MutableRefObject<TElement>, videoId: string) => ReactNode;
17
17
  }
18
- export declare const PlayerContainer: <TElement extends HTMLElement, TPlayer extends object, TController extends PlayerControllerImpl<TPlayer>>({ logger, type, loadScript, playerFactory, onControllerChange, videoId, options, controllerFactory, children, }: PlayerContainerProps<TElement, TPlayer, TController>) => React.ReactElement<PlayerContainerProps<TElement, TPlayer, TController>, string | React.JSXElementConstructor<any>>;
18
+ export declare const PlayerContainer: <TElement extends HTMLElement, TPlayer extends object, TController extends PlayerControllerImpl<TPlayer>>({ logger, type, loadScript, playerFactory, onControllerChange, videoId, options, controllerFactory, children, }: PlayerContainerProps<TElement, TPlayer, TController>) => ReactElement<PlayerContainerProps<TElement, TPlayer, TController>>;
19
19
  export {};
@@ -1,4 +1,4 @@
1
- import { PlayerProps } from '../components/PlayerContainer';
2
- import React, { ReactElement } from 'react';
1
+ import { PlayerProps } from './PlayerContainer';
2
+ import { default as React, ReactElement } from 'react';
3
3
  declare const SoundCloudPlayer: React.MemoExoticComponent<({ ...props }: PlayerProps) => ReactElement>;
4
4
  export default SoundCloudPlayer;
@@ -1,4 +1,4 @@
1
- import { PlayerProps } from '../components/PlayerContainer';
2
- import React, { ReactElement } from 'react';
1
+ import { PlayerProps } from './PlayerContainer';
2
+ import { default as React, ReactElement } from 'react';
3
3
  declare const TwitchPlayer: React.MemoExoticComponent<({ ...props }: PlayerProps) => ReactElement>;
4
4
  export default TwitchPlayer;
@@ -1,4 +1,4 @@
1
- import { PlayerProps } from '../components/PlayerContainer';
2
- import React, { ReactElement } from 'react';
1
+ import { PlayerProps } from './PlayerContainer';
2
+ import { default as React, ReactElement } from 'react';
3
3
  declare const VimeoPlayer: React.MemoExoticComponent<({ ...props }: PlayerProps) => ReactElement>;
4
4
  export default VimeoPlayer;
@@ -1,4 +1,4 @@
1
- import { PlayerProps } from '../components/PlayerContainer';
2
- import React, { ReactElement } from 'react';
1
+ import { PlayerProps } from './PlayerContainer';
2
+ import { default as React, ReactElement } from 'react';
3
3
  declare const YouTubePlayer: React.MemoExoticComponent<({ ...props }: PlayerProps) => ReactElement>;
4
4
  export default YouTubePlayer;
@@ -1,4 +1,4 @@
1
- import { PlayerControllerImpl } from '../controllers/PlayerControllerImpl';
1
+ import { PlayerControllerImpl } from './PlayerControllerImpl';
2
2
  export declare class AudioPlayerController extends PlayerControllerImpl<HTMLAudioElement> {
3
3
  attach(): Promise<void>;
4
4
  detach(): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { PlayerControllerImpl } from '../controllers/PlayerControllerImpl';
1
+ import { PlayerControllerImpl } from './PlayerControllerImpl';
2
2
  export declare class DailymotionPlayerController extends PlayerControllerImpl<DM.player> {
3
3
  private handlePlayerEvents;
4
4
  attach(id: string): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { PlayerControllerImpl } from '../controllers/PlayerControllerImpl';
1
+ import { PlayerControllerImpl } from './PlayerControllerImpl';
2
2
  declare global {
3
3
  interface Window {
4
4
  onNicoPlayerFactoryReady: (callback: nico.NicoPlayerFactory) => void;
@@ -1,4 +1,4 @@
1
- import { IPlayerCommands, IPlayerController } from '../controllers/PlayerController';
1
+ import { IPlayerCommands, IPlayerController } from './PlayerController';
2
2
  declare class NullPlayerController implements IPlayerController {
3
3
  attach(): Promise<void>;
4
4
  detach(): Promise<void>;
@@ -1,5 +1,5 @@
1
- import { ILogger } from '../controllers/Logger';
2
- import { PlayerControllerImpl } from '../controllers/PlayerControllerImpl';
1
+ import { ILogger } from './Logger';
2
+ import { PlayerControllerImpl } from './PlayerControllerImpl';
3
3
  export declare enum PlayerType {
4
4
  'Audio' = "Audio",
5
5
  'Dailymotion' = "Dailymotion",
@@ -1,5 +1,5 @@
1
- import { ILogger } from '../controllers/Logger';
2
- import { IPlayerCommands, PlayerOptions } from '../controllers/PlayerController';
1
+ import { ILogger } from './Logger';
2
+ import { IPlayerCommands, PlayerOptions } from './PlayerController';
3
3
  export declare abstract class PlayerControllerImpl<TPlayer> implements Partial<IPlayerCommands> {
4
4
  protected readonly logger: ILogger;
5
5
  protected readonly player: TPlayer;
@@ -1,4 +1,4 @@
1
- import { PlayerControllerImpl } from '../controllers/PlayerControllerImpl';
1
+ import { PlayerControllerImpl } from './PlayerControllerImpl';
2
2
  export declare class SoundCloudPlayerController extends PlayerControllerImpl<SC.SoundCloudWidget> {
3
3
  private getDurationCore;
4
4
  attach(id: string): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { PlayerControllerImpl } from '../controllers/PlayerControllerImpl';
1
+ import { PlayerControllerImpl } from './PlayerControllerImpl';
2
2
  export declare class TwitchPlayerController extends PlayerControllerImpl<Twitch.Player> {
3
3
  private handleReady;
4
4
  private handlePlay;
@@ -1,4 +1,4 @@
1
- import { PlayerControllerImpl } from '../controllers/PlayerControllerImpl';
1
+ import { PlayerControllerImpl } from './PlayerControllerImpl';
2
2
  export declare class VimeoPlayerController extends PlayerControllerImpl<Vimeo.Player> {
3
3
  attach(): Promise<void>;
4
4
  detach(): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { PlayerControllerImpl } from '../controllers/PlayerControllerImpl';
1
+ import { PlayerControllerImpl } from './PlayerControllerImpl';
2
2
  declare global {
3
3
  interface Window {
4
4
  onYouTubeIframeAPIReady(): void;
@@ -1,2 +1,2 @@
1
- import { ILogger } from '../controllers/Logger';
1
+ import { ILogger } from './Logger';
2
2
  export declare function ensureScriptLoaded(url: string, logger: ILogger): Promise<boolean>;
@@ -1,5 +1,5 @@
1
1
  import { PlayerType } from '../controllers/PlayerController';
2
- import { VideoService } from '../services/VideoService';
2
+ import { VideoService } from './VideoService';
3
3
  export declare class AudioVideoService extends VideoService<PlayerType.Audio> {
4
4
  constructor();
5
5
  canPlay(url: string): boolean;
@@ -1,5 +1,5 @@
1
1
  import { PlayerType } from '../controllers/PlayerController';
2
- import { VideoService } from '../services/VideoService';
2
+ import { VideoService } from './VideoService';
3
3
  export declare class DailymotionVideoService extends VideoService<PlayerType.Dailymotion> {
4
4
  constructor();
5
5
  canPlay(url: string): boolean;
@@ -1,5 +1,5 @@
1
1
  import { PlayerType } from '../controllers/PlayerController';
2
- import { VideoService } from '../services/VideoService';
2
+ import { VideoService } from './VideoService';
3
3
  export declare class NiconicoVideoService extends VideoService<PlayerType.Niconico> {
4
4
  constructor();
5
5
  canPlay(url: string): boolean;
@@ -1,5 +1,5 @@
1
1
  import { PlayerType } from '../controllers/PlayerController';
2
- import { VideoService } from '../services/VideoService';
2
+ import { VideoService } from './VideoService';
3
3
  export declare class SoundCloudVideoService extends VideoService<PlayerType.SoundCloud> {
4
4
  constructor();
5
5
  canPlay(url: string): boolean;
@@ -1,5 +1,5 @@
1
1
  import { PlayerType } from '../controllers/PlayerController';
2
- import { VideoService } from '../services/VideoService';
2
+ import { VideoService } from './VideoService';
3
3
  export declare class TwitchVideoService extends VideoService<PlayerType.Twitch> {
4
4
  constructor();
5
5
  canPlay(url: string): boolean;
@@ -1,5 +1,5 @@
1
1
  import { PlayerType } from '../controllers/PlayerController';
2
- import { VideoService } from '../services/VideoService';
2
+ import { VideoService } from './VideoService';
3
3
  export declare class VimeoVideoService extends VideoService<PlayerType.Vimeo> {
4
4
  constructor();
5
5
  canPlay(url: string): boolean;
@@ -1,5 +1,5 @@
1
1
  import { PlayerType } from '../controllers/PlayerController';
2
- import { VideoService } from '../services/VideoService';
2
+ import { VideoService } from './VideoService';
3
3
  export declare class YouTubeVideoService extends VideoService<PlayerType.YouTube> {
4
4
  constructor();
5
5
  canPlay(url: string): boolean;
@@ -1,10 +1,10 @@
1
- import { AudioVideoService } from '../services/AudioVideoService';
2
- import { DailymotionVideoService } from '../services/DailymotionVideoService';
3
- import { NiconicoVideoService } from '../services/NiconicoVideoService';
4
- import { SoundCloudVideoService } from '../services/SoundCloudVideoService';
5
- import { TwitchVideoService } from '../services/TwitchVideoService';
6
- import { VimeoVideoService } from '../services/VimeoVideoService';
7
- import { YouTubeVideoService } from '../services/YouTubeVideoService';
1
+ import { AudioVideoService } from './AudioVideoService';
2
+ import { DailymotionVideoService } from './DailymotionVideoService';
3
+ import { NiconicoVideoService } from './NiconicoVideoService';
4
+ import { SoundCloudVideoService } from './SoundCloudVideoService';
5
+ import { TwitchVideoService } from './TwitchVideoService';
6
+ import { VimeoVideoService } from './VimeoVideoService';
7
+ import { YouTubeVideoService } from './YouTubeVideoService';
8
8
  declare const videoServices: readonly [AudioVideoService, DailymotionVideoService, NiconicoVideoService, SoundCloudVideoService, TwitchVideoService, VimeoVideoService, YouTubeVideoService];
9
9
  export declare function findVideoService(url: string): (typeof videoServices)[number] | undefined;
10
10
  export {};
package/package.json CHANGED
@@ -1,78 +1,83 @@
1
1
  {
2
- "name": "@aigamo/nostalgic-diva",
3
- "version": "1.15.2",
4
- "type": "module",
5
- "scripts": {
6
- "clean": "rimraf ./dist",
7
- "dev": "vite",
8
- "build": "npm run clean && tsc && vite build",
9
- "preview": "vite preview"
10
- },
11
- "devDependencies": {
12
- "@trivago/prettier-plugin-sort-imports": "^4.1.1",
13
- "@types/react": "^17.0.39",
14
- "@types/react-dom": "^17.0.11",
15
- "@typescript-eslint/eslint-plugin": "^5.43.0",
16
- "@typescript-eslint/parser": "^5.43.0",
17
- "@vitejs/plugin-react": "^4.0.0",
18
- "eslint": "^8.27.0",
19
- "eslint-config-prettier": "^8.5.0",
20
- "eslint-config-react-app": "^7.0.1",
21
- "eslint-plugin-flowtype": "^8.0.3",
22
- "eslint-plugin-import": "^2.26.0",
23
- "eslint-plugin-jsx-a11y": "^6.6.1",
24
- "eslint-plugin-prettier": "^4.2.1",
25
- "eslint-plugin-react": "^7.31.10",
26
- "eslint-plugin-react-hooks": "^4.6.0",
27
- "prettier": "^2.7.1",
28
- "react": "^17.0.2",
29
- "react-dom": "^17.0.2",
30
- "rimraf": "^3.0.2",
31
- "typescript": "^5.9.3",
32
- "vite": "^7.1.5",
33
- "vite-plugin-dts": "^2.3.0"
34
- },
35
- "peerDependencies": {
36
- "react": "^17 || ^18",
37
- "react-dom": "^17 || ^18"
38
- },
39
- "files": [
40
- "dist"
41
- ],
42
- "main": "./dist/index.cjs.js",
43
- "module": "./dist/index.es.js",
44
- "types": "./dist/index.d.ts",
45
- "exports": {
46
- ".": {
47
- "import": {
48
- "types": "./dist/index.d.ts",
49
- "default": "./dist/index.es.js"
50
- },
51
- "require": {
52
- "types": "./dist/index.d.ts",
53
- "default": "./dist/index.cjs.js"
54
- }
55
- }
56
- },
57
- "description": "React function components for imperatively controlling embedded players (audio, Niconico, SoundCloud and YouTube) using refs.",
58
- "license": "MIT",
59
- "repository": {
60
- "type": "git",
61
- "url": "git+https://github.com/ycanardeau/nostalgic-diva.git"
62
- },
63
- "keywords": [
64
- "react",
65
- "player",
66
- "audio",
67
- "dailymotion",
68
- "niconico",
69
- "soundcloud",
70
- "twitch",
71
- "vimeo",
72
- "youtube"
73
- ],
74
- "author": "Aigamo <51428094+ycanardeau@users.noreply.github.com>",
75
- "bugs": {
76
- "url": "https://github.com/ycanardeau/nostalgic-diva/issues"
77
- }
78
- }
2
+ "name": "@aigamo/nostalgic-diva",
3
+ "version": "1.15.3-rc.1",
4
+ "type": "module",
5
+ "devDependencies": {
6
+ "@eslint/compat": "^2.0.0",
7
+ "@eslint/eslintrc": "^3.3.1",
8
+ "@testing-library/jest-dom": "^6.9.1",
9
+ "@trivago/prettier-plugin-sort-imports": "^6.0.0",
10
+ "@types/node": "^24.10.1",
11
+ "@types/react": "^18.3.27",
12
+ "@types/react-dom": "^18.3.7",
13
+ "@typescript-eslint/eslint-plugin": "^8.48.0",
14
+ "@typescript-eslint/parser": "^8.48.0",
15
+ "@vitejs/plugin-react": "^5.1.1",
16
+ "eslint": "^9.39.1",
17
+ "eslint-config-prettier": "^10.1.8",
18
+ "eslint-config-react-app": "^7.0.1",
19
+ "eslint-plugin-flowtype": "^8.0.3",
20
+ "eslint-plugin-import": "^2.32.0",
21
+ "eslint-plugin-jsx-a11y": "^6.10.2",
22
+ "eslint-plugin-prettier": "^5.5.4",
23
+ "eslint-plugin-react": "^7.37.5",
24
+ "eslint-plugin-react-hooks": "^7.0.1",
25
+ "prettier": "^3.6.2",
26
+ "react": "^18.3.1",
27
+ "react-dom": "^18.3.1",
28
+ "rimraf": "^6.1.2",
29
+ "typescript": "^5.9.3",
30
+ "vite": "^7.2.4",
31
+ "vite-plugin-dts": "^4.5.4",
32
+ "vitest": "^4.0.14"
33
+ },
34
+ "peerDependencies": {
35
+ "react": "^17 || ^18",
36
+ "react-dom": "^17 || ^18"
37
+ },
38
+ "files": [
39
+ "dist"
40
+ ],
41
+ "main": "./dist/index.cjs.js",
42
+ "module": "./dist/index.es.js",
43
+ "types": "./dist/index.d.ts",
44
+ "exports": {
45
+ ".": {
46
+ "import": {
47
+ "types": "./dist/index.d.ts",
48
+ "default": "./dist/index.es.js"
49
+ },
50
+ "require": {
51
+ "types": "./dist/index.d.ts",
52
+ "default": "./dist/index.cjs.js"
53
+ }
54
+ }
55
+ },
56
+ "description": "React function components for imperatively controlling embedded players (audio, Niconico, SoundCloud and YouTube) using refs.",
57
+ "license": "MIT",
58
+ "repository": {
59
+ "type": "git",
60
+ "url": "git+https://github.com/ycanardeau/nostalgic-diva.git"
61
+ },
62
+ "keywords": [
63
+ "react",
64
+ "player",
65
+ "audio",
66
+ "dailymotion",
67
+ "niconico",
68
+ "soundcloud",
69
+ "twitch",
70
+ "vimeo",
71
+ "youtube"
72
+ ],
73
+ "author": "Aigamo <51428094+ycanardeau@users.noreply.github.com>",
74
+ "bugs": {
75
+ "url": "https://github.com/ycanardeau/nostalgic-diva/issues"
76
+ },
77
+ "scripts": {
78
+ "clean": "rimraf ./dist",
79
+ "dev": "vite",
80
+ "build": "pnpm clean && tsc && vite build",
81
+ "preview": "vite preview"
82
+ }
83
+ }