@appquality/unguess-design-system 3.1.91-alpha-marks → 3.1.91-highlighted-obs

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/build/index.js CHANGED
@@ -4053,14 +4053,13 @@ const Rect = styled.styled.div `
4053
4053
  border-radius: 4px;
4054
4054
  }
4055
4055
  color: white;
4056
+ ${({ isFocused }) => isFocused && activeBookMark}
4056
4057
  ${({ isActive }) => isActive && activeBookMark}
4057
-
4058
4058
  transition: width 0.1s ease;
4059
4059
  `;
4060
4060
  const StyledTooltip$1 = styled.styled(Tooltip) `
4061
4061
  margin-bottom: ${({ theme }) => theme.space.sm};
4062
4062
  color: ${({ tooltipColor }) => tooltipColor};
4063
-
4064
4063
  `;
4065
4064
  const Grabber = (props) => {
4066
4065
  const { observation } = props;
@@ -4087,7 +4086,7 @@ const Bookmark = (props) => {
4087
4086
  }
4088
4087
  if (start > videoEnd || start < videoStart)
4089
4088
  return null;
4090
- return (jsxRuntime.jsx(StyledTooltip$1, Object.assign({ content: tooltipContent, type: "light", size: "large", isTransparent: true }, { children: jsxRuntime.jsxs(Rect, Object.assign({ isActive: activeBookmark && activeBookmark.id === props.id, hue: hue, style: {
4089
+ return (jsxRuntime.jsx(StyledTooltip$1, Object.assign({ content: tooltipContent, type: "light", size: "large", isTransparent: true }, { children: jsxRuntime.jsxs(Rect, Object.assign({ isFocused: props.isFocused, isActive: activeBookmark && activeBookmark.id === props.id, hue: hue, style: {
4091
4090
  left: `${((start - videoStart) / duration) * 100}%`,
4092
4091
  width: `${((end - start) / duration) * 100}%`,
4093
4092
  }, onClick: props.onClick }, { children: [jsxRuntime.jsx(Grabber, { observation: props }), jsxRuntime.jsx(Grabber, { isEnd: true, observation: props })] })) })));
@@ -4512,6 +4511,9 @@ const Controls = ({ container, onCutHandler, bookmarks, isCutting, onBookMarkUpd
4512
4511
  const { context, setCurrentTime } = Video.useVideoContext();
4513
4512
  const debouncedMark = useDebounce(updatedMark, 500);
4514
4513
  const { reset, isGrabbing, activeBookmark, fromEnd } = useProgressContext();
4514
+ React.useEffect(() => {
4515
+ setMarks(bookmarks);
4516
+ }, [bookmarks]);
4515
4517
  const relCurrentTime = ((_a = context.player) === null || _a === void 0 ? void 0 : _a.currentTime)
4516
4518
  ? ((_b = context.player) === null || _b === void 0 ? void 0 : _b.currentTime) - context.part.start
4517
4519
  : 0;
@@ -5601,9 +5603,11 @@ const StyledWord = styled__default["default"](reactTypography.Span) `
5601
5603
  ${({ observation, theme }) => {
5602
5604
  var _a, _b;
5603
5605
  return observation &&
5604
- ` user-select: none;
5605
- background-color: ${(_a = observation.hue) !== null && _a !== void 0 ? _a : getColor(theme.palette.azure, 700, undefined, 0.5)};
5606
- color: ${(_b = observation.color) !== null && _b !== void 0 ? _b : "white"};
5606
+ `font-weight: ${observation.isFocused && 500};
5607
+ background-color: ${observation.isFocused
5608
+ ? getColor(theme.palette.yellow, 300)
5609
+ : (_a = observation.hue) !== null && _a !== void 0 ? _a : getColor(theme.palette.azure, 700, undefined, 0.5)};
5610
+ color: ${observation.isFocused ? "black" : (_b = observation.color) !== null && _b !== void 0 ? _b : "white"};
5607
5611
  box-sizing: border-box;
5608
5612
  &:focus {
5609
5613
  outline: none;
@@ -23,6 +23,8 @@ export interface IBookmark {
23
23
  tooltipContent?: ReactNode;
24
24
  onClick?: () => void;
25
25
  tags?: VideoTag[];
26
+ isFocused?: boolean;
27
+ isActive?: boolean;
26
28
  }
27
29
  export interface WrapperProps {
28
30
  isPlaying?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "3.1.91-alpha-marks",
3
+ "version": "3.1.91-highlighted-obs",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",