@rxdrag/website-lib-core 0.0.93 → 0.0.95

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rxdrag/website-lib-core",
3
- "version": "0.0.93",
3
+ "version": "0.0.95",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.ts"
@@ -24,8 +24,8 @@
24
24
  "@types/react-dom": "^19.1.0",
25
25
  "eslint": "^7.32.0",
26
26
  "typescript": "^5",
27
- "@rxdrag/eslint-config-custom": "0.2.12",
28
27
  "@rxdrag/slate-preview": "1.2.61",
28
+ "@rxdrag/eslint-config-custom": "0.2.12",
29
29
  "@rxdrag/tsconfig": "0.2.0"
30
30
  },
31
31
  "dependencies": {
@@ -1,4 +1,10 @@
1
- import React, { useCallback, useEffect, useRef, useState, forwardRef } from "react";
1
+ import React, {
2
+ useCallback,
3
+ useEffect,
4
+ useRef,
5
+ useState,
6
+ forwardRef,
7
+ } from "react";
2
8
  import Hls from "hls.js";
3
9
  import type { Media } from "@rxdrag/rxcms-models";
4
10
  import { ReactModalTrigger } from "./ReactModalTrigger";
@@ -19,15 +25,18 @@ export type VideoPlayerClassNames = {
19
25
  overlayReplayButton?: string;
20
26
  };
21
27
 
22
- export const ReactVideoPlayer = forwardRef<HTMLDivElement, {
23
- endTitle?: string;
24
- media: Media;
25
- posterUrl?: string;
26
- classNames?: VideoPlayerClassNames;
27
- callToAction?: string;
28
- onToggleSelect?: (id: ID) => void;
29
- designMode?: boolean;
30
- }>((props, ref) => {
28
+ export const ReactVideoPlayer = forwardRef<
29
+ HTMLDivElement,
30
+ {
31
+ endTitle?: string;
32
+ media: Media;
33
+ posterUrl?: string;
34
+ classNames?: VideoPlayerClassNames;
35
+ callToAction?: string;
36
+ onToggleSelect?: (id: ID) => void;
37
+ designMode?: boolean;
38
+ }
39
+ >((props, ref) => {
31
40
  const {
32
41
  endTitle,
33
42
  media,
@@ -142,7 +151,10 @@ export const ReactVideoPlayer = forwardRef<HTMLDivElement, {
142
151
  return (
143
152
  <div
144
153
  ref={ref}
145
- className={clsx("relative w-full aspect-video rounded-2xl", classNames?.container)}
154
+ className={clsx(
155
+ "relative w-full aspect-video rounded-2xl",
156
+ classNames?.container
157
+ )}
146
158
  onClick={handleContainerClick}
147
159
  {...rest}
148
160
  >
@@ -151,7 +163,10 @@ export const ReactVideoPlayer = forwardRef<HTMLDivElement, {
151
163
  onClick={(e) => !designMode && e.stopPropagation()}
152
164
  preload="metadata"
153
165
  poster={posterUrl ?? media.file?.thumbnail}
154
- className={clsx("w-full h-full rounded-lg object-cover", classNames?.video)}
166
+ className={clsx(
167
+ "w-full h-full rounded-lg object-cover",
168
+ classNames?.video
169
+ )}
155
170
  controls={!designMode}
156
171
  >
157
172
  {!media.storageType && media.file?.original ? (
@@ -171,20 +186,23 @@ export const ReactVideoPlayer = forwardRef<HTMLDivElement, {
171
186
  >
172
187
  <div
173
188
  className={clsx(
174
- "flex items-center justify-center size-[80px] lg:size-[130px] bg-white/15 rounded-full backdrop-blur-sm hover:shadow-md transition-all duration-300 hover:scale-110 group",
189
+ "flex items-center justify-center w-[80px] h-[80px] lg:w-[130px] lg:h-[130px] bg-white/15 rounded-full backdrop-blur-sm hover:shadow-md transition-all duration-300 hover:scale-110 group",
175
190
  classNames?.playButtonOuter
176
191
  )}
177
192
  >
178
193
  <div
179
194
  className={clsx(
180
- "size-[50px] lg:size-[90px] bg-white relative overflow-hidden rounded-full",
195
+ "w-[50px] h-[50px] lg:w-[90px] lg:h-[90px] bg-white relative overflow-hidden rounded-full",
181
196
  classNames?.playButtonInner
182
197
  )}
183
198
  >
184
199
  <div className="absolute inset-0 cross-gradient box-shadow-1">
185
200
  <div className="w-full h-full flex items-center justify-center">
186
201
  <svg
187
- className={clsx("size-5 lg:size-8 text-gray-700", classNames?.playIcon)}
202
+ className={clsx(
203
+ "size-5 lg:size-8 text-gray-700",
204
+ classNames?.playIcon
205
+ )}
188
206
  viewBox="0 0 30 32"
189
207
  fill="currentColor"
190
208
  xmlns="http://www.w3.org/2000/svg"